Class: IbmCloudPower::PVMInstanceReference
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- IbmCloudPower::PVMInstanceReference
- Defined in:
- lib/ibm_cloud_power/models/pvm_instance_reference.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#addresses ⇒ Object
(deprecated - replaced by networks) The list of addresses and their network information.
-
#allow_remote_restart ⇒ Object
if set to false, automated remote restart is disabled for the VM.
-
#console_language ⇒ Object
Console language and code.
-
#creation_date ⇒ Object
Date/Time of PVM creation.
-
#crn ⇒ Object
The CRN for this resource.
-
#dedicated_host_id ⇒ Object
ID of the dedicated host where the PVM Instance is running, if applicable.
-
#default_trusted_profile ⇒ Object
default IAM trusted profile to use for this virtual server instance.
-
#disk_size ⇒ Object
Size of allocated disk (in GiB).
-
#effective_processor_compatibility_mode ⇒ Object
Effective processor compatibility mode.
-
#fault ⇒ Object
Returns the value of attribute fault.
-
#health ⇒ Object
Returns the value of attribute health.
-
#host_id ⇒ Object
The PVM Instance Host ID (Internal Use Only).
-
#href ⇒ Object
Link to Cloud Instance resource.
-
#image_id ⇒ Object
The ImageID used by the server.
-
#license_repository_capacity ⇒ Object
The VTL license repository capacity TiB value.
-
#maxmem ⇒ Object
Maximum amount of memory that can be allocated (in GiB, for resize).
-
#maxproc ⇒ Object
Maximum number of processors that can be allocated (for resize).
-
#memory ⇒ Object
Amount of memory allocated (in GiB).
-
#metadata_service ⇒ Object
The metadata service configuration.
-
#minmem ⇒ Object
Minimum amount of memory that can be allocated (in GiB, for resize).
-
#minproc ⇒ Object
Minimum number of processors that can be allocated (for resize).
-
#networks ⇒ Object
The list of addresses and their network information.
-
#operating_system ⇒ Object
OS system information (usually version and build).
-
#os_type ⇒ Object
Type of the OS [aix, ibmi, rhel, sles, vtl, rhcos].
-
#pin_policy ⇒ Object
VM pinning policy to use [none, soft, hard].
-
#placement_group ⇒ Object
The placement group of the server.
-
#preferred_processor_compatibility_mode ⇒ Object
Preferred processor compatibility mode.
-
#proc_type ⇒ Object
Processor type (dedicated, shared, capped).
-
#processors ⇒ Object
Number of processors allocated.
-
#progress ⇒ Object
The progress of an operation.
-
#pvm_instance_id ⇒ Object
PCloud PVM Instance ID.
-
#sap_profile ⇒ Object
If this is an SAP pvm-instance the profile reference will link to the SAP profile.
-
#server_name ⇒ Object
Name of the server.
-
#shared_processor_pool ⇒ Object
The shared processor pool of the server.
-
#shared_processor_pool_id ⇒ Object
The shared processor pool id.
-
#software_licenses ⇒ Object
The pvm instance Software Licenses.
-
#srcs ⇒ Object
The pvm instance SRC lists.
-
#status ⇒ Object
The status of the instance.
-
#storage_connection ⇒ Object
The storage connection type.
-
#storage_pool ⇒ Object
Storage Pool where server is deployed.
-
#storage_pool_affinity ⇒ Object
Indicates if all volumes attached to the server must reside in the same storage pool.
-
#storage_type ⇒ Object
Storage type of the deployment storage pool.
-
#sys_type ⇒ Object
System type used to host the instance.
-
#task_state ⇒ Object
Represents the task state of a virtual machine (VM).
-
#updated_date ⇒ Object
Date/Time of PVM last update.
-
#virtual_cores ⇒ Object
The pvm instance virtual CPU information.
-
#virtual_serial_number ⇒ Object
Information about Virtual Serial Number assigned to the PVM Instance.
-
#vpmem_volumes ⇒ Object
List of vPMEM volumes attached to this PVM Instance.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping 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.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ PVMInstanceReference
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ PVMInstanceReference
Initializes the object
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 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 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 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 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 308 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `IbmCloudPower::PVMInstanceReference` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `IbmCloudPower::PVMInstanceReference`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'addresses') if (value = attributes[:'addresses']).is_a?(Array) self.addresses = value end end if attributes.key?(:'allow_remote_restart') self.allow_remote_restart = attributes[:'allow_remote_restart'] end if attributes.key?(:'console_language') self.console_language = attributes[:'console_language'] end if attributes.key?(:'creation_date') self.creation_date = attributes[:'creation_date'] end if attributes.key?(:'crn') self.crn = attributes[:'crn'] end if attributes.key?(:'dedicated_host_id') self.dedicated_host_id = attributes[:'dedicated_host_id'] end if attributes.key?(:'default_trusted_profile') self.default_trusted_profile = attributes[:'default_trusted_profile'] end if attributes.key?(:'disk_size') self.disk_size = attributes[:'disk_size'] else self.disk_size = nil end if attributes.key?(:'effective_processor_compatibility_mode') self.effective_processor_compatibility_mode = attributes[:'effective_processor_compatibility_mode'] end if attributes.key?(:'fault') self.fault = attributes[:'fault'] end if attributes.key?(:'health') self.health = attributes[:'health'] end if attributes.key?(:'host_id') self.host_id = attributes[:'host_id'] end if attributes.key?(:'href') self.href = attributes[:'href'] else self.href = nil end if attributes.key?(:'image_id') self.image_id = attributes[:'image_id'] else self.image_id = nil end if attributes.key?(:'license_repository_capacity') self.license_repository_capacity = attributes[:'license_repository_capacity'] end if attributes.key?(:'maxmem') self.maxmem = attributes[:'maxmem'] end if attributes.key?(:'maxproc') self.maxproc = attributes[:'maxproc'] end if attributes.key?(:'memory') self.memory = attributes[:'memory'] else self.memory = nil end if attributes.key?(:'metadata_service') self. = attributes[:'metadata_service'] end if attributes.key?(:'minmem') self.minmem = attributes[:'minmem'] end if attributes.key?(:'minproc') self.minproc = attributes[:'minproc'] end if attributes.key?(:'networks') if (value = attributes[:'networks']).is_a?(Array) self.networks = value end end if attributes.key?(:'operating_system') self. = attributes[:'operating_system'] end if attributes.key?(:'os_type') self.os_type = attributes[:'os_type'] else self.os_type = nil end if attributes.key?(:'pin_policy') self.pin_policy = attributes[:'pin_policy'] end if attributes.key?(:'placement_group') self.placement_group = attributes[:'placement_group'] else self.placement_group = 'none' end if attributes.key?(:'preferred_processor_compatibility_mode') self.preferred_processor_compatibility_mode = attributes[:'preferred_processor_compatibility_mode'] end if attributes.key?(:'proc_type') self.proc_type = attributes[:'proc_type'] else self.proc_type = 'dedicated' end if attributes.key?(:'processors') self.processors = attributes[:'processors'] else self.processors = nil end if attributes.key?(:'progress') self.progress = attributes[:'progress'] end if attributes.key?(:'pvm_instance_id') self.pvm_instance_id = attributes[:'pvm_instance_id'] else self.pvm_instance_id = nil end if attributes.key?(:'sap_profile') self.sap_profile = attributes[:'sap_profile'] end if attributes.key?(:'server_name') self.server_name = attributes[:'server_name'] else self.server_name = nil end if attributes.key?(:'shared_processor_pool') self.shared_processor_pool = attributes[:'shared_processor_pool'] end if attributes.key?(:'shared_processor_pool_id') self.shared_processor_pool_id = attributes[:'shared_processor_pool_id'] end if attributes.key?(:'software_licenses') self.software_licenses = attributes[:'software_licenses'] end if attributes.key?(:'srcs') if (value = attributes[:'srcs']).is_a?(Array) self.srcs = value end end if attributes.key?(:'status') self.status = attributes[:'status'] else self.status = nil end if attributes.key?(:'storage_connection') self.storage_connection = attributes[:'storage_connection'] end if attributes.key?(:'storage_pool') self.storage_pool = attributes[:'storage_pool'] end if attributes.key?(:'storage_pool_affinity') self.storage_pool_affinity = attributes[:'storage_pool_affinity'] else self.storage_pool_affinity = true end if attributes.key?(:'storage_type') self.storage_type = attributes[:'storage_type'] end if attributes.key?(:'sys_type') self.sys_type = attributes[:'sys_type'] end if attributes.key?(:'task_state') self.task_state = attributes[:'task_state'] end if attributes.key?(:'updated_date') self.updated_date = attributes[:'updated_date'] end if attributes.key?(:'virtual_cores') self.virtual_cores = attributes[:'virtual_cores'] end if attributes.key?(:'virtual_serial_number') self.virtual_serial_number = attributes[:'virtual_serial_number'] end if attributes.key?(:'vpmem_volumes') if (value = attributes[:'vpmem_volumes']).is_a?(Array) self.vpmem_volumes = value end end end |
Instance Attribute Details
#addresses ⇒ Object
(deprecated - replaced by networks) The list of addresses and their network information
19 20 21 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 19 def addresses @addresses end |
#allow_remote_restart ⇒ Object
if set to false, automated remote restart is disabled for the VM
22 23 24 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 22 def allow_remote_restart @allow_remote_restart end |
#console_language ⇒ Object
Console language and code
25 26 27 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 25 def console_language @console_language end |
#creation_date ⇒ Object
Date/Time of PVM creation
28 29 30 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 28 def creation_date @creation_date end |
#crn ⇒ Object
The CRN for this resource
31 32 33 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 31 def crn @crn end |
#dedicated_host_id ⇒ Object
ID of the dedicated host where the PVM Instance is running, if applicable
34 35 36 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 34 def dedicated_host_id @dedicated_host_id end |
#default_trusted_profile ⇒ Object
default IAM trusted profile to use for this virtual server instance
37 38 39 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 37 def default_trusted_profile @default_trusted_profile end |
#disk_size ⇒ Object
Size of allocated disk (in GiB)
40 41 42 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 40 def disk_size @disk_size end |
#effective_processor_compatibility_mode ⇒ Object
Effective processor compatibility mode
43 44 45 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 43 def effective_processor_compatibility_mode @effective_processor_compatibility_mode end |
#fault ⇒ Object
Returns the value of attribute fault.
45 46 47 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 45 def fault @fault end |
#health ⇒ Object
Returns the value of attribute health.
47 48 49 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 47 def health @health end |
#host_id ⇒ Object
The PVM Instance Host ID (Internal Use Only)
50 51 52 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 50 def host_id @host_id end |
#href ⇒ Object
Link to Cloud Instance resource
53 54 55 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 53 def href @href end |
#image_id ⇒ Object
The ImageID used by the server
56 57 58 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 56 def image_id @image_id end |
#license_repository_capacity ⇒ Object
The VTL license repository capacity TiB value
59 60 61 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 59 def license_repository_capacity @license_repository_capacity end |
#maxmem ⇒ Object
Maximum amount of memory that can be allocated (in GiB, for resize)
62 63 64 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 62 def maxmem @maxmem end |
#maxproc ⇒ Object
Maximum number of processors that can be allocated (for resize)
65 66 67 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 65 def maxproc @maxproc end |
#memory ⇒ Object
Amount of memory allocated (in GiB)
68 69 70 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 68 def memory @memory end |
#metadata_service ⇒ Object
The metadata service configuration
71 72 73 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 71 def @metadata_service end |
#minmem ⇒ Object
Minimum amount of memory that can be allocated (in GiB, for resize)
74 75 76 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 74 def minmem @minmem end |
#minproc ⇒ Object
Minimum number of processors that can be allocated (for resize)
77 78 79 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 77 def minproc @minproc end |
#networks ⇒ Object
The list of addresses and their network information
80 81 82 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 80 def networks @networks end |
#operating_system ⇒ Object
OS system information (usually version and build)
83 84 85 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 83 def @operating_system end |
#os_type ⇒ Object
Type of the OS [aix, ibmi, rhel, sles, vtl, rhcos]
86 87 88 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 86 def os_type @os_type end |
#pin_policy ⇒ Object
VM pinning policy to use [none, soft, hard]
89 90 91 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 89 def pin_policy @pin_policy end |
#placement_group ⇒ Object
The placement group of the server
92 93 94 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 92 def placement_group @placement_group end |
#preferred_processor_compatibility_mode ⇒ Object
Preferred processor compatibility mode
95 96 97 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 95 def preferred_processor_compatibility_mode @preferred_processor_compatibility_mode end |
#proc_type ⇒ Object
Processor type (dedicated, shared, capped)
98 99 100 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 98 def proc_type @proc_type end |
#processors ⇒ Object
Number of processors allocated
101 102 103 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 101 def processors @processors end |
#progress ⇒ Object
The progress of an operation
104 105 106 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 104 def progress @progress end |
#pvm_instance_id ⇒ Object
PCloud PVM Instance ID
107 108 109 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 107 def pvm_instance_id @pvm_instance_id end |
#sap_profile ⇒ Object
If this is an SAP pvm-instance the profile reference will link to the SAP profile
110 111 112 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 110 def sap_profile @sap_profile end |
#server_name ⇒ Object
Name of the server
113 114 115 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 113 def server_name @server_name end |
#shared_processor_pool ⇒ Object
The shared processor pool of the server
116 117 118 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 116 def shared_processor_pool @shared_processor_pool end |
#shared_processor_pool_id ⇒ Object
The shared processor pool id
119 120 121 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 119 def shared_processor_pool_id @shared_processor_pool_id end |
#software_licenses ⇒ Object
The pvm instance Software Licenses
122 123 124 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 122 def software_licenses @software_licenses end |
#srcs ⇒ Object
The pvm instance SRC lists
125 126 127 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 125 def srcs @srcs end |
#status ⇒ Object
The status of the instance
128 129 130 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 128 def status @status end |
#storage_connection ⇒ Object
The storage connection type
131 132 133 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 131 def storage_connection @storage_connection end |
#storage_pool ⇒ Object
Storage Pool where server is deployed
134 135 136 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 134 def storage_pool @storage_pool end |
#storage_pool_affinity ⇒ Object
Indicates if all volumes attached to the server must reside in the same storage pool
137 138 139 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 137 def storage_pool_affinity @storage_pool_affinity end |
#storage_type ⇒ Object
Storage type of the deployment storage pool
140 141 142 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 140 def storage_type @storage_type end |
#sys_type ⇒ Object
System type used to host the instance
143 144 145 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 143 def sys_type @sys_type end |
#task_state ⇒ Object
Represents the task state of a virtual machine (VM).
146 147 148 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 146 def task_state @task_state end |
#updated_date ⇒ Object
Date/Time of PVM last update
149 150 151 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 149 def updated_date @updated_date end |
#virtual_cores ⇒ Object
The pvm instance virtual CPU information
152 153 154 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 152 def virtual_cores @virtual_cores end |
#virtual_serial_number ⇒ Object
Information about Virtual Serial Number assigned to the PVM Instance
155 156 157 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 155 def virtual_serial_number @virtual_serial_number end |
#vpmem_volumes ⇒ Object
List of vPMEM volumes attached to this PVM Instance
158 159 160 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 158 def vpmem_volumes @vpmem_volumes end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
237 238 239 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 237 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
242 243 244 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 242 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 183 def self.attribute_map { :'addresses' => :'addresses', :'allow_remote_restart' => :'allowRemoteRestart', :'console_language' => :'consoleLanguage', :'creation_date' => :'creationDate', :'crn' => :'crn', :'dedicated_host_id' => :'dedicatedHostID', :'default_trusted_profile' => :'defaultTrustedProfile', :'disk_size' => :'diskSize', :'effective_processor_compatibility_mode' => :'effectiveProcessorCompatibilityMode', :'fault' => :'fault', :'health' => :'health', :'host_id' => :'hostID', :'href' => :'href', :'image_id' => :'imageID', :'license_repository_capacity' => :'licenseRepositoryCapacity', :'maxmem' => :'maxmem', :'maxproc' => :'maxproc', :'memory' => :'memory', :'metadata_service' => :'metadataService', :'minmem' => :'minmem', :'minproc' => :'minproc', :'networks' => :'networks', :'operating_system' => :'operatingSystem', :'os_type' => :'osType', :'pin_policy' => :'pinPolicy', :'placement_group' => :'placementGroup', :'preferred_processor_compatibility_mode' => :'preferredProcessorCompatibilityMode', :'proc_type' => :'procType', :'processors' => :'processors', :'progress' => :'progress', :'pvm_instance_id' => :'pvmInstanceID', :'sap_profile' => :'sapProfile', :'server_name' => :'serverName', :'shared_processor_pool' => :'sharedProcessorPool', :'shared_processor_pool_id' => :'sharedProcessorPoolID', :'software_licenses' => :'softwareLicenses', :'srcs' => :'srcs', :'status' => :'status', :'storage_connection' => :'storageConnection', :'storage_pool' => :'storagePool', :'storage_pool_affinity' => :'storagePoolAffinity', :'storage_type' => :'storageType', :'sys_type' => :'sysType', :'task_state' => :'taskState', :'updated_date' => :'updatedDate', :'virtual_cores' => :'virtualCores', :'virtual_serial_number' => :'virtualSerialNumber', :'vpmem_volumes' => :'vpmemVolumes' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 784 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{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[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
301 302 303 304 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 301 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 294 295 296 297 298 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 247 def self.openapi_types { :'addresses' => :'Array<PVMInstanceNetwork>', :'allow_remote_restart' => :'Boolean', :'console_language' => :'ConsoleLanguage', :'creation_date' => :'Time', :'crn' => :'String', :'dedicated_host_id' => :'String', :'default_trusted_profile' => :'TrustedProfile', :'disk_size' => :'Float', :'effective_processor_compatibility_mode' => :'String', :'fault' => :'PVMInstanceFault', :'health' => :'PVMInstanceHealth', :'host_id' => :'Integer', :'href' => :'String', :'image_id' => :'String', :'license_repository_capacity' => :'Integer', :'maxmem' => :'Float', :'maxproc' => :'Float', :'memory' => :'Float', :'metadata_service' => :'MetadataService', :'minmem' => :'Float', :'minproc' => :'Float', :'networks' => :'Array<PVMInstanceNetwork>', :'operating_system' => :'String', :'os_type' => :'String', :'pin_policy' => :'String', :'placement_group' => :'String', :'preferred_processor_compatibility_mode' => :'String', :'proc_type' => :'String', :'processors' => :'Float', :'progress' => :'Float', :'pvm_instance_id' => :'String', :'sap_profile' => :'SAPProfileReference', :'server_name' => :'String', :'shared_processor_pool' => :'String', :'shared_processor_pool_id' => :'String', :'software_licenses' => :'SoftwareLicenses', :'srcs' => :'Array<Array<SRC>>', :'status' => :'String', :'storage_connection' => :'String', :'storage_pool' => :'String', :'storage_pool_affinity' => :'Boolean', :'storage_type' => :'String', :'sys_type' => :'String', :'task_state' => :'String', :'updated_date' => :'Time', :'virtual_cores' => :'VirtualCores', :'virtual_serial_number' => :'GetServerVirtualSerialNumber', :'vpmem_volumes' => :'Array<VPMemVolumeReference>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 716 def ==(o) return true if self.equal?(o) self.class == o.class && addresses == o.addresses && allow_remote_restart == o.allow_remote_restart && console_language == o.console_language && creation_date == o.creation_date && crn == o.crn && dedicated_host_id == o.dedicated_host_id && default_trusted_profile == o.default_trusted_profile && disk_size == o.disk_size && effective_processor_compatibility_mode == o.effective_processor_compatibility_mode && fault == o.fault && health == o.health && host_id == o.host_id && href == o.href && image_id == o.image_id && license_repository_capacity == o.license_repository_capacity && maxmem == o.maxmem && maxproc == o.maxproc && memory == o.memory && == o. && minmem == o.minmem && minproc == o.minproc && networks == o.networks && == o. && os_type == o.os_type && pin_policy == o.pin_policy && placement_group == o.placement_group && preferred_processor_compatibility_mode == o.preferred_processor_compatibility_mode && proc_type == o.proc_type && processors == o.processors && progress == o.progress && pvm_instance_id == o.pvm_instance_id && sap_profile == o.sap_profile && server_name == o.server_name && shared_processor_pool == o.shared_processor_pool && shared_processor_pool_id == o.shared_processor_pool_id && software_licenses == o.software_licenses && srcs == o.srcs && status == o.status && storage_connection == o.storage_connection && storage_pool == o.storage_pool && storage_pool_affinity == o.storage_pool_affinity && storage_type == o.storage_type && sys_type == o.sys_type && task_state == o.task_state && updated_date == o.updated_date && virtual_cores == o.virtual_cores && virtual_serial_number == o.virtual_serial_number && vpmem_volumes == o.vpmem_volumes end |
#eql?(o) ⇒ Boolean
771 772 773 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 771 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
777 778 779 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 777 def hash [addresses, allow_remote_restart, console_language, creation_date, crn, dedicated_host_id, default_trusted_profile, disk_size, effective_processor_compatibility_mode, fault, health, host_id, href, image_id, license_repository_capacity, maxmem, maxproc, memory, , minmem, minproc, networks, , os_type, pin_policy, placement_group, preferred_processor_compatibility_mode, proc_type, processors, progress, pvm_instance_id, sap_profile, server_name, shared_processor_pool, shared_processor_pool_id, software_licenses, srcs, status, storage_connection, storage_pool, storage_pool_affinity, storage_type, sys_type, task_state, updated_date, virtual_cores, virtual_serial_number, vpmem_volumes].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 549 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @disk_size.nil? invalid_properties.push('invalid value for "disk_size", disk_size cannot be nil.') end if @href.nil? invalid_properties.push('invalid value for "href", href cannot be nil.') end if @image_id.nil? invalid_properties.push('invalid value for "image_id", image_id cannot be nil.') end if @memory.nil? invalid_properties.push('invalid value for "memory", memory cannot be nil.') end if @os_type.nil? invalid_properties.push('invalid value for "os_type", os_type cannot be nil.') end if @proc_type.nil? invalid_properties.push('invalid value for "proc_type", proc_type cannot be nil.') end if @processors.nil? invalid_properties.push('invalid value for "processors", processors cannot be nil.') end if @pvm_instance_id.nil? invalid_properties.push('invalid value for "pvm_instance_id", pvm_instance_id cannot be nil.') end if @server_name.nil? invalid_properties.push('invalid value for "server_name", server_name cannot be nil.') end if @status.nil? invalid_properties.push('invalid value for "status", status cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
806 807 808 809 810 811 812 813 814 815 816 817 818 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 806 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 |
# File 'lib/ibm_cloud_power/models/pvm_instance_reference.rb', line 597 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @disk_size.nil? return false if @href.nil? return false if @image_id.nil? return false if @memory.nil? return false if @os_type.nil? return false if @proc_type.nil? proc_type_validator = EnumAttributeValidator.new('String', ["dedicated", "shared", "capped", ""]) return false unless proc_type_validator.valid?(@proc_type) return false if @processors.nil? return false if @pvm_instance_id.nil? return false if @server_name.nil? return false if @status.nil? true end |