Class: FtcApiV3Client::ApiV3FFRemoteAchievementsDetail

Inherits:
ApiModelBase
  • Object
show all
Defined in:
lib/ftc_api_v3_client/models/api_v3_ff_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 = {}) ⇒ ApiV3FFRemoteAchievementsDetail

Initializes the object

Parameters:

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

    Model attributes in the form of hash



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
# File 'lib/ftc_api_v3_client/models/api_v3_ff_remote_achievements_detail.rb', line 145

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#auto_deliveredObject

Returns the value of attribute auto_delivered.



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

def auto_delivered
  @auto_delivered
end

#auto_freight1Object

Returns the value of attribute auto_freight1.



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

def auto_freight1
  @auto_freight1
end

#auto_freight2Object

Returns the value of attribute auto_freight2.



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

def auto_freight2
  @auto_freight2
end

#auto_freight3Object

Returns the value of attribute auto_freight3.



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

def auto_freight3
  @auto_freight3
end

#auto_robotObject

Returns the value of attribute auto_robot.



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

def auto_robot
  @auto_robot
end

#auto_storage_freightObject

Returns the value of attribute auto_storage_freight.



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

def auto_storage_freight
  @auto_storage_freight
end

#balancedObject

Returns the value of attribute balanced.



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

def balanced
  @balanced
end

#cappedObject

Returns the value of attribute capped.



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

def capped
  @capped
end

#dc_freight1Object

Returns the value of attribute dc_freight1.



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

def dc_freight1
  @dc_freight1
end

#dc_freight2Object

Returns the value of attribute dc_freight2.



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

def dc_freight2
  @dc_freight2
end

#dc_freight3Object

Returns the value of attribute dc_freight3.



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

def dc_freight3
  @dc_freight3
end

#dc_storage_freightObject

Returns the value of attribute dc_storage_freight.



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

def dc_storage_freight
  @dc_storage_freight
end

#eg_deliveredObject

Returns the value of attribute eg_delivered.



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

def eg_delivered
  @eg_delivered
end

#eg_robotObject

Returns the value of attribute eg_robot.



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

def eg_robot
  @eg_robot
end

#init_tseObject

Indicates if team used a team shipping element



53
54
55
# File 'lib/ftc_api_v3_client/models/api_v3_ff_remote_achievements_detail.rb', line 53

def init_tse
  @init_tse
end

#major_penaltiesObject

Returns the value of attribute major_penalties.



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

def major_penalties
  @major_penalties
end

#minor_penaltiesObject

Returns the value of attribute minor_penalties.



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

def minor_penalties
  @minor_penalties
end

#preloadObject

Returns the value of attribute preload.



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

def preload
  @preload
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



102
103
104
# File 'lib/ftc_api_v3_client/models/api_v3_ff_remote_achievements_detail.rb', line 102

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



107
108
109
# File 'lib/ftc_api_v3_client/models/api_v3_ff_remote_achievements_detail.rb', line 107

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

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



78
79
80
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_ff_remote_achievements_detail.rb', line 78

def self.attribute_map
  {
    :'auto_delivered' => :'autoDelivered',
    :'auto_robot' => :'autoRobot',
    :'preload' => :'preload',
    :'auto_storage_freight' => :'autoStorageFreight',
    :'auto_freight1' => :'autoFreight1',
    :'auto_freight2' => :'autoFreight2',
    :'auto_freight3' => :'autoFreight3',
    :'dc_storage_freight' => :'dcStorageFreight',
    :'dc_freight1' => :'dcFreight1',
    :'dc_freight2' => :'dcFreight2',
    :'dc_freight3' => :'dcFreight3',
    :'eg_delivered' => :'egDelivered',
    :'balanced' => :'balanced',
    :'eg_robot' => :'egRobot',
    :'capped' => :'capped',
    :'minor_penalties' => :'minorPenalties',
    :'major_penalties' => :'majorPenalties',
    :'init_tse' => :'initTSE'
  }
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



563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
# File 'lib/ftc_api_v3_client/models/api_v3_ff_remote_achievements_detail.rb', line 563

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



136
137
138
139
140
141
# File 'lib/ftc_api_v3_client/models/api_v3_ff_remote_achievements_detail.rb', line 136

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

.openapi_typesObject

Attribute type mapping.



112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/ftc_api_v3_client/models/api_v3_ff_remote_achievements_detail.rb', line 112

def self.openapi_types
  {
    :'auto_delivered' => :'Boolean',
    :'auto_robot' => :'ApiV3FFAutoLocation',
    :'preload' => :'Boolean',
    :'auto_storage_freight' => :'Integer',
    :'auto_freight1' => :'Integer',
    :'auto_freight2' => :'Integer',
    :'auto_freight3' => :'Integer',
    :'dc_storage_freight' => :'Integer',
    :'dc_freight1' => :'Integer',
    :'dc_freight2' => :'Integer',
    :'dc_freight3' => :'Integer',
    :'eg_delivered' => :'Integer',
    :'balanced' => :'Boolean',
    :'eg_robot' => :'ApiV3FFEndLocation',
    :'capped' => :'Integer',
    :'minor_penalties' => :'Integer',
    :'major_penalties' => :'Integer',
    :'init_tse' => :'Boolean'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
# File 'lib/ftc_api_v3_client/models/api_v3_ff_remote_achievements_detail.rb', line 525

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      auto_delivered == o.auto_delivered &&
      auto_robot == o.auto_robot &&
      preload == o.preload &&
      auto_storage_freight == o.auto_storage_freight &&
      auto_freight1 == o.auto_freight1 &&
      auto_freight2 == o.auto_freight2 &&
      auto_freight3 == o.auto_freight3 &&
      dc_storage_freight == o.dc_storage_freight &&
      dc_freight1 == o.dc_freight1 &&
      dc_freight2 == o.dc_freight2 &&
      dc_freight3 == o.dc_freight3 &&
      eg_delivered == o.eg_delivered &&
      balanced == o.balanced &&
      eg_robot == o.eg_robot &&
      capped == o.capped &&
      minor_penalties == o.minor_penalties &&
      major_penalties == o.major_penalties &&
      init_tse == o.init_tse
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


550
551
552
# File 'lib/ftc_api_v3_client/models/api_v3_ff_remote_achievements_detail.rb', line 550

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



556
557
558
# File 'lib/ftc_api_v3_client/models/api_v3_ff_remote_achievements_detail.rb', line 556

def hash
  [auto_delivered, auto_robot, preload, auto_storage_freight, auto_freight1, auto_freight2, auto_freight3, dc_storage_freight, dc_freight1, dc_freight2, dc_freight3, eg_delivered, balanced, eg_robot, capped, minor_penalties, major_penalties, init_tse].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



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

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

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

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

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

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

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

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

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

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

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

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

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

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

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



585
586
587
588
589
590
591
592
593
594
595
596
597
# File 'lib/ftc_api_v3_client/models/api_v3_ff_remote_achievements_detail.rb', line 585

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



342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
# File 'lib/ftc_api_v3_client/models/api_v3_ff_remote_achievements_detail.rb', line 342

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  return false if @auto_delivered.nil?
  return false if @preload.nil?
  return false if @auto_storage_freight.nil?
  return false if @auto_freight1.nil?
  return false if @auto_freight2.nil?
  return false if @auto_freight3.nil?
  return false if @dc_storage_freight.nil?
  return false if @dc_freight1.nil?
  return false if @dc_freight2.nil?
  return false if @dc_freight3.nil?
  return false if @eg_delivered.nil?
  return false if @balanced.nil?
  return false if @capped.nil?
  return false if @minor_penalties.nil?
  return false if @major_penalties.nil?
  return false if @init_tse.nil?
  true
end