Method: OCI::Autoscaling::Models::Threshold#initialize

Defined in:
lib/oci/autoscaling/models/threshold.rb

#initialize(attributes = {}) ⇒ Threshold

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :operator (String)

    The value to assign to the #operator property

  • :value (Integer)

    The value to assign to the #value property



56
57
58
59
60
61
62
63
64
65
# File 'lib/oci/autoscaling/models/threshold.rb', line 56

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.operator = attributes[:'operator'] if attributes[:'operator']

  self.value = attributes[:'value'] if attributes[:'value']
end