Class: FtcEventsClient::ScoreDetailAllianceModel2022
- Inherits:
-
Object
- Object
- FtcEventsClient::ScoreDetailAllianceModel2022
- Defined in:
- lib/ftc_events_client/models/score_detail_alliance_model_2022.rb
Instance Attribute Summary collapse
-
#alliance ⇒ Object
Returns the value of attribute alliance.
-
#auto_junction_cone_points ⇒ Object
Returns the value of attribute auto_junction_cone_points.
-
#auto_junction_cones ⇒ Object
Array of 4 cone counts scored by this alliance on ground, low, medium, and high junctions respectively, scored in autonomous.
-
#auto_junctions ⇒ Object
Two dimensional array of lists of items scored on junctions in autonomous.
-
#auto_navigation_points ⇒ Object
Returns the value of attribute auto_navigation_points.
-
#auto_points ⇒ Object
Returns the value of attribute auto_points.
-
#auto_terminal ⇒ Object
Returns the value of attribute auto_terminal.
-
#auto_terminal_cone_points ⇒ Object
Returns the value of attribute auto_terminal_cone_points.
-
#beacons ⇒ Object
Returns the value of attribute beacons.
-
#circuit ⇒ Object
Returns the value of attribute circuit.
-
#circuit_points ⇒ Object
Returns the value of attribute circuit_points.
-
#dc_junction_cone_points ⇒ Object
Returns the value of attribute dc_junction_cone_points.
-
#dc_junction_cones ⇒ Object
Array of 4 cone counts scored by this alliance on ground, low, medium, and high junctions respectively, scored in driver-controlled.
-
#dc_junctions ⇒ Object
Two dimensional array of lists of items scored on junctions in driver-controlled.
-
#dc_points ⇒ Object
Returns the value of attribute dc_points.
-
#dc_terminal_cone_points ⇒ Object
Returns the value of attribute dc_terminal_cone_points.
-
#dc_terminal_far ⇒ Object
Number of Scored cones in the alliance-colored terminal on the side of the field opposite the alliance station.
-
#dc_terminal_near ⇒ Object
Number of Scored cones in the alliance-colored terminal on the side of the field closest to the alliance station.
-
#eg_navigated1 ⇒ Object
Returns the value of attribute eg_navigated1.
-
#eg_navigated2 ⇒ Object
Returns the value of attribute eg_navigated2.
-
#eg_navigation_points ⇒ Object
Returns the value of attribute eg_navigation_points.
-
#endgame_points ⇒ Object
Returns the value of attribute endgame_points.
-
#init_signal_sleeve1 ⇒ Object
Returns the value of attribute init_signal_sleeve1.
-
#init_signal_sleeve2 ⇒ Object
Returns the value of attribute init_signal_sleeve2.
-
#major_penalties ⇒ Object
Returns the value of attribute major_penalties.
-
#minor_penalties ⇒ Object
Returns the value of attribute minor_penalties.
-
#owned_junctions ⇒ Object
Returns the value of attribute owned_junctions.
-
#ownership_points ⇒ Object
Returns the value of attribute ownership_points.
-
#penalty_points_committed ⇒ Object
Returns the value of attribute penalty_points_committed.
-
#pre_penalty_total ⇒ Object
Returns the value of attribute pre_penalty_total.
-
#robot1_auto ⇒ Object
Returns the value of attribute robot1_auto.
-
#robot2_auto ⇒ Object
Returns the value of attribute robot2_auto.
-
#side_of_field ⇒ Object
Returns the value of attribute side_of_field.
-
#signal_bonus_points ⇒ Object
Returns the value of attribute signal_bonus_points.
-
#team ⇒ Object
Returns the value of attribute team.
-
#total_points ⇒ Object
Returns the value of attribute total_points.
Class Method Summary collapse
-
.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.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ScoreDetailAllianceModel2022
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ ScoreDetailAllianceModel2022
Initializes the object
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 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 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 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 191 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `FtcEventsClient::ScoreDetailAllianceModel2022` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `FtcEventsClient::ScoreDetailAllianceModel2022`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'side_of_field') self.side_of_field = attributes[:'side_of_field'] end if attributes.key?(:'init_signal_sleeve1') self.init_signal_sleeve1 = attributes[:'init_signal_sleeve1'] end if attributes.key?(:'init_signal_sleeve2') self.init_signal_sleeve2 = attributes[:'init_signal_sleeve2'] end if attributes.key?(:'robot1_auto') self.robot1_auto = attributes[:'robot1_auto'] end if attributes.key?(:'robot2_auto') self.robot2_auto = attributes[:'robot2_auto'] end if attributes.key?(:'auto_terminal') self.auto_terminal = attributes[:'auto_terminal'] end if attributes.key?(:'auto_junctions') if (value = attributes[:'auto_junctions']).is_a?(Array) self.auto_junctions = value end end if attributes.key?(:'dc_junctions') if (value = attributes[:'dc_junctions']).is_a?(Array) self.dc_junctions = value end end if attributes.key?(:'dc_terminal_near') self.dc_terminal_near = attributes[:'dc_terminal_near'] end if attributes.key?(:'dc_terminal_far') self.dc_terminal_far = attributes[:'dc_terminal_far'] end if attributes.key?(:'eg_navigated1') self.eg_navigated1 = attributes[:'eg_navigated1'] end if attributes.key?(:'eg_navigated2') self.eg_navigated2 = attributes[:'eg_navigated2'] end if attributes.key?(:'minor_penalties') self.minor_penalties = attributes[:'minor_penalties'] end if attributes.key?(:'major_penalties') self.major_penalties = attributes[:'major_penalties'] end if attributes.key?(:'auto_navigation_points') self. = attributes[:'auto_navigation_points'] end if attributes.key?(:'signal_bonus_points') self.signal_bonus_points = attributes[:'signal_bonus_points'] end if attributes.key?(:'auto_junction_cone_points') self.auto_junction_cone_points = attributes[:'auto_junction_cone_points'] end if attributes.key?(:'auto_terminal_cone_points') self.auto_terminal_cone_points = attributes[:'auto_terminal_cone_points'] end if attributes.key?(:'dc_junction_cone_points') self.dc_junction_cone_points = attributes[:'dc_junction_cone_points'] end if attributes.key?(:'dc_terminal_cone_points') self.dc_terminal_cone_points = attributes[:'dc_terminal_cone_points'] end if attributes.key?(:'ownership_points') self.ownership_points = attributes[:'ownership_points'] end if attributes.key?(:'circuit_points') self.circuit_points = attributes[:'circuit_points'] end if attributes.key?(:'eg_navigation_points') self. = attributes[:'eg_navigation_points'] end if attributes.key?(:'auto_points') self.auto_points = attributes[:'auto_points'] end if attributes.key?(:'dc_points') self.dc_points = attributes[:'dc_points'] end if attributes.key?(:'endgame_points') self.endgame_points = attributes[:'endgame_points'] end if attributes.key?(:'penalty_points_committed') self.penalty_points_committed = attributes[:'penalty_points_committed'] end if attributes.key?(:'pre_penalty_total') self.pre_penalty_total = attributes[:'pre_penalty_total'] end if attributes.key?(:'auto_junction_cones') if (value = attributes[:'auto_junction_cones']).is_a?(Array) self.auto_junction_cones = value end end if attributes.key?(:'dc_junction_cones') if (value = attributes[:'dc_junction_cones']).is_a?(Array) self.dc_junction_cones = value end end if attributes.key?(:'beacons') self.beacons = attributes[:'beacons'] end if attributes.key?(:'owned_junctions') self.owned_junctions = attributes[:'owned_junctions'] end if attributes.key?(:'circuit') self.circuit = attributes[:'circuit'] end if attributes.key?(:'total_points') self.total_points = attributes[:'total_points'] end if attributes.key?(:'alliance') self.alliance = attributes[:'alliance'] end if attributes.key?(:'team') self.team = attributes[:'team'] end end |
Instance Attribute Details
#alliance ⇒ Object
Returns the value of attribute alliance.
90 91 92 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 90 def alliance @alliance end |
#auto_junction_cone_points ⇒ Object
Returns the value of attribute auto_junction_cone_points.
52 53 54 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 52 def auto_junction_cone_points @auto_junction_cone_points end |
#auto_junction_cones ⇒ Object
Array of 4 cone counts scored by this alliance on ground, low, medium, and high junctions respectively, scored in autonomous. E.g. red.autoJunctionCones is the total number of cones scored by red on medium-height junctions.
77 78 79 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 77 def auto_junction_cones @auto_junction_cones end |
#auto_junctions ⇒ Object
Two dimensional array of lists of items scored on junctions in autonomous. [0,0] is the upper-left corner of the field as viewed from the audience side of the field (V5). The array is indexed by row, then column. (e.g [0,4] is in the upper right corner of the field (Z5).) Each junction is stored bottom up (index 0 is the bottom-most element on the field). MY_* elements belong to the alliance whose score object the element appears in, OTHER_* elements belong to the opposing alliance. (e.g in a set of scores for the red alliance, MY_CONE is a red cone and OTHER_CONE is a blue cone.) For a complete example, if red.autoJunctions[0] is OTHER_CONE, there is a blue cone in the bottom left cornerof the field (V1) on top of one other cone.
29 30 31 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 29 def auto_junctions @auto_junctions end |
#auto_navigation_points ⇒ Object
Returns the value of attribute auto_navigation_points.
48 49 50 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 48 def @auto_navigation_points end |
#auto_points ⇒ Object
Returns the value of attribute auto_points.
66 67 68 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 66 def auto_points @auto_points end |
#auto_terminal ⇒ Object
Returns the value of attribute auto_terminal.
26 27 28 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 26 def auto_terminal @auto_terminal end |
#auto_terminal_cone_points ⇒ Object
Returns the value of attribute auto_terminal_cone_points.
54 55 56 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 54 def auto_terminal_cone_points @auto_terminal_cone_points end |
#beacons ⇒ Object
Returns the value of attribute beacons.
82 83 84 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 82 def beacons @beacons end |
#circuit ⇒ Object
Returns the value of attribute circuit.
86 87 88 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 86 def circuit @circuit end |
#circuit_points ⇒ Object
Returns the value of attribute circuit_points.
62 63 64 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 62 def circuit_points @circuit_points end |
#dc_junction_cone_points ⇒ Object
Returns the value of attribute dc_junction_cone_points.
56 57 58 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 56 def dc_junction_cone_points @dc_junction_cone_points end |
#dc_junction_cones ⇒ Object
Array of 4 cone counts scored by this alliance on ground, low, medium, and high junctions respectively, scored in driver-controlled. E.g. red.dcJunctionCones is the total number of cones scored by red on medium-height junctions.
80 81 82 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 80 def dc_junction_cones @dc_junction_cones end |
#dc_junctions ⇒ Object
Two dimensional array of lists of items scored on junctions in driver-controlled. [0,0] is the upper-left corner of the field as viewed from the audience side of the field (V5). The array is indexed by crow, then column. (e.g [0,4] is in the upper right corner of the field (Z5).) Each junction is stored bottom up (index 0 is the bottom-most element on the field). MY_* elements belong to the alliance whose score object the element appears in, OTHER_* elements belong to the opposing alliance. (e.g in a set of scores for the red alliance, MY_CONE is a red cone and OTHER_CONE is a blue cone.) *_R1_BEACON means the beacon scored by robot 1 on the corresponding alliance. For a complete example, if red.dcJunctions[0] is OTHER_CONE, there is a blue cone in the bottom left cornerof the field (V1) on top of one other cone.
32 33 34 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 32 def dc_junctions @dc_junctions end |
#dc_points ⇒ Object
Returns the value of attribute dc_points.
68 69 70 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 68 def dc_points @dc_points end |
#dc_terminal_cone_points ⇒ Object
Returns the value of attribute dc_terminal_cone_points.
58 59 60 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 58 def dc_terminal_cone_points @dc_terminal_cone_points end |
#dc_terminal_far ⇒ Object
Number of Scored cones in the alliance-colored terminal on the side of the field opposite the alliance station.
38 39 40 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 38 def dc_terminal_far @dc_terminal_far end |
#dc_terminal_near ⇒ Object
Number of Scored cones in the alliance-colored terminal on the side of the field closest to the alliance station.
35 36 37 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 35 def dc_terminal_near @dc_terminal_near end |
#eg_navigated1 ⇒ Object
Returns the value of attribute eg_navigated1.
40 41 42 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 40 def eg_navigated1 @eg_navigated1 end |
#eg_navigated2 ⇒ Object
Returns the value of attribute eg_navigated2.
42 43 44 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 42 def eg_navigated2 @eg_navigated2 end |
#eg_navigation_points ⇒ Object
Returns the value of attribute eg_navigation_points.
64 65 66 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 64 def @eg_navigation_points end |
#endgame_points ⇒ Object
Returns the value of attribute endgame_points.
70 71 72 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 70 def endgame_points @endgame_points end |
#init_signal_sleeve1 ⇒ Object
Returns the value of attribute init_signal_sleeve1.
18 19 20 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 18 def init_signal_sleeve1 @init_signal_sleeve1 end |
#init_signal_sleeve2 ⇒ Object
Returns the value of attribute init_signal_sleeve2.
20 21 22 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 20 def init_signal_sleeve2 @init_signal_sleeve2 end |
#major_penalties ⇒ Object
Returns the value of attribute major_penalties.
46 47 48 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 46 def major_penalties @major_penalties end |
#minor_penalties ⇒ Object
Returns the value of attribute minor_penalties.
44 45 46 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 44 def minor_penalties @minor_penalties end |
#owned_junctions ⇒ Object
Returns the value of attribute owned_junctions.
84 85 86 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 84 def owned_junctions @owned_junctions end |
#ownership_points ⇒ Object
Returns the value of attribute ownership_points.
60 61 62 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 60 def ownership_points @ownership_points end |
#penalty_points_committed ⇒ Object
Returns the value of attribute penalty_points_committed.
72 73 74 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 72 def penalty_points_committed @penalty_points_committed end |
#pre_penalty_total ⇒ Object
Returns the value of attribute pre_penalty_total.
74 75 76 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 74 def pre_penalty_total @pre_penalty_total end |
#robot1_auto ⇒ Object
Returns the value of attribute robot1_auto.
22 23 24 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 22 def robot1_auto @robot1_auto end |
#robot2_auto ⇒ Object
Returns the value of attribute robot2_auto.
24 25 26 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 24 def robot2_auto @robot2_auto end |
#side_of_field ⇒ Object
Returns the value of attribute side_of_field.
16 17 18 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 16 def side_of_field @side_of_field end |
#signal_bonus_points ⇒ Object
Returns the value of attribute signal_bonus_points.
50 51 52 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 50 def signal_bonus_points @signal_bonus_points end |
#team ⇒ Object
Returns the value of attribute team.
92 93 94 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 92 def team @team end |
#total_points ⇒ Object
Returns the value of attribute total_points.
88 89 90 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 88 def total_points @total_points end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 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 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 95 def self.attribute_map { :'side_of_field' => :'sideOfField', :'init_signal_sleeve1' => :'initSignalSleeve1', :'init_signal_sleeve2' => :'initSignalSleeve2', :'robot1_auto' => :'robot1Auto', :'robot2_auto' => :'robot2Auto', :'auto_terminal' => :'autoTerminal', :'auto_junctions' => :'autoJunctions', :'dc_junctions' => :'dcJunctions', :'dc_terminal_near' => :'dcTerminalNear', :'dc_terminal_far' => :'dcTerminalFar', :'eg_navigated1' => :'egNavigated1', :'eg_navigated2' => :'egNavigated2', :'minor_penalties' => :'minorPenalties', :'major_penalties' => :'majorPenalties', :'auto_navigation_points' => :'autoNavigationPoints', :'signal_bonus_points' => :'signalBonusPoints', :'auto_junction_cone_points' => :'autoJunctionConePoints', :'auto_terminal_cone_points' => :'autoTerminalConePoints', :'dc_junction_cone_points' => :'dcJunctionConePoints', :'dc_terminal_cone_points' => :'dcTerminalConePoints', :'ownership_points' => :'ownershipPoints', :'circuit_points' => :'circuitPoints', :'eg_navigation_points' => :'egNavigationPoints', :'auto_points' => :'autoPoints', :'dc_points' => :'dcPoints', :'endgame_points' => :'endgamePoints', :'penalty_points_committed' => :'penaltyPointsCommitted', :'pre_penalty_total' => :'prePenaltyTotal', :'auto_junction_cones' => :'autoJunctionCones', :'dc_junction_cones' => :'dcJunctionCones', :'beacons' => :'beacons', :'owned_junctions' => :'ownedJunctions', :'circuit' => :'circuit', :'total_points' => :'totalPoints', :'alliance' => :'alliance', :'team' => :'team' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
428 429 430 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 428 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
179 180 181 182 183 184 185 186 187 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 179 def self.openapi_nullable Set.new([ :'auto_junctions', :'dc_junctions', :'auto_junction_cones', :'dc_junction_cones', :'alliance', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 137 def self.openapi_types { :'side_of_field' => :'Object', :'init_signal_sleeve1' => :'Object', :'init_signal_sleeve2' => :'Object', :'robot1_auto' => :'Object', :'robot2_auto' => :'Object', :'auto_terminal' => :'Object', :'auto_junctions' => :'Object', :'dc_junctions' => :'Object', :'dc_terminal_near' => :'Object', :'dc_terminal_far' => :'Object', :'eg_navigated1' => :'Object', :'eg_navigated2' => :'Object', :'minor_penalties' => :'Object', :'major_penalties' => :'Object', :'auto_navigation_points' => :'Object', :'signal_bonus_points' => :'Object', :'auto_junction_cone_points' => :'Object', :'auto_terminal_cone_points' => :'Object', :'dc_junction_cone_points' => :'Object', :'dc_terminal_cone_points' => :'Object', :'ownership_points' => :'Object', :'circuit_points' => :'Object', :'eg_navigation_points' => :'Object', :'auto_points' => :'Object', :'dc_points' => :'Object', :'endgame_points' => :'Object', :'penalty_points_committed' => :'Object', :'pre_penalty_total' => :'Object', :'auto_junction_cones' => :'Object', :'dc_junction_cones' => :'Object', :'beacons' => :'Object', :'owned_junctions' => :'Object', :'circuit' => :'Object', :'total_points' => :'Object', :'alliance' => :'Object', :'team' => :'Object' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 372 def ==(o) return true if self.equal?(o) self.class == o.class && side_of_field == o.side_of_field && init_signal_sleeve1 == o.init_signal_sleeve1 && init_signal_sleeve2 == o.init_signal_sleeve2 && robot1_auto == o.robot1_auto && robot2_auto == o.robot2_auto && auto_terminal == o.auto_terminal && auto_junctions == o.auto_junctions && dc_junctions == o.dc_junctions && dc_terminal_near == o.dc_terminal_near && dc_terminal_far == o.dc_terminal_far && eg_navigated1 == o.eg_navigated1 && eg_navigated2 == o.eg_navigated2 && minor_penalties == o.minor_penalties && major_penalties == o.major_penalties && == o. && signal_bonus_points == o.signal_bonus_points && auto_junction_cone_points == o.auto_junction_cone_points && auto_terminal_cone_points == o.auto_terminal_cone_points && dc_junction_cone_points == o.dc_junction_cone_points && dc_terminal_cone_points == o.dc_terminal_cone_points && ownership_points == o.ownership_points && circuit_points == o.circuit_points && == o. && auto_points == o.auto_points && dc_points == o.dc_points && endgame_points == o.endgame_points && penalty_points_committed == o.penalty_points_committed && pre_penalty_total == o.pre_penalty_total && auto_junction_cones == o.auto_junction_cones && dc_junction_cones == o.dc_junction_cones && beacons == o.beacons && owned_junctions == o.owned_junctions && circuit == o.circuit && total_points == o.total_points && alliance == o.alliance && team == o.team end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 458 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model FtcEventsClient.const_get(type).build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
527 528 529 530 531 532 533 534 535 536 537 538 539 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 527 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 435 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if 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[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) end end self end |
#eql?(o) ⇒ Boolean
415 416 417 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 415 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
421 422 423 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 421 def hash [side_of_field, init_signal_sleeve1, init_signal_sleeve2, robot1_auto, robot2_auto, auto_terminal, auto_junctions, dc_junctions, dc_terminal_near, dc_terminal_far, eg_navigated1, eg_navigated2, minor_penalties, major_penalties, , signal_bonus_points, auto_junction_cone_points, auto_terminal_cone_points, dc_junction_cone_points, dc_terminal_cone_points, ownership_points, circuit_points, , auto_points, dc_points, endgame_points, penalty_points_committed, pre_penalty_total, auto_junction_cones, dc_junction_cones, beacons, owned_junctions, circuit, total_points, alliance, team].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
359 360 361 362 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 359 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
503 504 505 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 503 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
509 510 511 512 513 514 515 516 517 518 519 520 521 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 509 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 |
#to_s ⇒ String
Returns the string representation of the object
497 498 499 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 497 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
366 367 368 |
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2022.rb', line 366 def valid? true end |