Class: FtcEventsClient::ScoreDetailAllianceModel2023

Inherits:
Object
  • Object
show all
Defined in:
lib/ftc_events_client/models/score_detail_alliance_model_2023.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ScoreDetailAllianceModel2023

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
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
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 189

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `FtcEventsClient::ScoreDetailAllianceModel2023` 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::ScoreDetailAllianceModel2023`. 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?(:'init_team_prop1')
    self.init_team_prop1 = attributes[:'init_team_prop1']
  end

  if attributes.key?(:'init_team_prop2')
    self.init_team_prop2 = attributes[:'init_team_prop2']
  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?(:'spike_mark_pixel1')
    self.spike_mark_pixel1 = attributes[:'spike_mark_pixel1']
  end

  if attributes.key?(:'spike_mark_pixel2')
    self.spike_mark_pixel2 = attributes[:'spike_mark_pixel2']
  end

  if attributes.key?(:'target_backdrop_pixel1')
    self.target_backdrop_pixel1 = attributes[:'target_backdrop_pixel1']
  end

  if attributes.key?(:'target_backdrop_pixel2')
    self.target_backdrop_pixel2 = attributes[:'target_backdrop_pixel2']
  end

  if attributes.key?(:'auto_backdrop')
    self.auto_backdrop = attributes[:'auto_backdrop']
  end

  if attributes.key?(:'auto_backstage')
    self.auto_backstage = attributes[:'auto_backstage']
  end

  if attributes.key?(:'dc_backdrop')
    self.dc_backdrop = attributes[:'dc_backdrop']
  end

  if attributes.key?(:'dc_backstage')
    self.dc_backstage = attributes[:'dc_backstage']
  end

  if attributes.key?(:'mosaics')
    self.mosaics = attributes[:'mosaics']
  end

  if attributes.key?(:'max_set_line')
    self.max_set_line = attributes[:'max_set_line']
  end

  if attributes.key?(:'eg_robot1')
    self.eg_robot1 = attributes[:'eg_robot1']
  end

  if attributes.key?(:'eg_robot2')
    self.eg_robot2 = attributes[:'eg_robot2']
  end

  if attributes.key?(:'drone1')
    self.drone1 = attributes[:'drone1']
  end

  if attributes.key?(:'drone2')
    self.drone2 = attributes[:'drone2']
  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_navigating_points')
    self.auto_navigating_points = attributes[:'auto_navigating_points']
  end

  if attributes.key?(:'auto_randomization_points')
    self.auto_randomization_points = attributes[:'auto_randomization_points']
  end

  if attributes.key?(:'auto_backstage_points')
    self.auto_backstage_points = attributes[:'auto_backstage_points']
  end

  if attributes.key?(:'auto_backdrop_points')
    self.auto_backdrop_points = attributes[:'auto_backdrop_points']
  end

  if attributes.key?(:'dc_backdrop_points')
    self.dc_backdrop_points = attributes[:'dc_backdrop_points']
  end

  if attributes.key?(:'dc_backstage_points')
    self.dc_backstage_points = attributes[:'dc_backstage_points']
  end

  if attributes.key?(:'mosaic_points')
    self.mosaic_points = attributes[:'mosaic_points']
  end

  if attributes.key?(:'set_bonus_points')
    self.set_bonus_points = attributes[:'set_bonus_points']
  end

  if attributes.key?(:'eg_location_points')
    self.eg_location_points = attributes[:'eg_location_points']
  end

  if attributes.key?(:'eg_drone_points')
    self.eg_drone_points = attributes[:'eg_drone_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?(:'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

#allianceObject

Returns the value of attribute alliance.



88
89
90
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 88

def alliance
  @alliance
end

#auto_backdropObject

Returns the value of attribute auto_backdrop.



32
33
34
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 32

def auto_backdrop
  @auto_backdrop
end

#auto_backdrop_pointsObject

Returns the value of attribute auto_backdrop_points.



62
63
64
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 62

def auto_backdrop_points
  @auto_backdrop_points
end

#auto_backstageObject

Returns the value of attribute auto_backstage.



34
35
36
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 34

def auto_backstage
  @auto_backstage
end

#auto_backstage_pointsObject

Returns the value of attribute auto_backstage_points.



60
61
62
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 60

def auto_backstage_points
  @auto_backstage_points
end

#auto_navigating_pointsObject

Returns the value of attribute auto_navigating_points.



56
57
58
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 56

def auto_navigating_points
  @auto_navigating_points
end

#auto_pointsObject

Returns the value of attribute auto_points.



76
77
78
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 76

def auto_points
  @auto_points
end

#auto_randomization_pointsObject

Returns the value of attribute auto_randomization_points.



58
59
60
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 58

def auto_randomization_points
  @auto_randomization_points
end

#dc_backdropObject

Returns the value of attribute dc_backdrop.



36
37
38
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 36

def dc_backdrop
  @dc_backdrop
end

#dc_backdrop_pointsObject

Returns the value of attribute dc_backdrop_points.



64
65
66
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 64

def dc_backdrop_points
  @dc_backdrop_points
end

#dc_backstageObject

Returns the value of attribute dc_backstage.



38
39
40
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 38

def dc_backstage
  @dc_backstage
end

#dc_backstage_pointsObject

Returns the value of attribute dc_backstage_points.



66
67
68
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 66

def dc_backstage_points
  @dc_backstage_points
end

#dc_pointsObject

Returns the value of attribute dc_points.



78
79
80
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 78

def dc_points
  @dc_points
end

#drone1Object

Returns the value of attribute drone1.



48
49
50
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 48

def drone1
  @drone1
end

#drone2Object

Returns the value of attribute drone2.



50
51
52
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 50

def drone2
  @drone2
end

#eg_drone_pointsObject

Returns the value of attribute eg_drone_points.



74
75
76
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 74

def eg_drone_points
  @eg_drone_points
end

#eg_location_pointsObject

Returns the value of attribute eg_location_points.



72
73
74
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 72

def eg_location_points
  @eg_location_points
end

#eg_robot1Object

Returns the value of attribute eg_robot1.



44
45
46
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 44

def eg_robot1
  @eg_robot1
end

#eg_robot2Object

Returns the value of attribute eg_robot2.



46
47
48
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 46

def eg_robot2
  @eg_robot2
end

#endgame_pointsObject

Returns the value of attribute endgame_points.



80
81
82
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 80

def endgame_points
  @endgame_points
end

#init_team_prop1Object

Returns the value of attribute init_team_prop1.



16
17
18
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 16

def init_team_prop1
  @init_team_prop1
end

#init_team_prop2Object

Returns the value of attribute init_team_prop2.



18
19
20
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 18

def init_team_prop2
  @init_team_prop2
end

#major_penaltiesObject

Returns the value of attribute major_penalties.



54
55
56
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 54

def major_penalties
  @major_penalties
end

#max_set_lineObject

Returns the value of attribute max_set_line.



42
43
44
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 42

def max_set_line
  @max_set_line
end

#minor_penaltiesObject

Returns the value of attribute minor_penalties.



52
53
54
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 52

def minor_penalties
  @minor_penalties
end

#mosaic_pointsObject

Returns the value of attribute mosaic_points.



68
69
70
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 68

def mosaic_points
  @mosaic_points
end

#mosaicsObject

Returns the value of attribute mosaics.



40
41
42
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 40

def mosaics
  @mosaics
end

#penalty_points_committedObject

Returns the value of attribute penalty_points_committed.



82
83
84
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 82

def penalty_points_committed
  @penalty_points_committed
end

#pre_penalty_totalObject

Returns the value of attribute pre_penalty_total.



84
85
86
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 84

def pre_penalty_total
  @pre_penalty_total
end

#robot1_autoObject

Returns the value of attribute robot1_auto.



20
21
22
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 20

def robot1_auto
  @robot1_auto
end

#robot2_autoObject

Returns the value of attribute robot2_auto.



22
23
24
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 22

def robot2_auto
  @robot2_auto
end

#set_bonus_pointsObject

Returns the value of attribute set_bonus_points.



70
71
72
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 70

def set_bonus_points
  @set_bonus_points
end

#spike_mark_pixel1Object

Returns the value of attribute spike_mark_pixel1.



24
25
26
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 24

def spike_mark_pixel1
  @spike_mark_pixel1
end

#spike_mark_pixel2Object

Returns the value of attribute spike_mark_pixel2.



26
27
28
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 26

def spike_mark_pixel2
  @spike_mark_pixel2
end

#target_backdrop_pixel1Object

Returns the value of attribute target_backdrop_pixel1.



28
29
30
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 28

def target_backdrop_pixel1
  @target_backdrop_pixel1
end

#target_backdrop_pixel2Object

Returns the value of attribute target_backdrop_pixel2.



30
31
32
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 30

def target_backdrop_pixel2
  @target_backdrop_pixel2
end

#teamObject

Returns the value of attribute team.



90
91
92
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 90

def team
  @team
end

#total_pointsObject

Returns the value of attribute total_points.



86
87
88
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 86

def total_points
  @total_points
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



93
94
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_2023.rb', line 93

def self.attribute_map
  {
    :'init_team_prop1' => :'initTeamProp1',
    :'init_team_prop2' => :'initTeamProp2',
    :'robot1_auto' => :'robot1Auto',
    :'robot2_auto' => :'robot2Auto',
    :'spike_mark_pixel1' => :'spikeMarkPixel1',
    :'spike_mark_pixel2' => :'spikeMarkPixel2',
    :'target_backdrop_pixel1' => :'targetBackdropPixel1',
    :'target_backdrop_pixel2' => :'targetBackdropPixel2',
    :'auto_backdrop' => :'autoBackdrop',
    :'auto_backstage' => :'autoBackstage',
    :'dc_backdrop' => :'dcBackdrop',
    :'dc_backstage' => :'dcBackstage',
    :'mosaics' => :'mosaics',
    :'max_set_line' => :'maxSetLine',
    :'eg_robot1' => :'egRobot1',
    :'eg_robot2' => :'egRobot2',
    :'drone1' => :'drone1',
    :'drone2' => :'drone2',
    :'minor_penalties' => :'minorPenalties',
    :'major_penalties' => :'majorPenalties',
    :'auto_navigating_points' => :'autoNavigatingPoints',
    :'auto_randomization_points' => :'autoRandomizationPoints',
    :'auto_backstage_points' => :'autoBackstagePoints',
    :'auto_backdrop_points' => :'autoBackdropPoints',
    :'dc_backdrop_points' => :'dcBackdropPoints',
    :'dc_backstage_points' => :'dcBackstagePoints',
    :'mosaic_points' => :'mosaicPoints',
    :'set_bonus_points' => :'setBonusPoints',
    :'eg_location_points' => :'egLocationPoints',
    :'eg_drone_points' => :'egDronePoints',
    :'auto_points' => :'autoPoints',
    :'dc_points' => :'dcPoints',
    :'endgame_points' => :'endgamePoints',
    :'penalty_points_committed' => :'penaltyPointsCommitted',
    :'pre_penalty_total' => :'prePenaltyTotal',
    :'total_points' => :'totalPoints',
    :'alliance' => :'alliance',
    :'team' => :'team'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



428
429
430
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 428

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



181
182
183
184
185
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 181

def self.openapi_nullable
  Set.new([
    :'alliance',
  ])
end

.openapi_typesObject

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
177
178
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 137

def self.openapi_types
  {
    :'init_team_prop1' => :'Object',
    :'init_team_prop2' => :'Object',
    :'robot1_auto' => :'Object',
    :'robot2_auto' => :'Object',
    :'spike_mark_pixel1' => :'Object',
    :'spike_mark_pixel2' => :'Object',
    :'target_backdrop_pixel1' => :'Object',
    :'target_backdrop_pixel2' => :'Object',
    :'auto_backdrop' => :'Object',
    :'auto_backstage' => :'Object',
    :'dc_backdrop' => :'Object',
    :'dc_backstage' => :'Object',
    :'mosaics' => :'Object',
    :'max_set_line' => :'Object',
    :'eg_robot1' => :'Object',
    :'eg_robot2' => :'Object',
    :'drone1' => :'Object',
    :'drone2' => :'Object',
    :'minor_penalties' => :'Object',
    :'major_penalties' => :'Object',
    :'auto_navigating_points' => :'Object',
    :'auto_randomization_points' => :'Object',
    :'auto_backstage_points' => :'Object',
    :'auto_backdrop_points' => :'Object',
    :'dc_backdrop_points' => :'Object',
    :'dc_backstage_points' => :'Object',
    :'mosaic_points' => :'Object',
    :'set_bonus_points' => :'Object',
    :'eg_location_points' => :'Object',
    :'eg_drone_points' => :'Object',
    :'auto_points' => :'Object',
    :'dc_points' => :'Object',
    :'endgame_points' => :'Object',
    :'penalty_points_committed' => :'Object',
    :'pre_penalty_total' => :'Object',
    :'total_points' => :'Object',
    :'alliance' => :'Object',
    :'team' => :'Object'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



370
371
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_2023.rb', line 370

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      init_team_prop1 == o.init_team_prop1 &&
      init_team_prop2 == o.init_team_prop2 &&
      robot1_auto == o.robot1_auto &&
      robot2_auto == o.robot2_auto &&
      spike_mark_pixel1 == o.spike_mark_pixel1 &&
      spike_mark_pixel2 == o.spike_mark_pixel2 &&
      target_backdrop_pixel1 == o.target_backdrop_pixel1 &&
      target_backdrop_pixel2 == o.target_backdrop_pixel2 &&
      auto_backdrop == o.auto_backdrop &&
      auto_backstage == o.auto_backstage &&
      dc_backdrop == o.dc_backdrop &&
      dc_backstage == o.dc_backstage &&
      mosaics == o.mosaics &&
      max_set_line == o.max_set_line &&
      eg_robot1 == o.eg_robot1 &&
      eg_robot2 == o.eg_robot2 &&
      drone1 == o.drone1 &&
      drone2 == o.drone2 &&
      minor_penalties == o.minor_penalties &&
      major_penalties == o.major_penalties &&
      auto_navigating_points == o.auto_navigating_points &&
      auto_randomization_points == o.auto_randomization_points &&
      auto_backstage_points == o.auto_backstage_points &&
      auto_backdrop_points == o.auto_backdrop_points &&
      dc_backdrop_points == o.dc_backdrop_points &&
      dc_backstage_points == o.dc_backstage_points &&
      mosaic_points == o.mosaic_points &&
      set_bonus_points == o.set_bonus_points &&
      eg_location_points == o.eg_location_points &&
      eg_drone_points == o.eg_drone_points &&
      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 &&
      total_points == o.total_points &&
      alliance == o.alliance &&
      team == o.team
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



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_2023.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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



527
528
529
530
531
532
533
534
535
536
537
538
539
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



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_2023.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

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


415
416
417
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 415

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



421
422
423
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 421

def hash
  [init_team_prop1, init_team_prop2, robot1_auto, robot2_auto, spike_mark_pixel1, spike_mark_pixel2, target_backdrop_pixel1, target_backdrop_pixel2, auto_backdrop, auto_backstage, dc_backdrop, dc_backstage, mosaics, max_set_line, eg_robot1, eg_robot2, drone1, drone2, minor_penalties, major_penalties, auto_navigating_points, auto_randomization_points, auto_backstage_points, auto_backdrop_points, dc_backdrop_points, dc_backstage_points, mosaic_points, set_bonus_points, eg_location_points, eg_drone_points, auto_points, dc_points, endgame_points, penalty_points_committed, pre_penalty_total, total_points, alliance, team].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



357
358
359
360
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 357

def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



503
504
505
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 503

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (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_2023.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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



497
498
499
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.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

Returns:

  • (Boolean)

    true if the model is valid



364
365
366
# File 'lib/ftc_events_client/models/score_detail_alliance_model_2023.rb', line 364

def valid?
  true
end