Class: Google::Apis::SaasservicemgmtV1beta1::AllocationSlot

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

AllocationSlot specifies a variant and the proportion of traffic allocated to it.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#variantString

Required. Variant of the allocation slot. Corresponds to the JSON property variant

Returns:

  • (String)


98
99
100
# File 'lib/google/apis/saasservicemgmt_v1beta1/classes.rb', line 98

def variant
  @variant
end

#weightFixnum

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

Returns:

  • (Fixnum)


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