UNPKG

@ringer-tel/ivy

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