lib/ionoscloud/models/volume_properties.rb in ionoscloud-6.1.0 vs lib/ionoscloud/models/volume_properties.rb in ionoscloud-6.1.1

- old
+ new

@@ -96,10 +96,14 @@ # The UUID of the attached server. attr_accessor :boot_server + + # Determines whether the volume will be used as a boot volume. Set to `NONE`, the volume will not be used as boot volume. Set to `PRIMARY`, the volume will be used as boot volume and all other volumes must be set to `NONE`. Set to `AUTO` or `null` requires all volumes to be set to `AUTO` or `null`; this will use the legacy behavior, which is to use the volume as a boot volume only if there are no other volumes or cdrom devices. + attr_accessor :boot_order + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values def initialize(datatype, allowable_values) @@ -162,11 +166,13 @@ :'backupunit_id' => :'backupunitId', :'user_data' => :'userData', - :'boot_server' => :'bootServer' + :'boot_server' => :'bootServer', + + :'boot_order' => :'bootOrder' } end # Returns all the JSON keys this model knows about def self.acceptable_attributes @@ -215,11 +221,13 @@ :'backupunit_id' => :'String', :'user_data' => :'String', - :'boot_server' => :'String' + :'boot_server' => :'String', + + :'boot_order' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable @@ -243,10 +251,11 @@ + ]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash @@ -365,10 +374,17 @@ if attributes.key?(:'boot_server') self.boot_server = attributes[:'boot_server'] end + + + if attributes.key?(:'boot_order') + self.boot_order = attributes[:'boot_order'] + else + self.boot_order = 'AUTO' + end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties @@ -396,10 +412,11 @@ + invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid @@ -432,10 +449,13 @@ + + boot_order_validator = EnumAttributeValidator.new('String', ["AUTO", "NONE", "PRIMARY"]) + return false unless boot_order_validator.valid?(@boot_order) true end @@ -496,10 +516,21 @@ + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] boot_order Object to be assigned + def boot_order=(boot_order) + validator = EnumAttributeValidator.new('String', ["AUTO", "NONE", "PRIMARY"]) + unless validator.valid?(boot_order) + fail ArgumentError, "invalid value for \"boot_order\", must be one of #{validator.allowable_values}." + end + @boot_order = boot_order + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) self.class == o.class && @@ -521,11 +552,12 @@ disc_virtio_hot_unplug == o.disc_virtio_hot_unplug && device_number == o.device_number && pci_slot == o.pci_slot && backupunit_id == o.backupunit_id && user_data == o.user_data && - boot_server == o.boot_server + boot_server == o.boot_server && + boot_order == o.boot_order end # @see the `==` method # @param [Object] Object to be compared def eql?(o) @@ -533,10 +565,10 @@ end # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [name, type, size, availability_zone, image, image_password, image_alias, ssh_keys, bus, licence_type, cpu_hot_plug, ram_hot_plug, nic_hot_plug, nic_hot_unplug, disc_virtio_hot_plug, disc_virtio_hot_unplug, device_number, pci_slot, backupunit_id, user_data, boot_server].hash + [name, type, size, availability_zone, image, image_password, image_alias, ssh_keys, bus, licence_type, cpu_hot_plug, ram_hot_plug, nic_hot_plug, nic_hot_unplug, disc_virtio_hot_plug, disc_virtio_hot_unplug, device_number, pci_slot, backupunit_id, user_data, boot_server, boot_order].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself