UNPKG

upstox-js-sdk

Version:

The official Node Js client for communicating with the Upstox API

74 lines (67 loc) 2.24 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Pagination = void 0; var _ApiClient = require("../ApiClient"); /* * OpenAPI definition * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * OpenAPI spec version: v0 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * * Swagger Codegen version: 3.0.79 * * Do not edit the class manually. * */ /** * The Pagination model module. * @module model/Pagination * @version v0 */ class Pagination { /** * Constructs a new <code>Pagination</code>. * @alias module:model/Pagination * @class */ constructor() {} /** * Constructs a <code>Pagination</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/Pagination} obj Optional instance to populate. * @return {module:model/Pagination} The populated <code>Pagination</code> instance. */ static constructFromObject(data, obj) { if (data) { obj = obj || new Pagination(); if (data.hasOwnProperty('page_number')) obj.pageNumber = _ApiClient.ApiClient.convertToType(data['page_number'], Object); if (data.hasOwnProperty('total_pages')) obj.totalPages = _ApiClient.ApiClient.convertToType(data['total_pages'], Object); if (data.hasOwnProperty('records')) obj.records = _ApiClient.ApiClient.convertToType(data['records'], Object); if (data.hasOwnProperty('total_records')) obj.totalRecords = _ApiClient.ApiClient.convertToType(data['total_records'], Object); } return obj; } } /** * @member {Object} pageNumber */ exports.Pagination = Pagination; Pagination.prototype.pageNumber = undefined; /** * @member {Object} totalPages */ Pagination.prototype.totalPages = undefined; /** * @member {Object} records */ Pagination.prototype.records = undefined; /** * @member {Object} totalRecords */ Pagination.prototype.totalRecords = undefined;