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, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashFields, toStringaddAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic 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.GeneratedMessageprotected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessagepublic 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 SecuritySchemeOrBuilderpublic 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 SecuritySchemeOrBuilderpublic java.lang.String getDescription()
A short description for security scheme.
string description = 2 [json_name = "description"];getDescription in interface SecuritySchemeOrBuilderpublic com.google.protobuf.ByteString getDescriptionBytes()
A short description for security scheme.
string description = 2 [json_name = "description"];getDescriptionBytes in interface SecuritySchemeOrBuilderpublic 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 SecuritySchemeOrBuilderpublic 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 SecuritySchemeOrBuilderpublic 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 SecuritySchemeOrBuilderpublic 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 SecuritySchemeOrBuilderpublic 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 SecuritySchemeOrBuilderpublic 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 SecuritySchemeOrBuilderpublic 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 SecuritySchemeOrBuilderpublic 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 SecuritySchemeOrBuilderpublic 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 SecuritySchemeOrBuilderpublic 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 SecuritySchemeOrBuilderpublic 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 SecuritySchemeOrBuilderpublic 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 SecuritySchemeOrBuilderpublic 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 SecuritySchemeOrBuilderpublic int getExtensionsCount()
SecuritySchemeOrBuilderCustom 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 SecuritySchemeOrBuilderpublic 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 SecuritySchemeOrBuilderpublic 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 SecuritySchemeOrBuilderpublic 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 SecuritySchemeOrBuilderpublic 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 SecuritySchemeOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessagepublic void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessagejava.io.IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessagepublic boolean equals(java.lang.Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static SecurityScheme parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static SecurityScheme parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static SecurityScheme parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static SecurityScheme parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static SecurityScheme parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static SecurityScheme parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static SecurityScheme parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static SecurityScheme parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static SecurityScheme parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static SecurityScheme parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static SecurityScheme parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
java.io.IOExceptionpublic static SecurityScheme parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic SecurityScheme.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static SecurityScheme.Builder newBuilder()
public static SecurityScheme.Builder newBuilder(SecurityScheme prototype)
public SecurityScheme.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected SecurityScheme.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
newBuilderForType in class com.google.protobuf.AbstractMessagepublic static SecurityScheme getDefaultInstance()
public static com.google.protobuf.Parser<SecurityScheme> parser()
public com.google.protobuf.Parser<SecurityScheme> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessagepublic SecurityScheme getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder