Class AuthRequirement.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<AuthRequirement.Builder>
com.google.api.AuthRequirement.Builder
All Implemented Interfaces:
AuthRequirementOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
AuthRequirement

public static final class AuthRequirement.Builder extends com.google.protobuf.GeneratedMessageV3.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 Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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
    • clone

      public AuthRequirement.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<AuthRequirement.Builder>
    • setField

      public AuthRequirement.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<AuthRequirement.Builder>
    • clearField

      public AuthRequirement.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<AuthRequirement.Builder>
    • clearOneof

      public AuthRequirement.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<AuthRequirement.Builder>
    • setRepeatedField

      public AuthRequirement.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<AuthRequirement.Builder>
    • addRepeatedField

      public AuthRequirement.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<AuthRequirement.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>
    • mergeFrom

      public AuthRequirement.Builder mergeFrom(AuthRequirement other)
    • isInitialized

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

      public AuthRequirement.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws 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:
      IOException
    • getProviderId

      public 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(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 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(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.
    • setUnknownFields

      public final AuthRequirement.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AuthRequirement.Builder>
    • mergeUnknownFields

      public final AuthRequirement.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AuthRequirement.Builder>