UNPKG

@ringer-tel/ivy

Version:
196 lines (184 loc) 5.97 kB
/* 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.5 * 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'; import type { DeviceResponseAllOfFailOverDestination } from './DeviceResponseAllOfFailOverDestination'; import { DeviceResponseAllOfFailOverDestinationFromJSON, DeviceResponseAllOfFailOverDestinationFromJSONTyped, DeviceResponseAllOfFailOverDestinationToJSON, DeviceResponseAllOfFailOverDestinationToJSONTyped, } from './DeviceResponseAllOfFailOverDestination'; import type { SchemasLink } from './SchemasLink'; import { SchemasLinkFromJSON, SchemasLinkFromJSONTyped, SchemasLinkToJSON, SchemasLinkToJSONTyped, } from './SchemasLink'; /** * * @export * @interface DeviceResponse */ export interface DeviceResponse { /** * * @type {string} * @memberof DeviceResponse */ name: string; /** * * @type {string} * @memberof DeviceResponse */ login: string; /** * * @type {boolean} * @memberof DeviceResponse */ active?: boolean; /** * * @type {number} * @memberof DeviceResponse */ channelLimit?: number; /** * * @type {number} * @memberof DeviceResponse */ timeout?: number; /** * * @type {string} * @memberof DeviceResponse */ callerIdName?: string | null; /** * * @type {string} * @memberof DeviceResponse */ callerIdNumber?: string | null; /** * * @type {string} * @memberof DeviceResponse */ acl?: string | null; /** * * @type {string} * @memberof DeviceResponse */ failOverDestinationCode?: string | null; /** * * @type {number} * @memberof DeviceResponse */ id: number; /** * * @type {number} * @memberof DeviceResponse */ siteId?: number | null; /** * (Returned on create only) * @type {string} * @memberof DeviceResponse */ password?: string; /** * * @type {DeviceResponseAllOfFailOverDestination} * @memberof DeviceResponse */ failOverDestination?: DeviceResponseAllOfFailOverDestination; /** * * @type {number} * @memberof DeviceResponse */ userId?: number | null; /** * * @type {Array<SchemasLink>} * @memberof DeviceResponse */ links?: Array<SchemasLink> | null; } /** * Check if a given object implements the DeviceResponse interface. */ export function instanceOfDeviceResponse(value: object): value is DeviceResponse { if (!('name' in value) || value['name'] === undefined) return false; if (!('login' in value) || value['login'] === undefined) return false; if (!('id' in value) || value['id'] === undefined) return false; return true; } export function DeviceResponseFromJSON(json: any): DeviceResponse { return DeviceResponseFromJSONTyped(json, false); } export function DeviceResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceResponse { if (json == null) { return json; } return { 'name': json['name'], 'login': json['login'], 'active': json['active'] == null ? undefined : json['active'], 'channelLimit': json['channel_limit'] == null ? undefined : json['channel_limit'], 'timeout': json['timeout'] == null ? undefined : json['timeout'], 'callerIdName': json['caller_id_name'] == null ? undefined : json['caller_id_name'], 'callerIdNumber': json['caller_id_number'] == null ? undefined : json['caller_id_number'], 'acl': json['acl'] == null ? undefined : json['acl'], 'failOverDestinationCode': json['fail_over_destination_code'] == null ? undefined : json['fail_over_destination_code'], 'id': json['id'], 'siteId': json['site_id'] == null ? undefined : json['site_id'], 'password': json['password'] == null ? undefined : json['password'], 'failOverDestination': json['fail_over_destination'] == null ? undefined : DeviceResponseAllOfFailOverDestinationFromJSON(json['fail_over_destination']), 'userId': json['user_id'] == null ? undefined : json['user_id'], 'links': json['links'] == null ? undefined : ((json['links'] as Array<any>).map(SchemasLinkFromJSON)), }; } export function DeviceResponseToJSON(json: any): DeviceResponse { return DeviceResponseToJSONTyped(json, false); } export function DeviceResponseToJSONTyped(value?: DeviceResponse | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'name': value['name'], 'login': value['login'], 'active': value['active'], 'channel_limit': value['channelLimit'], 'timeout': value['timeout'], 'caller_id_name': value['callerIdName'], 'caller_id_number': value['callerIdNumber'], 'acl': value['acl'], 'fail_over_destination_code': value['failOverDestinationCode'], 'id': value['id'], 'site_id': value['siteId'], 'password': value['password'], 'fail_over_destination': DeviceResponseAllOfFailOverDestinationToJSON(value['failOverDestination']), 'user_id': value['userId'], 'links': value['links'] == null ? undefined : ((value['links'] as Array<any>).map(SchemasLinkToJSON)), }; }