Class Tool.Authentication.OAuthConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Tool.Authentication.OAuthConfig.Builder>
com.google.cloud.dialogflow.v2.Tool.Authentication.OAuthConfig.Builder
All Implemented Interfaces:
Tool.Authentication.OAuthConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Tool.Authentication.OAuthConfig

public static final class Tool.Authentication.OAuthConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<Tool.Authentication.OAuthConfig.Builder> implements Tool.Authentication.OAuthConfigOrBuilder
 Config for authentication with OAuth.
 
Protobuf type google.cloud.dialogflow.v2.Tool.Authentication.OAuthConfig
  • Method Details

    • 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<Tool.Authentication.OAuthConfig.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<Tool.Authentication.OAuthConfig.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<Tool.Authentication.OAuthConfig.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

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

      public Tool.Authentication.OAuthConfig.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<Tool.Authentication.OAuthConfig.Builder>
    • mergeFrom

    • isInitialized

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

      public Tool.Authentication.OAuthConfig.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<Tool.Authentication.OAuthConfig.Builder>
      Throws:
      IOException
    • getOauthGrantTypeValue

      public int getOauthGrantTypeValue()
       Required. OAuth grant types.
       
      .google.cloud.dialogflow.v2.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getOauthGrantTypeValue in interface Tool.Authentication.OAuthConfigOrBuilder
      Returns:
      The enum numeric value on the wire for oauthGrantType.
    • setOauthGrantTypeValue

      public Tool.Authentication.OAuthConfig.Builder setOauthGrantTypeValue(int value)
       Required. OAuth grant types.
       
      .google.cloud.dialogflow.v2.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The enum numeric value on the wire for oauthGrantType to set.
      Returns:
      This builder for chaining.
    • getOauthGrantType

       Required. OAuth grant types.
       
      .google.cloud.dialogflow.v2.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getOauthGrantType in interface Tool.Authentication.OAuthConfigOrBuilder
      Returns:
      The oauthGrantType.
    • setOauthGrantType

       Required. OAuth grant types.
       
      .google.cloud.dialogflow.v2.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The oauthGrantType to set.
      Returns:
      This builder for chaining.
    • clearOauthGrantType

      public Tool.Authentication.OAuthConfig.Builder clearOauthGrantType()
       Required. OAuth grant types.
       
      .google.cloud.dialogflow.v2.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • getClientId

      public String getClientId()
       Required. The client ID from the OAuth provider.
       
      string client_id = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getClientId in interface Tool.Authentication.OAuthConfigOrBuilder
      Returns:
      The clientId.
    • getClientIdBytes

      public com.google.protobuf.ByteString getClientIdBytes()
       Required. The client ID from the OAuth provider.
       
      string client_id = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getClientIdBytes in interface Tool.Authentication.OAuthConfigOrBuilder
      Returns:
      The bytes for clientId.
    • setClientId

      public Tool.Authentication.OAuthConfig.Builder setClientId(String value)
       Required. The client ID from the OAuth provider.
       
      string client_id = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The clientId to set.
      Returns:
      This builder for chaining.
    • clearClientId

       Required. The client ID from the OAuth provider.
       
      string client_id = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setClientIdBytes

      public Tool.Authentication.OAuthConfig.Builder setClientIdBytes(com.google.protobuf.ByteString value)
       Required. The client ID from the OAuth provider.
       
      string client_id = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for clientId to set.
      Returns:
      This builder for chaining.
    • getClientSecret

      public String getClientSecret()
       Optional. The client secret from the OAuth provider. If the
       `secret_version_for_client_secret` field is set, this field will be
       ignored.
       
      string client_secret = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getClientSecret in interface Tool.Authentication.OAuthConfigOrBuilder
      Returns:
      The clientSecret.
    • getClientSecretBytes

      public com.google.protobuf.ByteString getClientSecretBytes()
       Optional. The client secret from the OAuth provider. If the
       `secret_version_for_client_secret` field is set, this field will be
       ignored.
       
      string client_secret = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getClientSecretBytes in interface Tool.Authentication.OAuthConfigOrBuilder
      Returns:
      The bytes for clientSecret.
    • setClientSecret

      public Tool.Authentication.OAuthConfig.Builder setClientSecret(String value)
       Optional. The client secret from the OAuth provider. If the
       `secret_version_for_client_secret` field is set, this field will be
       ignored.
       
      string client_secret = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The clientSecret to set.
      Returns:
      This builder for chaining.
    • clearClientSecret

      public Tool.Authentication.OAuthConfig.Builder clearClientSecret()
       Optional. The client secret from the OAuth provider. If the
       `secret_version_for_client_secret` field is set, this field will be
       ignored.
       
      string client_secret = 3 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setClientSecretBytes

      public Tool.Authentication.OAuthConfig.Builder setClientSecretBytes(com.google.protobuf.ByteString value)
       Optional. The client secret from the OAuth provider. If the
       `secret_version_for_client_secret` field is set, this field will be
       ignored.
       
      string client_secret = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for clientSecret to set.
      Returns:
      This builder for chaining.
    • getSecretVersionForClientSecret

      public String getSecretVersionForClientSecret()
       Optional. The name of the SecretManager secret version resource storing
       the client secret. If this field is set, the `client_secret` field will
       be ignored. Format:
       `projects/{project}/secrets/{secret}/versions/{version}`
       
      string secret_version_for_client_secret = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getSecretVersionForClientSecret in interface Tool.Authentication.OAuthConfigOrBuilder
      Returns:
      The secretVersionForClientSecret.
    • getSecretVersionForClientSecretBytes

      public com.google.protobuf.ByteString getSecretVersionForClientSecretBytes()
       Optional. The name of the SecretManager secret version resource storing
       the client secret. If this field is set, the `client_secret` field will
       be ignored. Format:
       `projects/{project}/secrets/{secret}/versions/{version}`
       
      string secret_version_for_client_secret = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getSecretVersionForClientSecretBytes in interface Tool.Authentication.OAuthConfigOrBuilder
      Returns:
      The bytes for secretVersionForClientSecret.
    • setSecretVersionForClientSecret

      public Tool.Authentication.OAuthConfig.Builder setSecretVersionForClientSecret(String value)
       Optional. The name of the SecretManager secret version resource storing
       the client secret. If this field is set, the `client_secret` field will
       be ignored. Format:
       `projects/{project}/secrets/{secret}/versions/{version}`
       
      string secret_version_for_client_secret = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The secretVersionForClientSecret to set.
      Returns:
      This builder for chaining.
    • clearSecretVersionForClientSecret

      public Tool.Authentication.OAuthConfig.Builder clearSecretVersionForClientSecret()
       Optional. The name of the SecretManager secret version resource storing
       the client secret. If this field is set, the `client_secret` field will
       be ignored. Format:
       `projects/{project}/secrets/{secret}/versions/{version}`
       
      string secret_version_for_client_secret = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setSecretVersionForClientSecretBytes

      public Tool.Authentication.OAuthConfig.Builder setSecretVersionForClientSecretBytes(com.google.protobuf.ByteString value)
       Optional. The name of the SecretManager secret version resource storing
       the client secret. If this field is set, the `client_secret` field will
       be ignored. Format:
       `projects/{project}/secrets/{secret}/versions/{version}`
       
      string secret_version_for_client_secret = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for secretVersionForClientSecret to set.
      Returns:
      This builder for chaining.
    • getTokenEndpoint

      public String getTokenEndpoint()
       Required. The token endpoint in the OAuth provider to exchange for an
       access token.
       
      string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getTokenEndpoint in interface Tool.Authentication.OAuthConfigOrBuilder
      Returns:
      The tokenEndpoint.
    • getTokenEndpointBytes

      public com.google.protobuf.ByteString getTokenEndpointBytes()
       Required. The token endpoint in the OAuth provider to exchange for an
       access token.
       
      string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getTokenEndpointBytes in interface Tool.Authentication.OAuthConfigOrBuilder
      Returns:
      The bytes for tokenEndpoint.
    • setTokenEndpoint

      public Tool.Authentication.OAuthConfig.Builder setTokenEndpoint(String value)
       Required. The token endpoint in the OAuth provider to exchange for an
       access token.
       
      string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The tokenEndpoint to set.
      Returns:
      This builder for chaining.
    • clearTokenEndpoint

      public Tool.Authentication.OAuthConfig.Builder clearTokenEndpoint()
       Required. The token endpoint in the OAuth provider to exchange for an
       access token.
       
      string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setTokenEndpointBytes

      public Tool.Authentication.OAuthConfig.Builder setTokenEndpointBytes(com.google.protobuf.ByteString value)
       Required. The token endpoint in the OAuth provider to exchange for an
       access token.
       
      string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for tokenEndpoint to set.
      Returns:
      This builder for chaining.
    • getScopesList

      public com.google.protobuf.ProtocolStringList getScopesList()
       Optional. The OAuth scopes to grant.
       
      repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getScopesList in interface Tool.Authentication.OAuthConfigOrBuilder
      Returns:
      A list containing the scopes.
    • getScopesCount

      public int getScopesCount()
       Optional. The OAuth scopes to grant.
       
      repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getScopesCount in interface Tool.Authentication.OAuthConfigOrBuilder
      Returns:
      The count of scopes.
    • getScopes

      public String getScopes(int index)
       Optional. The OAuth scopes to grant.
       
      repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getScopes in interface Tool.Authentication.OAuthConfigOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The scopes at the given index.
    • getScopesBytes

      public com.google.protobuf.ByteString getScopesBytes(int index)
       Optional. The OAuth scopes to grant.
       
      repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getScopesBytes in interface Tool.Authentication.OAuthConfigOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the scopes at the given index.
    • setScopes

      public Tool.Authentication.OAuthConfig.Builder setScopes(int index, String value)
       Optional. The OAuth scopes to grant.
       
      repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      index - The index to set the value at.
      value - The scopes to set.
      Returns:
      This builder for chaining.
    • addScopes

       Optional. The OAuth scopes to grant.
       
      repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The scopes to add.
      Returns:
      This builder for chaining.
    • addAllScopes

       Optional. The OAuth scopes to grant.
       
      repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      values - The scopes to add.
      Returns:
      This builder for chaining.
    • clearScopes

       Optional. The OAuth scopes to grant.
       
      repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • addScopesBytes

      public Tool.Authentication.OAuthConfig.Builder addScopesBytes(com.google.protobuf.ByteString value)
       Optional. The OAuth scopes to grant.
       
      repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes of the scopes to add.
      Returns:
      This builder for chaining.