Adapt API to OpenApiObject removal
[netconf.git] / restconf / restconf-openapi / src / main / java / org / opendaylight / restconf / openapi / model / security / Http.java
1 /*
2  * Copyright (c) 2023 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.restconf.openapi.model.security;
9
10 import static java.util.Objects.requireNonNull;
11
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.eclipse.jdt.annotation.Nullable;
14
15 public record Http(
16         @NonNull String scheme,
17         @Nullable String description,
18         @Nullable String bearerFormat) implements SecuritySchemeObject {
19     private static final Type TYPE = Type.http;
20
21     public Http {
22         requireNonNull(scheme);
23     }
24
25     @Override
26     public Type type() {
27         return TYPE;
28     }
29
30     @Override
31     public String toString() {
32         return "Http[type=" + TYPE
33             + ", scheme=" + scheme
34             + ", description=" + description
35             + ", bearerFormat=" + bearerFormat + "]";
36     }
37 }