UNPKG

@ringer-tel/ivy

Version:
122 lines (108 loc) 3.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'; /** * * @export * @interface RingGroupCore */ export interface RingGroupCore { /** * A user-friendly name for the ring group. * @type {string} * @memberof RingGroupCore */ name: string; /** * An array of system codes for the destinations to be rung. * @type {Array<string>} * @memberof RingGroupCore */ destinationCodes: Array<string>; /** * How the destinations are rung. * @type {string} * @memberof RingGroupCore */ ringStrategy: RingGroupCoreRingStrategyEnum; /** * Duration in seconds to ring the group before proceeding to failover. * @type {number} * @memberof RingGroupCore */ timeout: number; /** * System code for the failover destination if the ring group is not answered. * @type {string} * @memberof RingGroupCore */ failOverDestinationCode?: string | null; /** * Optional. Identifier of a user primarily associated with this ring group. * @type {number} * @memberof RingGroupCore */ userId?: number | null; } /** * @export */ export const RingGroupCoreRingStrategyEnum = { Simultaneous: 'simultaneous', Sequential: 'sequential', Random: 'random' } as const; export type RingGroupCoreRingStrategyEnum = typeof RingGroupCoreRingStrategyEnum[keyof typeof RingGroupCoreRingStrategyEnum]; /** * Check if a given object implements the RingGroupCore interface. */ export function instanceOfRingGroupCore(value: object): value is RingGroupCore { 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; return true; } export function RingGroupCoreFromJSON(json: any): RingGroupCore { return RingGroupCoreFromJSONTyped(json, false); } export function RingGroupCoreFromJSONTyped(json: any, ignoreDiscriminator: boolean): RingGroupCore { 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'], }; } export function RingGroupCoreToJSON(json: any): RingGroupCore { return RingGroupCoreToJSONTyped(json, false); } export function RingGroupCoreToJSONTyped(value?: RingGroupCore | 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'], }; }