@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_
123 lines (115 loc) • 6.07 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
var _APIStatusAppVersion = _interopRequireDefault(require("./APIStatusAppVersion"));
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 APIStatus model module.
* @module model/APIStatus
* @version 3.8.0
*/
var APIStatus = /*#__PURE__*/function () {
/**
* Constructs a new <code>APIStatus</code>.
* @alias module:model/APIStatus
* @param currentSeason {Number} Year of the current FRC season.
* @param maxSeason {Number} Maximum FRC season year for valid queries.
* @param isDatafeedDown {Boolean} True if the entire FMS API provided by FIRST is down.
* @param downEvents {Array.<String>} An array of strings containing event keys of any active events that are no longer updating.
* @param ios {module:model/APIStatusAppVersion}
* @param android {module:model/APIStatusAppVersion}
*/
function APIStatus(currentSeason, maxSeason, isDatafeedDown, downEvents, ios, android) {
_classCallCheck(this, APIStatus);
APIStatus.initialize(this, currentSeason, maxSeason, isDatafeedDown, downEvents, ios, android);
}
/**
* 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(APIStatus, null, [{
key: "initialize",
value: function initialize(obj, currentSeason, maxSeason, isDatafeedDown, downEvents, ios, android) {
obj['current_season'] = currentSeason;
obj['max_season'] = maxSeason;
obj['is_datafeed_down'] = isDatafeedDown;
obj['down_events'] = downEvents;
obj['ios'] = ios;
obj['android'] = android;
}
/**
* Constructs a <code>APIStatus</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/APIStatus} obj Optional instance to populate.
* @return {module:model/APIStatus} The populated <code>APIStatus</code> instance.
*/
}, {
key: "constructFromObject",
value: function constructFromObject(data, obj) {
if (data) {
obj = obj || new APIStatus();
if (data.hasOwnProperty('current_season')) {
obj['current_season'] = _ApiClient["default"].convertToType(data['current_season'], 'Number');
}
if (data.hasOwnProperty('max_season')) {
obj['max_season'] = _ApiClient["default"].convertToType(data['max_season'], 'Number');
}
if (data.hasOwnProperty('is_datafeed_down')) {
obj['is_datafeed_down'] = _ApiClient["default"].convertToType(data['is_datafeed_down'], 'Boolean');
}
if (data.hasOwnProperty('down_events')) {
obj['down_events'] = _ApiClient["default"].convertToType(data['down_events'], ['String']);
}
if (data.hasOwnProperty('ios')) {
obj['ios'] = _APIStatusAppVersion["default"].constructFromObject(data['ios']);
}
if (data.hasOwnProperty('android')) {
obj['android'] = _APIStatusAppVersion["default"].constructFromObject(data['android']);
}
}
return obj;
}
}]);
return APIStatus;
}();
/**
* Year of the current FRC season.
* @member {Number} current_season
*/
APIStatus.prototype['current_season'] = undefined;
/**
* Maximum FRC season year for valid queries.
* @member {Number} max_season
*/
APIStatus.prototype['max_season'] = undefined;
/**
* True if the entire FMS API provided by FIRST is down.
* @member {Boolean} is_datafeed_down
*/
APIStatus.prototype['is_datafeed_down'] = undefined;
/**
* An array of strings containing event keys of any active events that are no longer updating.
* @member {Array.<String>} down_events
*/
APIStatus.prototype['down_events'] = undefined;
/**
* @member {module:model/APIStatusAppVersion} ios
*/
APIStatus.prototype['ios'] = undefined;
/**
* @member {module:model/APIStatusAppVersion} android
*/
APIStatus.prototype['android'] = undefined;
var _default = APIStatus;
exports["default"] = _default;