Class: Google::Apis::ApikeysV2::V2Restrictions
- Inherits:
-
Object
- Object
- Google::Apis::ApikeysV2::V2Restrictions
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/apikeys_v2/classes.rb,
lib/google/apis/apikeys_v2/representations.rb,
lib/google/apis/apikeys_v2/representations.rb
Overview
Describes the restrictions on the key.
Instance Attribute Summary collapse
-
#android_key_restrictions ⇒ Google::Apis::ApikeysV2::V2AndroidKeyRestrictions
The Android apps that are allowed to use the key.
-
#api_targets ⇒ Array<Google::Apis::ApikeysV2::V2ApiTarget>
A restriction for a specific service and optionally one or more specific methods.
-
#browser_key_restrictions ⇒ Google::Apis::ApikeysV2::V2BrowserKeyRestrictions
The HTTP referrers (websites) that are allowed to use the key.
-
#ios_key_restrictions ⇒ Google::Apis::ApikeysV2::V2IosKeyRestrictions
The iOS apps that are allowed to use the key.
-
#server_key_restrictions ⇒ Google::Apis::ApikeysV2::V2ServerKeyRestrictions
The IP addresses of callers that are allowed to use the key.
Instance Method Summary collapse
-
#initialize(**args) ⇒ V2Restrictions
constructor
A new instance of V2Restrictions.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ V2Restrictions
Returns a new instance of V2Restrictions.
435 436 437 |
# File 'lib/google/apis/apikeys_v2/classes.rb', line 435 def initialize(**args) update!(**args) end |
Instance Attribute Details
#android_key_restrictions ⇒ Google::Apis::ApikeysV2::V2AndroidKeyRestrictions
The Android apps that are allowed to use the key.
Corresponds to the JSON property androidKeyRestrictions
411 412 413 |
# File 'lib/google/apis/apikeys_v2/classes.rb', line 411 def android_key_restrictions @android_key_restrictions end |
#api_targets ⇒ Array<Google::Apis::ApikeysV2::V2ApiTarget>
A restriction for a specific service and optionally one or more specific
methods. Requests are allowed if they match any of these restrictions. If no
restrictions are specified, all targets are allowed.
Corresponds to the JSON property apiTargets
418 419 420 |
# File 'lib/google/apis/apikeys_v2/classes.rb', line 418 def api_targets @api_targets end |
#browser_key_restrictions ⇒ Google::Apis::ApikeysV2::V2BrowserKeyRestrictions
The HTTP referrers (websites) that are allowed to use the key.
Corresponds to the JSON property browserKeyRestrictions
423 424 425 |
# File 'lib/google/apis/apikeys_v2/classes.rb', line 423 def browser_key_restrictions @browser_key_restrictions end |
#ios_key_restrictions ⇒ Google::Apis::ApikeysV2::V2IosKeyRestrictions
The iOS apps that are allowed to use the key.
Corresponds to the JSON property iosKeyRestrictions
428 429 430 |
# File 'lib/google/apis/apikeys_v2/classes.rb', line 428 def ios_key_restrictions @ios_key_restrictions end |
#server_key_restrictions ⇒ Google::Apis::ApikeysV2::V2ServerKeyRestrictions
The IP addresses of callers that are allowed to use the key.
Corresponds to the JSON property serverKeyRestrictions
433 434 435 |
# File 'lib/google/apis/apikeys_v2/classes.rb', line 433 def server_key_restrictions @server_key_restrictions end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
440 441 442 443 444 445 446 |
# File 'lib/google/apis/apikeys_v2/classes.rb', line 440 def update!(**args) @android_key_restrictions = args[:android_key_restrictions] if args.key?(:android_key_restrictions) @api_targets = args[:api_targets] if args.key?(:api_targets) @browser_key_restrictions = args[:browser_key_restrictions] if args.key?(:browser_key_restrictions) @ios_key_restrictions = args[:ios_key_restrictions] if args.key?(:ios_key_restrictions) @server_key_restrictions = args[:server_key_restrictions] if args.key?(:server_key_restrictions) end |