Class: Google::Apis::SaasservicemgmtV1beta1::AllocationSlot
- Inherits:
-
Object
- Object
- Google::Apis::SaasservicemgmtV1beta1::AllocationSlot
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/saasservicemgmt_v1beta1/classes.rb,
lib/google/apis/saasservicemgmt_v1beta1/representations.rb,
lib/google/apis/saasservicemgmt_v1beta1/representations.rb
Overview
AllocationSlot specifies a variant and the proportion of traffic allocated to it.
Instance Attribute Summary collapse
-
#variant ⇒ String
Required.
-
#weight ⇒ Fixnum
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AllocationSlot
constructor
A new instance of AllocationSlot.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ AllocationSlot
Returns a new instance of AllocationSlot.
106 107 108 |
# File 'lib/google/apis/saasservicemgmt_v1beta1/classes.rb', line 106 def initialize(**args) update!(**args) end |
Instance Attribute Details
#variant ⇒ String
Required. Variant of the allocation slot.
Corresponds to the JSON property variant
98 99 100 |
# File 'lib/google/apis/saasservicemgmt_v1beta1/classes.rb', line 98 def variant @variant end |
#weight ⇒ Fixnum
Required. Weight defines the proportion of traffic to allocate to the variant,
relative to other slots in the same allocation.
Corresponds to the JSON property weight
104 105 106 |
# File 'lib/google/apis/saasservicemgmt_v1beta1/classes.rb', line 104 def weight @weight end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
111 112 113 114 |
# File 'lib/google/apis/saasservicemgmt_v1beta1/classes.rb', line 111 def update!(**args) @variant = args[:variant] if args.key?(:variant) @weight = args[:weight] if args.key?(:weight) end |