Method: OCI::Autoscaling::Models::CreateThresholdPolicyDetails#initialize
- Defined in:
- lib/oci/autoscaling/models/create_threshold_policy_details.rb
#initialize(attributes = {}) ⇒ CreateThresholdPolicyDetails
Initializes the object
51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/oci/autoscaling/models/create_threshold_policy_details.rb', line 51 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['policyType'] = 'threshold' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.rules = attributes[:'rules'] if attributes[:'rules'] end |