Class: Google::Apis::ApikeysV2::V2ApiTarget

Inherits:
Object
  • Object
show all
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

A restriction for a specific service and optionally one or multiple specific methods. Both fields are case insensitive.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ V2ApiTarget

Returns a new instance of V2ApiTarget.



194
195
196
# File 'lib/google/apis/apikeys_v2/classes.rb', line 194

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

Instance Attribute Details

#methods_propArray<String>

Optional. List of one or more methods that can be called. If empty, all methods for the service are allowed. A wildcard () can be used as the last symbol. Valid examples: google.cloud.translate.v2.TranslateService. GetSupportedLanguage TranslateText `Gettranslate.googleapis.com.Get* Corresponds to the JSON propertymethods`

Returns:

  • (Array<String>)


184
185
186
# File 'lib/google/apis/apikeys_v2/classes.rb', line 184

def methods_prop
  @methods_prop
end

#serviceString

The service for this restriction. It should be the canonical service name, for example: translate.googleapis.com. You can use gcloud services list to get a list of services that are enabled in the project. Corresponds to the JSON property service

Returns:

  • (String)


192
193
194
# File 'lib/google/apis/apikeys_v2/classes.rb', line 192

def service
  @service
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



199
200
201
202
# File 'lib/google/apis/apikeys_v2/classes.rb', line 199

def update!(**args)
  @methods_prop = args[:methods_prop] if args.key?(:methods_prop)
  @service = args[:service] if args.key?(:service)
end