UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
68 lines (67 loc) 2.73 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * AskNews API * AskNews API [![status](https://status.asknews.app/api/badge/2/status?style=for-the-badge)](https://status.asknews.app/status/prod) * * The version of the OpenAPI document: 0.24.22 * 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.ReadDomainResponseToJSONTyped = exports.ReadDomainResponseToJSON = exports.ReadDomainResponseFromJSONTyped = exports.ReadDomainResponseFromJSON = exports.instanceOfReadDomainResponse = void 0; /** * Check if a given object implements the ReadDomainResponse interface. */ function instanceOfReadDomainResponse(value) { if (!('id' in value) || value['id'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; if (!('createdAt' in value) || value['createdAt'] === undefined) return false; return true; } exports.instanceOfReadDomainResponse = instanceOfReadDomainResponse; function ReadDomainResponseFromJSON(json) { return ReadDomainResponseFromJSONTyped(json, false); } exports.ReadDomainResponseFromJSON = ReadDomainResponseFromJSON; function ReadDomainResponseFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'id': json['id'], 'name': json['name'], 'owner': json['owner'] == null ? undefined : json['owner'], 'isTollbit': json['is_tollbit'] == null ? undefined : json['is_tollbit'], 'publisher': json['publisher'] == null ? undefined : json['publisher'], 'createdAt': (new Date(json['created_at'])), 'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), }; } exports.ReadDomainResponseFromJSONTyped = ReadDomainResponseFromJSONTyped; function ReadDomainResponseToJSON(json) { return ReadDomainResponseToJSONTyped(json, false); } exports.ReadDomainResponseToJSON = ReadDomainResponseToJSON; function ReadDomainResponseToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'id': value['id'], 'name': value['name'], 'owner': value['owner'], 'is_tollbit': value['isTollbit'], 'publisher': value['publisher'], 'created_at': ((value['createdAt']).toISOString()), 'updated_at': value['updatedAt'] == null ? undefined : (value['updatedAt'].toISOString()), }; } exports.ReadDomainResponseToJSONTyped = ReadDomainResponseToJSONTyped;