/* tslint:disable */ /* eslint-disable */ /** * MailSlurp API * MailSlurp is an API for sending and receiving emails and SMS from dynamically allocated email addresses and phone numbers. It\'s designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository * * The version of the OpenAPI document: 6.5.2 * Contact: contact@mailslurp.dev * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { exists, mapValues } from '../runtime'; import { PhoneProvisioningJobItemDto, PhoneProvisioningJobItemDtoFromJSON, PhoneProvisioningJobItemDtoFromJSONTyped, PhoneProvisioningJobItemDtoToJSON, } from './'; /** * * @export * @interface PhoneProvisioningJobDto */ export interface PhoneProvisioningJobDto { /** * * @type {string} * @memberof PhoneProvisioningJobDto */ id: string; /** * * @type {string} * @memberof PhoneProvisioningJobDto */ userId: string; /** * * @type {string} * @memberof PhoneProvisioningJobDto */ phoneCountry: PhoneProvisioningJobDtoPhoneCountryEnum; /** * * @type {string} * @memberof PhoneProvisioningJobDto */ phoneVariant?: PhoneProvisioningJobDtoPhoneVariantEnum; /** * * @type {string} * @memberof PhoneProvisioningJobDto */ status: PhoneProvisioningJobDtoStatusEnum; /** * * @type {number} * @memberof PhoneProvisioningJobDto */ requestedCount: number; /** * * @type {number} * @memberof PhoneProvisioningJobDto */ attemptedCount: number; /** * * @type {number} * @memberof PhoneProvisioningJobDto */ succeededCount: number; /** * * @type {number} * @memberof PhoneProvisioningJobDto */ failedCount: number; /** * * @type {number} * @memberof PhoneProvisioningJobDto */ unavailableCount: number; /** * * @type {Date} * @memberof PhoneProvisioningJobDto */ createdAt: Date; /** * * @type {Date} * @memberof PhoneProvisioningJobDto */ updatedAt: Date; /** * * @type {Array} * @memberof PhoneProvisioningJobDto */ items: Array; } /** * @export * @enum {string} */ export enum PhoneProvisioningJobDtoPhoneCountryEnum { US = 'US', GB = 'GB', AU = 'AU', CA = 'CA', EE = 'EE', HK = 'HK', PL = 'PL', PT = 'PT', NL = 'NL', IL = 'IL', FI = 'FI', SE = 'SE', } /** * @export * @enum {string} */ export enum PhoneProvisioningJobDtoPhoneVariantEnum { LOCAL = 'LOCAL', MOBILE = 'MOBILE', TOLL_FREE = 'TOLL_FREE', } /** * @export * @enum {string} */ export enum PhoneProvisioningJobDtoStatusEnum { CREATED = 'CREATED', RUNNING = 'RUNNING', COMPLETED = 'COMPLETED', PARTIAL = 'PARTIAL', FAILED = 'FAILED', } export function PhoneProvisioningJobDtoFromJSON( json: any ): PhoneProvisioningJobDto { return PhoneProvisioningJobDtoFromJSONTyped(json, false); } export function PhoneProvisioningJobDtoFromJSONTyped( json: any, ignoreDiscriminator: boolean ): PhoneProvisioningJobDto { if (json === undefined || json === null) { return json; } return { id: json['id'], userId: json['userId'], phoneCountry: json['phoneCountry'], phoneVariant: !exists(json, 'phoneVariant') ? undefined : json['phoneVariant'], status: json['status'], requestedCount: json['requestedCount'], attemptedCount: json['attemptedCount'], succeededCount: json['succeededCount'], failedCount: json['failedCount'], unavailableCount: json['unavailableCount'], createdAt: new Date(json['createdAt']), updatedAt: new Date(json['updatedAt']), items: (json['items'] as Array).map( PhoneProvisioningJobItemDtoFromJSON ), }; } export function PhoneProvisioningJobDtoToJSON( value?: PhoneProvisioningJobDto | null ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { id: value.id, userId: value.userId, phoneCountry: value.phoneCountry, phoneVariant: value.phoneVariant, status: value.status, requestedCount: value.requestedCount, attemptedCount: value.attemptedCount, succeededCount: value.succeededCount, failedCount: value.failedCount, unavailableCount: value.unavailableCount, createdAt: value.createdAt.toISOString(), updatedAt: value.updatedAt.toISOString(), items: (value.items as Array).map(PhoneProvisioningJobItemDtoToJSON), }; }