Class: Google::Apis::SaasservicemgmtV1beta1::Allocation
- Inherits:
-
Object
- Object
- Google::Apis::SaasservicemgmtV1beta1::Allocation
- 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
Allocation defines a set of weighted flag variants, specifying how traffic is split based on the randomization unit.
Instance Attribute Summary collapse
-
#description ⇒ String
Optional.
-
#id ⇒ String
Required.
-
#randomized_on ⇒ String
Required.
-
#slots ⇒ Array<Google::Apis::SaasservicemgmtV1beta1::AllocationSlot>
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Allocation
constructor
A new instance of Allocation.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Allocation
Returns a new instance of Allocation.
77 78 79 |
# File 'lib/google/apis/saasservicemgmt_v1beta1/classes.rb', line 77 def initialize(**args) update!(**args) end |
Instance Attribute Details
#description ⇒ String
Optional. Description of the allocation. Max length: 500 bytes.
Corresponds to the JSON property description
60 61 62 |
# File 'lib/google/apis/saasservicemgmt_v1beta1/classes.rb', line 60 def description @description end |
#id ⇒ String
Required. Allocation ID. Max length: 128 bytes.
Corresponds to the JSON property id
65 66 67 |
# File 'lib/google/apis/saasservicemgmt_v1beta1/classes.rb', line 65 def id @id end |
#randomized_on ⇒ String
Required. Key of the context attribute that is used for traffic splitting.
Corresponds to the JSON property randomizedOn
70 71 72 |
# File 'lib/google/apis/saasservicemgmt_v1beta1/classes.rb', line 70 def randomized_on @randomized_on end |
#slots ⇒ Array<Google::Apis::SaasservicemgmtV1beta1::AllocationSlot>
Required. Slots defines the weighted distribution of variants.
Corresponds to the JSON property slots
75 76 77 |
# File 'lib/google/apis/saasservicemgmt_v1beta1/classes.rb', line 75 def slots @slots end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
82 83 84 85 86 87 |
# File 'lib/google/apis/saasservicemgmt_v1beta1/classes.rb', line 82 def update!(**args) @description = args[:description] if args.key?(:description) @id = args[:id] if args.key?(:id) @randomized_on = args[:randomized_on] if args.key?(:randomized_on) @slots = args[:slots] if args.key?(:slots) end |