Class: OCI::Opsi::Models::DBExternalInstance
- Inherits:
-
DatabaseConfigurationMetricGroup
- Object
- DatabaseConfigurationMetricGroup
- OCI::Opsi::Models::DBExternalInstance
- Defined in:
- lib/oci/opsi/models/db_external_instance.rb
Overview
Configuration parameters defined for external databases instance level.
Constant Summary
Constants inherited from DatabaseConfigurationMetricGroup
OCI::Opsi::Models::DatabaseConfigurationMetricGroup::METRIC_NAME_ENUM
Instance Attribute Summary collapse
-
#cpu_count ⇒ Integer
Total number of CPUs allocated for the host.
-
#database_status ⇒ String
Status of the database.
-
#edition ⇒ String
The edition of the database.
-
#host_memory_capacity ⇒ Float
Total amount of usable Physical RAM Memory available in gigabytes.
-
#host_name ⇒ String
[Required] Host name of the database instance.
-
#instance_name ⇒ String
[Required] Name of the database instance.
-
#instance_role ⇒ String
Role (permissions) of the database instance.
-
#logins ⇒ String
Indicates if logins are allowed or restricted.
-
#parallel ⇒ String
Indicates whether the instance is mounted in cluster database mode (YES) or not (NO).
-
#startup_time ⇒ DateTime
Start up time of the database instance.
-
#status ⇒ String
Status of the instance.
-
#version ⇒ String
Database 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 = {}) ⇒ DBExternalInstance
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 = {}) ⇒ DBExternalInstance
Initializes the object
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
# File 'lib/oci/opsi/models/db_external_instance.rb', line 123 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['metricName'] = 'DB_EXTERNAL_INSTANCE' 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.host_name = attributes[:'hostName'] if attributes[:'hostName'] raise 'You cannot provide both :hostName and :host_name' if attributes.key?(:'hostName') && attributes.key?(:'host_name') self.host_name = attributes[:'host_name'] if attributes[:'host_name'] self.cpu_count = attributes[:'cpuCount'] if attributes[:'cpuCount'] raise 'You cannot provide both :cpuCount and :cpu_count' if attributes.key?(:'cpuCount') && attributes.key?(:'cpu_count') self.cpu_count = attributes[:'cpu_count'] if attributes[:'cpu_count'] self.host_memory_capacity = attributes[:'hostMemoryCapacity'] if attributes[:'hostMemoryCapacity'] raise 'You cannot provide both :hostMemoryCapacity and :host_memory_capacity' if attributes.key?(:'hostMemoryCapacity') && attributes.key?(:'host_memory_capacity') self.host_memory_capacity = attributes[:'host_memory_capacity'] if attributes[:'host_memory_capacity'] self.version = attributes[:'version'] if attributes[:'version'] self.parallel = attributes[:'parallel'] if attributes[:'parallel'] self.instance_role = attributes[:'instanceRole'] if attributes[:'instanceRole'] raise 'You cannot provide both :instanceRole and :instance_role' if attributes.key?(:'instanceRole') && attributes.key?(:'instance_role') self.instance_role = attributes[:'instance_role'] if attributes[:'instance_role'] self.logins = attributes[:'logins'] if attributes[:'logins'] self.database_status = attributes[:'databaseStatus'] if attributes[:'databaseStatus'] raise 'You cannot provide both :databaseStatus and :database_status' if attributes.key?(:'databaseStatus') && attributes.key?(:'database_status') self.database_status = attributes[:'database_status'] if attributes[:'database_status'] self.status = attributes[:'status'] if attributes[:'status'] self.edition = attributes[:'edition'] if attributes[:'edition'] self.startup_time = attributes[:'startupTime'] if attributes[:'startupTime'] raise 'You cannot provide both :startupTime and :startup_time' if attributes.key?(:'startupTime') && attributes.key?(:'startup_time') self.startup_time = attributes[:'startup_time'] if attributes[:'startup_time'] end |
Instance Attribute Details
#cpu_count ⇒ Integer
Total number of CPUs allocated for the host.
22 23 24 |
# File 'lib/oci/opsi/models/db_external_instance.rb', line 22 def cpu_count @cpu_count end |
#database_status ⇒ String
Status of the database.
46 47 48 |
# File 'lib/oci/opsi/models/db_external_instance.rb', line 46 def database_status @database_status end |
#edition ⇒ String
The edition of the database.
54 55 56 |
# File 'lib/oci/opsi/models/db_external_instance.rb', line 54 def edition @edition end |
#host_memory_capacity ⇒ Float
Total amount of usable Physical RAM Memory available in gigabytes.
26 27 28 |
# File 'lib/oci/opsi/models/db_external_instance.rb', line 26 def host_memory_capacity @host_memory_capacity end |
#host_name ⇒ String
[Required] Host name of the database instance.
18 19 20 |
# File 'lib/oci/opsi/models/db_external_instance.rb', line 18 def host_name @host_name end |
#instance_name ⇒ String
[Required] Name of the database instance.
14 15 16 |
# File 'lib/oci/opsi/models/db_external_instance.rb', line 14 def instance_name @instance_name end |
#instance_role ⇒ String
Role (permissions) of the database instance.
38 39 40 |
# File 'lib/oci/opsi/models/db_external_instance.rb', line 38 def instance_role @instance_role end |
#logins ⇒ String
Indicates if logins are allowed or restricted.
42 43 44 |
# File 'lib/oci/opsi/models/db_external_instance.rb', line 42 def logins @logins end |
#parallel ⇒ String
Indicates whether the instance is mounted in cluster database mode (YES) or not (NO).
34 35 36 |
# File 'lib/oci/opsi/models/db_external_instance.rb', line 34 def parallel @parallel end |
#startup_time ⇒ DateTime
Start up time of the database instance.
58 59 60 |
# File 'lib/oci/opsi/models/db_external_instance.rb', line 58 def startup_time @startup_time end |
#status ⇒ String
Status of the instance.
50 51 52 |
# File 'lib/oci/opsi/models/db_external_instance.rb', line 50 def status @status end |
#version ⇒ String
Database version.
30 31 32 |
# File 'lib/oci/opsi/models/db_external_instance.rb', line 30 def version @version end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/oci/opsi/models/db_external_instance.rb', line 61 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'metric_name': :'metricName', 'time_collected': :'timeCollected', 'instance_name': :'instanceName', 'host_name': :'hostName', 'cpu_count': :'cpuCount', 'host_memory_capacity': :'hostMemoryCapacity', 'version': :'version', 'parallel': :'parallel', 'instance_role': :'instanceRole', 'logins': :'logins', 'database_status': :'databaseStatus', 'status': :'status', 'edition': :'edition', 'startup_time': :'startupTime' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/oci/opsi/models/db_external_instance.rb', line 83 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'metric_name': :'String', 'time_collected': :'DateTime', 'instance_name': :'String', 'host_name': :'String', 'cpu_count': :'Integer', 'host_memory_capacity': :'Float', 'version': :'String', 'parallel': :'String', 'instance_role': :'String', 'logins': :'String', 'database_status': :'String', 'status': :'String', 'edition': :'String', 'startup_time': :'DateTime' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/oci/opsi/models/db_external_instance.rb', line 193 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 && host_name == other.host_name && cpu_count == other.cpu_count && host_memory_capacity == other.host_memory_capacity && version == other.version && parallel == other.parallel && instance_role == other.instance_role && logins == other.logins && database_status == other.database_status && status == other.status && edition == other.edition && startup_time == other.startup_time end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 |
# File 'lib/oci/opsi/models/db_external_instance.rb', line 236 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
216 217 218 |
# File 'lib/oci/opsi/models/db_external_instance.rb', line 216 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
225 226 227 |
# File 'lib/oci/opsi/models/db_external_instance.rb', line 225 def hash [metric_name, time_collected, instance_name, host_name, cpu_count, host_memory_capacity, version, parallel, instance_role, logins, database_status, status, edition, startup_time].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
269 270 271 272 273 274 275 276 277 278 |
# File 'lib/oci/opsi/models/db_external_instance.rb', line 269 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
263 264 265 |
# File 'lib/oci/opsi/models/db_external_instance.rb', line 263 def to_s to_hash.to_s end |