Class: IntersightClient::ApplianceImageBundle
- Defined in:
- lib/intersight_client/models/appliance_image_bundle.rb
Overview
ImageBundle keeps track of all the software bundles installed in the Intersight Appliances. Each ImageBundle managed object is derived from a software upgrade manifest. ImageBundle has additional properties computed during the manifest processing. Additional properties are the dynamic attributes of the software packages declared in the software manifest. For example, SHA256 values of the software packages are computed during the software manifest processing. An ImageBundle managed object named ‘current’ is always present in the Intersight Appliance. The software upgrade service creates another ImageBundle managed object named ‘pending’ when there is a pending software upgrade. The upgrade service renames the ‘pending’ bundle to the ‘current’ bundle after the software upgrade is successful.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#ansible_packages ⇒ Object
Returns the value of attribute ansible_packages.
-
#auto_upgrade ⇒ Object
Indicates that the software upgrade was automatically initiated by the Intersight Appliance.
-
#class_id ⇒ Object
The fully-qualified name of the instantiated, concrete type.
-
#dc_packages ⇒ Object
Returns the value of attribute dc_packages.
-
#debug_packages ⇒ Object
Returns the value of attribute debug_packages.
-
#description ⇒ Object
Short description of the software upgrade bundle.
-
#endpoint_packages ⇒ Object
Returns the value of attribute endpoint_packages.
-
#fingerprint ⇒ Object
Fingerprint of the software manifest from which this bundle is created.
-
#has_error ⇒ Object
Indicates that the ImageBundle has errors.
-
#infra_packages ⇒ Object
Returns the value of attribute infra_packages.
-
#init_packages ⇒ Object
Returns the value of attribute init_packages.
-
#name ⇒ Object
Name of the software upgrade bundle.
-
#notes ⇒ Object
Detailed description of the software upgrade bundle.
-
#object_type ⇒ Object
The fully-qualified name of the instantiated, concrete type.
-
#priority ⇒ Object
Software upgrade manifest’s upgrade priority.
-
#release_time ⇒ Object
Software upgrade manifest’s release date and time.
-
#service_packages ⇒ Object
Returns the value of attribute service_packages.
-
#status_message ⇒ Object
Status message set during the manifest processing.
-
#system_packages ⇒ Object
Returns the value of attribute system_packages.
-
#ui_packages ⇒ Object
Returns the value of attribute ui_packages.
-
#upgrade_end_time ⇒ Object
End date of the software upgrade process.
-
#upgrade_grace_period ⇒ Object
Grace period in seconds before the automatic upgrade is initiated.
-
#upgrade_impact_duration ⇒ Object
Duration (in minutes) for which services will be disrupted.
-
#upgrade_impact_enum ⇒ Object
UpgradeImpactEnum is used to indicate the kind of impact the upgrade has on currently running services on the appliance.
-
#upgrade_start_time ⇒ Object
Start date of the software upgrade process.
-
#version ⇒ Object
Software upgrade manifest’s version.
Attributes inherited from MoBaseMo
#account_moid, #ancestors, #create_time, #display_names, #domain_group_moid, #mod_time, #moid, #owners, #parent, #permission_resources, #shared_scope, #tags, #version_context
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns the key-value map of all the JSON attributes this model knows about, including the ones defined in its parent(s).
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about, including the ones defined in its parent(s).
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3).
-
.openapi_discriminator_name ⇒ Object
discriminator’s property name in OpenAPI v3.
-
.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 = {}) ⇒ ApplianceImageBundle
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 = {}) ⇒ ApplianceImageBundle
Initializes the object
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 294 295 296 297 298 299 300 301 302 303 304 305 306 307 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 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 214 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `IntersightClient::ApplianceImageBundle` 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 } # call parent's initialize super(attributes) if attributes.key?(:'class_id') self.class_id = attributes[:'class_id'] else self.class_id = 'appliance.ImageBundle' end if attributes.key?(:'object_type') self.object_type = attributes[:'object_type'] else self.object_type = 'appliance.ImageBundle' end if attributes.key?(:'ansible_packages') if (value = attributes[:'ansible_packages']).is_a?(Array) self.ansible_packages = value end end if attributes.key?(:'auto_upgrade') self.auto_upgrade = attributes[:'auto_upgrade'] end if attributes.key?(:'dc_packages') if (value = attributes[:'dc_packages']).is_a?(Array) self.dc_packages = value end end if attributes.key?(:'debug_packages') if (value = attributes[:'debug_packages']).is_a?(Array) self.debug_packages = value end end if attributes.key?(:'description') self.description = attributes[:'description'] end if attributes.key?(:'endpoint_packages') if (value = attributes[:'endpoint_packages']).is_a?(Array) self.endpoint_packages = value end end if attributes.key?(:'fingerprint') self.fingerprint = attributes[:'fingerprint'] end if attributes.key?(:'has_error') self.has_error = attributes[:'has_error'] end if attributes.key?(:'infra_packages') if (value = attributes[:'infra_packages']).is_a?(Array) self.infra_packages = value end end if attributes.key?(:'init_packages') if (value = attributes[:'init_packages']).is_a?(Array) self.init_packages = value end end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'notes') self.notes = attributes[:'notes'] end if attributes.key?(:'priority') self.priority = attributes[:'priority'] else self.priority = 'Normal' end if attributes.key?(:'release_time') self.release_time = attributes[:'release_time'] end if attributes.key?(:'service_packages') if (value = attributes[:'service_packages']).is_a?(Array) self.service_packages = value end end if attributes.key?(:'status_message') self. = attributes[:'status_message'] end if attributes.key?(:'system_packages') if (value = attributes[:'system_packages']).is_a?(Array) self.system_packages = value end end if attributes.key?(:'ui_packages') if (value = attributes[:'ui_packages']).is_a?(Array) self.ui_packages = value end end if attributes.key?(:'upgrade_end_time') self.upgrade_end_time = attributes[:'upgrade_end_time'] end if attributes.key?(:'upgrade_grace_period') self.upgrade_grace_period = attributes[:'upgrade_grace_period'] end if attributes.key?(:'upgrade_impact_duration') self.upgrade_impact_duration = attributes[:'upgrade_impact_duration'] else self.upgrade_impact_duration = 0 end if attributes.key?(:'upgrade_impact_enum') self.upgrade_impact_enum = attributes[:'upgrade_impact_enum'] else self.upgrade_impact_enum = 'None' end if attributes.key?(:'upgrade_start_time') self.upgrade_start_time = attributes[:'upgrade_start_time'] end if attributes.key?(:'version') self.version = attributes[:'version'] end end |
Instance Attribute Details
#ansible_packages ⇒ Object
Returns the value of attribute ansible_packages.
25 26 27 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 25 def ansible_packages @ansible_packages end |
#auto_upgrade ⇒ Object
Indicates that the software upgrade was automatically initiated by the Intersight Appliance.
28 29 30 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 28 def auto_upgrade @auto_upgrade 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/appliance_image_bundle.rb', line 20 def class_id @class_id end |
#dc_packages ⇒ Object
Returns the value of attribute dc_packages.
30 31 32 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 30 def dc_packages @dc_packages end |
#debug_packages ⇒ Object
Returns the value of attribute debug_packages.
32 33 34 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 32 def debug_packages @debug_packages end |
#description ⇒ Object
Short description of the software upgrade bundle.
35 36 37 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 35 def description @description end |
#endpoint_packages ⇒ Object
Returns the value of attribute endpoint_packages.
37 38 39 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 37 def endpoint_packages @endpoint_packages end |
#fingerprint ⇒ Object
Fingerprint of the software manifest from which this bundle is created. Fingerprint is calculated using the SHA256 algorithm.
40 41 42 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 40 def fingerprint @fingerprint end |
#has_error ⇒ Object
Indicates that the ImageBundle has errors. The upgrade service sets this field when it encounters errors during the manifest processing.
43 44 45 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 43 def has_error @has_error end |
#infra_packages ⇒ Object
Returns the value of attribute infra_packages.
45 46 47 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 45 def infra_packages @infra_packages end |
#init_packages ⇒ Object
Returns the value of attribute init_packages.
47 48 49 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 47 def init_packages @init_packages end |
#name ⇒ Object
Name of the software upgrade bundle.
50 51 52 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 50 def name @name end |
#notes ⇒ Object
Detailed description of the software upgrade bundle.
53 54 55 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 53 def notes @notes 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/appliance_image_bundle.rb', line 23 def object_type @object_type end |
#priority ⇒ Object
Software upgrade manifest’s upgrade priority. The upgrade service supports two priorities, Normal and Critical. Normal priority is used for regular software upgrades, and the upgrade service uses the Upgrade Policy to compute upgrade start time. Critical priority is used for the critical software security patches, and the upgrade service ignores the Upgrade Policy when it computes the upgrade start time. * Normal - Normal upgrade priority is used for all the software upgrades except for the critical security updates. The upgrade service of Intersight Appliance uses the Software Upgrade Policy settings to start the upgrade process. * Critical - Critical upgrade priority is used for critical updates such as security patches. The upgrade service of the Intersight Appliance starts the upgrade as specified by the upgrade properties in the software manifest file. The upgrade service will not use the settings specified in the Software Upgrade Policy.
56 57 58 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 56 def priority @priority end |
#release_time ⇒ Object
Software upgrade manifest’s release date and time.
59 60 61 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 59 def release_time @release_time end |
#service_packages ⇒ Object
Returns the value of attribute service_packages.
61 62 63 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 61 def service_packages @service_packages end |
#status_message ⇒ Object
Status message set during the manifest processing.
64 65 66 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 64 def @status_message end |
#system_packages ⇒ Object
Returns the value of attribute system_packages.
66 67 68 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 66 def system_packages @system_packages end |
#ui_packages ⇒ Object
Returns the value of attribute ui_packages.
68 69 70 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 68 def ui_packages @ui_packages end |
#upgrade_end_time ⇒ Object
End date of the software upgrade process.
71 72 73 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 71 def upgrade_end_time @upgrade_end_time end |
#upgrade_grace_period ⇒ Object
Grace period in seconds before the automatic upgrade is initiated. The upgrade service uses the grace period to compute the upgrade start time when it receives an upgrade notfication from the Intersight. If there is an Upgrade Policy configured for the Intersight Appliance, then the upgrade service uses the policy to compute the upgrade start time. However, the upgrade start time cannot not exceed the limit enforced by the grace period.
74 75 76 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 74 def upgrade_grace_period @upgrade_grace_period end |
#upgrade_impact_duration ⇒ Object
Duration (in minutes) for which services will be disrupted.
77 78 79 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 77 def upgrade_impact_duration @upgrade_impact_duration end |
#upgrade_impact_enum ⇒ Object
UpgradeImpactEnum is used to indicate the kind of impact the upgrade has on currently running services on the appliance. * None - The upgrade has no effect on the system. * Disruptive - The services will not be functional during the upgrade. * Disruptive-reboot - The upgrade needs a reboot.
80 81 82 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 80 def upgrade_impact_enum @upgrade_impact_enum end |
#upgrade_start_time ⇒ Object
Start date of the software upgrade process.
83 84 85 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 83 def upgrade_start_time @upgrade_start_time end |
#version ⇒ Object
Software upgrade manifest’s version.
86 87 88 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 86 def version @version end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns the key-value map of all the JSON attributes this model knows about, including the ones defined in its parent(s)
148 149 150 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 148 def self.acceptable_attribute_map attribute_map.merge(superclass.acceptable_attribute_map) end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about, including the ones defined in its parent(s)
143 144 145 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 143 def self.acceptable_attributes attribute_map.values.concat(superclass.acceptable_attributes) end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 111 def self.attribute_map { :'class_id' => :'ClassId', :'object_type' => :'ObjectType', :'ansible_packages' => :'AnsiblePackages', :'auto_upgrade' => :'AutoUpgrade', :'dc_packages' => :'DcPackages', :'debug_packages' => :'DebugPackages', :'description' => :'Description', :'endpoint_packages' => :'EndpointPackages', :'fingerprint' => :'Fingerprint', :'has_error' => :'HasError', :'infra_packages' => :'InfraPackages', :'init_packages' => :'InitPackages', :'name' => :'Name', :'notes' => :'Notes', :'priority' => :'Priority', :'release_time' => :'ReleaseTime', :'service_packages' => :'ServicePackages', :'status_message' => :'StatusMessage', :'system_packages' => :'SystemPackages', :'ui_packages' => :'UiPackages', :'upgrade_end_time' => :'UpgradeEndTime', :'upgrade_grace_period' => :'UpgradeGracePeriod', :'upgrade_impact_duration' => :'UpgradeImpactDuration', :'upgrade_impact_enum' => :'UpgradeImpactEnum', :'upgrade_start_time' => :'UpgradeStartTime', :'version' => :'Version' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
482 483 484 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 482 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3)
200 201 202 203 204 205 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 200 def self.openapi_all_of [ :'ApplianceImageBundleAllOf', :'MoBaseMo' ] end |
.openapi_discriminator_name ⇒ Object
discriminator’s property name in OpenAPI v3
208 209 210 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 208 def self.openapi_discriminator_name :'ClassId' end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
185 186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 185 def self.openapi_nullable Set.new([ :'ansible_packages', :'dc_packages', :'debug_packages', :'endpoint_packages', :'infra_packages', :'init_packages', :'service_packages', :'system_packages', :'ui_packages', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 153 def self.openapi_types { :'class_id' => :'String', :'object_type' => :'String', :'ansible_packages' => :'Array<OnpremImagePackage>', :'auto_upgrade' => :'Boolean', :'dc_packages' => :'Array<OnpremImagePackage>', :'debug_packages' => :'Array<OnpremImagePackage>', :'description' => :'String', :'endpoint_packages' => :'Array<OnpremImagePackage>', :'fingerprint' => :'String', :'has_error' => :'Boolean', :'infra_packages' => :'Array<OnpremImagePackage>', :'init_packages' => :'Array<OnpremImagePackage>', :'name' => :'String', :'notes' => :'String', :'priority' => :'String', :'release_time' => :'Time', :'service_packages' => :'Array<OnpremImagePackage>', :'status_message' => :'String', :'system_packages' => :'Array<OnpremImagePackage>', :'ui_packages' => :'Array<OnpremImagePackage>', :'upgrade_end_time' => :'Time', :'upgrade_grace_period' => :'Integer', :'upgrade_impact_duration' => :'Integer', :'upgrade_impact_enum' => :'String', :'upgrade_start_time' => :'Time', :'version' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 436 def ==(o) return true if self.equal?(o) self.class == o.class && class_id == o.class_id && object_type == o.object_type && ansible_packages == o.ansible_packages && auto_upgrade == o.auto_upgrade && dc_packages == o.dc_packages && debug_packages == o.debug_packages && description == o.description && endpoint_packages == o.endpoint_packages && fingerprint == o.fingerprint && has_error == o.has_error && infra_packages == o.infra_packages && init_packages == o.init_packages && name == o.name && notes == o.notes && priority == o.priority && release_time == o.release_time && service_packages == o.service_packages && == o. && system_packages == o.system_packages && ui_packages == o.ui_packages && upgrade_end_time == o.upgrade_end_time && upgrade_grace_period == o.upgrade_grace_period && upgrade_impact_duration == o.upgrade_impact_duration && upgrade_impact_enum == o.upgrade_impact_enum && upgrade_start_time == o.upgrade_start_time && version == o.version && super(o) end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 548 549 550 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 513 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
584 585 586 587 588 589 590 591 592 593 594 595 596 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 584 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
489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 489 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) super(attributes) ApplianceImageBundle.openapi_types.each_pair do |key, type| if attributes[ApplianceImageBundle.attribute_map[key]].nil? && ApplianceImageBundle.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[ApplianceImageBundle.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[ApplianceImageBundle.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[ApplianceImageBundle.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[ApplianceImageBundle.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
469 470 471 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 469 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
475 476 477 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 475 def hash [class_id, object_type, ansible_packages, auto_upgrade, dc_packages, debug_packages, description, endpoint_packages, fingerprint, has_error, infra_packages, init_packages, name, notes, priority, release_time, service_packages, , system_packages, ui_packages, upgrade_end_time, upgrade_grace_period, upgrade_impact_duration, upgrade_impact_enum, upgrade_start_time, version].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
365 366 367 368 369 370 371 372 373 374 375 376 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 365 def list_invalid_properties invalid_properties = super 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 invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
560 561 562 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 560 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
566 567 568 569 570 571 572 573 574 575 576 577 578 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 566 def to_hash hash = super ApplianceImageBundle.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = ApplianceImageBundle.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
554 555 556 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 554 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
380 381 382 383 384 385 386 387 388 389 390 391 392 |
# File 'lib/intersight_client/models/appliance_image_bundle.rb', line 380 def valid? return false if @class_id.nil? class_id_validator = EnumAttributeValidator.new('String', ["appliance.ImageBundle"]) return false unless class_id_validator.valid?(@class_id) return false if @object_type.nil? object_type_validator = EnumAttributeValidator.new('String', ["appliance.ImageBundle"]) return false unless object_type_validator.valid?(@object_type) priority_validator = EnumAttributeValidator.new('String', ["Normal", "Critical"]) return false unless priority_validator.valid?(@priority) upgrade_impact_enum_validator = EnumAttributeValidator.new('String', ["None", "Disruptive", "Disruptive-reboot"]) return false unless upgrade_impact_enum_validator.valid?(@upgrade_impact_enum) true && super end |