Class: FtcApiV3Client::ApiV3SkystoneAchievementsDetail
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- FtcApiV3Client::ApiV3SkystoneAchievementsDetail
- Defined in:
- lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb
Instance Attribute Summary collapse
-
#auto_delivered ⇒ Object
Returns the value of attribute auto_delivered.
-
#auto_placed ⇒ Object
Returns the value of attribute auto_placed.
-
#auto_returned ⇒ Object
Returns the value of attribute auto_returned.
-
#auto_stones ⇒ Object
Returns the value of attribute auto_stones.
-
#driver_controlled_delivered ⇒ Object
Returns the value of attribute driver_controlled_delivered.
-
#driver_controlled_placed ⇒ Object
Returns the value of attribute driver_controlled_placed.
-
#driver_controlled_returned ⇒ Object
Returns the value of attribute driver_controlled_returned.
-
#first_returned_is_skystone ⇒ Object
Returns the value of attribute first_returned_is_skystone.
-
#foundation_moved ⇒ Object
Returns the value of attribute foundation_moved.
-
#foundation_repositioned ⇒ Object
Returns the value of attribute foundation_repositioned.
-
#major_penalties ⇒ Object
Returns the value of attribute major_penalties.
-
#minor_penalties ⇒ Object
Returns the value of attribute minor_penalties.
-
#robot1_capstone_level ⇒ Object
Returns the value of attribute robot1_capstone_level.
-
#robot1_navigated ⇒ Object
Returns the value of attribute robot1_navigated.
-
#robot1_parked ⇒ Object
Returns the value of attribute robot1_parked.
-
#robot2_capstone_level ⇒ Object
Returns the value of attribute robot2_capstone_level.
-
#robot2_navigated ⇒ Object
Returns the value of attribute robot2_navigated.
-
#robot2_parked ⇒ Object
Returns the value of attribute robot2_parked.
-
#tallest_skyscraper ⇒ Object
Returns the value of attribute tallest_skyscraper.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ApiV3SkystoneAchievementsDetail
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ ApiV3SkystoneAchievementsDetail
Initializes the object
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 124 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `FtcApiV3Client::ApiV3SkystoneAchievementsDetail` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `FtcApiV3Client::ApiV3SkystoneAchievementsDetail`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'robot1_navigated') self.robot1_navigated = attributes[:'robot1_navigated'] else self.robot1_navigated = nil end if attributes.key?(:'robot2_navigated') self.robot2_navigated = attributes[:'robot2_navigated'] else self.robot2_navigated = nil end if attributes.key?(:'auto_stones') if (value = attributes[:'auto_stones']).is_a?(Array) self.auto_stones = value end else self.auto_stones = nil end if attributes.key?(:'auto_delivered') self.auto_delivered = attributes[:'auto_delivered'] else self.auto_delivered = nil end if attributes.key?(:'auto_returned') self.auto_returned = attributes[:'auto_returned'] else self.auto_returned = nil end if attributes.key?(:'auto_placed') self.auto_placed = attributes[:'auto_placed'] else self.auto_placed = nil end if attributes.key?(:'first_returned_is_skystone') self.first_returned_is_skystone = attributes[:'first_returned_is_skystone'] else self.first_returned_is_skystone = nil end if attributes.key?(:'foundation_repositioned') self.foundation_repositioned = attributes[:'foundation_repositioned'] else self.foundation_repositioned = nil end if attributes.key?(:'driver_controlled_delivered') self.driver_controlled_delivered = attributes[:'driver_controlled_delivered'] else self.driver_controlled_delivered = nil end if attributes.key?(:'driver_controlled_returned') self.driver_controlled_returned = attributes[:'driver_controlled_returned'] else self.driver_controlled_returned = nil end if attributes.key?(:'driver_controlled_placed') self.driver_controlled_placed = attributes[:'driver_controlled_placed'] else self.driver_controlled_placed = nil end if attributes.key?(:'tallest_skyscraper') self.tallest_skyscraper = attributes[:'tallest_skyscraper'] else self.tallest_skyscraper = nil end if attributes.key?(:'robot1_parked') self.robot1_parked = attributes[:'robot1_parked'] else self.robot1_parked = nil end if attributes.key?(:'robot2_parked') self.robot2_parked = attributes[:'robot2_parked'] else self.robot2_parked = nil end if attributes.key?(:'robot1_capstone_level') self.robot1_capstone_level = attributes[:'robot1_capstone_level'] else self.robot1_capstone_level = nil end if attributes.key?(:'robot2_capstone_level') self.robot2_capstone_level = attributes[:'robot2_capstone_level'] else self.robot2_capstone_level = nil end if attributes.key?(:'foundation_moved') self.foundation_moved = attributes[:'foundation_moved'] else self.foundation_moved = nil end if attributes.key?(:'minor_penalties') self.minor_penalties = attributes[:'minor_penalties'] else self.minor_penalties = nil end if attributes.key?(:'major_penalties') self.major_penalties = attributes[:'major_penalties'] else self.major_penalties = nil end end |
Instance Attribute Details
#auto_delivered ⇒ Object
Returns the value of attribute auto_delivered.
24 25 26 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 24 def auto_delivered @auto_delivered end |
#auto_placed ⇒ Object
Returns the value of attribute auto_placed.
28 29 30 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 28 def auto_placed @auto_placed end |
#auto_returned ⇒ Object
Returns the value of attribute auto_returned.
26 27 28 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 26 def auto_returned @auto_returned end |
#auto_stones ⇒ Object
Returns the value of attribute auto_stones.
22 23 24 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 22 def auto_stones @auto_stones end |
#driver_controlled_delivered ⇒ Object
Returns the value of attribute driver_controlled_delivered.
34 35 36 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 34 def driver_controlled_delivered @driver_controlled_delivered end |
#driver_controlled_placed ⇒ Object
Returns the value of attribute driver_controlled_placed.
38 39 40 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 38 def driver_controlled_placed @driver_controlled_placed end |
#driver_controlled_returned ⇒ Object
Returns the value of attribute driver_controlled_returned.
36 37 38 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 36 def driver_controlled_returned @driver_controlled_returned end |
#first_returned_is_skystone ⇒ Object
Returns the value of attribute first_returned_is_skystone.
30 31 32 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 30 def first_returned_is_skystone @first_returned_is_skystone end |
#foundation_moved ⇒ Object
Returns the value of attribute foundation_moved.
50 51 52 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 50 def foundation_moved @foundation_moved end |
#foundation_repositioned ⇒ Object
Returns the value of attribute foundation_repositioned.
32 33 34 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 32 def foundation_repositioned @foundation_repositioned end |
#major_penalties ⇒ Object
Returns the value of attribute major_penalties.
54 55 56 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 54 def major_penalties @major_penalties end |
#minor_penalties ⇒ Object
Returns the value of attribute minor_penalties.
52 53 54 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 52 def minor_penalties @minor_penalties end |
#robot1_capstone_level ⇒ Object
Returns the value of attribute robot1_capstone_level.
46 47 48 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 46 def robot1_capstone_level @robot1_capstone_level end |
#robot1_navigated ⇒ Object
Returns the value of attribute robot1_navigated.
18 19 20 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 18 def robot1_navigated @robot1_navigated end |
#robot1_parked ⇒ Object
Returns the value of attribute robot1_parked.
42 43 44 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 42 def robot1_parked @robot1_parked end |
#robot2_capstone_level ⇒ Object
Returns the value of attribute robot2_capstone_level.
48 49 50 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 48 def robot2_capstone_level @robot2_capstone_level end |
#robot2_navigated ⇒ Object
Returns the value of attribute robot2_navigated.
20 21 22 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 20 def robot2_navigated @robot2_navigated end |
#robot2_parked ⇒ Object
Returns the value of attribute robot2_parked.
44 45 46 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 44 def robot2_parked @robot2_parked end |
#tallest_skyscraper ⇒ Object
Returns the value of attribute tallest_skyscraper.
40 41 42 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 40 def tallest_skyscraper @tallest_skyscraper end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
82 83 84 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 82 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
87 88 89 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 87 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 57 def self.attribute_map { :'robot1_navigated' => :'robot1Navigated', :'robot2_navigated' => :'robot2Navigated', :'auto_stones' => :'autoStones', :'auto_delivered' => :'autoDelivered', :'auto_returned' => :'autoReturned', :'auto_placed' => :'autoPlaced', :'first_returned_is_skystone' => :'firstReturnedIsSkystone', :'foundation_repositioned' => :'foundationRepositioned', :'driver_controlled_delivered' => :'driverControlledDelivered', :'driver_controlled_returned' => :'driverControlledReturned', :'driver_controlled_placed' => :'driverControlledPlaced', :'tallest_skyscraper' => :'tallestSkyscraper', :'robot1_parked' => :'robot1Parked', :'robot2_parked' => :'robot2Parked', :'robot1_capstone_level' => :'robot1CapstoneLevel', :'robot2_capstone_level' => :'robot2CapstoneLevel', :'foundation_moved' => :'foundationMoved', :'minor_penalties' => :'minorPenalties', :'major_penalties' => :'majorPenalties' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 596 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
117 118 119 120 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 117 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 92 def self.openapi_types { :'robot1_navigated' => :'Boolean', :'robot2_navigated' => :'Boolean', :'auto_stones' => :'Array<ApiV3Stone>', :'auto_delivered' => :'Integer', :'auto_returned' => :'Integer', :'auto_placed' => :'Integer', :'first_returned_is_skystone' => :'Boolean', :'foundation_repositioned' => :'Boolean', :'driver_controlled_delivered' => :'Integer', :'driver_controlled_returned' => :'Integer', :'driver_controlled_placed' => :'Integer', :'tallest_skyscraper' => :'Integer', :'robot1_parked' => :'Boolean', :'robot2_parked' => :'Boolean', :'robot1_capstone_level' => :'Integer', :'robot2_capstone_level' => :'Integer', :'foundation_moved' => :'Boolean', :'minor_penalties' => :'Integer', :'major_penalties' => :'Integer' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 557 def ==(o) return true if self.equal?(o) self.class == o.class && robot1_navigated == o.robot1_navigated && robot2_navigated == o.robot2_navigated && auto_stones == o.auto_stones && auto_delivered == o.auto_delivered && auto_returned == o.auto_returned && auto_placed == o.auto_placed && first_returned_is_skystone == o.first_returned_is_skystone && foundation_repositioned == o.foundation_repositioned && driver_controlled_delivered == o.driver_controlled_delivered && driver_controlled_returned == o.driver_controlled_returned && driver_controlled_placed == o.driver_controlled_placed && tallest_skyscraper == o.tallest_skyscraper && robot1_parked == o.robot1_parked && robot2_parked == o.robot2_parked && robot1_capstone_level == o.robot1_capstone_level && robot2_capstone_level == o.robot2_capstone_level && foundation_moved == o.foundation_moved && minor_penalties == o.minor_penalties && major_penalties == o.major_penalties end |
#eql?(o) ⇒ Boolean
583 584 585 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 583 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
589 590 591 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 589 def hash [robot1_navigated, robot2_navigated, auto_stones, auto_delivered, auto_returned, auto_placed, first_returned_is_skystone, foundation_repositioned, driver_controlled_delivered, driver_controlled_returned, driver_controlled_placed, tallest_skyscraper, robot1_parked, robot2_parked, robot1_capstone_level, robot2_capstone_level, foundation_moved, minor_penalties, major_penalties].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 257 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @robot1_navigated.nil? invalid_properties.push('invalid value for "robot1_navigated", robot1_navigated cannot be nil.') end if @robot2_navigated.nil? invalid_properties.push('invalid value for "robot2_navigated", robot2_navigated cannot be nil.') end if @auto_stones.nil? invalid_properties.push('invalid value for "auto_stones", auto_stones cannot be nil.') end if @auto_delivered.nil? invalid_properties.push('invalid value for "auto_delivered", auto_delivered cannot be nil.') end if @auto_returned.nil? invalid_properties.push('invalid value for "auto_returned", auto_returned cannot be nil.') end if @auto_placed.nil? invalid_properties.push('invalid value for "auto_placed", auto_placed cannot be nil.') end if @first_returned_is_skystone.nil? invalid_properties.push('invalid value for "first_returned_is_skystone", first_returned_is_skystone cannot be nil.') end if @foundation_repositioned.nil? invalid_properties.push('invalid value for "foundation_repositioned", foundation_repositioned cannot be nil.') end if @driver_controlled_delivered.nil? invalid_properties.push('invalid value for "driver_controlled_delivered", driver_controlled_delivered cannot be nil.') end if @driver_controlled_returned.nil? invalid_properties.push('invalid value for "driver_controlled_returned", driver_controlled_returned cannot be nil.') end if @driver_controlled_placed.nil? invalid_properties.push('invalid value for "driver_controlled_placed", driver_controlled_placed cannot be nil.') end if @tallest_skyscraper.nil? invalid_properties.push('invalid value for "tallest_skyscraper", tallest_skyscraper cannot be nil.') end if @robot1_parked.nil? invalid_properties.push('invalid value for "robot1_parked", robot1_parked cannot be nil.') end if @robot2_parked.nil? invalid_properties.push('invalid value for "robot2_parked", robot2_parked cannot be nil.') end if @robot1_capstone_level.nil? invalid_properties.push('invalid value for "robot1_capstone_level", robot1_capstone_level cannot be nil.') end if @robot2_capstone_level.nil? invalid_properties.push('invalid value for "robot2_capstone_level", robot2_capstone_level cannot be nil.') end if @foundation_moved.nil? invalid_properties.push('invalid value for "foundation_moved", foundation_moved cannot be nil.') end if @minor_penalties.nil? invalid_properties.push('invalid value for "minor_penalties", minor_penalties cannot be nil.') end if @major_penalties.nil? invalid_properties.push('invalid value for "major_penalties", major_penalties cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
618 619 620 621 622 623 624 625 626 627 628 629 630 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 618 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_achievements_detail.rb', line 341 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @robot1_navigated.nil? return false if @robot2_navigated.nil? return false if @auto_stones.nil? return false if @auto_delivered.nil? return false if @auto_returned.nil? return false if @auto_placed.nil? return false if @first_returned_is_skystone.nil? return false if @foundation_repositioned.nil? return false if @driver_controlled_delivered.nil? return false if @driver_controlled_returned.nil? return false if @driver_controlled_placed.nil? return false if @tallest_skyscraper.nil? return false if @robot1_parked.nil? return false if @robot2_parked.nil? return false if @robot1_capstone_level.nil? return false if @robot2_capstone_level.nil? return false if @foundation_moved.nil? return false if @minor_penalties.nil? return false if @major_penalties.nil? true end |