UNPKG

@ringer-tel/ivy

Version:
179 lines (164 loc) 5.83 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 { SiteDestination } from './SiteDestination'; import { SiteDestinationFromJSON, SiteDestinationFromJSONTyped, SiteDestinationToJSON, SiteDestinationToJSONTyped, } from './SiteDestination'; import type { Link } from './Link'; import { LinkFromJSON, LinkFromJSONTyped, LinkToJSON, LinkToJSONTyped, } from './Link'; /** * Detailed information about a ring group. * @export * @interface RingGroupResponse */ export interface RingGroupResponse { /** * A user-friendly name for the ring group. * @type {string} * @memberof RingGroupResponse */ name: string; /** * An array of system codes for the destinations to be rung. * @type {Array<string>} * @memberof RingGroupResponse */ destinationCodes: Array<string>; /** * How the destinations are rung. * @type {string} * @memberof RingGroupResponse */ ringStrategy: RingGroupResponseRingStrategyEnum; /** * Duration in seconds to ring the group before proceeding to failover. * @type {number} * @memberof RingGroupResponse */ timeout: number; /** * System code for the failover destination if the ring group is not answered. * @type {string} * @memberof RingGroupResponse */ failOverDestinationCode?: string | null; /** * Optional. Identifier of a user primarily associated with this ring group. * @type {number} * @memberof RingGroupResponse */ userId?: number | null; /** * * @type {number} * @memberof RingGroupResponse */ id: number; /** * * @type {number} * @memberof RingGroupResponse */ siteId: number; /** * * @type {Array<SiteDestination>} * @memberof RingGroupResponse */ destinations?: Array<SiteDestination>; /** * * @type {object} * @memberof RingGroupResponse */ failOverDestination?: object | null; /** * * @type {Array<Link>} * @memberof RingGroupResponse */ links?: Array<Link> | null; } /** * @export */ export const RingGroupResponseRingStrategyEnum = { Simultaneous: 'simultaneous', Sequential: 'sequential', Random: 'random' } as const; export type RingGroupResponseRingStrategyEnum = typeof RingGroupResponseRingStrategyEnum[keyof typeof RingGroupResponseRingStrategyEnum]; /** * Check if a given object implements the RingGroupResponse interface. */ export function instanceOfRingGroupResponse(value: object): value is RingGroupResponse { if (!('name' in value) || value['name'] === undefined) return false; if (!('destinationCodes' in value) || value['destinationCodes'] === undefined) return false; if (!('ringStrategy' in value) || value['ringStrategy'] === undefined) return false; if (!('timeout' in value) || value['timeout'] === undefined) return false; if (!('id' in value) || value['id'] === undefined) return false; if (!('siteId' in value) || value['siteId'] === undefined) return false; return true; } export function RingGroupResponseFromJSON(json: any): RingGroupResponse { return RingGroupResponseFromJSONTyped(json, false); } export function RingGroupResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RingGroupResponse { if (json == null) { return json; } return { 'name': json['name'], 'destinationCodes': json['destination_codes'], 'ringStrategy': json['ring_strategy'], 'timeout': json['timeout'], 'failOverDestinationCode': json['fail_over_destination_code'] == null ? undefined : json['fail_over_destination_code'], 'userId': json['user_id'] == null ? undefined : json['user_id'], 'id': json['id'], 'siteId': json['site_id'], 'destinations': json['destinations'] == null ? undefined : ((json['destinations'] as Array<any>).map(SiteDestinationFromJSON)), 'failOverDestination': json['fail_over_destination'] == null ? undefined : json['fail_over_destination'], 'links': json['links'] == null ? undefined : ((json['links'] as Array<any>).map(LinkFromJSON)), }; } export function RingGroupResponseToJSON(json: any): RingGroupResponse { return RingGroupResponseToJSONTyped(json, false); } export function RingGroupResponseToJSONTyped(value?: RingGroupResponse | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'name': value['name'], 'destination_codes': value['destinationCodes'], 'ring_strategy': value['ringStrategy'], 'timeout': value['timeout'], 'fail_over_destination_code': value['failOverDestinationCode'], 'user_id': value['userId'], 'id': value['id'], 'site_id': value['siteId'], 'destinations': value['destinations'] == null ? undefined : ((value['destinations'] as Array<any>).map(SiteDestinationToJSON)), 'fail_over_destination': value['failOverDestination'], 'links': value['links'] == null ? undefined : ((value['links'] as Array<any>).map(LinkToJSON)), }; }