Class: IntersightClient::VirtualizationVmwareVirtualDiskAllOf
- Inherits:
-
Object
- Object
- IntersightClient::VirtualizationVmwareVirtualDiskAllOf
- Defined in:
- lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb
Overview
Definition of the list of properties defined in ‘virtualization.VmwareVirtualDisk’, excluding properties defined in parent classes.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#class_id ⇒ Object
The fully-qualified name of the instantiated, concrete type.
-
#compatibility_mode ⇒ Object
Compatibility mode of the raw disk mapping (RDM).
-
#controller_key ⇒ Object
Key of the controller on which the disk is created.
-
#datastore ⇒ Object
Returns the value of attribute datastore.
-
#device_name ⇒ Object
Host-specific device the LUN is being accessed through.
-
#disk_mode ⇒ Object
Persistence mode of the virtual disk.
-
#disk_type ⇒ Object
Specifies whether the virtual disk is a RDM or a Hard disk.
-
#key ⇒ Object
The internally assigned key of this disk.
-
#limit ⇒ Object
The utilization of a virtual machine will not exceed this limit, even if there are available resources.
-
#lun_uuid ⇒ Object
Unique identifier of the LUN accessed by the raw disk mapping (RDM).
-
#object_type ⇒ Object
The fully-qualified name of the instantiated, concrete type.
-
#serial ⇒ Object
Serial ID of the storage device.
-
#shares ⇒ Object
Returns the value of attribute shares.
-
#sharing ⇒ Object
Sharing mode of the virtual disk.
-
#storage_allocation_type ⇒ Object
Allocation type for the virtual disk.
-
#unit_number ⇒ Object
Unit number of the disk on its controller.
-
#uuid ⇒ Object
UUID assigned by vCenter to every disk.
-
#vdisk_id ⇒ Object
Identity of the virtual disk object as the first class entity.
-
#vendor ⇒ Object
Vendor of the storage device.
-
#virtual_disk_path ⇒ Object
Path of the virtual disk.
-
#virtual_machine ⇒ Object
Returns the value of attribute virtual_machine.
-
#vm_identity ⇒ Object
Identity of the virtual machine where the virtual disk is created.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns the key-value map of all the JSON attributes this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ VirtualizationVmwareVirtualDiskAllOf
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ VirtualizationVmwareVirtualDiskAllOf
Initializes the object
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 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 179 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `IntersightClient::VirtualizationVmwareVirtualDiskAllOf` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `#{self.class.name}`. Please check the name to make sure it's valid. List of attributes: " + self.class.acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'class_id') self.class_id = attributes[:'class_id'] else self.class_id = 'virtualization.VmwareVirtualDisk' end if attributes.key?(:'object_type') self.object_type = attributes[:'object_type'] else self.object_type = 'virtualization.VmwareVirtualDisk' end if attributes.key?(:'compatibility_mode') self.compatibility_mode = attributes[:'compatibility_mode'] else self.compatibility_mode = 'notApplicable' end if attributes.key?(:'controller_key') self.controller_key = attributes[:'controller_key'] end if attributes.key?(:'device_name') self.device_name = attributes[:'device_name'] end if attributes.key?(:'disk_mode') self.disk_mode = attributes[:'disk_mode'] else self.disk_mode = 'persistent' end if attributes.key?(:'disk_type') self.disk_type = attributes[:'disk_type'] else self.disk_type = 'flatDisk' end if attributes.key?(:'key') self.key = attributes[:'key'] end if attributes.key?(:'limit') self.limit = attributes[:'limit'] end if attributes.key?(:'lun_uuid') self.lun_uuid = attributes[:'lun_uuid'] end if attributes.key?(:'serial') self.serial = attributes[:'serial'] end if attributes.key?(:'shares') self.shares = attributes[:'shares'] end if attributes.key?(:'sharing') self.sharing = attributes[:'sharing'] else self.sharing = 'sharingNone' end if attributes.key?(:'storage_allocation_type') self.storage_allocation_type = attributes[:'storage_allocation_type'] else self.storage_allocation_type = 'notApplicable' end if attributes.key?(:'unit_number') self.unit_number = attributes[:'unit_number'] end if attributes.key?(:'uuid') self.uuid = attributes[:'uuid'] end if attributes.key?(:'vdisk_id') self.vdisk_id = attributes[:'vdisk_id'] end if attributes.key?(:'vendor') self.vendor = attributes[:'vendor'] end if attributes.key?(:'virtual_disk_path') self.virtual_disk_path = attributes[:'virtual_disk_path'] end if attributes.key?(:'vm_identity') self.vm_identity = attributes[:'vm_identity'] end if attributes.key?(:'datastore') self.datastore = attributes[:'datastore'] end if attributes.key?(:'virtual_machine') self.virtual_machine = attributes[:'virtual_machine'] end end |
Instance Attribute Details
#class_id ⇒ Object
The fully-qualified name of the instantiated, concrete type. This property is used as a discriminator to identify the type of the payload when marshaling and unmarshaling data.
20 21 22 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 20 def class_id @class_id end |
#compatibility_mode ⇒ Object
Compatibility mode of the raw disk mapping (RDM). * notApplicable - Value specified for any disk which is not of raw device mapping type. * physicalMode - A disk device backed by a physical compatibility mode raw disk mapping cannot use disk modes, and commands are passed straight through to the LUN indicated by the raw disk mapping. * virtualMode - A disk device backed by a virtual compatibility mode raw disk mapping can use disk modes.
26 27 28 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 26 def compatibility_mode @compatibility_mode end |
#controller_key ⇒ Object
Key of the controller on which the disk is created.
29 30 31 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 29 def controller_key @controller_key end |
#datastore ⇒ Object
Returns the value of attribute datastore.
78 79 80 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 78 def datastore @datastore end |
#device_name ⇒ Object
Host-specific device the LUN is being accessed through. If the target LUN is not available on the host then it is empty. For example, this could happen if it has accidentally been masked out.
32 33 34 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 32 def device_name @device_name end |
#disk_mode ⇒ Object
Persistence mode of the virtual disk. For RDM disks, it is only supported when the raw disk mapping is using virtual compatibility mode. * persistent - Changes are immediately and permanently written to the virtual disk. * independent_persistent - Changes are immediately and permanently written to the virtual disk and not affected by snapshots. * independent_nonpersistent - Changes to virtual disk are made to a redo log and discarded at power off and not affected by snapshots. * nonpersistent - Changes to virtual disk are made to a redo log and discarded at power off. * undoable - Changes to virtual disk are made to a redo log and has the option to commit or undo. * append - Changes are appended to the redo log and can be revoked by removing the undo log.
35 36 37 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 35 def disk_mode @disk_mode end |
#disk_type ⇒ Object
Specifies whether the virtual disk is a RDM or a Hard disk. * flatDisk - Specifies that it is a flat disk. * rdmDisk - Specifies that it is a raw device mapping disk.
38 39 40 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 38 def disk_type @disk_type end |
#key ⇒ Object
The internally assigned key of this disk. This entity is not manipulated by users.
41 42 43 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 41 def key @key end |
#limit ⇒ Object
The utilization of a virtual machine will not exceed this limit, even if there are available resources. Used to ensure a consistent performance of virtual machines independent of available resources. If set to -1, then there is no fixed limit on resource usage (only bounded by available resources and shares). The unit is number of I/O per second.
44 45 46 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 44 def limit @limit end |
#lun_uuid ⇒ Object
Unique identifier of the LUN accessed by the raw disk mapping (RDM).
47 48 49 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 47 def lun_uuid @lun_uuid end |
#object_type ⇒ Object
The fully-qualified name of the instantiated, concrete type. The value should be the same as the ‘ClassId’ property.
23 24 25 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 23 def object_type @object_type end |
#serial ⇒ Object
Serial ID of the storage device.
50 51 52 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 50 def serial @serial end |
#shares ⇒ Object
Returns the value of attribute shares.
52 53 54 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 52 def shares @shares end |
#sharing ⇒ Object
Sharing mode of the virtual disk. * sharingNone - The virtual disk is not shared. * sharingMultiWriter - The virtual disk is shared between multiple virtual machines.
55 56 57 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 55 def sharing @sharing end |
#storage_allocation_type ⇒ Object
Allocation type for the virtual disk. * notApplicable - Value specified for a disk for which storage allocation type is not applicable. * thin - A thin provisioned disk consumes only the space that it needs for its initial operrations, and grows with time according to demand. It is the fastest method to create a virtual disk because it creates a disk with just the header information. * lazyZeroedThick - A lazy zeroed thick disk has all space allocated at the time of its creation. Data remaining on the physical device is not erased during creation, but is zeroed out on demand later on first write from the virtual machine. * eagerZeroedThick - An eager zeroed thick disk has all space allocated and wiped clean of any previous contents on the physical media at creation time. Such disks may take longer time during creation compared to other disk formats.
58 59 60 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 58 def storage_allocation_type @storage_allocation_type end |
#unit_number ⇒ Object
Unit number of the disk on its controller.
61 62 63 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 61 def unit_number @unit_number end |
#uuid ⇒ Object
UUID assigned by vCenter to every disk.
64 65 66 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 64 def uuid @uuid end |
#vdisk_id ⇒ Object
Identity of the virtual disk object as the first class entity.
67 68 69 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 67 def vdisk_id @vdisk_id end |
#vendor ⇒ Object
Vendor of the storage device.
70 71 72 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 70 def vendor @vendor end |
#virtual_disk_path ⇒ Object
Path of the virtual disk.
73 74 75 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 73 def virtual_disk_path @virtual_disk_path end |
#virtual_machine ⇒ Object
Returns the value of attribute virtual_machine.
80 81 82 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 80 def virtual_machine @virtual_machine end |
#vm_identity ⇒ Object
Identity of the virtual machine where the virtual disk is created.
76 77 78 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 76 def vm_identity @vm_identity end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns the key-value map of all the JSON attributes this model knows about
138 139 140 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 138 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
133 134 135 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 133 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 105 def self.attribute_map { :'class_id' => :'ClassId', :'object_type' => :'ObjectType', :'compatibility_mode' => :'CompatibilityMode', :'controller_key' => :'ControllerKey', :'device_name' => :'DeviceName', :'disk_mode' => :'DiskMode', :'disk_type' => :'DiskType', :'key' => :'Key', :'limit' => :'Limit', :'lun_uuid' => :'LunUuid', :'serial' => :'Serial', :'shares' => :'Shares', :'sharing' => :'Sharing', :'storage_allocation_type' => :'StorageAllocationType', :'unit_number' => :'UnitNumber', :'uuid' => :'Uuid', :'vdisk_id' => :'VdiskId', :'vendor' => :'Vendor', :'virtual_disk_path' => :'VirtualDiskPath', :'vm_identity' => :'VmIdentity', :'datastore' => :'Datastore', :'virtual_machine' => :'VirtualMachine' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
480 481 482 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 480 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
171 172 173 174 175 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 171 def self.openapi_nullable Set.new([ :'shares', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 143 def self.openapi_types { :'class_id' => :'String', :'object_type' => :'String', :'compatibility_mode' => :'String', :'controller_key' => :'Integer', :'device_name' => :'String', :'disk_mode' => :'String', :'disk_type' => :'String', :'key' => :'Integer', :'limit' => :'Integer', :'lun_uuid' => :'String', :'serial' => :'String', :'shares' => :'VirtualizationVmwareSharesInfo', :'sharing' => :'String', :'storage_allocation_type' => :'String', :'unit_number' => :'Integer', :'uuid' => :'String', :'vdisk_id' => :'String', :'vendor' => :'String', :'virtual_disk_path' => :'String', :'vm_identity' => :'String', :'datastore' => :'VirtualizationVmwareDatastoreRelationship', :'virtual_machine' => :'VirtualizationVmwareVirtualMachineRelationship' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 438 def ==(o) return true if self.equal?(o) self.class == o.class && class_id == o.class_id && object_type == o.object_type && compatibility_mode == o.compatibility_mode && controller_key == o.controller_key && device_name == o.device_name && disk_mode == o.disk_mode && disk_type == o.disk_type && key == o.key && limit == o.limit && lun_uuid == o.lun_uuid && serial == o.serial && shares == o.shares && sharing == o.sharing && storage_allocation_type == o.storage_allocation_type && unit_number == o.unit_number && uuid == o.uuid && vdisk_id == o.vdisk_id && vendor == o.vendor && virtual_disk_path == o.virtual_disk_path && vm_identity == o.vm_identity && datastore == o.datastore && virtual_machine == o.virtual_machine end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 510 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = IntersightClient.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
581 582 583 584 585 586 587 588 589 590 591 592 593 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 581 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 487 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) VirtualizationVmwareVirtualDiskAllOf.openapi_types.each_pair do |key, type| if attributes[VirtualizationVmwareVirtualDiskAllOf.attribute_map[key]].nil? && VirtualizationVmwareVirtualDiskAllOf.openapi_nullable.include?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[VirtualizationVmwareVirtualDiskAllOf.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[VirtualizationVmwareVirtualDiskAllOf.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[VirtualizationVmwareVirtualDiskAllOf.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[VirtualizationVmwareVirtualDiskAllOf.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
467 468 469 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 467 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
473 474 475 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 473 def hash [class_id, object_type, compatibility_mode, controller_key, device_name, disk_mode, disk_type, key, limit, lun_uuid, serial, shares, sharing, storage_allocation_type, unit_number, uuid, vdisk_id, vendor, virtual_disk_path, vm_identity, datastore, virtual_machine].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 297 def list_invalid_properties invalid_properties = Array.new if @class_id.nil? invalid_properties.push('invalid value for "class_id", class_id cannot be nil.') end if @object_type.nil? invalid_properties.push('invalid value for "object_type", object_type cannot be nil.') end pattern = Regexp.new(/^$|^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/) if !@uuid.nil? && @uuid !~ pattern invalid_properties.push("invalid value for \"uuid\", must conform to the pattern #{pattern}.") end pattern = Regexp.new(/^$|^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/) if !@vdisk_id.nil? && @vdisk_id !~ pattern invalid_properties.push("invalid value for \"vdisk_id\", must conform to the pattern #{pattern}.") end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
557 558 559 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 557 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
563 564 565 566 567 568 569 570 571 572 573 574 575 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 563 def to_hash hash = {} VirtualizationVmwareVirtualDiskAllOf.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = VirtualizationVmwareVirtualDiskAllOf.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
551 552 553 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 551 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 |
# File 'lib/intersight_client/models/virtualization_vmware_virtual_disk_all_of.rb', line 322 def valid? return false if @class_id.nil? class_id_validator = EnumAttributeValidator.new('String', ["virtualization.VmwareVirtualDisk"]) return false unless class_id_validator.valid?(@class_id) return false if @object_type.nil? object_type_validator = EnumAttributeValidator.new('String', ["virtualization.VmwareVirtualDisk"]) return false unless object_type_validator.valid?(@object_type) compatibility_mode_validator = EnumAttributeValidator.new('String', ["notApplicable", "physicalMode", "virtualMode"]) return false unless compatibility_mode_validator.valid?(@compatibility_mode) disk_mode_validator = EnumAttributeValidator.new('String', ["persistent", "independent_persistent", "independent_nonpersistent", "nonpersistent", "undoable", "append"]) return false unless disk_mode_validator.valid?(@disk_mode) disk_type_validator = EnumAttributeValidator.new('String', ["flatDisk", "rdmDisk"]) return false unless disk_type_validator.valid?(@disk_type) sharing_validator = EnumAttributeValidator.new('String', ["sharingNone", "sharingMultiWriter"]) return false unless sharing_validator.valid?(@sharing) storage_allocation_type_validator = EnumAttributeValidator.new('String', ["notApplicable", "thin", "lazyZeroedThick", "eagerZeroedThick"]) return false unless storage_allocation_type_validator.valid?(@storage_allocation_type) return false if !@uuid.nil? && @uuid !~ Regexp.new(/^$|^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/) return false if !@vdisk_id.nil? && @vdisk_id !~ Regexp.new(/^$|^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/) true end |