Class: OCI::Opsi::Models::ExadataCellConfig

Inherits:
DatabaseConfigurationMetricGroup show all
Defined in:
lib/oci/opsi/models/exadata_cell_config.rb

Overview

Storage server configuration

Constant Summary

Constants inherited from DatabaseConfigurationMetricGroup

DatabaseConfigurationMetricGroup::METRIC_NAME_ENUM

Instance Attribute Summary collapse

Attributes inherited from DatabaseConfigurationMetricGroup

#metric_name, #time_collected

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DatabaseConfigurationMetricGroup

get_subtype

Constructor Details

#initialize(attributes = {}) ⇒ ExadataCellConfig

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :time_collected (DateTime)

    The value to assign to the #time_collected proprety

  • :cell_name (String)

    The value to assign to the #cell_name property

  • :cell_hash (String)

    The value to assign to the #cell_hash property

  • :cell_properties (String)

    The value to assign to the #cell_properties property

  • :cell_configs (String)

    The value to assign to the #cell_configs property

  • :disk_counts (String)

    The value to assign to the #disk_counts property



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/oci/opsi/models/exadata_cell_config.rb', line 75

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

  attributes['metricName'] = 'EXADATA_CELL_CONFIG'

  super(attributes)

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

  self.cell_name = attributes[:'cellName'] if attributes[:'cellName']

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

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

  self.cell_hash = attributes[:'cellHash'] if attributes[:'cellHash']

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

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

  self.cell_properties = attributes[:'cellProperties'] if attributes[:'cellProperties']

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

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

  self.cell_configs = attributes[:'cellConfigs'] if attributes[:'cellConfigs']

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

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

  self.disk_counts = attributes[:'diskCounts'] if attributes[:'diskCounts']

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

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

Instance Attribute Details

#cell_configsString

Cell configs

Returns:

  • (String)


27
28
29
# File 'lib/oci/opsi/models/exadata_cell_config.rb', line 27

def cell_configs
  @cell_configs
end

#cell_hashString

Cell hash

Returns:

  • (String)


19
20
21
# File 'lib/oci/opsi/models/exadata_cell_config.rb', line 19

def cell_hash
  @cell_hash
end

#cell_nameString

Cell name

Returns:

  • (String)


15
16
17
# File 'lib/oci/opsi/models/exadata_cell_config.rb', line 15

def cell_name
  @cell_name
end

#cell_propertiesString

Cell properties

Returns:

  • (String)


23
24
25
# File 'lib/oci/opsi/models/exadata_cell_config.rb', line 23

def cell_properties
  @cell_properties
end

#disk_countsString

Cell disk counts

Returns:

  • (String)


31
32
33
# File 'lib/oci/opsi/models/exadata_cell_config.rb', line 31

def disk_counts
  @disk_counts
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/oci/opsi/models/exadata_cell_config.rb', line 34

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'metric_name': :'metricName',
    'time_collected': :'timeCollected',
    'cell_name': :'cellName',
    'cell_hash': :'cellHash',
    'cell_properties': :'cellProperties',
    'cell_configs': :'cellConfigs',
    'disk_counts': :'diskCounts'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/oci/opsi/models/exadata_cell_config.rb', line 49

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'metric_name': :'String',
    'time_collected': :'DateTime',
    'cell_name': :'String',
    'cell_hash': :'String',
    'cell_properties': :'String',
    'cell_configs': :'String',
    'disk_counts': :'String'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



123
124
125
126
127
128
129
130
131
132
133
134
# File 'lib/oci/opsi/models/exadata_cell_config.rb', line 123

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    metric_name == other.metric_name &&
    time_collected == other.time_collected &&
    cell_name == other.cell_name &&
    cell_hash == other.cell_hash &&
    cell_properties == other.cell_properties &&
    cell_configs == other.cell_configs &&
    disk_counts == other.disk_counts
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# File 'lib/oci/opsi/models/exadata_cell_config.rb', line 159

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      public_method("#{key}=").call(
        OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
      )
    end
    # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


139
140
141
# File 'lib/oci/opsi/models/exadata_cell_config.rb', line 139

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



148
149
150
# File 'lib/oci/opsi/models/exadata_cell_config.rb', line 148

def hash
  [metric_name, time_collected, cell_name, cell_hash, cell_properties, cell_configs, disk_counts].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



192
193
194
195
196
197
198
199
200
201
# File 'lib/oci/opsi/models/exadata_cell_config.rb', line 192

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = public_method(attr).call
    next if value.nil? && !instance_variable_defined?("@#{attr}")

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



186
187
188
# File 'lib/oci/opsi/models/exadata_cell_config.rb', line 186

def to_s
  to_hash.to_s
end