Class: Google::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1ToolAuthenticationApiKeyConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dialogflow_v2beta1/classes.rb,
lib/google/apis/dialogflow_v2beta1/representations.rb,
lib/google/apis/dialogflow_v2beta1/representations.rb

Overview

Config for authentication with API key.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2beta1ToolAuthenticationApiKeyConfig

Returns a new instance of GoogleCloudDialogflowV2beta1ToolAuthenticationApiKeyConfig.



23560
23561
23562
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 23560

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#api_keyString

Optional. The API key. If the secret_version_for_api_key field is set, this field will be ignored. Corresponds to the JSON property apiKey

Returns:

  • (String)


23539
23540
23541
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 23539

def api_key
  @api_key
end

#key_nameString

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=", "X-Api-Key" would be the parameter name. Corresponds to the JSON property keyName

Returns:

  • (String)


23546
23547
23548
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 23546

def key_name
  @key_name
end

#request_locationString

Required. Key location in the request. Corresponds to the JSON property requestLocation

Returns:

  • (String)


23551
23552
23553
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 23551

def request_location
  @request_location
end

#secret_version_for_api_keyString

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` Corresponds to the JSON propertysecretVersionForApiKey`

Returns:

  • (String)


23558
23559
23560
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 23558

def secret_version_for_api_key
  @secret_version_for_api_key
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



23565
23566
23567
23568
23569
23570
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 23565

def update!(**args)
  @api_key = args[:api_key] if args.key?(:api_key)
  @key_name = args[:key_name] if args.key?(:key_name)
  @request_location = args[:request_location] if args.key?(:request_location)
  @secret_version_for_api_key = args[:secret_version_for_api_key] if args.key?(:secret_version_for_api_key)
end