@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_
120 lines (111 loc) • 5.75 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
var _WLTRecord = _interopRequireDefault(require("./WLTRecord"));
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 TeamEventStatusRankRanking model module.
* @module model/TeamEventStatusRankRanking
* @version 3.8.0
*/
var TeamEventStatusRankRanking = /*#__PURE__*/function () {
/**
* Constructs a new <code>TeamEventStatusRankRanking</code>.
* @alias module:model/TeamEventStatusRankRanking
*/
function TeamEventStatusRankRanking() {
_classCallCheck(this, TeamEventStatusRankRanking);
TeamEventStatusRankRanking.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(TeamEventStatusRankRanking, null, [{
key: "initialize",
value: function initialize(obj) {}
/**
* Constructs a <code>TeamEventStatusRankRanking</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/TeamEventStatusRankRanking} obj Optional instance to populate.
* @return {module:model/TeamEventStatusRankRanking} The populated <code>TeamEventStatusRankRanking</code> instance.
*/
}, {
key: "constructFromObject",
value: function constructFromObject(data, obj) {
if (data) {
obj = obj || new TeamEventStatusRankRanking();
if (data.hasOwnProperty('matches_played')) {
obj['matches_played'] = _ApiClient["default"].convertToType(data['matches_played'], 'Number');
}
if (data.hasOwnProperty('qual_average')) {
obj['qual_average'] = _ApiClient["default"].convertToType(data['qual_average'], 'Number');
}
if (data.hasOwnProperty('sort_orders')) {
obj['sort_orders'] = _ApiClient["default"].convertToType(data['sort_orders'], ['Number']);
}
if (data.hasOwnProperty('record')) {
obj['record'] = _WLTRecord["default"].constructFromObject(data['record']);
}
if (data.hasOwnProperty('rank')) {
obj['rank'] = _ApiClient["default"].convertToType(data['rank'], 'Number');
}
if (data.hasOwnProperty('dq')) {
obj['dq'] = _ApiClient["default"].convertToType(data['dq'], 'Number');
}
if (data.hasOwnProperty('team_key')) {
obj['team_key'] = _ApiClient["default"].convertToType(data['team_key'], 'String');
}
}
return obj;
}
}]);
return TeamEventStatusRankRanking;
}();
/**
* Number of matches played.
* @member {Number} matches_played
*/
TeamEventStatusRankRanking.prototype['matches_played'] = undefined;
/**
* For some years, average qualification score. Can be null.
* @member {Number} qual_average
*/
TeamEventStatusRankRanking.prototype['qual_average'] = undefined;
/**
* Ordered list of values used to determine the rank. See the `sort_order_info` property for the name of each value.
* @member {Array.<Number>} sort_orders
*/
TeamEventStatusRankRanking.prototype['sort_orders'] = undefined;
/**
* @member {module:model/WLTRecord} record
*/
TeamEventStatusRankRanking.prototype['record'] = undefined;
/**
* Relative rank of this team.
* @member {Number} rank
*/
TeamEventStatusRankRanking.prototype['rank'] = undefined;
/**
* Number of matches the team was disqualified for.
* @member {Number} dq
*/
TeamEventStatusRankRanking.prototype['dq'] = undefined;
/**
* TBA team key for this rank.
* @member {String} team_key
*/
TeamEventStatusRankRanking.prototype['team_key'] = undefined;
var _default = TeamEventStatusRankRanking;
exports["default"] = _default;