Method: OCI::ApmConfig::Models::ApdexRules#initialize

Defined in:
lib/oci/apm_config/models/apdex_rules.rb

#initialize(attributes = {}) ⇒ ApdexRules

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :id (String)

    The value to assign to the #id proprety

  • :time_created (DateTime)

    The value to assign to the #time_created proprety

  • :time_updated (DateTime)

    The value to assign to the #time_updated proprety

  • :freeform_tags (Hash<String, String>)

    The value to assign to the #freeform_tags proprety

  • :defined_tags (Hash<String, Hash<String, Object>>)

    The value to assign to the #defined_tags proprety

  • :display_name (String)

    The value to assign to the #display_name property

  • :rules (Array<OCI::ApmConfig::Models::Apdex>)

    The value to assign to the #rules property



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/oci/apm_config/models/apdex_rules.rb', line 65

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

  attributes['configType'] = 'APDEX'

  super(attributes)

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

  self.display_name = attributes[:'displayName'] if attributes[:'displayName']

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

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

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