Class: Google::Apis::ServicecontrolV1::QuotaProperties

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

Overview

Represents the properties needed for quota operations.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ QuotaProperties

Returns a new instance of QuotaProperties



374
375
376
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 374

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

Instance Attribute Details

#limit_by_idsHash<String,String>

LimitType IDs that should be used for checking quota. Key in this map should be a valid LimitType string, and the value is the ID to be used. For example, an entry will cause all user quota limits to use 123 as the user ID. See google/api/quota.proto for the definition of LimitType. CLIENT_PROJECT: Not supported. USER: Value of this entry will be used for enforcing user-level quota limits. If none specified, caller IP passed in the servicecontrol.googleapis.com/caller_ip label will be used instead. If the server cannot resolve a value for this LimitType, an error will be thrown. No validation will be performed on this ID. Deprecated: use servicecontrol.googleapis.com/user label to send user ID. Corresponds to the JSON property limitByIds

Returns:

  • (Hash<String,String>)


367
368
369
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 367

def limit_by_ids
  @limit_by_ids
end

#quota_modeString

Quota mode for this operation. Corresponds to the JSON property quotaMode

Returns:

  • (String)


372
373
374
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 372

def quota_mode
  @quota_mode
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



379
380
381
382
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 379

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