Class: OCI::Datacc::Models::InfrastructureServer
- Inherits:
-
Object
- Object
- OCI::Datacc::Models::InfrastructureServer
- Defined in:
- lib/oci/datacc/models/infrastructure_server.rb
Overview
Database Infrastructure Server details.
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, LIFECYCLE_STATE_REQUIRES_VALIDATION = 'REQUIRES_VALIDATION'.freeze, LIFECYCLE_STATE_VALIDATING = 'VALIDATING'.freeze, LIFECYCLE_STATE_VALIDATION_FAILED = 'VALIDATION_FAILED'.freeze, LIFECYCLE_STATE_REQUIRES_ACTIVATION = 'REQUIRES_ACTIVATION'.freeze, LIFECYCLE_STATE_ACTIVATING = 'ACTIVATING'.freeze, LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_ACTIVATION_FAILED = 'ACTIVATION_FAILED'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, LIFECYCLE_STATE_DELETING = 'DELETING'.freeze, LIFECYCLE_STATE_DELETED = 'DELETED'.freeze, LIFECYCLE_STATE_DISCONNECTED = 'DISCONNECTED'.freeze, LIFECYCLE_STATE_MAINTENANCE_IN_PROGRESS = 'MAINTENANCE_IN_PROGRESS'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#base_vm_count ⇒ Integer
Number of database virtual machines hosted on the server.
- #compute_capacity ⇒ OCI::Datacc::Models::ComputeCapacityDetails
-
#id ⇒ String
[Required] The OCID of the Oracle Data Server of Infrastructure.
-
#ilom_ip_address ⇒ String
[Required] Database Infrastructure Server ILOM IP address.
-
#ilom_name ⇒ String
[Required] Database Infrastructure Server ILOM name.
-
#instance_vm_count ⇒ Integer
Number of instances hosted on the server.
-
#lifecycle_state ⇒ String
[Required] The current state of the Database Infrastructure server.
-
#server_ip_address ⇒ String
[Required] Database Infrastructure Server IP address.
-
#server_name ⇒ String
[Required] Database Infrastructure Server name.
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 = {}) ⇒ InfrastructureServer
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.
Constructor Details
#initialize(attributes = {}) ⇒ InfrastructureServer
Initializes the object
114 115 116 117 118 119 120 121 122 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 |
# File 'lib/oci/datacc/models/infrastructure_server.rb', line 114 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.id = attributes[:'id'] if attributes[:'id'] self.server_name = attributes[:'serverName'] if attributes[:'serverName'] raise 'You cannot provide both :serverName and :server_name' if attributes.key?(:'serverName') && attributes.key?(:'server_name') self.server_name = attributes[:'server_name'] if attributes[:'server_name'] self.server_ip_address = attributes[:'serverIpAddress'] if attributes[:'serverIpAddress'] raise 'You cannot provide both :serverIpAddress and :server_ip_address' if attributes.key?(:'serverIpAddress') && attributes.key?(:'server_ip_address') self.server_ip_address = attributes[:'server_ip_address'] if attributes[:'server_ip_address'] self.ilom_name = attributes[:'ilomName'] if attributes[:'ilomName'] raise 'You cannot provide both :ilomName and :ilom_name' if attributes.key?(:'ilomName') && attributes.key?(:'ilom_name') self.ilom_name = attributes[:'ilom_name'] if attributes[:'ilom_name'] self.ilom_ip_address = attributes[:'ilomIpAddress'] if attributes[:'ilomIpAddress'] raise 'You cannot provide both :ilomIpAddress and :ilom_ip_address' if attributes.key?(:'ilomIpAddress') && attributes.key?(:'ilom_ip_address') self.ilom_ip_address = attributes[:'ilom_ip_address'] if attributes[:'ilom_ip_address'] self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] self.base_vm_count = attributes[:'baseVmCount'] if attributes[:'baseVmCount'] raise 'You cannot provide both :baseVmCount and :base_vm_count' if attributes.key?(:'baseVmCount') && attributes.key?(:'base_vm_count') self.base_vm_count = attributes[:'base_vm_count'] if attributes[:'base_vm_count'] self.instance_vm_count = attributes[:'instanceVmCount'] if attributes[:'instanceVmCount'] raise 'You cannot provide both :instanceVmCount and :instance_vm_count' if attributes.key?(:'instanceVmCount') && attributes.key?(:'instance_vm_count') self.instance_vm_count = attributes[:'instance_vm_count'] if attributes[:'instance_vm_count'] self.compute_capacity = attributes[:'computeCapacity'] if attributes[:'computeCapacity'] raise 'You cannot provide both :computeCapacity and :compute_capacity' if attributes.key?(:'computeCapacity') && attributes.key?(:'compute_capacity') self.compute_capacity = attributes[:'compute_capacity'] if attributes[:'compute_capacity'] end |
Instance Attribute Details
#base_vm_count ⇒ Integer
Number of database virtual machines hosted on the server.
56 57 58 |
# File 'lib/oci/datacc/models/infrastructure_server.rb', line 56 def base_vm_count @base_vm_count end |
#compute_capacity ⇒ OCI::Datacc::Models::ComputeCapacityDetails
63 64 65 |
# File 'lib/oci/datacc/models/infrastructure_server.rb', line 63 def compute_capacity @compute_capacity end |
#id ⇒ String
[Required] The OCID of the Oracle Data Server of Infrastructure.
32 33 34 |
# File 'lib/oci/datacc/models/infrastructure_server.rb', line 32 def id @id end |
#ilom_ip_address ⇒ String
[Required] Database Infrastructure Server ILOM IP address.
48 49 50 |
# File 'lib/oci/datacc/models/infrastructure_server.rb', line 48 def ilom_ip_address @ilom_ip_address end |
#ilom_name ⇒ String
[Required] Database Infrastructure Server ILOM name.
44 45 46 |
# File 'lib/oci/datacc/models/infrastructure_server.rb', line 44 def ilom_name @ilom_name end |
#instance_vm_count ⇒ Integer
Number of instances hosted on the server.
60 61 62 |
# File 'lib/oci/datacc/models/infrastructure_server.rb', line 60 def instance_vm_count @instance_vm_count end |
#lifecycle_state ⇒ String
[Required] The current state of the Database Infrastructure server.
52 53 54 |
# File 'lib/oci/datacc/models/infrastructure_server.rb', line 52 def lifecycle_state @lifecycle_state end |
#server_ip_address ⇒ String
[Required] Database Infrastructure Server IP address.
40 41 42 |
# File 'lib/oci/datacc/models/infrastructure_server.rb', line 40 def server_ip_address @server_ip_address end |
#server_name ⇒ String
[Required] Database Infrastructure Server name.
36 37 38 |
# File 'lib/oci/datacc/models/infrastructure_server.rb', line 36 def server_name @server_name end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/oci/datacc/models/infrastructure_server.rb', line 66 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'server_name': :'serverName', 'server_ip_address': :'serverIpAddress', 'ilom_name': :'ilomName', 'ilom_ip_address': :'ilomIpAddress', 'lifecycle_state': :'lifecycleState', 'base_vm_count': :'baseVmCount', 'instance_vm_count': :'instanceVmCount', 'compute_capacity': :'computeCapacity' # 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 |
# File 'lib/oci/datacc/models/infrastructure_server.rb', line 83 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'server_name': :'String', 'server_ip_address': :'String', 'ilom_name': :'String', 'ilom_ip_address': :'String', 'lifecycle_state': :'String', 'base_vm_count': :'Integer', 'instance_vm_count': :'Integer', 'compute_capacity': :'OCI::Datacc::Models::ComputeCapacityDetails' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/oci/datacc/models/infrastructure_server.rb', line 191 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && server_name == other.server_name && server_ip_address == other.server_ip_address && ilom_name == other.ilom_name && ilom_ip_address == other.ilom_ip_address && lifecycle_state == other.lifecycle_state && base_vm_count == other.base_vm_count && instance_vm_count == other.instance_vm_count && compute_capacity == other.compute_capacity end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
# File 'lib/oci/datacc/models/infrastructure_server.rb', line 229 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
209 210 211 |
# File 'lib/oci/datacc/models/infrastructure_server.rb', line 209 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
218 219 220 |
# File 'lib/oci/datacc/models/infrastructure_server.rb', line 218 def hash [id, server_name, server_ip_address, ilom_name, ilom_ip_address, lifecycle_state, base_vm_count, instance_vm_count, compute_capacity].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
262 263 264 265 266 267 268 269 270 271 |
# File 'lib/oci/datacc/models/infrastructure_server.rb', line 262 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
256 257 258 |
# File 'lib/oci/datacc/models/infrastructure_server.rb', line 256 def to_s to_hash.to_s end |