/* tslint:disable */ /* eslint-disable */ /** * Boat Public API v1 * Public JSON API for creating, operating, prompting, observing, and exposing Boat sandboxes from backend services, CI jobs, hosted workers, and Boat automation products. The v1 reference intentionally documents the developer integration surface only. Dashboard billing actions are not part of v1. * * The version of the OpenAPI document: 1.0.0 * * * 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 { PageInfo } from './PageInfo'; import { PageInfoFromJSON, PageInfoFromJSONTyped, PageInfoToJSON, PageInfoToJSONTyped, } from './PageInfo'; import type { BoxEvent } from './BoxEvent'; import { BoxEventFromJSON, BoxEventFromJSONTyped, BoxEventToJSON, BoxEventToJSONTyped, } from './BoxEvent'; /** * * @export * @interface EventsResponse */ export interface EventsResponse { /** * * @type {boolean} * @memberof EventsResponse */ ok: boolean; /** * * @type {EventsResponseTypeEnum} * @memberof EventsResponse */ type: EventsResponseTypeEnum; /** * * @type {string} * @memberof EventsResponse */ id: string; /** * Boat work and lifecycle event objects. Event shapes are intentionally extensible; branch on each event `type` when present. * @type {Array} * @memberof EventsResponse */ events: Array; /** * * @type {PageInfo} * @memberof EventsResponse */ pageInfo?: PageInfo; } /** * @export */ export const EventsResponseTypeEnum = { EventsList: 'events.list' } as const; export type EventsResponseTypeEnum = typeof EventsResponseTypeEnum[keyof typeof EventsResponseTypeEnum]; /** * Check if a given object implements the EventsResponse interface. */ export function instanceOfEventsResponse(value: object): value is EventsResponse { if (!('ok' in value) || value['ok'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; if (!('id' in value) || value['id'] === undefined) return false; if (!('events' in value) || value['events'] === undefined) return false; return true; } export function EventsResponseFromJSON(json: any): EventsResponse { return EventsResponseFromJSONTyped(json, false); } export function EventsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventsResponse { if (json == null) { return json; } return { 'ok': json['ok'], 'type': json['type'], 'id': json['id'], 'events': ((json['events'] as Array).map(BoxEventFromJSON)), 'pageInfo': json['pageInfo'] == null ? undefined : PageInfoFromJSON(json['pageInfo']), }; } export function EventsResponseToJSON(json: any): EventsResponse { return EventsResponseToJSONTyped(json, false); } export function EventsResponseToJSONTyped(value?: EventsResponse | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'ok': value['ok'], 'type': value['type'], 'id': value['id'], 'events': ((value['events'] as Array).map(BoxEventToJSON)), 'pageInfo': PageInfoToJSON(value['pageInfo']), }; }