lib/patch_ruby/models/project.rb in patch_ruby-1.3.0 vs lib/patch_ruby/models/project.rb in patch_ruby-1.4.0
- old
+ new
@@ -45,10 +45,13 @@
attr_accessor :remaining_mass_g
# An object returning the Standard associated with this project.
attr_accessor :standard
+ # An array returning the UN Sustainable Development Goals associated with this project.
+ attr_accessor :sdgs
+
class EnumAttributeValidator
attr_reader :datatype
attr_reader :allowable_values
def initialize(datatype, allowable_values)
@@ -80,11 +83,12 @@
:'country' => :'country',
:'developer' => :'developer',
:'photos' => :'photos',
:'average_price_per_tonne_cents_usd' => :'average_price_per_tonne_cents_usd',
:'remaining_mass_g' => :'remaining_mass_g',
- :'standard' => :'standard'
+ :'standard' => :'standard',
+ :'sdgs' => :'sdgs'
}
end
# Attribute type mapping.
def self.openapi_types
@@ -97,11 +101,12 @@
:'country' => :'String',
:'developer' => :'String',
:'photos' => :'Array<Photo>',
:'average_price_per_tonne_cents_usd' => :'Integer',
:'remaining_mass_g' => :'Integer',
- :'standard' => :'Standard'
+ :'standard' => :'Standard',
+ :'sdgs' => :'Array<Sdg>'
}
end
# Set with nullable attributes.
def self.openapi_nullable
@@ -109,10 +114,12 @@
nullable_properties.add("photos")
nullable_properties.add("standard")
+ nullable_properties.add("sdgs")
+
nullable_properties
end
# Allows models with corresponding API classes to delegate API operations to those API classes
# Exposes Model.operation_id which delegates to ModelsApi.new.operation_id
@@ -183,10 +190,16 @@
end
if attributes.key?(:'standard')
self.standard = attributes[:'standard']
end
+
+ if attributes.key?(:'sdgs')
+ if (value = attributes[:'sdgs']).is_a?(Array)
+ self.sdgs = value
+ end
+ 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
@@ -265,11 +278,12 @@
country == o.country &&
developer == o.developer &&
photos == o.photos &&
average_price_per_tonne_cents_usd == o.average_price_per_tonne_cents_usd &&
remaining_mass_g == o.remaining_mass_g &&
- standard == o.standard
+ standard == o.standard &&
+ sdgs == o.sdgs
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)
@@ -277,10 +291,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [id, production, name, description, type, country, developer, photos, average_price_per_tonne_cents_usd, remaining_mass_g, standard].hash
+ [id, production, name, description, type, country, developer, photos, average_price_per_tonne_cents_usd, remaining_mass_g, standard, sdgs].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself