Class: FtcApiV3Client::ApiV3CsRemotePointsDetail

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

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 = {}) ⇒ ApiV3CsRemotePointsDetail

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'lib/ftc_api_v3_client/models/api_v3_cs_remote_points_detail.rb', line 108

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#auto_backdrop_pointsObject

Returns the value of attribute auto_backdrop_points.



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

def auto_backdrop_points
  @auto_backdrop_points
end

#auto_backstage_pointsObject

Returns the value of attribute auto_backstage_points.



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

def auto_backstage_points
  @auto_backstage_points
end

#auto_navigating_pointsObject

Returns the value of attribute auto_navigating_points.



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

def auto_navigating_points
  @auto_navigating_points
end

#auto_pointsObject

Returns the value of attribute auto_points.



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

def auto_points
  @auto_points
end

#auto_randomization_pointsObject

Returns the value of attribute auto_randomization_points.



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

def auto_randomization_points
  @auto_randomization_points
end

#dc_backdrop_pointsObject

Returns the value of attribute dc_backdrop_points.



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

def dc_backdrop_points
  @dc_backdrop_points
end

#dc_backstage_pointsObject

Returns the value of attribute dc_backstage_points.



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

def dc_backstage_points
  @dc_backstage_points
end

#dc_pointsObject

Returns the value of attribute dc_points.



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

def dc_points
  @dc_points
end

#eg_drone_pointsObject

Returns the value of attribute eg_drone_points.



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

def eg_drone_points
  @eg_drone_points
end

#eg_location_pointsObject

Returns the value of attribute eg_location_points.



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

def eg_location_points
  @eg_location_points
end

#endgame_pointsObject

Returns the value of attribute endgame_points.



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

def endgame_points
  @endgame_points
end

#mosaic_pointsObject

Returns the value of attribute mosaic_points.



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

def mosaic_points
  @mosaic_points
end

#penalty_points_committedObject

Returns the value of attribute penalty_points_committed.



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

def penalty_points_committed
  @penalty_points_committed
end

#pre_penalty_totalObject

Returns the value of attribute pre_penalty_total.



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

def pre_penalty_total
  @pre_penalty_total
end

#set_bonus_pointsObject

Returns the value of attribute set_bonus_points.



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

def set_bonus_points
  @set_bonus_points
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



70
71
72
# File 'lib/ftc_api_v3_client/models/api_v3_cs_remote_points_detail.rb', line 70

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



75
76
77
# File 'lib/ftc_api_v3_client/models/api_v3_cs_remote_points_detail.rb', line 75

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

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



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/ftc_api_v3_client/models/api_v3_cs_remote_points_detail.rb', line 49

def self.attribute_map
  {
    :'auto_navigating_points' => :'autoNavigatingPoints',
    :'auto_randomization_points' => :'autoRandomizationPoints',
    :'auto_backdrop_points' => :'autoBackdropPoints',
    :'auto_backstage_points' => :'autoBackstagePoints',
    :'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'
  }
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



490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
# File 'lib/ftc_api_v3_client/models/api_v3_cs_remote_points_detail.rb', line 490

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



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

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/ftc_api_v3_client/models/api_v3_cs_remote_points_detail.rb', line 80

def self.openapi_types
  {
    :'auto_navigating_points' => :'Integer',
    :'auto_randomization_points' => :'Integer',
    :'auto_backdrop_points' => :'Integer',
    :'auto_backstage_points' => :'Integer',
    :'dc_backdrop_points' => :'Integer',
    :'dc_backstage_points' => :'Integer',
    :'mosaic_points' => :'Integer',
    :'set_bonus_points' => :'Integer',
    :'eg_location_points' => :'Integer',
    :'eg_drone_points' => :'Integer',
    :'auto_points' => :'Integer',
    :'dc_points' => :'Integer',
    :'endgame_points' => :'Integer',
    :'penalty_points_committed' => :'Integer',
    :'pre_penalty_total' => :'Integer'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
# File 'lib/ftc_api_v3_client/models/api_v3_cs_remote_points_detail.rb', line 455

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      auto_navigating_points == o.auto_navigating_points &&
      auto_randomization_points == o.auto_randomization_points &&
      auto_backdrop_points == o.auto_backdrop_points &&
      auto_backstage_points == o.auto_backstage_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
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


477
478
479
# File 'lib/ftc_api_v3_client/models/api_v3_cs_remote_points_detail.rb', line 477

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



483
484
485
# File 'lib/ftc_api_v3_client/models/api_v3_cs_remote_points_detail.rb', line 483

def hash
  [auto_navigating_points, auto_randomization_points, auto_backdrop_points, auto_backstage_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].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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



512
513
514
515
516
517
518
519
520
521
522
523
524
# File 'lib/ftc_api_v3_client/models/api_v3_cs_remote_points_detail.rb', line 512

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



283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
# File 'lib/ftc_api_v3_client/models/api_v3_cs_remote_points_detail.rb', line 283

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  return false if @auto_navigating_points.nil?
  return false if @auto_randomization_points.nil?
  return false if @auto_backdrop_points.nil?
  return false if @auto_backstage_points.nil?
  return false if @dc_backdrop_points.nil?
  return false if @dc_backstage_points.nil?
  return false if @mosaic_points.nil?
  return false if @set_bonus_points.nil?
  return false if @eg_location_points.nil?
  return false if @eg_drone_points.nil?
  return false if @auto_points.nil?
  return false if @dc_points.nil?
  return false if @endgame_points.nil?
  return false if @penalty_points_committed.nil?
  return false if @pre_penalty_total.nil?
  true
end