Class: FtcApiV3Client::ApiV3DecodeAchievementsDetail
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- FtcApiV3Client::ApiV3DecodeAchievementsDetail
- Defined in:
- lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#auto_classified_artifacts ⇒ Object
Returns the value of attribute auto_classified_artifacts.
-
#auto_classifier_state ⇒ Object
Returns the value of attribute auto_classifier_state.
-
#auto_overflow_artifacts ⇒ Object
Returns the value of attribute auto_overflow_artifacts.
-
#major_fouls ⇒ Object
Returns the value of attribute major_fouls.
-
#minor_fouls ⇒ Object
Returns the value of attribute minor_fouls.
-
#robot1_auto ⇒ Object
Returns the value of attribute robot1_auto.
-
#robot1_teleop ⇒ Object
Returns the value of attribute robot1_teleop.
-
#robot2_auto ⇒ Object
Returns the value of attribute robot2_auto.
-
#robot2_teleop ⇒ Object
Returns the value of attribute robot2_teleop.
-
#teleop_classified_artifacts ⇒ Object
Returns the value of attribute teleop_classified_artifacts.
-
#teleop_classifier_state ⇒ Object
Returns the value of attribute teleop_classifier_state.
-
#teleop_depot_artifacts ⇒ Object
Returns the value of attribute teleop_depot_artifacts.
-
#teleop_overflow_artifacts ⇒ Object
Returns the value of attribute teleop_overflow_artifacts.
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 = {}) ⇒ ApiV3DecodeAchievementsDetail
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 = {}) ⇒ ApiV3DecodeAchievementsDetail
Initializes the object
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 212 213 214 215 216 217 218 219 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 124 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `FtcApiV3Client::ApiV3DecodeAchievementsDetail` 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::ApiV3DecodeAchievementsDetail`. 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_classified_artifacts') self.auto_classified_artifacts = attributes[:'auto_classified_artifacts'] else self.auto_classified_artifacts = nil end if attributes.key?(:'auto_overflow_artifacts') self.auto_overflow_artifacts = attributes[:'auto_overflow_artifacts'] else self.auto_overflow_artifacts = nil end if attributes.key?(:'auto_classifier_state') if (value = attributes[:'auto_classifier_state']).is_a?(Array) self.auto_classifier_state = value end else self.auto_classifier_state = nil end if attributes.key?(:'robot1_auto') self.robot1_auto = attributes[:'robot1_auto'] else self.robot1_auto = nil end if attributes.key?(:'robot2_auto') self.robot2_auto = attributes[:'robot2_auto'] else self.robot2_auto = nil end if attributes.key?(:'teleop_classified_artifacts') self.teleop_classified_artifacts = attributes[:'teleop_classified_artifacts'] else self.teleop_classified_artifacts = nil end if attributes.key?(:'teleop_overflow_artifacts') self.teleop_overflow_artifacts = attributes[:'teleop_overflow_artifacts'] else self.teleop_overflow_artifacts = nil end if attributes.key?(:'teleop_depot_artifacts') self.teleop_depot_artifacts = attributes[:'teleop_depot_artifacts'] else self.teleop_depot_artifacts = nil end if attributes.key?(:'teleop_classifier_state') if (value = attributes[:'teleop_classifier_state']).is_a?(Array) self.teleop_classifier_state = value end else self.teleop_classifier_state = nil end if attributes.key?(:'robot1_teleop') self.robot1_teleop = attributes[:'robot1_teleop'] else self.robot1_teleop = nil end if attributes.key?(:'robot2_teleop') self.robot2_teleop = attributes[:'robot2_teleop'] else self.robot2_teleop = nil end if attributes.key?(:'minor_fouls') self.minor_fouls = attributes[:'minor_fouls'] else self.minor_fouls = nil end if attributes.key?(:'major_fouls') self.major_fouls = attributes[:'major_fouls'] else self.major_fouls = nil end end |
Instance Attribute Details
#auto_classified_artifacts ⇒ Object
Returns the value of attribute auto_classified_artifacts.
18 19 20 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 18 def auto_classified_artifacts @auto_classified_artifacts end |
#auto_classifier_state ⇒ Object
Returns the value of attribute auto_classifier_state.
22 23 24 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 22 def auto_classifier_state @auto_classifier_state end |
#auto_overflow_artifacts ⇒ Object
Returns the value of attribute auto_overflow_artifacts.
20 21 22 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 20 def auto_overflow_artifacts @auto_overflow_artifacts end |
#major_fouls ⇒ Object
Returns the value of attribute major_fouls.
42 43 44 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 42 def major_fouls @major_fouls end |
#minor_fouls ⇒ Object
Returns the value of attribute minor_fouls.
40 41 42 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 40 def minor_fouls @minor_fouls end |
#robot1_auto ⇒ Object
Returns the value of attribute robot1_auto.
24 25 26 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 24 def robot1_auto @robot1_auto end |
#robot1_teleop ⇒ Object
Returns the value of attribute robot1_teleop.
36 37 38 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 36 def robot1_teleop @robot1_teleop end |
#robot2_auto ⇒ Object
Returns the value of attribute robot2_auto.
26 27 28 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 26 def robot2_auto @robot2_auto end |
#robot2_teleop ⇒ Object
Returns the value of attribute robot2_teleop.
38 39 40 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 38 def robot2_teleop @robot2_teleop end |
#teleop_classified_artifacts ⇒ Object
Returns the value of attribute teleop_classified_artifacts.
28 29 30 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 28 def teleop_classified_artifacts @teleop_classified_artifacts end |
#teleop_classifier_state ⇒ Object
Returns the value of attribute teleop_classifier_state.
34 35 36 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 34 def teleop_classifier_state @teleop_classifier_state end |
#teleop_depot_artifacts ⇒ Object
Returns the value of attribute teleop_depot_artifacts.
32 33 34 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 32 def teleop_depot_artifacts @teleop_depot_artifacts end |
#teleop_overflow_artifacts ⇒ Object
Returns the value of attribute teleop_overflow_artifacts.
30 31 32 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 30 def teleop_overflow_artifacts @teleop_overflow_artifacts end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
86 87 88 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 86 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
91 92 93 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 91 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 67 def self.attribute_map { :'auto_classified_artifacts' => :'autoClassifiedArtifacts', :'auto_overflow_artifacts' => :'autoOverflowArtifacts', :'auto_classifier_state' => :'autoClassifierState', :'robot1_auto' => :'robot1Auto', :'robot2_auto' => :'robot2Auto', :'teleop_classified_artifacts' => :'teleopClassifiedArtifacts', :'teleop_overflow_artifacts' => :'teleopOverflowArtifacts', :'teleop_depot_artifacts' => :'teleopDepotArtifacts', :'teleop_classifier_state' => :'teleopClassifierState', :'robot1_teleop' => :'robot1Teleop', :'robot2_teleop' => :'robot2Teleop', :'minor_fouls' => :'minorFouls', :'major_fouls' => :'majorFouls' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 436 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
115 116 117 118 119 120 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 115 def self.openapi_nullable Set.new([ :'robot1_teleop', :'robot2_teleop', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 96 def self.openapi_types { :'auto_classified_artifacts' => :'Integer', :'auto_overflow_artifacts' => :'Integer', :'auto_classifier_state' => :'Array<ApiV3DecodeArtifactType>', :'robot1_auto' => :'Boolean', :'robot2_auto' => :'Boolean', :'teleop_classified_artifacts' => :'Integer', :'teleop_overflow_artifacts' => :'Integer', :'teleop_depot_artifacts' => :'Integer', :'teleop_classifier_state' => :'Array<ApiV3DecodeArtifactType>', :'robot1_teleop' => :'ApiV3DecodeTeleopBaseLocation', :'robot2_teleop' => :'ApiV3DecodeTeleopBaseLocation', :'minor_fouls' => :'Integer', :'major_fouls' => :'Integer' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 403 def ==(o) return true if self.equal?(o) self.class == o.class && auto_classified_artifacts == o.auto_classified_artifacts && auto_overflow_artifacts == o.auto_overflow_artifacts && auto_classifier_state == o.auto_classifier_state && robot1_auto == o.robot1_auto && robot2_auto == o.robot2_auto && teleop_classified_artifacts == o.teleop_classified_artifacts && teleop_overflow_artifacts == o.teleop_overflow_artifacts && teleop_depot_artifacts == o.teleop_depot_artifacts && teleop_classifier_state == o.teleop_classifier_state && robot1_teleop == o.robot1_teleop && robot2_teleop == o.robot2_teleop && minor_fouls == o.minor_fouls && major_fouls == o.major_fouls end |
#eql?(o) ⇒ Boolean
423 424 425 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 423 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
429 430 431 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 429 def hash [auto_classified_artifacts, auto_overflow_artifacts, auto_classifier_state, robot1_auto, robot2_auto, teleop_classified_artifacts, teleop_overflow_artifacts, teleop_depot_artifacts, teleop_classifier_state, robot1_teleop, robot2_teleop, minor_fouls, major_fouls].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 223 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @auto_classified_artifacts.nil? invalid_properties.push('invalid value for "auto_classified_artifacts", auto_classified_artifacts cannot be nil.') end if @auto_overflow_artifacts.nil? invalid_properties.push('invalid value for "auto_overflow_artifacts", auto_overflow_artifacts cannot be nil.') end if @auto_classifier_state.nil? invalid_properties.push('invalid value for "auto_classifier_state", auto_classifier_state cannot be nil.') end if @robot1_auto.nil? invalid_properties.push('invalid value for "robot1_auto", robot1_auto cannot be nil.') end if @robot2_auto.nil? invalid_properties.push('invalid value for "robot2_auto", robot2_auto cannot be nil.') end if @teleop_classified_artifacts.nil? invalid_properties.push('invalid value for "teleop_classified_artifacts", teleop_classified_artifacts cannot be nil.') end if @teleop_overflow_artifacts.nil? invalid_properties.push('invalid value for "teleop_overflow_artifacts", teleop_overflow_artifacts cannot be nil.') end if @teleop_depot_artifacts.nil? invalid_properties.push('invalid value for "teleop_depot_artifacts", teleop_depot_artifacts cannot be nil.') end if @teleop_classifier_state.nil? invalid_properties.push('invalid value for "teleop_classifier_state", teleop_classifier_state cannot be nil.') end if @minor_fouls.nil? invalid_properties.push('invalid value for "minor_fouls", minor_fouls cannot be nil.') end if @major_fouls.nil? invalid_properties.push('invalid value for "major_fouls", major_fouls cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
458 459 460 461 462 463 464 465 466 467 468 469 470 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 458 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
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/ftc_api_v3_client/models/api_v3_decode_achievements_detail.rb', line 275 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @auto_classified_artifacts.nil? return false if @auto_overflow_artifacts.nil? return false if @auto_classifier_state.nil? return false if @robot1_auto.nil? return false if @robot2_auto.nil? return false if @teleop_classified_artifacts.nil? return false if @teleop_overflow_artifacts.nil? return false if @teleop_depot_artifacts.nil? return false if @teleop_classifier_state.nil? return false if @minor_fouls.nil? return false if @major_fouls.nil? true end |