Method: OCI::DataScience::Models::ScalingPolicy#initialize

Defined in:
lib/oci/data_science/models/scaling_policy.rb

#initialize(attributes = {}) ⇒ ScalingPolicy

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :policy_type (String)

    The value to assign to the #policy_type property



61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/oci/data_science/models/scaling_policy.rb', line 61

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.policy_type = attributes[:'policyType'] if attributes[:'policyType']

  raise 'You cannot provide both :policyType and :policy_type' if attributes.key?(:'policyType') && attributes.key?(:'policy_type')

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