@ringer-tel/ivy
Version:
TypeScript SDK for Ringer APIs
141 lines (127 loc) • 4.4 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* Ringer Business API
* This API provides comprehensive endpoints for the Ringer Business system. It includes functionality for managing customer accounts, addresses, sites, phone numbers, payments, users, and other business resources. Operations typically require authentication and appropriate permissions.
*
* The version of the OpenAPI document: 1.0.6
* Contact: support@ringer.tel
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
/**
* Data required to create a new Voicemail Box.
* @export
* @interface VoicemailBoxRequest
*/
export interface VoicemailBoxRequest {
/**
* Name of the Voicemail Box.
* @type {string}
* @memberof VoicemailBoxRequest
*/
name: string;
/**
* PIN for accessing the Voicemail Box messages.
* @type {string}
* @memberof VoicemailBoxRequest
*/
pin: string;
/**
* Email addresses for notifications of new voicemails.
* @type {string}
* @memberof VoicemailBoxRequest
*/
notificationEmails: string;
/**
* URL of the current announcement greeting.
* @type {string}
* @memberof VoicemailBoxRequest
*/
readonly announcementUrl?: string | null;
/**
* Greeting message for the Voicemail Box. This is a file upload field.
* @type {Blob}
* @memberof VoicemailBoxRequest
*/
announcement?: Blob | null;
/**
* Status of the Voicemail Box.
* @type {string}
* @memberof VoicemailBoxRequest
*/
status: VoicemailBoxRequestStatusEnum;
/**
*
* @type {number}
* @memberof VoicemailBoxRequest
*/
readonly siteId?: number | null;
/**
*
* @type {Date}
* @memberof VoicemailBoxRequest
*/
readonly createdAt?: Date;
/**
*
* @type {Date}
* @memberof VoicemailBoxRequest
*/
readonly updatedAt?: Date;
}
/**
* @export
*/
export const VoicemailBoxRequestStatusEnum = {
Active: 'active',
Inactive: 'inactive'
} as const;
export type VoicemailBoxRequestStatusEnum = typeof VoicemailBoxRequestStatusEnum[keyof typeof VoicemailBoxRequestStatusEnum];
/**
* Check if a given object implements the VoicemailBoxRequest interface.
*/
export function instanceOfVoicemailBoxRequest(value: object): value is VoicemailBoxRequest {
if (!('name' in value) || value['name'] === undefined) return false;
if (!('pin' in value) || value['pin'] === undefined) return false;
if (!('notificationEmails' in value) || value['notificationEmails'] === undefined) return false;
if (!('status' in value) || value['status'] === undefined) return false;
return true;
}
export function VoicemailBoxRequestFromJSON(json: any): VoicemailBoxRequest {
return VoicemailBoxRequestFromJSONTyped(json, false);
}
export function VoicemailBoxRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): VoicemailBoxRequest {
if (json == null) {
return json;
}
return {
'name': json['name'],
'pin': json['pin'],
'notificationEmails': json['notification_emails'],
'announcementUrl': json['announcement_url'] == null ? undefined : json['announcement_url'],
'announcement': json['announcement'] == null ? undefined : json['announcement'],
'status': json['status'],
'siteId': json['site_id'] == null ? undefined : json['site_id'],
'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
};
}
export function VoicemailBoxRequestToJSON(json: any): VoicemailBoxRequest {
return VoicemailBoxRequestToJSONTyped(json, false);
}
export function VoicemailBoxRequestToJSONTyped(value?: Omit<VoicemailBoxRequest, 'announcement_url'|'site_id'|'created_at'|'updated_at'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'name': value['name'],
'pin': value['pin'],
'notification_emails': value['notificationEmails'],
'announcement': value['announcement'],
'status': value['status'],
};
}