Class: FtcApiV3Client::ApiV3UgRemoteAchievementsDetail

Inherits:
ApiModelBase
  • Object
show all
Defined in:
lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiModelBase

_deserialize, #_to_hash, #to_body, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ ApiV3UgRemoteAchievementsDetail

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
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
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 156

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

  if attributes.key?(:'wobble1_delivered')
    self.wobble1_delivered = attributes[:'wobble1_delivered']
  else
    self.wobble1_delivered = nil
  end

  if attributes.key?(:'wobble2_delivered')
    self.wobble2_delivered = attributes[:'wobble2_delivered']
  else
    self.wobble2_delivered = nil
  end

  if attributes.key?(:'auto_tower_low')
    self.auto_tower_low = attributes[:'auto_tower_low']
  else
    self.auto_tower_low = nil
  end

  if attributes.key?(:'auto_tower_mid')
    self.auto_tower_mid = attributes[:'auto_tower_mid']
  else
    self.auto_tower_mid = nil
  end

  if attributes.key?(:'auto_tower_high')
    self.auto_tower_high = attributes[:'auto_tower_high']
  else
    self.auto_tower_high = nil
  end

  if attributes.key?(:'auto_power_shot_left')
    self.auto_power_shot_left = attributes[:'auto_power_shot_left']
  else
    self.auto_power_shot_left = nil
  end

  if attributes.key?(:'auto_power_shot_center')
    self.auto_power_shot_center = attributes[:'auto_power_shot_center']
  else
    self.auto_power_shot_center = nil
  end

  if attributes.key?(:'auto_power_shot_right')
    self.auto_power_shot_right = attributes[:'auto_power_shot_right']
  else
    self.auto_power_shot_right = nil
  end

  if attributes.key?(:'dc_tower_low')
    self.dc_tower_low = attributes[:'dc_tower_low']
  else
    self.dc_tower_low = nil
  end

  if attributes.key?(:'dc_tower_mid')
    self.dc_tower_mid = attributes[:'dc_tower_mid']
  else
    self.dc_tower_mid = nil
  end

  if attributes.key?(:'dc_tower_high')
    self.dc_tower_high = attributes[:'dc_tower_high']
  else
    self.dc_tower_high = nil
  end

  if attributes.key?(:'wobble1_end')
    self.wobble1_end = attributes[:'wobble1_end']
  else
    self.wobble1_end = nil
  end

  if attributes.key?(:'wobble2_end')
    self.wobble2_end = attributes[:'wobble2_end']
  else
    self.wobble2_end = nil
  end

  if attributes.key?(:'wobble1_rings')
    self.wobble1_rings = attributes[:'wobble1_rings']
  else
    self.wobble1_rings = nil
  end

  if attributes.key?(:'wobble2_rings')
    self.wobble2_rings = attributes[:'wobble2_rings']
  else
    self.wobble2_rings = nil
  end

  if attributes.key?(:'end_power_shot_left')
    self.end_power_shot_left = attributes[:'end_power_shot_left']
  else
    self.end_power_shot_left = nil
  end

  if attributes.key?(:'end_power_shot_center')
    self.end_power_shot_center = attributes[:'end_power_shot_center']
  else
    self.end_power_shot_center = nil
  end

  if attributes.key?(:'end_power_shot_right')
    self.end_power_shot_right = attributes[:'end_power_shot_right']
  else
    self.end_power_shot_right = 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_power_shot_centerObject

Returns the value of attribute auto_power_shot_center.



32
33
34
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 32

def auto_power_shot_center
  @auto_power_shot_center
end

#auto_power_shot_leftObject

Returns the value of attribute auto_power_shot_left.



30
31
32
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 30

def auto_power_shot_left
  @auto_power_shot_left
end

#auto_power_shot_rightObject

Returns the value of attribute auto_power_shot_right.



34
35
36
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 34

def auto_power_shot_right
  @auto_power_shot_right
end

#auto_tower_highObject

Returns the value of attribute auto_tower_high.



28
29
30
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 28

def auto_tower_high
  @auto_tower_high
end

#auto_tower_lowObject

Returns the value of attribute auto_tower_low.



24
25
26
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 24

def auto_tower_low
  @auto_tower_low
end

#auto_tower_midObject

Returns the value of attribute auto_tower_mid.



26
27
28
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 26

def auto_tower_mid
  @auto_tower_mid
end

#dc_tower_highObject

Returns the value of attribute dc_tower_high.



40
41
42
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 40

def dc_tower_high
  @dc_tower_high
end

#dc_tower_lowObject

Returns the value of attribute dc_tower_low.



36
37
38
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 36

def dc_tower_low
  @dc_tower_low
end

#dc_tower_midObject

Returns the value of attribute dc_tower_mid.



38
39
40
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 38

def dc_tower_mid
  @dc_tower_mid
end

#end_power_shot_centerObject

