lib/ionoscloud/models/backup_unit_properties.rb in ionoscloud-6.1.1 vs lib/ionoscloud/models/backup_unit_properties.rb in ionoscloud-6.1.2

- old
+ new

@@ -14,30 +14,30 @@ require 'time' module Ionoscloud class BackupUnitProperties + # The email associated with the backup unit. Bear in mind that this email does not be the same email as of the user. + attr_accessor :email + + # The name of the resource (alphanumeric characters only). attr_accessor :name # The password associated with that resource. attr_accessor :password - - # The email associated with the backup unit. Bear in mind that this email does not be the same email as of the user. - attr_accessor :email - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'email' => :'email', + :'name' => :'name', - :'password' => :'password', - - :'email' => :'email' + :'password' => :'password' } end # Returns all the JSON keys this model knows about def self.acceptable_attributes @@ -46,15 +46,15 @@ # Attribute type mapping. def self.openapi_types { + :'email' => :'String', + :'name' => :'String', - :'password' => :'String', - - :'email' => :'String' + :'password' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable @@ -79,46 +79,46 @@ end h[k.to_sym] = v } + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'password') self.password = attributes[:'password'] end - - - if attributes.key?(:'email') - self.email = attributes[:'email'] - 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 invalid_properties = Array.new + if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end - invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return false if @name.nil? - true end @@ -126,13 +126,13 @@ # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) self.class == o.class && + email == o.email && name == o.name && - password == o.password && - email == o.email + password == o.password end # @see the `==` method # @param [Object] Object to be compared def eql?(o) @@ -140,10 +140,10 @@ end # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [name, password, email].hash + [email, name, password].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself