Class: FtcApiV3Client::ApiV3ItdPointsDetail
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- FtcApiV3Client::ApiV3ItdPointsDetail
- Defined in:
- lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb
Instance Attribute Summary collapse
-
#adjust_points ⇒ Object
Used to indicate the winner in double-red-card playoff matches.
-
#auto_ascent_points ⇒ Object
Returns the value of attribute auto_ascent_points.
-
#auto_park_points ⇒ Object
Returns the value of attribute auto_park_points.
-
#auto_points ⇒ Object
Returns the value of attribute auto_points.
-
#auto_sample_points ⇒ Object
Returns the value of attribute auto_sample_points.
-
#auto_specimen_points ⇒ Object
Returns the value of attribute auto_specimen_points.
-
#foul_points_committed ⇒ Object
Returns the value of attribute foul_points_committed.
-
#pre_foul_total ⇒ Object
Returns the value of attribute pre_foul_total.
-
#teleop_ascent_points ⇒ Object
Returns the value of attribute teleop_ascent_points.
-
#teleop_park_points ⇒ Object
Returns the value of attribute teleop_park_points.
-
#teleop_points ⇒ Object
Returns the value of attribute teleop_points.
-
#teleop_sample_points ⇒ Object
Returns the value of attribute teleop_sample_points.
-
#teleop_specimen_points ⇒ Object
Returns the value of attribute teleop_specimen_points.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.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.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ApiV3ItdPointsDetail
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ ApiV3ItdPointsDetail
Initializes the object
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 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 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 101 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `FtcApiV3Client::ApiV3ItdPointsDetail` 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::ApiV3ItdPointsDetail`. 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_sample_points') self.auto_sample_points = attributes[:'auto_sample_points'] else self.auto_sample_points = nil end if attributes.key?(:'auto_specimen_points') self.auto_specimen_points = attributes[:'auto_specimen_points'] else self.auto_specimen_points = nil end if attributes.key?(:'auto_park_points') self.auto_park_points = attributes[:'auto_park_points'] else self.auto_park_points = nil end if attributes.key?(:'auto_ascent_points') self.auto_ascent_points = attributes[:'auto_ascent_points'] else self.auto_ascent_points = nil end if attributes.key?(:'teleop_sample_points') self.teleop_sample_points = attributes[:'teleop_sample_points'] else self.teleop_sample_points = nil end if attributes.key?(:'teleop_specimen_points') self.teleop_specimen_points = attributes[:'teleop_specimen_points'] else self.teleop_specimen_points = nil end if attributes.key?(:'teleop_park_points') self.teleop_park_points = attributes[:'teleop_park_points'] else self.teleop_park_points = nil end if attributes.key?(:'teleop_ascent_points') self.teleop_ascent_points = attributes[:'teleop_ascent_points'] else self.teleop_ascent_points = nil end if attributes.key?(:'auto_points') self.auto_points = attributes[:'auto_points'] else self.auto_points = nil end if attributes.key?(:'teleop_points') self.teleop_points = attributes[:'teleop_points'] else self.teleop_points = nil end if attributes.key?(:'foul_points_committed') self.foul_points_committed = attributes[:'foul_points_committed'] else self.foul_points_committed = nil end if attributes.key?(:'pre_foul_total') self.pre_foul_total = attributes[:'pre_foul_total'] else self.pre_foul_total = nil end if attributes.key?(:'adjust_points') self.adjust_points = attributes[:'adjust_points'] else self.adjust_points = nil end end |
Instance Attribute Details
#adjust_points ⇒ Object
Used to indicate the winner in double-red-card playoff matches
43 44 45 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 43 def adjust_points @adjust_points end |
#auto_ascent_points ⇒ Object
Returns the value of attribute auto_ascent_points.
24 25 26 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 24 def auto_ascent_points @auto_ascent_points end |
#auto_park_points ⇒ Object
Returns the value of attribute auto_park_points.
22 23 24 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 22 def auto_park_points @auto_park_points end |
#auto_points ⇒ Object
Returns the value of attribute auto_points.
34 35 36 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 34 def auto_points @auto_points end |
#auto_sample_points ⇒ Object
Returns the value of attribute auto_sample_points.
18 19 20 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 18 def auto_sample_points @auto_sample_points end |
#auto_specimen_points ⇒ Object
Returns the value of attribute auto_specimen_points.
20 21 22 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 20 def auto_specimen_points @auto_specimen_points end |
#foul_points_committed ⇒ Object
Returns the value of attribute foul_points_committed.
38 39 40 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 38 def foul_points_committed @foul_points_committed end |
#pre_foul_total ⇒ Object
Returns the value of attribute pre_foul_total.
40 41 42 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 40 def pre_foul_total @pre_foul_total end |
#teleop_ascent_points ⇒ Object
Returns the value of attribute teleop_ascent_points.
32 33 34 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 32 def teleop_ascent_points @teleop_ascent_points end |
#teleop_park_points ⇒ Object
Returns the value of attribute teleop_park_points.
30 31 32 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 30 def teleop_park_points @teleop_park_points end |
#teleop_points ⇒ Object
Returns the value of attribute teleop_points.
36 37 38 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 36 def teleop_points @teleop_points end |
#teleop_sample_points ⇒ Object
Returns the value of attribute teleop_sample_points.
26 27 28 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 26 def teleop_sample_points @teleop_sample_points end |
#teleop_specimen_points ⇒ Object
Returns the value of attribute teleop_specimen_points.
28 29 30 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 28 def teleop_specimen_points @teleop_specimen_points end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
65 66 67 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 65 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
70 71 72 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 70 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 46 def self.attribute_map { :'auto_sample_points' => :'autoSamplePoints', :'auto_specimen_points' => :'autoSpecimenPoints', :'auto_park_points' => :'autoParkPoints', :'auto_ascent_points' => :'autoAscentPoints', :'teleop_sample_points' => :'teleopSamplePoints', :'teleop_specimen_points' => :'teleopSpecimenPoints', :'teleop_park_points' => :'teleopParkPoints', :'teleop_ascent_points' => :'teleopAscentPoints', :'auto_points' => :'autoPoints', :'teleop_points' => :'teleopPoints', :'foul_points_committed' => :'foulPointsCommitted', :'pre_foul_total' => :'preFoulTotal', :'adjust_points' => :'adjustPoints' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 439 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_nullable ⇒ Object
List of attributes with nullable: true
94 95 96 97 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 94 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 75 def self.openapi_types { :'auto_sample_points' => :'Integer', :'auto_specimen_points' => :'Integer', :'auto_park_points' => :'Integer', :'auto_ascent_points' => :'Integer', :'teleop_sample_points' => :'Integer', :'teleop_specimen_points' => :'Integer', :'teleop_park_points' => :'Integer', :'teleop_ascent_points' => :'Integer', :'auto_points' => :'Integer', :'teleop_points' => :'Integer', :'foul_points_committed' => :'Integer', :'pre_foul_total' => :'Integer', :'adjust_points' => :'Integer' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 406 def ==(o) return true if self.equal?(o) self.class == o.class && auto_sample_points == o.auto_sample_points && auto_specimen_points == o.auto_specimen_points && auto_park_points == o.auto_park_points && auto_ascent_points == o.auto_ascent_points && teleop_sample_points == o.teleop_sample_points && teleop_specimen_points == o.teleop_specimen_points && teleop_park_points == o.teleop_park_points && teleop_ascent_points == o.teleop_ascent_points && auto_points == o.auto_points && teleop_points == o.teleop_points && foul_points_committed == o.foul_points_committed && pre_foul_total == o.pre_foul_total && adjust_points == o.adjust_points end |
#eql?(o) ⇒ Boolean
426 427 428 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 426 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
432 433 434 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 432 def hash [auto_sample_points, auto_specimen_points, auto_park_points, auto_ascent_points, teleop_sample_points, teleop_specimen_points, teleop_park_points, teleop_ascent_points, auto_points, teleop_points, foul_points_committed, pre_foul_total, adjust_points].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 196 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @auto_sample_points.nil? invalid_properties.push('invalid value for "auto_sample_points", auto_sample_points cannot be nil.') end if @auto_specimen_points.nil? invalid_properties.push('invalid value for "auto_specimen_points", auto_specimen_points cannot be nil.') end if @auto_park_points.nil? invalid_properties.push('invalid value for "auto_park_points", auto_park_points cannot be nil.') end if @auto_ascent_points.nil? invalid_properties.push('invalid value for "auto_ascent_points", auto_ascent_points cannot be nil.') end if @teleop_sample_points.nil? invalid_properties.push('invalid value for "teleop_sample_points", teleop_sample_points cannot be nil.') end if @teleop_specimen_points.nil? invalid_properties.push('invalid value for "teleop_specimen_points", teleop_specimen_points cannot be nil.') end if @teleop_park_points.nil? invalid_properties.push('invalid value for "teleop_park_points", teleop_park_points cannot be nil.') end if @teleop_ascent_points.nil? invalid_properties.push('invalid value for "teleop_ascent_points", teleop_ascent_points cannot be nil.') end if @auto_points.nil? invalid_properties.push('invalid value for "auto_points", auto_points cannot be nil.') end if @teleop_points.nil? invalid_properties.push('invalid value for "teleop_points", teleop_points cannot be nil.') end if @foul_points_committed.nil? invalid_properties.push('invalid value for "foul_points_committed", foul_points_committed cannot be nil.') end if @pre_foul_total.nil? invalid_properties.push('invalid value for "pre_foul_total", pre_foul_total cannot be nil.') end if @adjust_points.nil? invalid_properties.push('invalid value for "adjust_points", adjust_points cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
461 462 463 464 465 466 467 468 469 470 471 472 473 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 461 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
256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/ftc_api_v3_client/models/api_v3_itd_points_detail.rb', line 256 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @auto_sample_points.nil? return false if @auto_specimen_points.nil? return false if @auto_park_points.nil? return false if @auto_ascent_points.nil? return false if @teleop_sample_points.nil? return false if @teleop_specimen_points.nil? return false if @teleop_park_points.nil? return false if @teleop_ascent_points.nil? return false if @auto_points.nil? return false if @teleop_points.nil? return false if @foul_points_committed.nil? return false if @pre_foul_total.nil? return false if @adjust_points.nil? true end |