UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
65 lines (64 loc) 2.81 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * AskNews API * AskNews API * * The version of the OpenAPI document: 0.21.1 * Contact: contact@emergentmethods.ai * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.PaginatedResponseReadDomainResponseToJSONTyped = exports.PaginatedResponseReadDomainResponseToJSON = exports.PaginatedResponseReadDomainResponseFromJSONTyped = exports.PaginatedResponseReadDomainResponseFromJSON = exports.instanceOfPaginatedResponseReadDomainResponse = void 0; const ReadDomainResponse_1 = require("./ReadDomainResponse"); /** * Check if a given object implements the PaginatedResponseReadDomainResponse interface. */ function instanceOfPaginatedResponseReadDomainResponse(value) { if (!('items' in value) || value['items'] === undefined) return false; if (!('count' in value) || value['count'] === undefined) return false; if (!('nextPage' in value) || value['nextPage'] === undefined) return false; if (!('previousPage' in value) || value['previousPage'] === undefined) return false; return true; } exports.instanceOfPaginatedResponseReadDomainResponse = instanceOfPaginatedResponseReadDomainResponse; function PaginatedResponseReadDomainResponseFromJSON(json) { return PaginatedResponseReadDomainResponseFromJSONTyped(json, false); } exports.PaginatedResponseReadDomainResponseFromJSON = PaginatedResponseReadDomainResponseFromJSON; function PaginatedResponseReadDomainResponseFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'items': (json['items'].map(ReadDomainResponse_1.ReadDomainResponseFromJSON)), 'count': json['count'], 'nextPage': json['next_page'], 'previousPage': json['previous_page'], }; } exports.PaginatedResponseReadDomainResponseFromJSONTyped = PaginatedResponseReadDomainResponseFromJSONTyped; function PaginatedResponseReadDomainResponseToJSON(json) { return PaginatedResponseReadDomainResponseToJSONTyped(json, false); } exports.PaginatedResponseReadDomainResponseToJSON = PaginatedResponseReadDomainResponseToJSON; function PaginatedResponseReadDomainResponseToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'items': (value['items'].map(ReadDomainResponse_1.ReadDomainResponseToJSON)), 'count': value['count'], 'next_page': value['nextPage'], 'previous_page': value['previousPage'], }; } exports.PaginatedResponseReadDomainResponseToJSONTyped = PaginatedResponseReadDomainResponseToJSONTyped;