@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_
135 lines (126 loc) • 6.79 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 DistrictRankingEventPoints model module.
* @module model/DistrictRankingEventPoints
* @version 3.8.0
*/
var DistrictRankingEventPoints = /*#__PURE__*/function () {
/**
* Constructs a new <code>DistrictRankingEventPoints</code>.
* @alias module:model/DistrictRankingEventPoints
* @param districtCmp {Boolean} `true` if this event is a District Championship event.
* @param total {Number} Total points awarded at this event.
* @param alliancePoints {Number} Points awarded for alliance selection.
* @param elimPoints {Number} Points awarded for elimination match performance.
* @param awardPoints {Number} Points awarded for event awards.
* @param eventKey {String} TBA Event key for this event.
* @param qualPoints {Number} Points awarded for qualification match performance.
*/
function DistrictRankingEventPoints(districtCmp, total, alliancePoints, elimPoints, awardPoints, eventKey, qualPoints) {
_classCallCheck(this, DistrictRankingEventPoints);
DistrictRankingEventPoints.initialize(this, districtCmp, total, alliancePoints, elimPoints, awardPoints, eventKey, qualPoints);
}
/**
* 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(DistrictRankingEventPoints, null, [{
key: "initialize",
value: function initialize(obj, districtCmp, total, alliancePoints, elimPoints, awardPoints, eventKey, qualPoints) {
obj['district_cmp'] = districtCmp;
obj['total'] = total;
obj['alliance_points'] = alliancePoints;
obj['elim_points'] = elimPoints;
obj['award_points'] = awardPoints;
obj['event_key'] = eventKey;
obj['qual_points'] = qualPoints;
}
/**
* Constructs a <code>DistrictRankingEventPoints</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/DistrictRankingEventPoints} obj Optional instance to populate.
* @return {module:model/DistrictRankingEventPoints} The populated <code>DistrictRankingEventPoints</code> instance.
*/
}, {
key: "constructFromObject",
value: function constructFromObject(data, obj) {
if (data) {
obj = obj || new DistrictRankingEventPoints();
if (data.hasOwnProperty('district_cmp')) {
obj['district_cmp'] = _ApiClient["default"].convertToType(data['district_cmp'], 'Boolean');
}
if (data.hasOwnProperty('total')) {
obj['total'] = _ApiClient["default"].convertToType(data['total'], 'Number');
}
if (data.hasOwnProperty('alliance_points')) {
obj['alliance_points'] = _ApiClient["default"].convertToType(data['alliance_points'], 'Number');
}
if (data.hasOwnProperty('elim_points')) {
obj['elim_points'] = _ApiClient["default"].convertToType(data['elim_points'], 'Number');
}
if (data.hasOwnProperty('award_points')) {
obj['award_points'] = _ApiClient["default"].convertToType(data['award_points'], 'Number');
}
if (data.hasOwnProperty('event_key')) {
obj['event_key'] = _ApiClient["default"].convertToType(data['event_key'], 'String');
}
if (data.hasOwnProperty('qual_points')) {
obj['qual_points'] = _ApiClient["default"].convertToType(data['qual_points'], 'Number');
}
}
return obj;
}
}]);
return DistrictRankingEventPoints;
}();
/**
* `true` if this event is a District Championship event.
* @member {Boolean} district_cmp
*/
DistrictRankingEventPoints.prototype['district_cmp'] = undefined;
/**
* Total points awarded at this event.
* @member {Number} total
*/
DistrictRankingEventPoints.prototype['total'] = undefined;
/**
* Points awarded for alliance selection.
* @member {Number} alliance_points
*/
DistrictRankingEventPoints.prototype['alliance_points'] = undefined;
/**
* Points awarded for elimination match performance.
* @member {Number} elim_points
*/
DistrictRankingEventPoints.prototype['elim_points'] = undefined;
/**
* Points awarded for event awards.
* @member {Number} award_points
*/
DistrictRankingEventPoints.prototype['award_points'] = undefined;
/**
* TBA Event key for this event.
* @member {String} event_key
*/
DistrictRankingEventPoints.prototype['event_key'] = undefined;
/**
* Points awarded for qualification match performance.
* @member {Number} qual_points
*/
DistrictRankingEventPoints.prototype['qual_points'] = undefined;
var _default = DistrictRankingEventPoints;
exports["default"] = _default;