public final class SecurityScheme extends com.google.protobuf.GeneratedMessage implements SecuritySchemeOrBuilder
`SecurityScheme` is a representation of OpenAPI v2 specification's Security Scheme object. See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject Allows the definition of a security scheme that can be used by the operations. Supported schemes are basic authentication, an API key (either as a header or as a query parameter) and OAuth2's common flows (implicit, password, application and access code).Protobuf type
grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme
Modifier and Type | Class and Description |
---|---|
static class |
SecurityScheme.Builder
`SecurityScheme` is a representation of OpenAPI v2 specification's
Security Scheme object.
|
static class |
SecurityScheme.Flow
The flow used by the OAuth2 security scheme.
|
static class |
SecurityScheme.In
The location of the API key.
|
static class |
SecurityScheme.Type
The type of the security scheme.
|
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter
Modifier and Type | Field and Description |
---|---|
static int |
AUTHORIZATION_URL_FIELD_NUMBER |
static int |
DESCRIPTION_FIELD_NUMBER |
static int |
EXTENSIONS_FIELD_NUMBER |
static int |
FLOW_FIELD_NUMBER |
static int |
IN_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
SCOPES_FIELD_NUMBER |
static int |
TOKEN_URL_FIELD_NUMBER |
static int |
TYPE_FIELD_NUMBER |
Modifier and Type | Method and Description |
---|---|
boolean |
containsExtensions(java.lang.String key)
Custom properties that start with "x-" such as "x-foo" used to describe
extra functionality that is not covered by the standard OpenAPI Specification.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAuthorizationUrl()
The authorization URL to be used for this flow.
|
com.google.protobuf.ByteString |
getAuthorizationUrlBytes()
The authorization URL to be used for this flow.
|
static SecurityScheme |
getDefaultInstance() |
SecurityScheme |
getDefaultInstanceForType() |
java.lang.String |
getDescription()
A short description for security scheme.
|
com.google.protobuf.ByteString |
getDescriptionBytes()
A short description for security scheme.
|
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
java.util.Map<java.lang.String,com.google.protobuf.Value> |
getExtensions()
Deprecated.
|
int |
getExtensionsCount()
Custom properties that start with "x-" such as "x-foo" used to describe
extra functionality that is not covered by the standard OpenAPI Specification.
|
java.util.Map<java.lang.String,com.google.protobuf.Value> |
getExtensionsMap()
Custom properties that start with "x-" such as "x-foo" used to describe
extra functionality that is not covered by the standard OpenAPI Specification.
|
com.google.protobuf.Value |
getExtensionsOrDefault(java.lang.String key,
com.google.protobuf.Value defaultValue)
Custom properties that start with "x-" such as "x-foo" used to describe
extra functionality that is not covered by the standard OpenAPI Specification.
|
com.google.protobuf.Value |
getExtensionsOrThrow(java.lang.String key)
Custom properties that start with "x-" such as "x-foo" used to describe
extra functionality that is not covered by the standard OpenAPI Specification.
|
SecurityScheme.Flow |
getFlow()
The flow used by the OAuth2 security scheme.
|
int |
getFlowValue()
The flow used by the OAuth2 security scheme.
|
SecurityScheme.In |
getIn()
The location of the API key.
|
int |
getInValue()
The location of the API key.
|
java.lang.String |
getName()
The name of the header or query parameter to be used.
|
com.google.protobuf.ByteString |
getNameBytes()
The name of the header or query parameter to be used.
|
com.google.protobuf.Parser<SecurityScheme> |
getParserForType() |
Scopes |
getScopes()
The available scopes for the OAuth2 security scheme.
|
ScopesOrBuilder |
getScopesOrBuilder()
The available scopes for the OAuth2 security scheme.
|
int |
getSerializedSize() |
java.lang.String |
getTokenUrl()
The token URL to be used for this flow.
|
com.google.protobuf.ByteString |
getTokenUrlBytes()
The token URL to be used for this flow.
|
SecurityScheme.Type |
getType()
The type of the security scheme.
|
int |
getTypeValue()
The type of the security scheme.
|
int |
hashCode() |
boolean |
hasScopes()
The available scopes for the OAuth2 security scheme.
|
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapFieldReflectionAccessor |
internalGetMapFieldReflection(int number) |
boolean |
isInitialized() |
static SecurityScheme.Builder |
newBuilder() |
static SecurityScheme.Builder |
newBuilder(SecurityScheme prototype) |
SecurityScheme.Builder |
newBuilderForType() |
protected SecurityScheme.Builder |
newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) |
static SecurityScheme |
parseDelimitedFrom(java.io.InputStream input) |
static SecurityScheme |
parseDelimitedFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static SecurityScheme |
parseFrom(byte[] data) |
static SecurityScheme |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static SecurityScheme |
parseFrom(java.nio.ByteBuffer data) |
static SecurityScheme |
parseFrom(java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static SecurityScheme |
parseFrom(com.google.protobuf.ByteString data) |
static SecurityScheme |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static SecurityScheme |
parseFrom(com.google.protobuf.CodedInputStream input) |
static SecurityScheme |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static SecurityScheme |
parseFrom(java.io.InputStream input) |
static SecurityScheme |
parseFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<SecurityScheme> |
parser() |
SecurityScheme.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashFields, toString
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public static final int TYPE_FIELD_NUMBER
public static final int DESCRIPTION_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
public static final int IN_FIELD_NUMBER
public static final int FLOW_FIELD_NUMBER
public static final int AUTHORIZATION_URL_FIELD_NUMBER
public static final int TOKEN_URL_FIELD_NUMBER
public static final int SCOPES_FIELD_NUMBER
public static final int EXTENSIONS_FIELD_NUMBER
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
internalGetMapFieldReflection
in class com.google.protobuf.GeneratedMessage
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class com.google.protobuf.GeneratedMessage
public int getTypeValue()
The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2".
.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"];
getTypeValue
in interface SecuritySchemeOrBuilder
public SecurityScheme.Type getType()
The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2".
.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"];
getType
in interface SecuritySchemeOrBuilder
public java.lang.String getDescription()
A short description for security scheme.
string description = 2 [json_name = "description"];
getDescription
in interface SecuritySchemeOrBuilder
public com.google.protobuf.ByteString getDescriptionBytes()
A short description for security scheme.
string description = 2 [json_name = "description"];
getDescriptionBytes
in interface SecuritySchemeOrBuilder
public java.lang.String getName()
The name of the header or query parameter to be used. Valid for apiKey.
string name = 3 [json_name = "name"];
getName
in interface SecuritySchemeOrBuilder
public com.google.protobuf.ByteString getNameBytes()
The name of the header or query parameter to be used. Valid for apiKey.
string name = 3 [json_name = "name"];
getNameBytes
in interface SecuritySchemeOrBuilder
public int getInValue()
The location of the API key. Valid values are "query" or "header". Valid for apiKey.
.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"];
getInValue
in interface SecuritySchemeOrBuilder
public SecurityScheme.In getIn()
The location of the API key. Valid values are "query" or "header". Valid for apiKey.
.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"];
getIn
in interface SecuritySchemeOrBuilder
public int getFlowValue()
The flow used by the OAuth2 security scheme. Valid values are "implicit", "password", "application" or "accessCode". Valid for oauth2.
.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"];
getFlowValue
in interface SecuritySchemeOrBuilder
public SecurityScheme.Flow getFlow()
The flow used by the OAuth2 security scheme. Valid values are "implicit", "password", "application" or "accessCode". Valid for oauth2.
.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"];
getFlow
in interface SecuritySchemeOrBuilder
public java.lang.String getAuthorizationUrl()
The authorization URL to be used for this flow. This SHOULD be in the form of a URL. Valid for oauth2/implicit and oauth2/accessCode.
string authorization_url = 6 [json_name = "authorizationUrl"];
getAuthorizationUrl
in interface SecuritySchemeOrBuilder
public com.google.protobuf.ByteString getAuthorizationUrlBytes()
The authorization URL to be used for this flow. This SHOULD be in the form of a URL. Valid for oauth2/implicit and oauth2/accessCode.
string authorization_url = 6 [json_name = "authorizationUrl"];
getAuthorizationUrlBytes
in interface SecuritySchemeOrBuilder
public java.lang.String getTokenUrl()
The token URL to be used for this flow. This SHOULD be in the form of a URL. Valid for oauth2/password, oauth2/application and oauth2/accessCode.
string token_url = 7 [json_name = "tokenUrl"];
getTokenUrl
in interface SecuritySchemeOrBuilder
public com.google.protobuf.ByteString getTokenUrlBytes()
The token URL to be used for this flow. This SHOULD be in the form of a URL. Valid for oauth2/password, oauth2/application and oauth2/accessCode.
string token_url = 7 [json_name = "tokenUrl"];
getTokenUrlBytes
in interface SecuritySchemeOrBuilder
public boolean hasScopes()
The available scopes for the OAuth2 security scheme. Valid for oauth2.
.grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"];
hasScopes
in interface SecuritySchemeOrBuilder
public Scopes getScopes()
The available scopes for the OAuth2 security scheme. Valid for oauth2.
.grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"];
getScopes
in interface SecuritySchemeOrBuilder
public ScopesOrBuilder getScopesOrBuilder()
The available scopes for the OAuth2 security scheme. Valid for oauth2.
.grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"];
getScopesOrBuilder
in interface SecuritySchemeOrBuilder
public int getExtensionsCount()
SecuritySchemeOrBuilder
Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/
map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"];
getExtensionsCount
in interface SecuritySchemeOrBuilder
public boolean containsExtensions(java.lang.String key)
Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/
map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"];
containsExtensions
in interface SecuritySchemeOrBuilder
@Deprecated public java.util.Map<java.lang.String,com.google.protobuf.Value> getExtensions()
getExtensionsMap()
instead.getExtensions
in interface SecuritySchemeOrBuilder
public java.util.Map<java.lang.String,com.google.protobuf.Value> getExtensionsMap()
Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/
map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"];
getExtensionsMap
in interface SecuritySchemeOrBuilder
public com.google.protobuf.Value getExtensionsOrDefault(java.lang.String key, com.google.protobuf.Value defaultValue)
Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/
map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"];
getExtensionsOrDefault
in interface SecuritySchemeOrBuilder
public com.google.protobuf.Value getExtensionsOrThrow(java.lang.String key)
Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/
map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"];
getExtensionsOrThrow
in interface SecuritySchemeOrBuilder
public final boolean isInitialized()
isInitialized
in interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
in class com.google.protobuf.GeneratedMessage
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException
writeTo
in interface com.google.protobuf.MessageLite
writeTo
in class com.google.protobuf.GeneratedMessage
java.io.IOException
public int getSerializedSize()
getSerializedSize
in interface com.google.protobuf.MessageLite
getSerializedSize
in class com.google.protobuf.GeneratedMessage
public boolean equals(java.lang.Object obj)
equals
in interface com.google.protobuf.Message
equals
in class com.google.protobuf.AbstractMessage
public int hashCode()
hashCode
in interface com.google.protobuf.Message
hashCode
in class com.google.protobuf.AbstractMessage
public static SecurityScheme parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static SecurityScheme parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static SecurityScheme parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static SecurityScheme parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static SecurityScheme parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static SecurityScheme parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static SecurityScheme parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static SecurityScheme parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static SecurityScheme parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static SecurityScheme parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static SecurityScheme parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
java.io.IOException
public static SecurityScheme parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public SecurityScheme.Builder newBuilderForType()
newBuilderForType
in interface com.google.protobuf.Message
newBuilderForType
in interface com.google.protobuf.MessageLite
public static SecurityScheme.Builder newBuilder()
public static SecurityScheme.Builder newBuilder(SecurityScheme prototype)
public SecurityScheme.Builder toBuilder()
toBuilder
in interface com.google.protobuf.Message
toBuilder
in interface com.google.protobuf.MessageLite
protected SecurityScheme.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
newBuilderForType
in class com.google.protobuf.AbstractMessage
public static SecurityScheme getDefaultInstance()
public static com.google.protobuf.Parser<SecurityScheme> parser()
public com.google.protobuf.Parser<SecurityScheme> getParserForType()
getParserForType
in interface com.google.protobuf.Message
getParserForType
in interface com.google.protobuf.MessageLite
getParserForType
in class com.google.protobuf.GeneratedMessage
public SecurityScheme getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder