Class: Google::Apis::SaasservicemgmtV1beta1::Allocation

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

Instance Method Summary collapse

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

#descriptionString

Optional. Description of the allocation. Max length: 500 bytes. Corresponds to the JSON property description

Returns:

  • (String)


60
61
62
# File 'lib/google/apis/saasservicemgmt_v1beta1/classes.rb', line 60

def description
  @description
end

#idString

Required. Allocation ID. Max length: 128 bytes. Corresponds to the JSON property id

Returns:

  • (String)


65
66
67
# File 'lib/google/apis/saasservicemgmt_v1beta1/classes.rb', line 65

def id
  @id
end

#randomized_onString

Required. Key of the context attribute that is used for traffic splitting. Corresponds to the JSON property randomizedOn

Returns:

  • (String)


70
71
72
# File 'lib/google/apis/saasservicemgmt_v1beta1/classes.rb', line 70

def randomized_on
  @randomized_on
end

#slotsArray<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