UNPKG

@ringer-tel/ivy

Version:
126 lines (114 loc) 4.12 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 { PaginationLinks } from './PaginationLinks'; import { PaginationLinksFromJSON, PaginationLinksFromJSONTyped, PaginationLinksToJSON, PaginationLinksToJSONTyped, } from './PaginationLinks'; import type { ScheduleResponseData } from './ScheduleResponseData'; import { ScheduleResponseDataFromJSON, ScheduleResponseDataFromJSONTyped, ScheduleResponseDataToJSON, ScheduleResponseDataToJSONTyped, } from './ScheduleResponseData'; /** * A paginated list of schedules. * @export * @interface PaginatedScheduleListResponse */ export interface PaginatedScheduleListResponse { /** * * @type {Array<ScheduleResponseData>} * @memberof PaginatedScheduleListResponse */ schedules: Array<ScheduleResponseData>; /** * * @type {number} * @memberof PaginatedScheduleListResponse */ totalItems: number; /** * * @type {number} * @memberof PaginatedScheduleListResponse */ totalPages: number; /** * * @type {number} * @memberof PaginatedScheduleListResponse */ currentPage: number; /** * * @type {number} * @memberof PaginatedScheduleListResponse */ perPage: number; /** * * @type {PaginationLinks} * @memberof PaginatedScheduleListResponse */ links?: PaginationLinks; } /** * Check if a given object implements the PaginatedScheduleListResponse interface. */ export function instanceOfPaginatedScheduleListResponse(value: object): value is PaginatedScheduleListResponse { if (!('schedules' in value) || value['schedules'] === 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 PaginatedScheduleListResponseFromJSON(json: any): PaginatedScheduleListResponse { return PaginatedScheduleListResponseFromJSONTyped(json, false); } export function PaginatedScheduleListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedScheduleListResponse { if (json == null) { return json; } return { 'schedules': ((json['schedules'] as Array<any>).map(ScheduleResponseDataFromJSON)), 'totalItems': json['total_items'], 'totalPages': json['total_pages'], 'currentPage': json['current_page'], 'perPage': json['per_page'], 'links': json['links'] == null ? undefined : PaginationLinksFromJSON(json['links']), }; } export function PaginatedScheduleListResponseToJSON(json: any): PaginatedScheduleListResponse { return PaginatedScheduleListResponseToJSONTyped(json, false); } export function PaginatedScheduleListResponseToJSONTyped(value?: PaginatedScheduleListResponse | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'schedules': ((value['schedules'] as Array<any>).map(ScheduleResponseDataToJSON)), 'total_items': value['totalItems'], 'total_pages': value['totalPages'], 'current_page': value['currentPage'], 'per_page': value['perPage'], 'links': PaginationLinksToJSON(value['links']), }; }