Class: IbmCloudPower::PVMInstanceUpdateResponse
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- IbmCloudPower::PVMInstanceUpdateResponse
- Defined in:
- lib/ibm_cloud_power/models/pvm_instance_update_response.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#allow_remote_restart ⇒ Object
if set to false, automated remote restart is disabled for the VM.
-
#default_trusted_profile ⇒ Object
default IAM trusted profile to use for this virtual server instance.
-
#license_repository_capacity ⇒ Object
The VTL license repository capacity TiB value.
-
#memory ⇒ Object
Amount of memory allocated (in GiB).
-
#metadata_service ⇒ Object
The metadata service configuration.
-
#pin_policy ⇒ Object
Returns the value of attribute pin_policy.
-
#preferred_processor_compatibility_mode ⇒ Object
Preferred processor compatibility mode.
-
#proc_type ⇒ Object
Processor type (dedicated, shared, capped).
-
#processors ⇒ Object
Number of processors allocated.
-
#server_name ⇒ Object
Name of the server.
-
#status_url ⇒ Object
URL to check for status of the operation (for now, just the URL for the GET on the server, which has status information).
-
#storage_pool_affinity ⇒ Object
Indicates if all volumes attached to the server must reside in the same storage pool; If set to false then volumes from any storage type and pool can be attached to the PVMInstance; Impacts PVMInstance snapshot, capture, and clone, for capture and clone - only data volumes that are of the same storage type and in the same storage pool of the PVMInstance's boot volume can be included; for snapshot - all data volumes to be included in the snapshot must reside in the same storage type and pool.
-
#virtual_cores ⇒ Object
The pvm instance virtual CPU information.
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 = {}) ⇒ PVMInstanceUpdateResponse
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 = {}) ⇒ PVMInstanceUpdateResponse
Initializes the object
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 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 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 134 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `IbmCloudPower::PVMInstanceUpdateResponse` 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::PVMInstanceUpdateResponse`. 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?(:'allow_remote_restart') self.allow_remote_restart = attributes[:'allow_remote_restart'] end if attributes.key?(:'default_trusted_profile') self.default_trusted_profile = attributes[:'default_trusted_profile'] end if attributes.key?(:'license_repository_capacity') self.license_repository_capacity = attributes[:'license_repository_capacity'] end if attributes.key?(:'memory') self.memory = attributes[:'memory'] end if attributes.key?(:'metadata_service') self. = attributes[:'metadata_service'] end if attributes.key?(:'pin_policy') self.pin_policy = attributes[:'pin_policy'] 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'] end if attributes.key?(:'processors') self.processors = attributes[:'processors'] end if attributes.key?(:'server_name') self.server_name = attributes[:'server_name'] end if attributes.key?(:'status_url') self.status_url = attributes[:'status_url'] 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?(:'virtual_cores') self.virtual_cores = attributes[:'virtual_cores'] end end |
Instance Attribute Details
#allow_remote_restart ⇒ Object
if set to false, automated remote restart is disabled for the VM
19 20 21 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 19 def allow_remote_restart @allow_remote_restart end |
#default_trusted_profile ⇒ Object
default IAM trusted profile to use for this virtual server instance
22 23 24 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 22 def default_trusted_profile @default_trusted_profile end |
#license_repository_capacity ⇒ Object
The VTL license repository capacity TiB value
25 26 27 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 25 def license_repository_capacity @license_repository_capacity end |
#memory ⇒ Object
Amount of memory allocated (in GiB)
28 29 30 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 28 def memory @memory end |
#metadata_service ⇒ Object
The metadata service configuration
31 32 33 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 31 def @metadata_service end |
#pin_policy ⇒ Object
Returns the value of attribute pin_policy.
33 34 35 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 33 def pin_policy @pin_policy end |
#preferred_processor_compatibility_mode ⇒ Object
Preferred processor compatibility mode
36 37 38 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 36 def preferred_processor_compatibility_mode @preferred_processor_compatibility_mode end |
#proc_type ⇒ Object
Processor type (dedicated, shared, capped)
39 40 41 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 39 def proc_type @proc_type end |
#processors ⇒ Object
Number of processors allocated
42 43 44 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 42 def processors @processors end |
#server_name ⇒ Object
Name of the server
45 46 47 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 45 def server_name @server_name end |
#status_url ⇒ Object
URL to check for status of the operation (for now, just the URL for the GET on the server, which has status information)
48 49 50 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 48 def status_url @status_url end |
#storage_pool_affinity ⇒ Object
Indicates if all volumes attached to the server must reside in the same storage pool; If set to false then volumes from any storage type and pool can be attached to the PVMInstance; Impacts PVMInstance snapshot, capture, and clone, for capture and clone - only data volumes that are of the same storage type and in the same storage pool of the PVMInstance's boot volume can be included; for snapshot - all data volumes to be included in the snapshot must reside in the same storage type and pool. Once set to false, cannot be set back to true unless all volumes attached reside in the same storage type and pool.
51 52 53 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 51 def storage_pool_affinity @storage_pool_affinity end |
#virtual_cores ⇒ Object
The pvm instance virtual CPU information
54 55 56 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 54 def virtual_cores @virtual_cores end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
98 99 100 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 98 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
103 104 105 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 103 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 79 def self.attribute_map { :'allow_remote_restart' => :'allowRemoteRestart', :'default_trusted_profile' => :'defaultTrustedProfile', :'license_repository_capacity' => :'licenseRepositoryCapacity', :'memory' => :'memory', :'metadata_service' => :'metadataService', :'pin_policy' => :'pinPolicy', :'preferred_processor_compatibility_mode' => :'preferredProcessorCompatibilityMode', :'proc_type' => :'procType', :'processors' => :'processors', :'server_name' => :'serverName', :'status_url' => :'statusUrl', :'storage_pool_affinity' => :'storagePoolAffinity', :'virtual_cores' => :'virtualCores' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 265 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
127 128 129 130 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 127 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 108 def self.openapi_types { :'allow_remote_restart' => :'Boolean', :'default_trusted_profile' => :'UpdateTrustedProfile', :'license_repository_capacity' => :'Integer', :'memory' => :'Float', :'metadata_service' => :'UpdateMetadataService', :'pin_policy' => :'PinPolicy', :'preferred_processor_compatibility_mode' => :'String', :'proc_type' => :'String', :'processors' => :'Float', :'server_name' => :'String', :'status_url' => :'String', :'storage_pool_affinity' => :'Boolean', :'virtual_cores' => :'VirtualCores' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 232 def ==(o) return true if self.equal?(o) self.class == o.class && allow_remote_restart == o.allow_remote_restart && default_trusted_profile == o.default_trusted_profile && license_repository_capacity == o.license_repository_capacity && memory == o.memory && == o. && pin_policy == o.pin_policy && preferred_processor_compatibility_mode == o.preferred_processor_compatibility_mode && proc_type == o.proc_type && processors == o.processors && server_name == o.server_name && status_url == o.status_url && storage_pool_affinity == o.storage_pool_affinity && virtual_cores == o.virtual_cores end |
#eql?(o) ⇒ Boolean
252 253 254 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 252 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
258 259 260 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 258 def hash [allow_remote_restart, default_trusted_profile, license_repository_capacity, memory, , pin_policy, preferred_processor_compatibility_mode, proc_type, processors, server_name, status_url, storage_pool_affinity, virtual_cores].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
205 206 207 208 209 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 205 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
287 288 289 290 291 292 293 294 295 296 297 298 299 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 287 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
213 214 215 216 217 218 |
# File 'lib/ibm_cloud_power/models/pvm_instance_update_response.rb', line 213 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' proc_type_validator = EnumAttributeValidator.new('String', ["dedicated", "shared", "capped"]) return false unless proc_type_validator.valid?(@proc_type) true end |