UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
65 lines (64 loc) 2.64 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.ResendBroadcastParamsToJSONTyped = exports.ResendBroadcastParamsToJSON = exports.ResendBroadcastParamsFromJSONTyped = exports.ResendBroadcastParamsFromJSON = exports.instanceOfResendBroadcastParams = void 0; const ReplyTo_1 = require("./ReplyTo"); /** * Check if a given object implements the ResendBroadcastParams interface. */ function instanceOfResendBroadcastParams(value) { if (!('sender' in value) || value['sender'] === undefined) return false; if (!('audienceId' in value) || value['audienceId'] === undefined) return false; if (!('resendApiKey' in value) || value['resendApiKey'] === undefined) return false; return true; } exports.instanceOfResendBroadcastParams = instanceOfResendBroadcastParams; function ResendBroadcastParamsFromJSON(json) { return ResendBroadcastParamsFromJSONTyped(json, false); } exports.ResendBroadcastParamsFromJSON = ResendBroadcastParamsFromJSON; function ResendBroadcastParamsFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'sender': json['sender'], 'replyTo': json['reply_to'] == null ? undefined : (0, ReplyTo_1.ReplyToFromJSON)(json['reply_to']), 'subject': json['subject'] == null ? undefined : json['subject'], 'audienceId': json['audience_id'], 'resendApiKey': json['resend_api_key'], }; } exports.ResendBroadcastParamsFromJSONTyped = ResendBroadcastParamsFromJSONTyped; function ResendBroadcastParamsToJSON(json) { return ResendBroadcastParamsToJSONTyped(json, false); } exports.ResendBroadcastParamsToJSON = ResendBroadcastParamsToJSON; function ResendBroadcastParamsToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'sender': value['sender'], 'reply_to': (0, ReplyTo_1.ReplyToToJSON)(value['replyTo']), 'subject': value['subject'], 'audience_id': value['audienceId'], 'resend_api_key': value['resendApiKey'], }; } exports.ResendBroadcastParamsToJSONTyped = ResendBroadcastParamsToJSONTyped;