lib/patch_ruby/models/project.rb in patch_ruby-1.15.1 vs lib/patch_ruby/models/project.rb in patch_ruby-1.15.2
- old
+ new
@@ -69,10 +69,13 @@
# A short description of the project.
attr_accessor :tagline
attr_accessor :technology_type
+ # An array of objects containing the highlight's slug and title. A highlight's title is a short string that spotlights a characteristic about the project.
+ attr_accessor :highlights
+
class EnumAttributeValidator
attr_reader :datatype
attr_reader :allowable_values
def initialize(datatype, allowable_values)
@@ -112,11 +115,12 @@
:'remaining_mass_g' => :'remaining_mass_g',
:'verifier' => :'verifier',
:'standard' => :'standard',
:'sdgs' => :'sdgs',
:'tagline' => :'tagline',
- :'technology_type' => :'technology_type'
+ :'technology_type' => :'technology_type',
+ :'highlights' => :'highlights'
}
end
# Returns all the JSON keys this model knows about
def self.acceptable_attributes
@@ -142,11 +146,12 @@
:'remaining_mass_g' => :'Integer',
:'verifier' => :'String',
:'standard' => :'Standard',
:'sdgs' => :'Array<Sdg>',
:'tagline' => :'String',
- :'technology_type' => :'TechnologyType'
+ :'technology_type' => :'TechnologyType',
+ :'highlights' => :'Array<Highlight>'
}
end
# List of attributes with nullable: true
def self.openapi_nullable
@@ -264,10 +269,16 @@
end
if attributes.key?(:'technology_type')
self.technology_type = attributes[:'technology_type']
end
+
+ if attributes.key?(:'highlights')
+ if (value = attributes[:'highlights']).is_a?(Array)
+ self.highlights = 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
@@ -306,10 +317,14 @@
if @technology_type.nil?
invalid_properties.push('invalid value for "technology_type", technology_type cannot be nil.')
end
+ if @highlights.nil?
+ invalid_properties.push('invalid value for "highlights", highlights 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
@@ -323,10 +338,11 @@
return false if @country.nil?
return false if @developer.nil?
return false if @average_price_per_tonne_cents_usd.nil?
return false if @remaining_mass_g.nil?
return false if @technology_type.nil?
+ return false if @highlights.nil?
true
end
# Custom attribute writer method checking allowed values (enum).
# @param [Object] mechanism Object to be assigned
@@ -359,11 +375,12 @@
remaining_mass_g == o.remaining_mass_g &&
verifier == o.verifier &&
standard == o.standard &&
sdgs == o.sdgs &&
tagline == o.tagline &&
- technology_type == o.technology_type
+ technology_type == o.technology_type &&
+ highlights == o.highlights
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)
@@ -371,10 +388,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [id, production, name, description, type, mechanism, country, state, latitude, longitude, developer, photos, average_price_per_tonne_cents_usd, remaining_mass_g, verifier, standard, sdgs, tagline, technology_type].hash
+ [id, production, name, description, type, mechanism, country, state, latitude, longitude, developer, photos, average_price_per_tonne_cents_usd, remaining_mass_g, verifier, standard, sdgs, tagline, technology_type, highlights].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself