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

- old
+ new

@@ -14,18 +14,18 @@ require 'time' module Ionoscloud class TemplateProperties - # The name of the resource. - attr_accessor :name - - # The CPU cores count. attr_accessor :cores + # The resource name. + attr_accessor :name + + # The RAM size in MB. attr_accessor :ram # The storage size in GB. @@ -33,14 +33,14 @@ # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'name' => :'name', - :'cores' => :'cores', + :'name' => :'name', + :'ram' => :'ram', :'storage_size' => :'storageSize' } end @@ -52,14 +52,14 @@ # Attribute type mapping. def self.openapi_types { - :'name' => :'String', - :'cores' => :'Float', + :'name' => :'String', + :'ram' => :'Float', :'storage_size' => :'Float' } end @@ -88,17 +88,17 @@ end h[k.to_sym] = v } - if attributes.key?(:'name') - self.name = attributes[:'name'] + if attributes.key?(:'cores') + self.cores = attributes[:'cores'] end - if attributes.key?(:'cores') - self.cores = attributes[:'cores'] + if attributes.key?(:'name') + self.name = attributes[:'name'] end if attributes.key?(:'ram') self.ram = attributes[:'ram'] @@ -113,17 +113,17 @@ # 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.') + if @cores.nil? + invalid_properties.push('invalid value for "cores", cores cannot be nil.') end - if @cores.nil? - invalid_properties.push('invalid value for "cores", cores cannot be nil.') + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') end if @ram.nil? invalid_properties.push('invalid value for "ram", ram cannot be nil.') @@ -139,14 +139,14 @@ # 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? - return false if @cores.nil? + return false if @name.nil? + return false if @ram.nil? return false if @storage_size.nil? true end @@ -158,12 +158,12 @@ # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) self.class == o.class && - name == o.name && cores == o.cores && + name == o.name && ram == o.ram && storage_size == o.storage_size end # @see the `==` method @@ -173,10 +173,10 @@ end # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [name, cores, ram, storage_size].hash + [cores, name, ram, storage_size].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself