UNPKG

@ringer-tel/ivy

Version:
126 lines (114 loc) 4.07 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 { Link } from './Link'; import { LinkFromJSON, LinkFromJSONTyped, LinkToJSON, LinkToJSONTyped, } from './Link'; import type { LocationResponse } from './LocationResponse'; import { LocationResponseFromJSON, LocationResponseFromJSONTyped, LocationResponseToJSON, LocationResponseToJSONTyped, } from './LocationResponse'; /** * A paginated list of locations for a site. * @export * @interface PaginatedLocationListResponse */ export interface PaginatedLocationListResponse { /** * * @type {Array<LocationResponse>} * @memberof PaginatedLocationListResponse */ locations: Array<LocationResponse>; /** * * @type {number} * @memberof PaginatedLocationListResponse */ totalItems: number; /** * * @type {number} * @memberof PaginatedLocationListResponse */ totalPages: number; /** * * @type {number} * @memberof PaginatedLocationListResponse */ currentPage: number; /** * * @type {number} * @memberof PaginatedLocationListResponse */ perPage: number; /** * * @type {Array<Link>} * @memberof PaginatedLocationListResponse */ links?: Array<Link> | null; } /** * Check if a given object implements the PaginatedLocationListResponse interface. */ export function instanceOfPaginatedLocationListResponse(value: object): value is PaginatedLocationListResponse { if (!('locations' in value) || value['locations'] === 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 PaginatedLocationListResponseFromJSON(json: any): PaginatedLocationListResponse { return PaginatedLocationListResponseFromJSONTyped(json, false); } export function PaginatedLocationListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedLocationListResponse { if (json == null) { return json; } return { 'locations': ((json['locations'] as Array<any>).map(LocationResponseFromJSON)), '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(LinkFromJSON)), }; } export function PaginatedLocationListResponseToJSON(json: any): PaginatedLocationListResponse { return PaginatedLocationListResponseToJSONTyped(json, false); } export function PaginatedLocationListResponseToJSONTyped(value?: PaginatedLocationListResponse | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'locations': ((value['locations'] as Array<any>).map(LocationResponseToJSON)), '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(LinkToJSON)), }; }