@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_
158 lines (149 loc) • 6.07 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 TeamEventStatusPlayoff model module.
* @module model/TeamEventStatusPlayoff
* @version 3.8.0
*/
var TeamEventStatusPlayoff = /*#__PURE__*/function () {
/**
* Constructs a new <code>TeamEventStatusPlayoff</code>.
* Playoff status for this team, may be null if the team did not make playoffs, or playoffs have not begun.
* @alias module:model/TeamEventStatusPlayoff
*/
function TeamEventStatusPlayoff() {
_classCallCheck(this, TeamEventStatusPlayoff);
TeamEventStatusPlayoff.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(TeamEventStatusPlayoff, null, [{
key: "initialize",
value: function initialize(obj) {}
/**
* Constructs a <code>TeamEventStatusPlayoff</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/TeamEventStatusPlayoff} obj Optional instance to populate.
* @return {module:model/TeamEventStatusPlayoff} The populated <code>TeamEventStatusPlayoff</code> instance.
*/
}, {
key: "constructFromObject",
value: function constructFromObject(data, obj) {
if (data) {
obj = obj || new TeamEventStatusPlayoff();
if (data.hasOwnProperty('level')) {
obj['level'] = _ApiClient["default"].convertToType(data['level'], 'String');
}
if (data.hasOwnProperty('current_level_record')) {
obj['current_level_record'] = _WLTRecord["default"].constructFromObject(data['current_level_record']);
}
if (data.hasOwnProperty('record')) {
obj['record'] = _WLTRecord["default"].constructFromObject(data['record']);
}
if (data.hasOwnProperty('status')) {
obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
}
if (data.hasOwnProperty('playoff_average')) {
obj['playoff_average'] = _ApiClient["default"].convertToType(data['playoff_average'], 'Number');
}
}
return obj;
}
}]);
return TeamEventStatusPlayoff;
}();
/**
* The highest playoff level the team reached.
* @member {module:model/TeamEventStatusPlayoff.LevelEnum} level
*/
TeamEventStatusPlayoff.prototype['level'] = undefined;
/**
* @member {module:model/WLTRecord} current_level_record
*/
TeamEventStatusPlayoff.prototype['current_level_record'] = undefined;
/**
* @member {module:model/WLTRecord} record
*/
TeamEventStatusPlayoff.prototype['record'] = undefined;
/**
* Current competition status for the playoffs.
* @member {module:model/TeamEventStatusPlayoff.StatusEnum} status
*/
TeamEventStatusPlayoff.prototype['status'] = undefined;
/**
* The average match score during playoffs. Year specific. May be null if not relevant for a given year.
* @member {Number} playoff_average
*/
TeamEventStatusPlayoff.prototype['playoff_average'] = undefined;
/**
* Allowed values for the <code>level</code> property.
* @enum {String}
* @readonly
*/
TeamEventStatusPlayoff['LevelEnum'] = {
/**
* value: "qm"
* @const
*/
"qm": "qm",
/**
* value: "ef"
* @const
*/
"ef": "ef",
/**
* value: "qf"
* @const
*/
"qf": "qf",
/**
* value: "sf"
* @const
*/
"sf": "sf",
/**
* value: "f"
* @const
*/
"f": "f"
};
/**
* Allowed values for the <code>status</code> property.
* @enum {String}
* @readonly
*/
TeamEventStatusPlayoff['StatusEnum'] = {
/**
* value: "won"
* @const
*/
"won": "won",
/**
* value: "eliminated"
* @const
*/
"eliminated": "eliminated",
/**
* value: "playing"
* @const
*/
"playing": "playing"
};
var _default = TeamEventStatusPlayoff;
exports["default"] = _default;