@brayjamin/tba-api-v3client
Version:
_Overview__Information_and_statistics_about_FIRST_Robotics_Competition_teams_and_events___Authentication_All_endpoints_require_an_Auth_Key_to_be_passed_in_the_header_X_TBA_Auth_Key__If_you_do_not_have_an_auth_key_yet_you_can_obtain_one_from_your__Account_
336 lines (303 loc) • 14.8 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
/**
* The MatchTimeseries2018 model module.
* @module model/MatchTimeseries2018
* @version 3.8.0
*/
var MatchTimeseries2018 = /*#__PURE__*/function () {
/**
* Constructs a new <code>MatchTimeseries2018</code>.
* Timeseries data for the 2018 game *FIRST* POWER UP. *WARNING:* This is *not* official data, and is subject to a significant possibility of error, or missing data. Do not rely on this data for any purpose. In fact, pretend we made it up. *WARNING:* This model is currently under active development and may change at any time, including in breaking ways.
* @alias module:model/MatchTimeseries2018
*/
function MatchTimeseries2018() {
_classCallCheck(this, MatchTimeseries2018);
MatchTimeseries2018.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
_createClass(MatchTimeseries2018, null, [{
key: "initialize",
value: function initialize(obj) {}
/**
* Constructs a <code>MatchTimeseries2018</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/MatchTimeseries2018} obj Optional instance to populate.
* @return {module:model/MatchTimeseries2018} The populated <code>MatchTimeseries2018</code> instance.
*/
}, {
key: "constructFromObject",
value: function constructFromObject(data, obj) {
if (data) {
obj = obj || new MatchTimeseries2018();
if (data.hasOwnProperty('event_key')) {
obj['event_key'] = _ApiClient["default"].convertToType(data['event_key'], 'String');
}
if (data.hasOwnProperty('match_id')) {
obj['match_id'] = _ApiClient["default"].convertToType(data['match_id'], 'String');
}
if (data.hasOwnProperty('mode')) {
obj['mode'] = _ApiClient["default"].convertToType(data['mode'], 'String');
}
if (data.hasOwnProperty('play')) {
obj['play'] = _ApiClient["default"].convertToType(data['play'], 'Number');
}
if (data.hasOwnProperty('time_remaining')) {
obj['time_remaining'] = _ApiClient["default"].convertToType(data['time_remaining'], 'Number');
}
if (data.hasOwnProperty('blue_auto_quest')) {
obj['blue_auto_quest'] = _ApiClient["default"].convertToType(data['blue_auto_quest'], 'Number');
}
if (data.hasOwnProperty('blue_boost_count')) {
obj['blue_boost_count'] = _ApiClient["default"].convertToType(data['blue_boost_count'], 'Number');
}
if (data.hasOwnProperty('blue_boost_played')) {
obj['blue_boost_played'] = _ApiClient["default"].convertToType(data['blue_boost_played'], 'Number');
}
if (data.hasOwnProperty('blue_current_powerup')) {
obj['blue_current_powerup'] = _ApiClient["default"].convertToType(data['blue_current_powerup'], 'String');
}
if (data.hasOwnProperty('blue_face_the_boss')) {
obj['blue_face_the_boss'] = _ApiClient["default"].convertToType(data['blue_face_the_boss'], 'Number');
}
if (data.hasOwnProperty('blue_force_count')) {
obj['blue_force_count'] = _ApiClient["default"].convertToType(data['blue_force_count'], 'Number');
}
if (data.hasOwnProperty('blue_force_played')) {
obj['blue_force_played'] = _ApiClient["default"].convertToType(data['blue_force_played'], 'Number');
}
if (data.hasOwnProperty('blue_levitate_count')) {
obj['blue_levitate_count'] = _ApiClient["default"].convertToType(data['blue_levitate_count'], 'Number');
}
if (data.hasOwnProperty('blue_levitate_played')) {
obj['blue_levitate_played'] = _ApiClient["default"].convertToType(data['blue_levitate_played'], 'Number');
}
if (data.hasOwnProperty('blue_powerup_time_remaining')) {
obj['blue_powerup_time_remaining'] = _ApiClient["default"].convertToType(data['blue_powerup_time_remaining'], 'String');
}
if (data.hasOwnProperty('blue_scale_owned')) {
obj['blue_scale_owned'] = _ApiClient["default"].convertToType(data['blue_scale_owned'], 'Number');
}
if (data.hasOwnProperty('blue_score')) {
obj['blue_score'] = _ApiClient["default"].convertToType(data['blue_score'], 'Number');
}
if (data.hasOwnProperty('blue_switch_owned')) {
obj['blue_switch_owned'] = _ApiClient["default"].convertToType(data['blue_switch_owned'], 'Number');
}
if (data.hasOwnProperty('red_auto_quest')) {
obj['red_auto_quest'] = _ApiClient["default"].convertToType(data['red_auto_quest'], 'Number');
}
if (data.hasOwnProperty('red_boost_count')) {
obj['red_boost_count'] = _ApiClient["default"].convertToType(data['red_boost_count'], 'Number');
}
if (data.hasOwnProperty('red_boost_played')) {
obj['red_boost_played'] = _ApiClient["default"].convertToType(data['red_boost_played'], 'Number');
}
if (data.hasOwnProperty('red_current_powerup')) {
obj['red_current_powerup'] = _ApiClient["default"].convertToType(data['red_current_powerup'], 'String');
}
if (data.hasOwnProperty('red_face_the_boss')) {
obj['red_face_the_boss'] = _ApiClient["default"].convertToType(data['red_face_the_boss'], 'Number');
}
if (data.hasOwnProperty('red_force_count')) {
obj['red_force_count'] = _ApiClient["default"].convertToType(data['red_force_count'], 'Number');
}
if (data.hasOwnProperty('red_force_played')) {
obj['red_force_played'] = _ApiClient["default"].convertToType(data['red_force_played'], 'Number');
}
if (data.hasOwnProperty('red_levitate_count')) {
obj['red_levitate_count'] = _ApiClient["default"].convertToType(data['red_levitate_count'], 'Number');
}
if (data.hasOwnProperty('red_levitate_played')) {
obj['red_levitate_played'] = _ApiClient["default"].convertToType(data['red_levitate_played'], 'Number');
}
if (data.hasOwnProperty('red_powerup_time_remaining')) {
obj['red_powerup_time_remaining'] = _ApiClient["default"].convertToType(data['red_powerup_time_remaining'], 'String');
}
if (data.hasOwnProperty('red_scale_owned')) {
obj['red_scale_owned'] = _ApiClient["default"].convertToType(data['red_scale_owned'], 'Number');
}
if (data.hasOwnProperty('red_score')) {
obj['red_score'] = _ApiClient["default"].convertToType(data['red_score'], 'Number');
}
if (data.hasOwnProperty('red_switch_owned')) {
obj['red_switch_owned'] = _ApiClient["default"].convertToType(data['red_switch_owned'], 'Number');
}
}
return obj;
}
}]);
return MatchTimeseries2018;
}();
/**
* TBA event key with the format yyyy[EVENT_CODE], where yyyy is the year, and EVENT_CODE is the event code of the event.
* @member {String} event_key
*/
MatchTimeseries2018.prototype['event_key'] = undefined;
/**
* Match ID consisting of the level, match number, and set number, eg `qm45` or `f1m1`.
* @member {String} match_id
*/
MatchTimeseries2018.prototype['match_id'] = undefined;
/**
* Current mode of play, can be `pre_match`, `auto`, `telop`, or `post_match`.
* @member {String} mode
*/
MatchTimeseries2018.prototype['mode'] = undefined;
/**
* @member {Number} play
*/
MatchTimeseries2018.prototype['play'] = undefined;
/**
* Amount of time remaining in the match, only valid during `auto` and `teleop` modes.
* @member {Number} time_remaining
*/
MatchTimeseries2018.prototype['time_remaining'] = undefined;
/**
* 1 if the blue alliance is credited with the AUTO QUEST, 0 if not.
* @member {Number} blue_auto_quest
*/
MatchTimeseries2018.prototype['blue_auto_quest'] = undefined;
/**
* Number of POWER CUBES in the BOOST section of the blue alliance VAULT.
* @member {Number} blue_boost_count
*/
MatchTimeseries2018.prototype['blue_boost_count'] = undefined;
/**
* Returns 1 if the blue alliance BOOST was played, or 0 if not played.
* @member {Number} blue_boost_played
*/
MatchTimeseries2018.prototype['blue_boost_played'] = undefined;
/**
* Name of the current blue alliance POWER UP being played, or `null`.
* @member {String} blue_current_powerup
*/
MatchTimeseries2018.prototype['blue_current_powerup'] = undefined;
/**
* 1 if the blue alliance is credited with FACING THE BOSS, 0 if not.
* @member {Number} blue_face_the_boss
*/
MatchTimeseries2018.prototype['blue_face_the_boss'] = undefined;
/**
* Number of POWER CUBES in the FORCE section of the blue alliance VAULT.
* @member {Number} blue_force_count
*/
MatchTimeseries2018.prototype['blue_force_count'] = undefined;
/**
* Returns 1 if the blue alliance FORCE was played, or 0 if not played.
* @member {Number} blue_force_played
*/
MatchTimeseries2018.prototype['blue_force_played'] = undefined;
/**
* Number of POWER CUBES in the LEVITATE section of the blue alliance VAULT.
* @member {Number} blue_levitate_count
*/
MatchTimeseries2018.prototype['blue_levitate_count'] = undefined;
/**
* Returns 1 if the blue alliance LEVITATE was played, or 0 if not played.
* @member {Number} blue_levitate_played
*/
MatchTimeseries2018.prototype['blue_levitate_played'] = undefined;
/**
* Number of seconds remaining in the blue alliance POWER UP time, or 0 if none is active.
* @member {String} blue_powerup_time_remaining
*/
MatchTimeseries2018.prototype['blue_powerup_time_remaining'] = undefined;
/**
* 1 if the blue alliance owns the SCALE, 0 if not.
* @member {Number} blue_scale_owned
*/
MatchTimeseries2018.prototype['blue_scale_owned'] = undefined;
/**
* Current score for the blue alliance.
* @member {Number} blue_score
*/
MatchTimeseries2018.prototype['blue_score'] = undefined;
/**
* 1 if the blue alliance owns their SWITCH, 0 if not.
* @member {Number} blue_switch_owned
*/
MatchTimeseries2018.prototype['blue_switch_owned'] = undefined;
/**
* 1 if the red alliance is credited with the AUTO QUEST, 0 if not.
* @member {Number} red_auto_quest
*/
MatchTimeseries2018.prototype['red_auto_quest'] = undefined;
/**
* Number of POWER CUBES in the BOOST section of the red alliance VAULT.
* @member {Number} red_boost_count
*/
MatchTimeseries2018.prototype['red_boost_count'] = undefined;
/**
* Returns 1 if the red alliance BOOST was played, or 0 if not played.
* @member {Number} red_boost_played
*/
MatchTimeseries2018.prototype['red_boost_played'] = undefined;
/**
* Name of the current red alliance POWER UP being played, or `null`.
* @member {String} red_current_powerup
*/
MatchTimeseries2018.prototype['red_current_powerup'] = undefined;
/**
* 1 if the red alliance is credited with FACING THE BOSS, 0 if not.
* @member {Number} red_face_the_boss
*/
MatchTimeseries2018.prototype['red_face_the_boss'] = undefined;
/**
* Number of POWER CUBES in the FORCE section of the red alliance VAULT.
* @member {Number} red_force_count
*/
MatchTimeseries2018.prototype['red_force_count'] = undefined;
/**
* Returns 1 if the red alliance FORCE was played, or 0 if not played.
* @member {Number} red_force_played
*/
MatchTimeseries2018.prototype['red_force_played'] = undefined;
/**
* Number of POWER CUBES in the LEVITATE section of the red alliance VAULT.
* @member {Number} red_levitate_count
*/
MatchTimeseries2018.prototype['red_levitate_count'] = undefined;
/**
* Returns 1 if the red alliance LEVITATE was played, or 0 if not played.
* @member {Number} red_levitate_played
*/
MatchTimeseries2018.prototype['red_levitate_played'] = undefined;
/**
* Number of seconds remaining in the red alliance POWER UP time, or 0 if none is active.
* @member {String} red_powerup_time_remaining
*/
MatchTimeseries2018.prototype['red_powerup_time_remaining'] = undefined;
/**
* 1 if the red alliance owns the SCALE, 0 if not.
* @member {Number} red_scale_owned
*/
MatchTimeseries2018.prototype['red_scale_owned'] = undefined;
/**
* Current score for the red alliance.
* @member {Number} red_score
*/
MatchTimeseries2018.prototype['red_score'] = undefined;
/**
* 1 if the red alliance owns their SWITCH, 0 if not.
* @member {Number} red_switch_owned
*/
MatchTimeseries2018.prototype['red_switch_owned'] = undefined;
var _default = MatchTimeseries2018;
exports["default"] = _default;