UNPKG

@ringer-tel/ivy

Version:
126 lines (114 loc) 4.34 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'; import type { IndexComponentsSchemasLink } from './IndexComponentsSchemasLink'; import { IndexComponentsSchemasLinkFromJSON, IndexComponentsSchemasLinkFromJSONTyped, IndexComponentsSchemasLinkToJSON, IndexComponentsSchemasLinkToJSONTyped, } from './IndexComponentsSchemasLink'; import type { ExtensionResponse } from './ExtensionResponse'; import { ExtensionResponseFromJSON, ExtensionResponseFromJSONTyped, ExtensionResponseToJSON, ExtensionResponseToJSONTyped, } from './ExtensionResponse'; /** * A paginated list of extensions. * @export * @interface PaginatedExtensionListResponse */ export interface PaginatedExtensionListResponse { /** * * @type {Array<ExtensionResponse>} * @memberof PaginatedExtensionListResponse */ extensions: Array<ExtensionResponse>; /** * * @type {number} * @memberof PaginatedExtensionListResponse */ totalItems: number; /** * * @type {number} * @memberof PaginatedExtensionListResponse */ totalPages: number; /** * * @type {number} * @memberof PaginatedExtensionListResponse */ currentPage: number; /** * * @type {number} * @memberof PaginatedExtensionListResponse */ perPage: number; /** * * @type {Array<IndexComponentsSchemasLink>} * @memberof PaginatedExtensionListResponse */ links?: Array<IndexComponentsSchemasLink> | null; } /** * Check if a given object implements the PaginatedExtensionListResponse interface. */ export function instanceOfPaginatedExtensionListResponse(value: object): value is PaginatedExtensionListResponse { if (!('extensions' in value) || value['extensions'] === undefined) return false; if (!('totalItems' in value) || value['totalItems'] === undefined) return false; if (!('totalPages' in value) || value['totalPages'] === undefined) return false; if (!('currentPage' in value) || value['currentPage'] === undefined) return false; if (!('perPage' in value) || value['perPage'] === undefined) return false; return true; } export function PaginatedExtensionListResponseFromJSON(json: any): PaginatedExtensionListResponse { return PaginatedExtensionListResponseFromJSONTyped(json, false); } export function PaginatedExtensionListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedExtensionListResponse { if (json == null) { return json; } return { 'extensions': ((json['extensions'] as Array<any>).map(ExtensionResponseFromJSON)), 'totalItems': json['total_items'], 'totalPages': json['total_pages'], 'currentPage': json['current_page'], 'perPage': json['per_page'], 'links': json['links'] == null ? undefined : ((json['links'] as Array<any>).map(IndexComponentsSchemasLinkFromJSON)), }; } export function PaginatedExtensionListResponseToJSON(json: any): PaginatedExtensionListResponse { return PaginatedExtensionListResponseToJSONTyped(json, false); } export function PaginatedExtensionListResponseToJSONTyped(value?: PaginatedExtensionListResponse | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'extensions': ((value['extensions'] as Array<any>).map(ExtensionResponseToJSON)), 'total_items': value['totalItems'], 'total_pages': value['totalPages'], 'current_page': value['currentPage'], 'per_page': value['perPage'], 'links': value['links'] == null ? undefined : ((value['links'] as Array<any>).map(IndexComponentsSchemasLinkToJSON)), }; }