Returns the value of attribute end_power_shot_center.



52
53
54
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 52

def end_power_shot_center
  @end_power_shot_center
end

#end_power_shot_leftObject

Returns the value of attribute end_power_shot_left.



50
51
52
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 50

def end_power_shot_left
  @end_power_shot_left
end

#end_power_shot_rightObject

Returns the value of attribute end_power_shot_right.



54
55
56
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 54

def end_power_shot_right
  @end_power_shot_right
end

#major_penaltiesObject

Returns the value of attribute major_penalties.



58
59
60
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 58

def major_penalties
  @major_penalties
end

#minor_penaltiesObject

Returns the value of attribute minor_penalties.



56
57
58
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 56

def minor_penalties
  @minor_penalties
end

#robot_navigatedObject

Returns the value of attribute robot_navigated.



18
19
20
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 18

def robot_navigated
  @robot_navigated
end

#wobble1_deliveredObject

Returns the value of attribute wobble1_delivered.



20
21
22
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 20

def wobble1_delivered
  @wobble1_delivered
end

#wobble1_endObject

Returns the value of attribute wobble1_end.



42
43
44
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 42

def wobble1_end
  @wobble1_end
end

#wobble1_ringsObject

Returns the value of attribute wobble1_rings.



46
47
48
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 46

def wobble1_rings
  @wobble1_rings
end

#wobble2_deliveredObject

Returns the value of attribute wobble2_delivered.



22
23
24
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 22

def wobble2_delivered
  @wobble2_delivered
end

#wobble2_endObject

Returns the value of attribute wobble2_end.



44
45
46
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 44

def wobble2_end
  @wobble2_end
end

#wobble2_ringsObject

Returns the value of attribute wobble2_rings.



48
49
50
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 48

def wobble2_rings
  @wobble2_rings
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



110
111
112
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 110

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



115
116
117
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 115

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

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



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 83

def self.attribute_map
  {
    :'robot_navigated' => :'robotNavigated',
    :'wobble1_delivered' => :'wobble1Delivered',
    :'wobble2_delivered' => :'wobble2Delivered',
    :'auto_tower_low' => :'autoTowerLow',
    :'auto_tower_mid' => :'autoTowerMid',
    :'auto_tower_high' => :'autoTowerHigh',
    :'auto_power_shot_left' => :'autoPowerShotLeft',
    :'auto_power_shot_center' => :'autoPowerShotCenter',
    :'auto_power_shot_right' => :'autoPowerShotRight',
    :'dc_tower_low' => :'dcTowerLow',
    :'dc_tower_mid' => :'dcTowerMid',
    :'dc_tower_high' => :'dcTowerHigh',
    :'wobble1_end' => :'wobble1End',
    :'wobble2_end' => :'wobble2End',
    :'wobble1_rings' => :'wobble1Rings',
    :'wobble2_rings' => :'wobble2Rings',
    :'end_power_shot_left' => :'endPowerShotLeft',
    :'end_power_shot_center' => :'endPowerShotCenter',
    :'end_power_shot_right' => :'endPowerShotRight',
    :'minor_penalties' => :'minorPenalties',
    :'major_penalties' => :'majorPenalties'
  }
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



640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 640

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_nullableObject

List of attributes with nullable: true



147
148
149
150
151
152
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 147

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

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 120

