Class Openapiv2.SecurityScheme

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Openapiv2.SecuritySchemeOrBuilder, java.io.Serializable
    Enclosing class:
    Openapiv2

    public static final class Openapiv2.SecurityScheme
    extends com.google.protobuf.GeneratedMessage
    implements Openapiv2.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
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Openapiv2.SecurityScheme.Builder
      `SecurityScheme` is a representation of OpenAPI v2 specification's Security Scheme object.
      static class  Openapiv2.SecurityScheme.Flow
      The flow used by the OAuth2 security scheme.
      static class  Openapiv2.SecurityScheme.In
      The location of the API key.
      static class  Openapiv2.SecurityScheme.Type
      The type of the security scheme.
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage

        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 extends java.lang.Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage

        com.google.protobuf.AbstractMessage.BuilderParent
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetMapFieldReflection

        protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection​(int number)
        Overrides:
        internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
      • getTypeValue

        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;
        Specified by:
        getTypeValue in interface Openapiv2.SecuritySchemeOrBuilder
        Returns:
        The enum numeric value on the wire for type.
      • getDescriptionBytes

        public com.google.protobuf.ByteString getDescriptionBytes()
         A short description for security scheme.
         
        string description = 2;
        Specified by:
        getDescriptionBytes in interface Openapiv2.SecuritySchemeOrBuilder
        Returns:
        The bytes for description.
      • getName

        public java.lang.String getName()
         The name of the header or query parameter to be used.
         Valid for apiKey.
         
        string name = 3;
        Specified by:
        getName in interface Openapiv2.SecuritySchemeOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         The name of the header or query parameter to be used.
         Valid for apiKey.
         
        string name = 3;
        Specified by:
        getNameBytes in interface Openapiv2.SecuritySchemeOrBuilder
        Returns:
        The bytes for name.
      • getInValue

        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;
        Specified by:
        getInValue in interface Openapiv2.SecuritySchemeOrBuilder
        Returns:
        The enum numeric value on the wire for in.
      • getFlowValue

        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;
        Specified by:
        getFlowValue in interface Openapiv2.SecuritySchemeOrBuilder
        Returns:
        The enum numeric value on the wire for flow.
      • getFlow

        public Openapiv2.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;
        Specified by:
        getFlow in interface Openapiv2.SecuritySchemeOrBuilder
        Returns:
        The flow.
      • getAuthorizationUrl

        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;
        Specified by:
        getAuthorizationUrl in interface Openapiv2.SecuritySchemeOrBuilder
        Returns:
        The authorizationUrl.
      • getAuthorizationUrlBytes

        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;
        Specified by:
        getAuthorizationUrlBytes in interface Openapiv2.SecuritySchemeOrBuilder
        Returns:
        The bytes for authorizationUrl.
      • getTokenUrl

        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;
        Specified by:
        getTokenUrl in interface Openapiv2.SecuritySchemeOrBuilder
        Returns:
        The tokenUrl.
      • getTokenUrlBytes

        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;
        Specified by:
        getTokenUrlBytes in interface Openapiv2.SecuritySchemeOrBuilder
        Returns:
        The bytes for tokenUrl.
      • hasScopes

        public boolean hasScopes()
         The available scopes for the OAuth2 security scheme.
         Valid for oauth2.
         
        .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8;
        Specified by:
        hasScopes in interface Openapiv2.SecuritySchemeOrBuilder
        Returns:
        Whether the scopes field is set.
      • getExtensionsCount

        public int getExtensionsCount()
        Description copied from interface: Openapiv2.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;
        Specified by:
        getExtensionsCount in interface Openapiv2.SecuritySchemeOrBuilder
      • containsExtensions

        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;
        Specified by:
        containsExtensions in interface Openapiv2.SecuritySchemeOrBuilder
      • getExtensionsMap

        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;
        Specified by:
        getExtensionsMap in interface Openapiv2.SecuritySchemeOrBuilder
      • getExtensionsOrDefault

        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;
        Specified by:
        getExtensionsOrDefault in interface Openapiv2.SecuritySchemeOrBuilder
      • getExtensionsOrThrow

        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;
        Specified by:
        getExtensionsOrThrow in interface Openapiv2.SecuritySchemeOrBuilder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessage
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws java.io.IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessage
        Throws:
        java.io.IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessage
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static Openapiv2.SecurityScheme parseFrom​(java.nio.ByteBuffer data)
                                                  throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Openapiv2.SecurityScheme parseFrom​(java.nio.ByteBuffer data,
                                                         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                  throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Openapiv2.SecurityScheme parseFrom​(com.google.protobuf.ByteString data)
                                                  throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Openapiv2.SecurityScheme parseFrom​(com.google.protobuf.ByteString data,
                                                         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                  throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Openapiv2.SecurityScheme parseFrom​(byte[] data)
                                                  throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Openapiv2.SecurityScheme parseFrom​(byte[] data,
                                                         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                  throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Openapiv2.SecurityScheme parseFrom​(java.io.InputStream input)
                                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static Openapiv2.SecurityScheme parseFrom​(java.io.InputStream input,
                                                         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static Openapiv2.SecurityScheme parseDelimitedFrom​(java.io.InputStream input)
                                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static Openapiv2.SecurityScheme parseDelimitedFrom​(java.io.InputStream input,
                                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static Openapiv2.SecurityScheme parseFrom​(com.google.protobuf.CodedInputStream input)
                                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static Openapiv2.SecurityScheme parseFrom​(com.google.protobuf.CodedInputStream input,
                                                         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • newBuilderForType

        public Openapiv2.SecurityScheme.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public Openapiv2.SecurityScheme.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected Openapiv2.SecurityScheme.Builder newBuilderForType​(com.google.protobuf.AbstractMessage.BuilderParent parent)
        Overrides:
        newBuilderForType in class com.google.protobuf.AbstractMessage
      • getParserForType

        public com.google.protobuf.Parser<Openapiv2.SecurityScheme> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessage
      • getDefaultInstanceForType

        public Openapiv2.SecurityScheme getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder