Class: Google::Apis::ApihubV1::GoogleCloudApihubV1ApiKeyConfig

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

Overview

Config for authentication with API key.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudApihubV1ApiKeyConfig

Returns a new instance of GoogleCloudApihubV1ApiKeyConfig.



643
644
645
# File 'lib/google/apis/apihub_v1/classes.rb', line 643

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

Instance Attribute Details

#api_keyGoogle::Apis::ApihubV1::GoogleCloudApihubV1Secret

Secret provides a reference to entries in Secret Manager. Corresponds to the JSON property apiKey



630
631
632
# File 'lib/google/apis/apihub_v1/classes.rb', line 630

def api_key
  @api_key
end

#http_element_locationString

Required. The location of the API key. The default value is QUERY. Corresponds to the JSON property httpElementLocation

Returns:

  • (String)


635
636
637
# File 'lib/google/apis/apihub_v1/classes.rb', line 635

def http_element_location
  @http_element_location
end

#nameString

Required. The parameter name of the API key. E.g. If the API request is "https: //example.com/act?api_key=", "api_key" would be the parameter name. Corresponds to the JSON property name

Returns:

  • (String)


641
642
643
# File 'lib/google/apis/apihub_v1/classes.rb', line 641

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



648
649
650
651
652
# File 'lib/google/apis/apihub_v1/classes.rb', line 648

def update!(**args)
  @api_key = args[:api_key] if args.key?(:api_key)
  @http_element_location = args[:http_element_location] if args.key?(:http_element_location)
  @name = args[:name] if args.key?(:name)
end