Class: IntersightClient::ServerProfileAllOf
- Inherits:
-
Object
- Object
- IntersightClient::ServerProfileAllOf
- Defined in:
- lib/intersight_client/models/server_profile_all_of.rb
Overview
Definition of the list of properties defined in ‘server.Profile’, excluding properties defined in parent classes.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#assigned_server ⇒ Object
Returns the value of attribute assigned_server.
-
#associated_server ⇒ Object
Returns the value of attribute associated_server.
-
#associated_server_pool ⇒ Object
Returns the value of attribute associated_server_pool.
-
#class_id ⇒ Object
The fully-qualified name of the instantiated, concrete type.
-
#config_change_context ⇒ Object
Returns the value of attribute config_change_context.
-
#config_change_details ⇒ Object
An array of relationships to serverConfigChangeDetail resources.
-
#config_changes ⇒ Object
Returns the value of attribute config_changes.
-
#config_result ⇒ Object
Returns the value of attribute config_result.
-
#is_pmc_deployed_secure_passphrase_set ⇒ Object
Indicates whether the value of the ‘pmcDeployedSecurePassphrase’ property has been set.
-
#leased_server ⇒ Object
Returns the value of attribute leased_server.
-
#object_type ⇒ Object
The fully-qualified name of the instantiated, concrete type.
-
#organization ⇒ Object
Returns the value of attribute organization.
-
#pmc_deployed_secure_passphrase ⇒ Object
Secure passphrase that is already deployed on all the Persistent Memory Modules on the server.
-
#resource_lease ⇒ Object
Returns the value of attribute resource_lease.
-
#running_workflows ⇒ Object
An array of relationships to workflowWorkflowInfo resources.
-
#server_assignment_mode ⇒ Object
Source of the server assigned to the server profile.
-
#server_pool ⇒ Object
Returns the value of attribute server_pool.
-
#static_uuid_address ⇒ Object
The UUID address for the server must include UUID prefix xxxxxxxx-xxxx-xxxx along with the UUID suffix of format xxxx-xxxxxxxxxxxx.
-
#uuid ⇒ Object
The UUID address that is assigned to the server based on the UUID pool.
-
#uuid_lease ⇒ Object
Returns the value of attribute uuid_lease.
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 = {}) ⇒ ServerProfileAllOf
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 = {}) ⇒ ServerProfileAllOf
Initializes the object
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 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 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 164 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `IntersightClient::ServerProfileAllOf` 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 = 'server.Profile' end if attributes.key?(:'object_type') self.object_type = attributes[:'object_type'] else self.object_type = 'server.Profile' end if attributes.key?(:'config_change_context') self.config_change_context = attributes[:'config_change_context'] end if attributes.key?(:'config_changes') self.config_changes = attributes[:'config_changes'] end if attributes.key?(:'is_pmc_deployed_secure_passphrase_set') self.is_pmc_deployed_secure_passphrase_set = attributes[:'is_pmc_deployed_secure_passphrase_set'] else self.is_pmc_deployed_secure_passphrase_set = false end if attributes.key?(:'pmc_deployed_secure_passphrase') self.pmc_deployed_secure_passphrase = attributes[:'pmc_deployed_secure_passphrase'] end if attributes.key?(:'server_assignment_mode') self.server_assignment_mode = attributes[:'server_assignment_mode'] else self.server_assignment_mode = 'None' end if attributes.key?(:'static_uuid_address') self.static_uuid_address = attributes[:'static_uuid_address'] end if attributes.key?(:'uuid') self.uuid = attributes[:'uuid'] end if attributes.key?(:'assigned_server') self.assigned_server = attributes[:'assigned_server'] end if attributes.key?(:'associated_server') self.associated_server = attributes[:'associated_server'] end if attributes.key?(:'associated_server_pool') self.associated_server_pool = attributes[:'associated_server_pool'] end if attributes.key?(:'config_change_details') if (value = attributes[:'config_change_details']).is_a?(Array) self.config_change_details = value end end if attributes.key?(:'config_result') self.config_result = attributes[:'config_result'] end if attributes.key?(:'leased_server') self.leased_server = attributes[:'leased_server'] end if attributes.key?(:'organization') self.organization = attributes[:'organization'] end if attributes.key?(:'resource_lease') self.resource_lease = attributes[:'resource_lease'] end if attributes.key?(:'running_workflows') if (value = attributes[:'running_workflows']).is_a?(Array) self.running_workflows = value end end if attributes.key?(:'server_pool') self.server_pool = attributes[:'server_pool'] end if attributes.key?(:'uuid_lease') self.uuid_lease = attributes[:'uuid_lease'] end end |
Instance Attribute Details
#assigned_server ⇒ Object
Returns the value of attribute assigned_server.
44 45 46 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 44 def assigned_server @assigned_server end |
#associated_server ⇒ Object
Returns the value of attribute associated_server.
46 47 48 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 46 def associated_server @associated_server end |
#associated_server_pool ⇒ Object
Returns the value of attribute associated_server_pool.
48 49 50 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 48 def associated_server_pool @associated_server_pool end |
#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/server_profile_all_of.rb', line 20 def class_id @class_id end |
#config_change_context ⇒ Object
Returns the value of attribute config_change_context.
25 26 27 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 25 def config_change_context @config_change_context end |
#config_change_details ⇒ Object
An array of relationships to serverConfigChangeDetail resources.
51 52 53 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 51 def config_change_details @config_change_details end |
#config_changes ⇒ Object
Returns the value of attribute config_changes.
27 28 29 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 27 def config_changes @config_changes end |
#config_result ⇒ Object
Returns the value of attribute config_result.
53 54 55 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 53 def config_result @config_result end |
#is_pmc_deployed_secure_passphrase_set ⇒ Object
Indicates whether the value of the ‘pmcDeployedSecurePassphrase’ property has been set.
30 31 32 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 30 def is_pmc_deployed_secure_passphrase_set @is_pmc_deployed_secure_passphrase_set end |
#leased_server ⇒ Object
Returns the value of attribute leased_server.
55 56 57 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 55 def leased_server @leased_server 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/server_profile_all_of.rb', line 23 def object_type @object_type end |
#organization ⇒ Object
Returns the value of attribute organization.
57 58 59 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 57 def organization @organization end |
#pmc_deployed_secure_passphrase ⇒ Object
Secure passphrase that is already deployed on all the Persistent Memory Modules on the server. This deployed passphrase is required during deploy of server profile if secure passphrase is changed or security is disabled in the attached persistent memory policy.
33 34 35 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 33 def pmc_deployed_secure_passphrase @pmc_deployed_secure_passphrase end |
#resource_lease ⇒ Object
Returns the value of attribute resource_lease.
59 60 61 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 59 def resource_lease @resource_lease end |
#running_workflows ⇒ Object
An array of relationships to workflowWorkflowInfo resources.
62 63 64 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 62 def running_workflows @running_workflows end |
#server_assignment_mode ⇒ Object
Source of the server assigned to the server profile. Values can be Static, Pool or None. Static is used if a server is attached directly to server profile. Pool is used if a resource pool is attached to server profile. None is used if no server or resource pool is attached to server profile. * None - No server is assigned to the server profile. * Static - Server is directly assigned to server profile using assign server. * Pool - Server is assigned from a resource pool.
36 37 38 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 36 def server_assignment_mode @server_assignment_mode end |
#server_pool ⇒ Object
Returns the value of attribute server_pool.
64 65 66 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 64 def server_pool @server_pool end |
#static_uuid_address ⇒ Object
The UUID address for the server must include UUID prefix xxxxxxxx-xxxx-xxxx along with the UUID suffix of format xxxx-xxxxxxxxxxxx.
39 40 41 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 39 def static_uuid_address @static_uuid_address end |
#uuid ⇒ Object
The UUID address that is assigned to the server based on the UUID pool.
42 43 44 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 42 def uuid @uuid end |
#uuid_lease ⇒ Object
Returns the value of attribute uuid_lease.
66 67 68 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 66 def uuid_lease @uuid_lease end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns the key-value map of all the JSON attributes this model knows about
122 123 124 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 122 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
117 118 119 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 117 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 91 def self.attribute_map { :'class_id' => :'ClassId', :'object_type' => :'ObjectType', :'config_change_context' => :'ConfigChangeContext', :'config_changes' => :'ConfigChanges', :'is_pmc_deployed_secure_passphrase_set' => :'IsPmcDeployedSecurePassphraseSet', :'pmc_deployed_secure_passphrase' => :'PmcDeployedSecurePassphrase', :'server_assignment_mode' => :'ServerAssignmentMode', :'static_uuid_address' => :'StaticUuidAddress', :'uuid' => :'Uuid', :'assigned_server' => :'AssignedServer', :'associated_server' => :'AssociatedServer', :'associated_server_pool' => :'AssociatedServerPool', :'config_change_details' => :'ConfigChangeDetails', :'config_result' => :'ConfigResult', :'leased_server' => :'LeasedServer', :'organization' => :'Organization', :'resource_lease' => :'ResourceLease', :'running_workflows' => :'RunningWorkflows', :'server_pool' => :'ServerPool', :'uuid_lease' => :'UuidLease' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
388 389 390 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 388 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
153 154 155 156 157 158 159 160 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 153 def self.openapi_nullable Set.new([ :'config_change_context', :'config_changes', :'config_change_details', :'running_workflows', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 127 def self.openapi_types { :'class_id' => :'String', :'object_type' => :'String', :'config_change_context' => :'PolicyConfigChangeContext', :'config_changes' => :'PolicyConfigChange', :'is_pmc_deployed_secure_passphrase_set' => :'Boolean', :'pmc_deployed_secure_passphrase' => :'String', :'server_assignment_mode' => :'String', :'static_uuid_address' => :'String', :'uuid' => :'String', :'assigned_server' => :'ComputePhysicalRelationship', :'associated_server' => :'ComputePhysicalRelationship', :'associated_server_pool' => :'ResourcepoolPoolRelationship', :'config_change_details' => :'Array<ServerConfigChangeDetailRelationship>', :'config_result' => :'ServerConfigResultRelationship', :'leased_server' => :'ComputePhysicalRelationship', :'organization' => :'OrganizationOrganizationRelationship', :'resource_lease' => :'ResourcepoolLeaseRelationship', :'running_workflows' => :'Array<WorkflowWorkflowInfoRelationship>', :'server_pool' => :'ResourcepoolPoolRelationship', :'uuid_lease' => :'UuidpoolUuidLeaseRelationship' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 348 def ==(o) return true if self.equal?(o) self.class == o.class && class_id == o.class_id && object_type == o.object_type && config_change_context == o.config_change_context && config_changes == o.config_changes && is_pmc_deployed_secure_passphrase_set == o.is_pmc_deployed_secure_passphrase_set && pmc_deployed_secure_passphrase == o.pmc_deployed_secure_passphrase && server_assignment_mode == o.server_assignment_mode && static_uuid_address == o.static_uuid_address && uuid == o.uuid && assigned_server == o.assigned_server && associated_server == o.associated_server && associated_server_pool == o.associated_server_pool && config_change_details == o.config_change_details && config_result == o.config_result && leased_server == o.leased_server && organization == o.organization && resource_lease == o.resource_lease && running_workflows == o.running_workflows && server_pool == o.server_pool && uuid_lease == o.uuid_lease end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 418 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
489 490 491 492 493 494 495 496 497 498 499 500 501 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 489 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
395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 395 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) ServerProfileAllOf.openapi_types.each_pair do |key, type| if attributes[ServerProfileAllOf.attribute_map[key]].nil? && ServerProfileAllOf.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[ServerProfileAllOf.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[ServerProfileAllOf.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[ServerProfileAllOf.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[ServerProfileAllOf.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
375 376 377 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 375 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
381 382 383 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 381 def hash [class_id, object_type, config_change_context, config_changes, is_pmc_deployed_secure_passphrase_set, pmc_deployed_secure_passphrase, server_assignment_mode, static_uuid_address, uuid, assigned_server, associated_server, associated_server_pool, config_change_details, config_result, leased_server, organization, resource_lease, running_workflows, server_pool, uuid_lease].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 272 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(/^$|^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if !@static_uuid_address.nil? && @static_uuid_address !~ pattern invalid_properties.push("invalid value for \"static_uuid_address\", must conform to the pattern #{pattern}.") end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
465 466 467 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 465 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
471 472 473 474 475 476 477 478 479 480 481 482 483 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 471 def to_hash hash = {} ServerProfileAllOf.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = ServerProfileAllOf.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
459 460 461 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 459 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
292 293 294 295 296 297 298 299 300 301 302 303 |
# File 'lib/intersight_client/models/server_profile_all_of.rb', line 292 def valid? return false if @class_id.nil? class_id_validator = EnumAttributeValidator.new('String', ["server.Profile"]) return false unless class_id_validator.valid?(@class_id) return false if @object_type.nil? object_type_validator = EnumAttributeValidator.new('String', ["server.Profile"]) return false unless object_type_validator.valid?(@object_type) server_assignment_mode_validator = EnumAttributeValidator.new('String', ["None", "Static", "Pool"]) return false unless server_assignment_mode_validator.valid?(@server_assignment_mode) return false if !@static_uuid_address.nil? && @static_uuid_address !~ Regexp.new(/^$|^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) true end |