def self.openapi_types
  {
    :'robot_navigated' => :'Boolean',
    :'wobble1_delivered' => :'Boolean',
    :'wobble2_delivered' => :'Boolean',
    :'auto_tower_low' => :'Integer',
    :'auto_tower_mid' => :'Integer',
    :'auto_tower_high' => :'Integer',
    :'auto_power_shot_left' => :'Boolean',
    :'auto_power_shot_center' => :'Boolean',
    :'auto_power_shot_right' => :'Boolean',
    :'dc_tower_low' => :'Integer',
    :'dc_tower_mid' => :'Integer',
    :'dc_tower_high' => :'Integer',
    :'wobble1_end' => :'ApiV3UgWobbleLocation',
    :'wobble2_end' => :'ApiV3UgWobbleLocation',
    :'wobble1_rings' => :'Integer',
    :'wobble2_rings' => :'Integer',
    :'end_power_shot_left' => :'Boolean',
    :'end_power_shot_center' => :'Boolean',
    :'end_power_shot_right' => :'Boolean',
    :'minor_penalties' => :'Integer',
    :'major_penalties' => :'Integer'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 599

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      robot_navigated == o.robot_navigated &&
      wobble1_delivered == o.wobble1_delivered &&
      wobble2_delivered == o.wobble2_delivered &&
      auto_tower_low == o.auto_tower_low &&
      auto_tower_mid == o.auto_tower_mid &&
      auto_tower_high == o.auto_tower_high &&
      auto_power_shot_left == o.auto_power_shot_left &&
      auto_power_shot_center == o.auto_power_shot_center &&
      auto_power_shot_right == o.auto_power_shot_right &&
      dc_tower_low == o.dc_tower_low &&
      dc_tower_mid == o.dc_tower_mid &&
      dc_tower_high == o.dc_tower_high &&
      wobble1_end == o.wobble1_end &&
      wobble2_end == o.wobble2_end &&
      wobble1_rings == o.wobble1_rings &&
      wobble2_rings == o.wobble2_rings &&
      end_power_shot_left == o.end_power_shot_left &&
      end_power_shot_center == o.end_power_shot_center &&
      end_power_shot_right == o.end_power_shot_right &&
      minor_penalties == o.minor_penalties &&
      major_penalties == o.major_penalties
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


627
628
629
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 627

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



633
634
635
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 633

def hash
  [robot_navigated, wobble1_delivered, wobble2_delivered, auto_tower_low, auto_tower_mid, auto_tower_high, auto_power_shot_left, auto_power_shot_center, auto_power_shot_right, dc_tower_low, dc_tower_mid, dc_tower_high, wobble1_end, wobble2_end, wobble1_rings, wobble2_rings, end_power_shot_left, end_power_shot_center, end_power_shot_right, minor_penalties, major_penalties].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



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
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 299

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  if @robot_navigated.nil?
    invalid_properties.push('invalid value for "robot_navigated", robot_navigated cannot be nil.')
  end

  if @wobble1_delivered.nil?
    invalid_properties.push('invalid value for "wobble1_delivered", wobble1_delivered cannot be nil.')
  end

  if @wobble2_delivered.nil?
    invalid_properties.push('invalid value for "wobble2_delivered", wobble2_delivered cannot be nil.')
  end

  if @auto_tower_low.nil?
    invalid_properties.push('invalid value for "auto_tower_low", auto_tower_low cannot be nil.')
  end

  if @auto_tower_mid.nil?
    invalid_properties.push('invalid value for "auto_tower_mid", auto_tower_mid cannot be nil.')
  end

  if @auto_tower_high.nil?
    invalid_properties.push('invalid value for "auto_tower_high", auto_tower_high cannot be nil.')
  end

  if @auto_power_shot_left.nil?
    invalid_properties.push('invalid value for "auto_power_shot_left", auto_power_shot_left cannot be nil.')
  end

  if @auto_power_shot_center.nil?
    invalid_properties.push('invalid value for "auto_power_shot_center", auto_power_shot_center cannot be nil.')
  end

  if @auto_power_shot_right.nil?
    invalid_properties.push('invalid value for "auto_power_shot_right", auto_power_shot_right cannot be nil.')
  end

  if @dc_tower_low.nil?
    invalid_properties.push('invalid value for "dc_tower_low", dc_tower_low cannot be nil.')
  end

  if @dc_tower_mid.nil?
    invalid_properties.push('invalid value for "dc_tower_mid", dc_tower_mid cannot be nil.')
  end

  if @dc_tower_high.nil?
    invalid_properties.push('invalid value for "dc_tower_high", dc_tower_high cannot be nil.')
  end

  if @wobble1_rings.nil?
    invalid_properties.push('invalid value for "wobble1_rings", wobble1_rings cannot be nil.')
  end

  if @wobble2_rings.nil?
    invalid_properties.push('invalid value for "wobble2_rings", wobble2_rings cannot be nil.')
  end

  if @end_power_shot_left.nil?
    invalid_properties.push('invalid value for "end_power_shot_left", end_power_shot_left cannot be nil.')
  end

  if @end_power_shot_center.nil?
    invalid_properties.push('invalid value for "end_power_shot_center", end_power_shot_center cannot be nil.')
  end

  if @end_power_shot_right.nil?
    invalid_properties.push('invalid value for "end_power_shot_right", end_power_shot_right 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_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



662
663
664
665
666
667
668
669
670
671
672
673
674
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 662

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

Returns:

  • (Boolean)

    true if the model is valid



383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
# File 'lib/ftc_api_v3_client/models/api_v3_ug_remote_achievements_detail.rb', line 383

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  return false if @robot_navigated.nil?
  return false if @wobble1_delivered.nil?
  return false if @wobble2_delivered.nil?
  return false if @auto_tower_low.nil?
  return false if @auto_tower_mid.nil?
  return false if @auto_tower_high.nil?
  return false if @auto_power_shot_left.nil?
  return false if @auto_power_shot_center.nil?
  return false if @auto_power_shot_right.nil?
  return false if @dc_tower_low.nil?
  return false if @dc_tower_mid.nil?
  return false if @dc_tower_high.nil?
  return false if @wobble1_rings.nil?
  return false if @wobble2_rings.nil?
  return false if @end_power_shot_left.nil?
  return false if @end_power_shot_center.nil?
  return false if @end_power_shot_right.nil?
  return false if @minor_penalties.nil?
  return false if @major_penalties.nil?
  true
end