UNPKG

@ringer-tel/ivy

Version:
108 lines (94 loc) 2.71 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.6 * 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'; /** * Represents a HATEOAS link. * @export * @interface Link */ export interface Link { /** * The target URI of the link. * @type {string} * @memberof Link */ href: string; /** * The relation type of the link (e.g., self, next, prev, item). * @type {string} * @memberof Link */ rel: string; /** * The HTTP method to use for the link's action. * @type {string} * @memberof Link */ method?: LinkMethodEnum; /** * A human-readable title for the link. * @type {string} * @memberof Link */ title?: string | null; } /** * @export */ export const LinkMethodEnum = { Get: 'GET', Post: 'POST', Put: 'PUT', Patch: 'PATCH', Delete: 'DELETE', Options: 'OPTIONS', Head: 'HEAD' } as const; export type LinkMethodEnum = typeof LinkMethodEnum[keyof typeof LinkMethodEnum]; /** * Check if a given object implements the Link interface. */ export function instanceOfLink(value: object): value is Link { if (!('href' in value) || value['href'] === undefined) return false; if (!('rel' in value) || value['rel'] === undefined) return false; return true; } export function LinkFromJSON(json: any): Link { return LinkFromJSONTyped(json, false); } export function LinkFromJSONTyped(json: any, ignoreDiscriminator: boolean): Link { if (json == null) { return json; } return { 'href': json['href'], 'rel': json['rel'], 'method': json['method'] == null ? undefined : json['method'], 'title': json['title'] == null ? undefined : json['title'], }; } export function LinkToJSON(json: any): Link { return LinkToJSONTyped(json, false); } export function LinkToJSONTyped(value?: Link | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'href': value['href'], 'rel': value['rel'], 'method': value['method'], 'title': value['title'], }; }