Class: FtcApiV3Client::ApiV3SkystonePointsDetail
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- FtcApiV3Client::ApiV3SkystonePointsDetail
- Defined in:
- lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb
Instance Attribute Summary collapse
-
#adjust_points ⇒ Object
Used to indicate the winner in double-red-card playoff matches.
-
#auto_delivery_points ⇒ Object
Returns the value of attribute auto_delivery_points.
-
#auto_placed_points ⇒ Object
Returns the value of attribute auto_placed_points.
-
#autonomous_points ⇒ Object
Returns the value of attribute autonomous_points.
-
#capstone_points ⇒ Object
Returns the value of attribute capstone_points.
-
#driver_controlled_delivery_points ⇒ Object
Returns the value of attribute driver_controlled_delivery_points.
-
#driver_controlled_placed_points ⇒ Object
Returns the value of attribute driver_controlled_placed_points.
-
#driver_controlled_points ⇒ Object
Returns the value of attribute driver_controlled_points.
-
#end_game_points ⇒ Object
Returns the value of attribute end_game_points.
-
#navigation_points ⇒ Object
Returns the value of attribute navigation_points.
-
#parking_points ⇒ Object
Returns the value of attribute parking_points.
-
#penalty_points ⇒ Object
Returns the value of attribute penalty_points.
-
#repositioned_points ⇒ Object
Returns the value of attribute repositioned_points.
-
#skyscraper_bonus_points ⇒ Object
Returns the value of attribute skyscraper_bonus_points.
-
#total_points ⇒ Object
Returns the value of attribute total_points.
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 = {}) ⇒ ApiV3SkystonePointsDetail
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 = {}) ⇒ ApiV3SkystonePointsDetail
Initializes the object
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 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 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 109 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `FtcApiV3Client::ApiV3SkystonePointsDetail` 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::ApiV3SkystonePointsDetail`. 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?(:'auto_delivery_points') self.auto_delivery_points = attributes[:'auto_delivery_points'] else self.auto_delivery_points = nil end if attributes.key?(:'auto_placed_points') self.auto_placed_points = attributes[:'auto_placed_points'] else self.auto_placed_points = nil end if attributes.key?(:'repositioned_points') self.repositioned_points = attributes[:'repositioned_points'] else self.repositioned_points = nil end if attributes.key?(:'navigation_points') self. = attributes[:'navigation_points'] else self. = nil end if attributes.key?(:'driver_controlled_delivery_points') self.driver_controlled_delivery_points = attributes[:'driver_controlled_delivery_points'] else self.driver_controlled_delivery_points = nil end if attributes.key?(:'driver_controlled_placed_points') self.driver_controlled_placed_points = attributes[:'driver_controlled_placed_points'] else self.driver_controlled_placed_points = nil end if attributes.key?(:'skyscraper_bonus_points') self.skyscraper_bonus_points = attributes[:'skyscraper_bonus_points'] else self.skyscraper_bonus_points = nil end if attributes.key?(:'capstone_points') self.capstone_points = attributes[:'capstone_points'] else self.capstone_points = nil end if attributes.key?(:'parking_points') self.parking_points = attributes[:'parking_points'] else self.parking_points = nil end if attributes.key?(:'autonomous_points') self.autonomous_points = attributes[:'autonomous_points'] else self.autonomous_points = nil end if attributes.key?(:'driver_controlled_points') self.driver_controlled_points = attributes[:'driver_controlled_points'] else self.driver_controlled_points = nil end if attributes.key?(:'end_game_points') self.end_game_points = attributes[:'end_game_points'] else self.end_game_points = nil end if attributes.key?(:'penalty_points') self.penalty_points = attributes[:'penalty_points'] else self.penalty_points = nil end if attributes.key?(:'total_points') self.total_points = attributes[:'total_points'] else self.total_points = nil end if attributes.key?(:'adjust_points') self.adjust_points = attributes[:'adjust_points'] else self.adjust_points = nil end end |
Instance Attribute Details
#adjust_points ⇒ Object
Used to indicate the winner in double-red-card playoff matches
47 48 49 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 47 def adjust_points @adjust_points end |
#auto_delivery_points ⇒ Object
Returns the value of attribute auto_delivery_points.
18 19 20 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 18 def auto_delivery_points @auto_delivery_points end |
#auto_placed_points ⇒ Object
Returns the value of attribute auto_placed_points.
20 21 22 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 20 def auto_placed_points @auto_placed_points end |
#autonomous_points ⇒ Object
Returns the value of attribute autonomous_points.
36 37 38 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 36 def autonomous_points @autonomous_points end |
#capstone_points ⇒ Object
Returns the value of attribute capstone_points.
32 33 34 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 32 def capstone_points @capstone_points end |
#driver_controlled_delivery_points ⇒ Object
Returns the value of attribute driver_controlled_delivery_points.
26 27 28 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 26 def driver_controlled_delivery_points @driver_controlled_delivery_points end |
#driver_controlled_placed_points ⇒ Object
Returns the value of attribute driver_controlled_placed_points.
28 29 30 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 28 def driver_controlled_placed_points @driver_controlled_placed_points end |
#driver_controlled_points ⇒ Object
Returns the value of attribute driver_controlled_points.
38 39 40 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 38 def driver_controlled_points @driver_controlled_points end |
#end_game_points ⇒ Object
Returns the value of attribute end_game_points.
40 41 42 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 40 def end_game_points @end_game_points end |
#navigation_points ⇒ Object
Returns the value of attribute navigation_points.
24 25 26 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 24 def @navigation_points end |
#parking_points ⇒ Object
Returns the value of attribute parking_points.
34 35 36 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 34 def parking_points @parking_points end |
#penalty_points ⇒ Object
Returns the value of attribute penalty_points.
42 43 44 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 42 def penalty_points @penalty_points end |
#repositioned_points ⇒ Object
Returns the value of attribute repositioned_points.
22 23 24 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 22 def repositioned_points @repositioned_points end |
#skyscraper_bonus_points ⇒ Object
Returns the value of attribute skyscraper_bonus_points.
30 31 32 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 30 def skyscraper_bonus_points @skyscraper_bonus_points end |
#total_points ⇒ Object
Returns the value of attribute total_points.
44 45 46 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 44 def total_points @total_points end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
71 72 73 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 71 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
76 77 78 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 76 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 50 def self.attribute_map { :'auto_delivery_points' => :'autoDeliveryPoints', :'auto_placed_points' => :'autoPlacedPoints', :'repositioned_points' => :'repositionedPoints', :'navigation_points' => :'navigationPoints', :'driver_controlled_delivery_points' => :'driverControlledDeliveryPoints', :'driver_controlled_placed_points' => :'driverControlledPlacedPoints', :'skyscraper_bonus_points' => :'skyscraperBonusPoints', :'capstone_points' => :'capstonePoints', :'parking_points' => :'parkingPoints', :'autonomous_points' => :'autonomousPoints', :'driver_controlled_points' => :'driverControlledPoints', :'end_game_points' => :'endGamePoints', :'penalty_points' => :'penaltyPoints', :'total_points' => :'totalPoints', :'adjust_points' => :'adjustPoints' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 491 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
102 103 104 105 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 102 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 81 def self.openapi_types { :'auto_delivery_points' => :'Integer', :'auto_placed_points' => :'Integer', :'repositioned_points' => :'Integer', :'navigation_points' => :'Integer', :'driver_controlled_delivery_points' => :'Integer', :'driver_controlled_placed_points' => :'Integer', :'skyscraper_bonus_points' => :'Integer', :'capstone_points' => :'Integer', :'parking_points' => :'Integer', :'autonomous_points' => :'Integer', :'driver_controlled_points' => :'Integer', :'end_game_points' => :'Integer', :'penalty_points' => :'Integer', :'total_points' => :'Integer', :'adjust_points' => :'Integer' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 456 def ==(o) return true if self.equal?(o) self.class == o.class && auto_delivery_points == o.auto_delivery_points && auto_placed_points == o.auto_placed_points && repositioned_points == o.repositioned_points && == o. && driver_controlled_delivery_points == o.driver_controlled_delivery_points && driver_controlled_placed_points == o.driver_controlled_placed_points && skyscraper_bonus_points == o.skyscraper_bonus_points && capstone_points == o.capstone_points && parking_points == o.parking_points && autonomous_points == o.autonomous_points && driver_controlled_points == o.driver_controlled_points && end_game_points == o.end_game_points && penalty_points == o.penalty_points && total_points == o.total_points && adjust_points == o.adjust_points end |
#eql?(o) ⇒ Boolean
478 479 480 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 478 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
484 485 486 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 484 def hash [auto_delivery_points, auto_placed_points, repositioned_points, , driver_controlled_delivery_points, driver_controlled_placed_points, skyscraper_bonus_points, capstone_points, parking_points, autonomous_points, driver_controlled_points, end_game_points, penalty_points, total_points, adjust_points].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 216 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @auto_delivery_points.nil? invalid_properties.push('invalid value for "auto_delivery_points", auto_delivery_points cannot be nil.') end if @auto_placed_points.nil? invalid_properties.push('invalid value for "auto_placed_points", auto_placed_points cannot be nil.') end if @repositioned_points.nil? invalid_properties.push('invalid value for "repositioned_points", repositioned_points cannot be nil.') end if @navigation_points.nil? invalid_properties.push('invalid value for "navigation_points", navigation_points cannot be nil.') end if @driver_controlled_delivery_points.nil? invalid_properties.push('invalid value for "driver_controlled_delivery_points", driver_controlled_delivery_points cannot be nil.') end if @driver_controlled_placed_points.nil? invalid_properties.push('invalid value for "driver_controlled_placed_points", driver_controlled_placed_points cannot be nil.') end if @skyscraper_bonus_points.nil? invalid_properties.push('invalid value for "skyscraper_bonus_points", skyscraper_bonus_points cannot be nil.') end if @capstone_points.nil? invalid_properties.push('invalid value for "capstone_points", capstone_points cannot be nil.') end if @parking_points.nil? invalid_properties.push('invalid value for "parking_points", parking_points cannot be nil.') end if @autonomous_points.nil? invalid_properties.push('invalid value for "autonomous_points", autonomous_points cannot be nil.') end if @driver_controlled_points.nil? invalid_properties.push('invalid value for "driver_controlled_points", driver_controlled_points cannot be nil.') end if @end_game_points.nil? invalid_properties.push('invalid value for "end_game_points", end_game_points cannot be nil.') end if @penalty_points.nil? invalid_properties.push('invalid value for "penalty_points", penalty_points cannot be nil.') end if @total_points.nil? invalid_properties.push('invalid value for "total_points", total_points cannot be nil.') end if @adjust_points.nil? invalid_properties.push('invalid value for "adjust_points", adjust_points cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
513 514 515 516 517 518 519 520 521 522 523 524 525 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 513 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
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
# File 'lib/ftc_api_v3_client/models/api_v3_skystone_points_detail.rb', line 284 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @auto_delivery_points.nil? return false if @auto_placed_points.nil? return false if @repositioned_points.nil? return false if @navigation_points.nil? return false if @driver_controlled_delivery_points.nil? return false if @driver_controlled_placed_points.nil? return false if @skyscraper_bonus_points.nil? return false if @capstone_points.nil? return false if @parking_points.nil? return false if @autonomous_points.nil? return false if @driver_controlled_points.nil? return false if @end_game_points.nil? return false if @penalty_points.nil? return false if @total_points.nil? return false if @adjust_points.nil? true end |