@ringer-tel/ivy
Version:
TypeScript SDK for Ringer APIs
197 lines (185 loc) • 6.46 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.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';
/**
* Device details including the newly regenerated SIP password.
* @export
* @interface DeviceResponseWithPassword
*/
export interface DeviceResponseWithPassword {
/**
*
* @type {string}
* @memberof DeviceResponseWithPassword
*/
name: string;
/**
*
* @type {string}
* @memberof DeviceResponseWithPassword
*/
login: string;
/**
*
* @type {boolean}
* @memberof DeviceResponseWithPassword
*/
active?: boolean;
/**
*
* @type {number}
* @memberof DeviceResponseWithPassword
*/
channelLimit?: number;
/**
*
* @type {number}
* @memberof DeviceResponseWithPassword
*/
timeout?: number;
/**
*
* @type {string}
* @memberof DeviceResponseWithPassword
*/
callerIdName?: string | null;
/**
*
* @type {string}
* @memberof DeviceResponseWithPassword
*/
callerIdNumber?: string | null;
/**
*
* @type {string}
* @memberof DeviceResponseWithPassword
*/
acl?: string | null;
/**
*
* @type {string}
* @memberof DeviceResponseWithPassword
*/
failOverDestinationCode?: string | null;
/**
*
* @type {number}
* @memberof DeviceResponseWithPassword
*/
id: number;
/**
*
* @type {number}
* @memberof DeviceResponseWithPassword
*/
siteId?: number | null;
/**
* The newly generated SIP password for the device.
* @type {string}
* @memberof DeviceResponseWithPassword
*/
password: string;
/**
*
* @type {DeviceResponseAllOfFailOverDestination}
* @memberof DeviceResponseWithPassword
*/
failOverDestination?: DeviceResponseAllOfFailOverDestination;
/**
*
* @type {number}
* @memberof DeviceResponseWithPassword
*/
userId?: number | null;
/**
*
* @type {Array<SchemasLink>}
* @memberof DeviceResponseWithPassword
*/
links?: Array<SchemasLink> | null;
}
/**
* Check if a given object implements the DeviceResponseWithPassword interface.
*/
export function instanceOfDeviceResponseWithPassword(value: object): value is DeviceResponseWithPassword {
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;
if (!('password' in value) || value['password'] === undefined) return false;
return true;
}
export function DeviceResponseWithPasswordFromJSON(json: any): DeviceResponseWithPassword {
return DeviceResponseWithPasswordFromJSONTyped(json, false);
}
export function DeviceResponseWithPasswordFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceResponseWithPassword {
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'],
'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 DeviceResponseWithPasswordToJSON(json: any): DeviceResponseWithPassword {
return DeviceResponseWithPasswordToJSONTyped(json, false);
}
export function DeviceResponseWithPasswordToJSONTyped(value?: DeviceResponseWithPassword | 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)),
};
}