Class Tool.Authentication.ApiKeyConfig.Builder

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

public static final class Tool.Authentication.ApiKeyConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<Tool.Authentication.ApiKeyConfig.Builder> implements Tool.Authentication.ApiKeyConfigOrBuilder
 Config for authentication with API key.
 
Protobuf type google.cloud.dialogflow.v2.Tool.Authentication.ApiKeyConfig
  • 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.ApiKeyConfig.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.ApiKeyConfig.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.ApiKeyConfig.Builder>
    • getDefaultInstanceForType

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

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

      public String getKeyName()
       Required. The parameter name or the header name of the API key.
       E.g., If the API request is "https://example.com/act?X-Api-Key=<API
       KEY>", "X-Api-Key" would be the parameter name.
       
      string key_name = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getKeyName in interface Tool.Authentication.ApiKeyConfigOrBuilder
      Returns:
      The keyName.
    • getKeyNameBytes

      public com.google.protobuf.ByteString getKeyNameBytes()
       Required. The parameter name or the header name of the API key.
       E.g., If the API request is "https://example.com/act?X-Api-Key=<API
       KEY>", "X-Api-Key" would be the parameter name.
       
      string key_name = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getKeyNameBytes in interface Tool.Authentication.ApiKeyConfigOrBuilder
      Returns:
      The bytes for keyName.
    • setKeyName

       Required. The parameter name or the header name of the API key.
       E.g., If the API request is "https://example.com/act?X-Api-Key=<API
       KEY>", "X-Api-Key" would be the parameter name.
       
      string key_name = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The keyName to set.
      Returns:
      This builder for chaining.
    • clearKeyName

       Required. The parameter name or the header name of the API key.
       E.g., If the API request is "https://example.com/act?X-Api-Key=<API
       KEY>", "X-Api-Key" would be the parameter name.
       
      string key_name = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setKeyNameBytes

      public Tool.Authentication.ApiKeyConfig.Builder setKeyNameBytes(com.google.protobuf.ByteString value)
       Required. The parameter name or the header name of the API key.
       E.g., If the API request is "https://example.com/act?X-Api-Key=<API
       KEY>", "X-Api-Key" would be the parameter name.
       
      string key_name = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for keyName to set.
      Returns:
      This builder for chaining.
    • getApiKey

      public String getApiKey()
       Optional. The API key. If the `secret_version_for_api_key` field is
       set, this field will be ignored.
       
      string api_key = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getApiKey in interface Tool.Authentication.ApiKeyConfigOrBuilder
      Returns:
      The apiKey.
    • getApiKeyBytes

      public com.google.protobuf.ByteString getApiKeyBytes()
       Optional. The API key. If the `secret_version_for_api_key` field is
       set, this field will be ignored.
       
      string api_key = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getApiKeyBytes in interface Tool.Authentication.ApiKeyConfigOrBuilder
      Returns:
      The bytes for apiKey.
    • setApiKey

       Optional. The API key. If the `secret_version_for_api_key` field is
       set, this field will be ignored.
       
      string api_key = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The apiKey to set.
      Returns:
      This builder for chaining.
    • clearApiKey

       Optional. The API key. If the `secret_version_for_api_key` field is
       set, this field will be ignored.
       
      string api_key = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setApiKeyBytes

      public Tool.Authentication.ApiKeyConfig.Builder setApiKeyBytes(com.google.protobuf.ByteString value)
       Optional. The API key. If the `secret_version_for_api_key` field is
       set, this field will be ignored.
       
      string api_key = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for apiKey to set.
      Returns:
      This builder for chaining.
    • getSecretVersionForApiKey

      public String getSecretVersionForApiKey()
       Optional. The name of the SecretManager secret version resource storing
       the API key. If this field is set, the `api_key` field will be ignored.
       Format: `projects/{project}/secrets/{secret}/versions/{version}`
       
      string secret_version_for_api_key = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getSecretVersionForApiKey in interface Tool.Authentication.ApiKeyConfigOrBuilder
      Returns:
      The secretVersionForApiKey.
    • getSecretVersionForApiKeyBytes

      public com.google.protobuf.ByteString getSecretVersionForApiKeyBytes()
       Optional. The name of the SecretManager secret version resource storing
       the API key. If this field is set, the `api_key` field will be ignored.
       Format: `projects/{project}/secrets/{secret}/versions/{version}`
       
      string secret_version_for_api_key = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getSecretVersionForApiKeyBytes in interface Tool.Authentication.ApiKeyConfigOrBuilder
      Returns:
      The bytes for secretVersionForApiKey.
    • setSecretVersionForApiKey

      public Tool.Authentication.ApiKeyConfig.Builder setSecretVersionForApiKey(String value)
       Optional. The name of the SecretManager secret version resource storing
       the API key. If this field is set, the `api_key` field will be ignored.
       Format: `projects/{project}/secrets/{secret}/versions/{version}`
       
      string secret_version_for_api_key = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The secretVersionForApiKey to set.
      Returns:
      This builder for chaining.
    • clearSecretVersionForApiKey

      public Tool.Authentication.ApiKeyConfig.Builder clearSecretVersionForApiKey()
       Optional. The name of the SecretManager secret version resource storing
       the API key. If this field is set, the `api_key` field will be ignored.
       Format: `projects/{project}/secrets/{secret}/versions/{version}`
       
      string secret_version_for_api_key = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setSecretVersionForApiKeyBytes

      public Tool.Authentication.ApiKeyConfig.Builder setSecretVersionForApiKeyBytes(com.google.protobuf.ByteString value)
       Optional. The name of the SecretManager secret version resource storing
       the API key. If this field is set, the `api_key` field will be ignored.
       Format: `projects/{project}/secrets/{secret}/versions/{version}`
       
      string secret_version_for_api_key = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for secretVersionForApiKey to set.
      Returns:
      This builder for chaining.
    • getRequestLocationValue

      public int getRequestLocationValue()
       Required. Key location in the request.
       
      .google.cloud.dialogflow.v2.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getRequestLocationValue in interface Tool.Authentication.ApiKeyConfigOrBuilder
      Returns:
      The enum numeric value on the wire for requestLocation.
    • setRequestLocationValue

      public Tool.Authentication.ApiKeyConfig.Builder setRequestLocationValue(int value)
       Required. Key location in the request.
       
      .google.cloud.dialogflow.v2.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The enum numeric value on the wire for requestLocation to set.
      Returns:
      This builder for chaining.
    • getRequestLocation

      public Tool.Authentication.RequestLocation getRequestLocation()
       Required. Key location in the request.
       
      .google.cloud.dialogflow.v2.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getRequestLocation in interface Tool.Authentication.ApiKeyConfigOrBuilder
      Returns:
      The requestLocation.
    • setRequestLocation

       Required. Key location in the request.
       
      .google.cloud.dialogflow.v2.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The requestLocation to set.
      Returns:
      This builder for chaining.
    • clearRequestLocation

      public Tool.Authentication.ApiKeyConfig.Builder clearRequestLocation()
       Required. Key location in the request.
       
      .google.cloud.dialogflow.v2.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.