@ringer-tel/ivy
Version:
TypeScript SDK for Ringer APIs
96 lines (82 loc) • 3.01 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';
/**
* Defines an attribute for a feature within a template.
* @export
* @interface TemplateFeatureAttribute
*/
export interface TemplateFeatureAttribute {
/**
* The name of the feature attribute (e.g., "name", "timeout", "caller_id_name").
* @type {string}
* @memberof TemplateFeatureAttribute
*/
name: string;
/**
* How the attribute's value is determined.
* @type {string}
* @memberof TemplateFeatureAttribute
*/
derivative: TemplateFeatureAttributeDerivativeEnum;
/**
* Default value or prompt text.
* @type {string}
* @memberof TemplateFeatureAttribute
*/
_default?: string | null;
}
/**
* @export
*/
export const TemplateFeatureAttributeDerivativeEnum = {
Calculated: 'calculated',
Predefined: 'predefined',
Prompt: 'prompt'
} as const;
export type TemplateFeatureAttributeDerivativeEnum = typeof TemplateFeatureAttributeDerivativeEnum[keyof typeof TemplateFeatureAttributeDerivativeEnum];
/**
* Check if a given object implements the TemplateFeatureAttribute interface.
*/
export function instanceOfTemplateFeatureAttribute(value: object): value is TemplateFeatureAttribute {
if (!('name' in value) || value['name'] === undefined) return false;
if (!('derivative' in value) || value['derivative'] === undefined) return false;
return true;
}
export function TemplateFeatureAttributeFromJSON(json: any): TemplateFeatureAttribute {
return TemplateFeatureAttributeFromJSONTyped(json, false);
}
export function TemplateFeatureAttributeFromJSONTyped(json: any, ignoreDiscriminator: boolean): TemplateFeatureAttribute {
if (json == null) {
return json;
}
return {
'name': json['name'],
'derivative': json['derivative'],
'_default': json['default'] == null ? undefined : json['default'],
};
}
export function TemplateFeatureAttributeToJSON(json: any): TemplateFeatureAttribute {
return TemplateFeatureAttributeToJSONTyped(json, false);
}
export function TemplateFeatureAttributeToJSONTyped(value?: TemplateFeatureAttribute | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'name': value['name'],
'derivative': value['derivative'],
'default': value['_default'],
};
}