Class: OCI::Opsi::Models::ExadataAsmEntity
- Inherits:
-
DatabaseConfigurationMetricGroup
- Object
- DatabaseConfigurationMetricGroup
- OCI::Opsi::Models::ExadataAsmEntity
- Defined in:
- lib/oci/opsi/models/exadata_asm_entity.rb
Overview
ASM entitie for an exadata
Constant Summary
Constants inherited from DatabaseConfigurationMetricGroup
DatabaseConfigurationMetricGroup::METRIC_NAME_ENUM
Instance Attribute Summary collapse
-
#cluster_name ⇒ String
Cluster name of ASM.
-
#instance_name ⇒ String
Instance name of ASM.
-
#software_version ⇒ String
Software version.
Attributes inherited from DatabaseConfigurationMetricGroup
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ExadataAsmEntity
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Methods inherited from DatabaseConfigurationMetricGroup
Constructor Details
#initialize(attributes = {}) ⇒ ExadataAsmEntity
Initializes the object
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/oci/opsi/models/exadata_asm_entity.rb', line 61 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['metricName'] = 'ASM_ENTITY' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.instance_name = attributes[:'instanceName'] if attributes[:'instanceName'] raise 'You cannot provide both :instanceName and :instance_name' if attributes.key?(:'instanceName') && attributes.key?(:'instance_name') self.instance_name = attributes[:'instance_name'] if attributes[:'instance_name'] self.cluster_name = attributes[:'clusterName'] if attributes[:'clusterName'] raise 'You cannot provide both :clusterName and :cluster_name' if attributes.key?(:'clusterName') && attributes.key?(:'cluster_name') self.cluster_name = attributes[:'cluster_name'] if attributes[:'cluster_name'] self.software_version = attributes[:'softwareVersion'] if attributes[:'softwareVersion'] raise 'You cannot provide both :softwareVersion and :software_version' if attributes.key?(:'softwareVersion') && attributes.key?(:'software_version') self.software_version = attributes[:'software_version'] if attributes[:'software_version'] end |
Instance Attribute Details
#cluster_name ⇒ String
Cluster name of ASM
19 20 21 |
# File 'lib/oci/opsi/models/exadata_asm_entity.rb', line 19 def cluster_name @cluster_name end |
#instance_name ⇒ String
Instance name of ASM
15 16 17 |
# File 'lib/oci/opsi/models/exadata_asm_entity.rb', line 15 def instance_name @instance_name end |
#software_version ⇒ String
Software version
23 24 25 |
# File 'lib/oci/opsi/models/exadata_asm_entity.rb', line 23 def software_version @software_version end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/oci/opsi/models/exadata_asm_entity.rb', line 26 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'metric_name': :'metricName', 'time_collected': :'timeCollected', 'instance_name': :'instanceName', 'cluster_name': :'clusterName', 'software_version': :'softwareVersion' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/oci/opsi/models/exadata_asm_entity.rb', line 39 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'metric_name': :'String', 'time_collected': :'DateTime', 'instance_name': :'String', 'cluster_name': :'String', 'software_version': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
97 98 99 100 101 102 103 104 105 106 |
# File 'lib/oci/opsi/models/exadata_asm_entity.rb', line 97 def ==(other) return true if equal?(other) self.class == other.class && metric_name == other.metric_name && time_collected == other.time_collected && instance_name == other.instance_name && cluster_name == other.cluster_name && software_version == other.software_version end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/oci/opsi/models/exadata_asm_entity.rb', line 131 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
111 112 113 |
# File 'lib/oci/opsi/models/exadata_asm_entity.rb', line 111 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
120 121 122 |
# File 'lib/oci/opsi/models/exadata_asm_entity.rb', line 120 def hash [metric_name, time_collected, instance_name, cluster_name, software_version].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
164 165 166 167 168 169 170 171 172 173 |
# File 'lib/oci/opsi/models/exadata_asm_entity.rb', line 164 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_s ⇒ String
Returns the string representation of the object
158 159 160 |
# File 'lib/oci/opsi/models/exadata_asm_entity.rb', line 158 def to_s to_hash.to_s end |