@ringer-tel/ivy
Version:
TypeScript SDK for Ringer APIs
132 lines (121 loc) • 3.84 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';
/**
*
* @export
* @interface DeviceCreateRequest
*/
export interface DeviceCreateRequest {
/**
*
* @type {string}
* @memberof DeviceCreateRequest
*/
name: string;
/**
*
* @type {string}
* @memberof DeviceCreateRequest
*/
login: string;
/**
*
* @type {boolean}
* @memberof DeviceCreateRequest
*/
active?: boolean;
/**
*
* @type {number}
* @memberof DeviceCreateRequest
*/
channelLimit?: number;
/**
*
* @type {number}
* @memberof DeviceCreateRequest
*/
timeout?: number;
/**
*
* @type {string}
* @memberof DeviceCreateRequest
*/
callerIdName?: string | null;
/**
*
* @type {string}
* @memberof DeviceCreateRequest
*/
callerIdNumber?: string | null;
/**
*
* @type {string}
* @memberof DeviceCreateRequest
*/
acl?: string | null;
/**
*
* @type {string}
* @memberof DeviceCreateRequest
*/
failOverDestinationCode?: string | null;
}
/**
* Check if a given object implements the DeviceCreateRequest interface.
*/
export function instanceOfDeviceCreateRequest(value: object): value is DeviceCreateRequest {
if (!('name' in value) || value['name'] === undefined) return false;
if (!('login' in value) || value['login'] === undefined) return false;
return true;
}
export function DeviceCreateRequestFromJSON(json: any): DeviceCreateRequest {
return DeviceCreateRequestFromJSONTyped(json, false);
}
export function DeviceCreateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceCreateRequest {
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'],
};
}
export function DeviceCreateRequestToJSON(json: any): DeviceCreateRequest {
return DeviceCreateRequestToJSONTyped(json, false);
}
export function DeviceCreateRequestToJSONTyped(value?: DeviceCreateRequest | 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'],
};
}