@ringer-tel/ivy
Version:
TypeScript SDK for Ringer APIs
123 lines (111 loc) • 3.56 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';
import type { PaginationLinksNext } from './PaginationLinksNext';
import {
PaginationLinksNextFromJSON,
PaginationLinksNextFromJSONTyped,
PaginationLinksNextToJSON,
PaginationLinksNextToJSONTyped,
} from './PaginationLinksNext';
import type { PaginationLinksPrev } from './PaginationLinksPrev';
import {
PaginationLinksPrevFromJSON,
PaginationLinksPrevFromJSONTyped,
PaginationLinksPrevToJSON,
PaginationLinksPrevToJSONTyped,
} from './PaginationLinksPrev';
import type { Link } from './Link';
import {
LinkFromJSON,
LinkFromJSONTyped,
LinkToJSON,
LinkToJSONTyped,
} from './Link';
/**
* HATEOAS links for paginated collections.
* @export
* @interface PaginationLinks
*/
export interface PaginationLinks {
/**
*
* @type {Link}
* @memberof PaginationLinks
*/
self: Link;
/**
*
* @type {Link}
* @memberof PaginationLinks
*/
first: Link;
/**
*
* @type {PaginationLinksPrev}
* @memberof PaginationLinks
*/
prev?: PaginationLinksPrev;
/**
*
* @type {PaginationLinksNext}
* @memberof PaginationLinks
*/
next?: PaginationLinksNext;
/**
*
* @type {Link}
* @memberof PaginationLinks
*/
last: Link;
}
/**
* Check if a given object implements the PaginationLinks interface.
*/
export function instanceOfPaginationLinks(value: object): value is PaginationLinks {
if (!('self' in value) || value['self'] === undefined) return false;
if (!('first' in value) || value['first'] === undefined) return false;
if (!('last' in value) || value['last'] === undefined) return false;
return true;
}
export function PaginationLinksFromJSON(json: any): PaginationLinks {
return PaginationLinksFromJSONTyped(json, false);
}
export function PaginationLinksFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginationLinks {
if (json == null) {
return json;
}
return {
'self': LinkFromJSON(json['self']),
'first': LinkFromJSON(json['first']),
'prev': json['prev'] == null ? undefined : PaginationLinksPrevFromJSON(json['prev']),
'next': json['next'] == null ? undefined : PaginationLinksNextFromJSON(json['next']),
'last': LinkFromJSON(json['last']),
};
}
export function PaginationLinksToJSON(json: any): PaginationLinks {
return PaginationLinksToJSONTyped(json, false);
}
export function PaginationLinksToJSONTyped(value?: PaginationLinks | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'self': LinkToJSON(value['self']),
'first': LinkToJSON(value['first']),
'prev': PaginationLinksPrevToJSON(value['prev']),
'next': PaginationLinksNextToJSON(value['next']),
'last': LinkToJSON(value['last']),
};
}