Class AuthRequirement.Builder

  • All Implemented Interfaces:
    AuthRequirementOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.lang.Cloneable
    Enclosing class:
    AuthRequirement

    public static final class AuthRequirement.Builder
    extends com.google.protobuf.GeneratedMessage.Builder<AuthRequirement.Builder>
    implements AuthRequirementOrBuilder
     User-defined authentication requirements, including support for
     [JSON Web Token
     (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
     
    Protobuf type google.api.AuthRequirement
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      AuthRequirement build()  
      AuthRequirement buildPartial()  
      AuthRequirement.Builder clear()  
      AuthRequirement.Builder clearAudiences()
      NOTE: This will be deprecated soon, once AuthProvider.audiences is implemented and accepted in all the runtime components.
      AuthRequirement.Builder clearProviderId()
      [id][google.api.AuthProvider.id] from authentication provider.
      java.lang.String getAudiences()
      NOTE: This will be deprecated soon, once AuthProvider.audiences is implemented and accepted in all the runtime components.
      com.google.protobuf.ByteString getAudiencesBytes()
      NOTE: This will be deprecated soon, once AuthProvider.audiences is implemented and accepted in all the runtime components.
      AuthRequirement getDefaultInstanceForType()  
      static com.google.protobuf.Descriptors.Descriptor getDescriptor()  
      com.google.protobuf.Descriptors.Descriptor getDescriptorForType()  
      java.lang.String getProviderId()
      [id][google.api.AuthProvider.id] from authentication provider.
      com.google.protobuf.ByteString getProviderIdBytes()
      [id][google.api.AuthProvider.id] from authentication provider.
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()  
      boolean isInitialized()  
      AuthRequirement.Builder mergeFrom​(AuthRequirement other)  
      AuthRequirement.Builder mergeFrom​(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      AuthRequirement.Builder mergeFrom​(com.google.protobuf.Message other)  
      AuthRequirement.Builder setAudiences​(java.lang.String value)
      NOTE: This will be deprecated soon, once AuthProvider.audiences is implemented and accepted in all the runtime components.
      AuthRequirement.Builder setAudiencesBytes​(com.google.protobuf.ByteString value)
      NOTE: This will be deprecated soon, once AuthProvider.audiences is implemented and accepted in all the runtime components.
      AuthRequirement.Builder setProviderId​(java.lang.String value)
      [id][google.api.AuthProvider.id] from authentication provider.
      AuthRequirement.Builder setProviderIdBytes​(com.google.protobuf.ByteString value)
      [id][google.api.AuthProvider.id] from authentication provider.
      • Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

        addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3
      • Methods inherited from class com.google.protobuf.AbstractMessage.Builder

        findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
      • Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

        addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface com.google.protobuf.Message.Builder

        mergeDelimitedFrom, mergeDelimitedFrom
      • Methods inherited from interface com.google.protobuf.MessageLite.Builder

        mergeFrom
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<AuthRequirement.Builder>
      • clear

        public AuthRequirement.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessage.Builder<AuthRequirement.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<AuthRequirement.Builder>
      • getDefaultInstanceForType

        public AuthRequirement getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public AuthRequirement build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public AuthRequirement buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • mergeFrom

        public AuthRequirement.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<AuthRequirement.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessage.Builder<AuthRequirement.Builder>
      • mergeFrom

        public AuthRequirement.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws java.io.IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<AuthRequirement.Builder>
        Throws:
        java.io.IOException
      • getProviderId

        public java.lang.String getProviderId()
         [id][google.api.AuthProvider.id] from authentication provider.
        
         Example:
        
         provider_id: bookstore_auth
         
        string provider_id = 1;
        Specified by:
        getProviderId in interface AuthRequirementOrBuilder
        Returns:
        The providerId.
      • getProviderIdBytes

        public com.google.protobuf.ByteString getProviderIdBytes()
         [id][google.api.AuthProvider.id] from authentication provider.
        
         Example:
        
         provider_id: bookstore_auth
         
        string provider_id = 1;
        Specified by:
        getProviderIdBytes in interface AuthRequirementOrBuilder
        Returns:
        The bytes for providerId.
      • setProviderId

        public AuthRequirement.Builder setProviderId​(java.lang.String value)
         [id][google.api.AuthProvider.id] from authentication provider.
        
         Example:
        
         provider_id: bookstore_auth
         
        string provider_id = 1;
        Parameters:
        value - The providerId to set.
        Returns:
        This builder for chaining.
      • clearProviderId

        public AuthRequirement.Builder clearProviderId()
         [id][google.api.AuthProvider.id] from authentication provider.
        
         Example:
        
         provider_id: bookstore_auth
         
        string provider_id = 1;
        Returns:
        This builder for chaining.
      • setProviderIdBytes

        public AuthRequirement.Builder setProviderIdBytes​(com.google.protobuf.ByteString value)
         [id][google.api.AuthProvider.id] from authentication provider.
        
         Example:
        
         provider_id: bookstore_auth
         
        string provider_id = 1;
        Parameters:
        value - The bytes for providerId to set.
        Returns:
        This builder for chaining.
      • getAudiences

        public java.lang.String getAudiences()
         NOTE: This will be deprecated soon, once AuthProvider.audiences is
         implemented and accepted in all the runtime components.
        
         The list of JWT
         [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
         that are allowed to access. A JWT containing any of these audiences will
         be accepted. When this setting is absent, only JWTs with audience
         "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
         will be accepted. For example, if no audiences are in the setting,
         LibraryService API will only accept JWTs with the following audience
         "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
        
         Example:
        
         audiences: bookstore_android.apps.googleusercontent.com,
         bookstore_web.apps.googleusercontent.com
         
        string audiences = 2;
        Specified by:
        getAudiences in interface AuthRequirementOrBuilder
        Returns:
        The audiences.
      • getAudiencesBytes

        public com.google.protobuf.ByteString getAudiencesBytes()
         NOTE: This will be deprecated soon, once AuthProvider.audiences is
         implemented and accepted in all the runtime components.
        
         The list of JWT
         [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
         that are allowed to access. A JWT containing any of these audiences will
         be accepted. When this setting is absent, only JWTs with audience
         "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
         will be accepted. For example, if no audiences are in the setting,
         LibraryService API will only accept JWTs with the following audience
         "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
        
         Example:
        
         audiences: bookstore_android.apps.googleusercontent.com,
         bookstore_web.apps.googleusercontent.com
         
        string audiences = 2;
        Specified by:
        getAudiencesBytes in interface AuthRequirementOrBuilder
        Returns:
        The bytes for audiences.
      • setAudiences

        public AuthRequirement.Builder setAudiences​(java.lang.String value)
         NOTE: This will be deprecated soon, once AuthProvider.audiences is
         implemented and accepted in all the runtime components.
        
         The list of JWT
         [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
         that are allowed to access. A JWT containing any of these audiences will
         be accepted. When this setting is absent, only JWTs with audience
         "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
         will be accepted. For example, if no audiences are in the setting,
         LibraryService API will only accept JWTs with the following audience
         "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
        
         Example:
        
         audiences: bookstore_android.apps.googleusercontent.com,
         bookstore_web.apps.googleusercontent.com
         
        string audiences = 2;
        Parameters:
        value - The audiences to set.
        Returns:
        This builder for chaining.
      • clearAudiences

        public AuthRequirement.Builder clearAudiences()
         NOTE: This will be deprecated soon, once AuthProvider.audiences is
         implemented and accepted in all the runtime components.
        
         The list of JWT
         [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
         that are allowed to access. A JWT containing any of these audiences will
         be accepted. When this setting is absent, only JWTs with audience
         "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
         will be accepted. For example, if no audiences are in the setting,
         LibraryService API will only accept JWTs with the following audience
         "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
        
         Example:
        
         audiences: bookstore_android.apps.googleusercontent.com,
         bookstore_web.apps.googleusercontent.com
         
        string audiences = 2;
        Returns:
        This builder for chaining.
      • setAudiencesBytes

        public AuthRequirement.Builder setAudiencesBytes​(com.google.protobuf.ByteString value)
         NOTE: This will be deprecated soon, once AuthProvider.audiences is
         implemented and accepted in all the runtime components.
        
         The list of JWT
         [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
         that are allowed to access. A JWT containing any of these audiences will
         be accepted. When this setting is absent, only JWTs with audience
         "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
         will be accepted. For example, if no audiences are in the setting,
         LibraryService API will only accept JWTs with the following audience
         "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
        
         Example:
        
         audiences: bookstore_android.apps.googleusercontent.com,
         bookstore_web.apps.googleusercontent.com
         
        string audiences = 2;
        Parameters:
        value - The bytes for audiences to set.
        Returns:
        This builder for chaining.