Class: OCI::CloudMigrations::Models::OlvmIscsiDetails
- Inherits:
-
Object
- Object
- OCI::CloudMigrations::Models::OlvmIscsiDetails
- Defined in:
- lib/oci/cloud_migrations/models/olvm_iscsi_details.rb
Overview
The host iSCSI details.
Instance Attribute Summary collapse
-
#address ⇒ String
Address of iSCSI.
-
#disk_id ⇒ String
Disk ID of iSCSI.
-
#initiator ⇒ String
Initiator of iSCSI.
-
#lun_mapping ⇒ Integer
LUN Mapping of iSCSI.
-
#paths ⇒ Integer
Number of paths of iSCSI.
-
#port ⇒ Integer
Port number of iSCSI.
-
#portal ⇒ String
Portal of iSCSI.
-
#product_id ⇒ String
Product ID of iSCSI.
-
#serial ⇒ String
Serial of iSCSI.
-
#size_in_bytes ⇒ Integer
size of iSCSI.
-
#status ⇒ String
Status of iSCSI.
-
#storage_domain_id ⇒ String
Storage Domain ID of iSCSI.
-
#target ⇒ String
target of iSCSI.
-
#username ⇒ String
Username of iSCSI.
-
#vendor_id ⇒ String
Vendor ID of iSCSI.
-
#volume_group_id ⇒ String
Volume Group ID of iSCSI.
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 = {}) ⇒ OlvmIscsiDetails
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 = {}) ⇒ OlvmIscsiDetails
Initializes the object
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 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 145 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.address = attributes[:'address'] if attributes[:'address'] self.disk_id = attributes[:'diskId'] if attributes[:'diskId'] raise 'You cannot provide both :diskId and :disk_id' if attributes.key?(:'diskId') && attributes.key?(:'disk_id') self.disk_id = attributes[:'disk_id'] if attributes[:'disk_id'] self.initiator = attributes[:'initiator'] if attributes[:'initiator'] self.lun_mapping = attributes[:'lunMapping'] if attributes[:'lunMapping'] raise 'You cannot provide both :lunMapping and :lun_mapping' if attributes.key?(:'lunMapping') && attributes.key?(:'lun_mapping') self.lun_mapping = attributes[:'lun_mapping'] if attributes[:'lun_mapping'] self.paths = attributes[:'paths'] if attributes[:'paths'] self.port = attributes[:'port'] if attributes[:'port'] self.portal = attributes[:'portal'] if attributes[:'portal'] self.product_id = attributes[:'productId'] if attributes[:'productId'] raise 'You cannot provide both :productId and :product_id' if attributes.key?(:'productId') && attributes.key?(:'product_id') self.product_id = attributes[:'product_id'] if attributes[:'product_id'] self.serial = attributes[:'serial'] if attributes[:'serial'] self.size_in_bytes = attributes[:'sizeInBytes'] if attributes[:'sizeInBytes'] raise 'You cannot provide both :sizeInBytes and :size_in_bytes' if attributes.key?(:'sizeInBytes') && attributes.key?(:'size_in_bytes') self.size_in_bytes = attributes[:'size_in_bytes'] if attributes[:'size_in_bytes'] self.status = attributes[:'status'] if attributes[:'status'] self.storage_domain_id = attributes[:'storageDomainId'] if attributes[:'storageDomainId'] raise 'You cannot provide both :storageDomainId and :storage_domain_id' if attributes.key?(:'storageDomainId') && attributes.key?(:'storage_domain_id') self.storage_domain_id = attributes[:'storage_domain_id'] if attributes[:'storage_domain_id'] self.target = attributes[:'target'] if attributes[:'target'] self.username = attributes[:'username'] if attributes[:'username'] self.vendor_id = attributes[:'vendorId'] if attributes[:'vendorId'] raise 'You cannot provide both :vendorId and :vendor_id' if attributes.key?(:'vendorId') && attributes.key?(:'vendor_id') self.vendor_id = attributes[:'vendor_id'] if attributes[:'vendor_id'] self.volume_group_id = attributes[:'volumeGroupId'] if attributes[:'volumeGroupId'] raise 'You cannot provide both :volumeGroupId and :volume_group_id' if attributes.key?(:'volumeGroupId') && attributes.key?(:'volume_group_id') self.volume_group_id = attributes[:'volume_group_id'] if attributes[:'volume_group_id'] end |
Instance Attribute Details
#address ⇒ String
Address of iSCSI
13 14 15 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 13 def address @address end |
#disk_id ⇒ String
Disk ID of iSCSI
17 18 19 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 17 def disk_id @disk_id end |
#initiator ⇒ String
Initiator of iSCSI
21 22 23 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 21 def initiator @initiator end |
#lun_mapping ⇒ Integer
LUN Mapping of iSCSI
25 26 27 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 25 def lun_mapping @lun_mapping end |
#paths ⇒ Integer
Number of paths of iSCSI
29 30 31 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 29 def paths @paths end |
#port ⇒ Integer
Port number of iSCSI
33 34 35 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 33 def port @port end |
#portal ⇒ String
Portal of iSCSI
37 38 39 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 37 def portal @portal end |
#product_id ⇒ String
Product ID of iSCSI
41 42 43 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 41 def product_id @product_id end |
#serial ⇒ String
Serial of iSCSI
45 46 47 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 45 def serial @serial end |
#size_in_bytes ⇒ Integer
size of iSCSI
49 50 51 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 49 def size_in_bytes @size_in_bytes end |
#status ⇒ String
Status of iSCSI
53 54 55 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 53 def status @status end |
#storage_domain_id ⇒ String
Storage Domain ID of iSCSI
57 58 59 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 57 def storage_domain_id @storage_domain_id end |
#target ⇒ String
target of iSCSI
61 62 63 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 61 def target @target end |
#username ⇒ String
Username of iSCSI
65 66 67 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 65 def username @username end |
#vendor_id ⇒ String
Vendor ID of iSCSI
69 70 71 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 69 def vendor_id @vendor_id end |
#volume_group_id ⇒ String
Volume Group ID of iSCSI
73 74 75 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 73 def volume_group_id @volume_group_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 76 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'address': :'address', 'disk_id': :'diskId', 'initiator': :'initiator', 'lun_mapping': :'lunMapping', 'paths': :'paths', 'port': :'port', 'portal': :'portal', 'product_id': :'productId', 'serial': :'serial', 'size_in_bytes': :'sizeInBytes', 'status': :'status', 'storage_domain_id': :'storageDomainId', 'target': :'target', 'username': :'username', 'vendor_id': :'vendorId', 'volume_group_id': :'volumeGroupId' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 100 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'address': :'String', 'disk_id': :'String', 'initiator': :'String', 'lun_mapping': :'Integer', 'paths': :'Integer', 'port': :'Integer', 'portal': :'String', 'product_id': :'String', 'serial': :'String', 'size_in_bytes': :'Integer', 'status': :'String', 'storage_domain_id': :'String', 'target': :'String', 'username': :'String', 'vendor_id': :'String', 'volume_group_id': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 219 def ==(other) return true if equal?(other) self.class == other.class && address == other.address && disk_id == other.disk_id && initiator == other.initiator && lun_mapping == other.lun_mapping && paths == other.paths && port == other.port && portal == other.portal && product_id == other.product_id && serial == other.serial && size_in_bytes == other.size_in_bytes && status == other.status && storage_domain_id == other.storage_domain_id && target == other.target && username == other.username && vendor_id == other.vendor_id && volume_group_id == other.volume_group_id end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 264 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
244 245 246 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 244 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
253 254 255 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 253 def hash [address, disk_id, initiator, lun_mapping, paths, port, portal, product_id, serial, size_in_bytes, status, storage_domain_id, target, username, vendor_id, volume_group_id].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
297 298 299 300 301 302 303 304 305 306 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 297 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
291 292 293 |
# File 'lib/oci/cloud_migrations/models/olvm_iscsi_details.rb', line 291 def to_s to_hash.to_s end |