Class: OCI::CloudBridge::Models::OlvmDataCenter
- Inherits:
-
Object
- Object
- OCI::CloudBridge::Models::OlvmDataCenter
- Defined in:
- lib/oci/cloud_bridge/models/olvm_data_center.rb
Overview
An OLVM Data Center.
Constant Summary collapse
- QUOTA_MODE_TYPE_ENUM =
[ QUOTA_MODE_TYPE_AUDIT = 'AUDIT'.freeze, QUOTA_MODE_TYPE_DISABLED = 'DISABLED'.freeze, QUOTA_MODE_TYPE_ENABLED = 'ENABLED'.freeze ].freeze
- DATA_CENTER_STATUS_ENUM =
[ DATA_CENTER_STATUS_CONTEND = 'CONTEND'.freeze, DATA_CENTER_STATUS_MAINTENANCE = 'MAINTENANCE'.freeze, DATA_CENTER_STATUS_NOT_OPERATIONAL = 'NOT_OPERATIONAL'.freeze, DATA_CENTER_STATUS_PROBLEMATIC = 'PROBLEMATIC'.freeze, DATA_CENTER_STATUS_UNINITIALIZED = 'UNINITIALIZED'.freeze, DATA_CENTER_STATUS_UP = 'UP'.freeze ].freeze
- STORAGE_FORMAT_ENUM =
[ STORAGE_FORMAT_V1 = 'V1'.freeze, STORAGE_FORMAT_V2 = 'V2'.freeze, STORAGE_FORMAT_V3 = 'V3'.freeze, STORAGE_FORMAT_V4 = 'V4'.freeze, STORAGE_FORMAT_V5 = 'V5'.freeze ].freeze
Instance Attribute Summary collapse
-
#comment ⇒ String
Free text containing comments about this object.
-
#data_center_status ⇒ String
The status of data center.
-
#description ⇒ String
A human-readable description in plain text.
-
#id ⇒ String
A unique identifier.
-
#is_local ⇒ BOOLEAN
Whether the data center is local.
-
#name ⇒ String
A human-readable name in plain text.
-
#quota_mode_type ⇒ String
The type of quota mode.
-
#storage_format ⇒ String
Type which represents a format of storage domain.
-
#supported_versions ⇒ Array<OCI::CloudBridge::Models::OlvmVersion>
List of supported versions.
- #version ⇒ OCI::CloudBridge::Models::OlvmVersion
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 = {}) ⇒ OlvmDataCenter
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 = {}) ⇒ OlvmDataCenter
Initializes the object
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 |
# File 'lib/oci/cloud_bridge/models/olvm_data_center.rb', line 125 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.comment = attributes[:'comment'] if attributes[:'comment'] self.description = attributes[:'description'] if attributes[:'description'] self.id = attributes[:'id'] if attributes[:'id'] self.name = attributes[:'name'] if attributes[:'name'] self.is_local = attributes[:'isLocal'] unless attributes[:'isLocal'].nil? raise 'You cannot provide both :isLocal and :is_local' if attributes.key?(:'isLocal') && attributes.key?(:'is_local') self.is_local = attributes[:'is_local'] unless attributes[:'is_local'].nil? self.quota_mode_type = attributes[:'quotaModeType'] if attributes[:'quotaModeType'] raise 'You cannot provide both :quotaModeType and :quota_mode_type' if attributes.key?(:'quotaModeType') && attributes.key?(:'quota_mode_type') self.quota_mode_type = attributes[:'quota_mode_type'] if attributes[:'quota_mode_type'] self.data_center_status = attributes[:'dataCenterStatus'] if attributes[:'dataCenterStatus'] raise 'You cannot provide both :dataCenterStatus and :data_center_status' if attributes.key?(:'dataCenterStatus') && attributes.key?(:'data_center_status') self.data_center_status = attributes[:'data_center_status'] if attributes[:'data_center_status'] self.storage_format = attributes[:'storageFormat'] if attributes[:'storageFormat'] raise 'You cannot provide both :storageFormat and :storage_format' if attributes.key?(:'storageFormat') && attributes.key?(:'storage_format') self.storage_format = attributes[:'storage_format'] if attributes[:'storage_format'] self.supported_versions = attributes[:'supportedVersions'] if attributes[:'supportedVersions'] raise 'You cannot provide both :supportedVersions and :supported_versions' if attributes.key?(:'supportedVersions') && attributes.key?(:'supported_versions') self.supported_versions = attributes[:'supported_versions'] if attributes[:'supported_versions'] self.version = attributes[:'version'] if attributes[:'version'] end |
Instance Attribute Details
#comment ⇒ String
Free text containing comments about this object.
36 37 38 |
# File 'lib/oci/cloud_bridge/models/olvm_data_center.rb', line 36 def comment @comment end |
#data_center_status ⇒ String
The status of data center
60 61 62 |
# File 'lib/oci/cloud_bridge/models/olvm_data_center.rb', line 60 def data_center_status @data_center_status end |
#description ⇒ String
A human-readable description in plain text.
40 41 42 |
# File 'lib/oci/cloud_bridge/models/olvm_data_center.rb', line 40 def description @description end |
#id ⇒ String
A unique identifier.
44 45 46 |
# File 'lib/oci/cloud_bridge/models/olvm_data_center.rb', line 44 def id @id end |
#is_local ⇒ BOOLEAN
Whether the data center is local.
52 53 54 |
# File 'lib/oci/cloud_bridge/models/olvm_data_center.rb', line 52 def is_local @is_local end |
#name ⇒ String
A human-readable name in plain text.
48 49 50 |
# File 'lib/oci/cloud_bridge/models/olvm_data_center.rb', line 48 def name @name end |
#quota_mode_type ⇒ String
The type of quota mode
56 57 58 |
# File 'lib/oci/cloud_bridge/models/olvm_data_center.rb', line 56 def quota_mode_type @quota_mode_type end |
#storage_format ⇒ String
Type which represents a format of storage domain
64 65 66 |
# File 'lib/oci/cloud_bridge/models/olvm_data_center.rb', line 64 def storage_format @storage_format end |
#supported_versions ⇒ Array<OCI::CloudBridge::Models::OlvmVersion>
List of supported versions.
68 69 70 |
# File 'lib/oci/cloud_bridge/models/olvm_data_center.rb', line 68 def supported_versions @supported_versions end |
#version ⇒ OCI::CloudBridge::Models::OlvmVersion
71 72 73 |
# File 'lib/oci/cloud_bridge/models/olvm_data_center.rb', line 71 def version @version end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/oci/cloud_bridge/models/olvm_data_center.rb', line 74 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'comment': :'comment', 'description': :'description', 'id': :'id', 'name': :'name', 'is_local': :'isLocal', 'quota_mode_type': :'quotaModeType', 'data_center_status': :'dataCenterStatus', 'storage_format': :'storageFormat', 'supported_versions': :'supportedVersions', 'version': :'version' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/oci/cloud_bridge/models/olvm_data_center.rb', line 92 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'comment': :'String', 'description': :'String', 'id': :'String', 'name': :'String', 'is_local': :'BOOLEAN', 'quota_mode_type': :'String', 'data_center_status': :'String', 'storage_format': :'String', 'supported_versions': :'Array<OCI::CloudBridge::Models::OlvmVersion>', 'version': :'OCI::CloudBridge::Models::OlvmVersion' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/oci/cloud_bridge/models/olvm_data_center.rb', line 203 def ==(other) return true if equal?(other) self.class == other.class && comment == other.comment && description == other.description && id == other.id && name == other.name && is_local == other.is_local && quota_mode_type == other.quota_mode_type && data_center_status == other.data_center_status && storage_format == other.storage_format && supported_versions == other.supported_versions && version == other.version end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'lib/oci/cloud_bridge/models/olvm_data_center.rb', line 242 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
222 223 224 |
# File 'lib/oci/cloud_bridge/models/olvm_data_center.rb', line 222 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
231 232 233 |
# File 'lib/oci/cloud_bridge/models/olvm_data_center.rb', line 231 def hash [comment, description, id, name, is_local, quota_mode_type, data_center_status, storage_format, supported_versions, version].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
275 276 277 278 279 280 281 282 283 284 |
# File 'lib/oci/cloud_bridge/models/olvm_data_center.rb', line 275 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
269 270 271 |
# File 'lib/oci/cloud_bridge/models/olvm_data_center.rb', line 269 def to_s to_hash.to_s end |