/* 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 { SnapshotSummary } from './SnapshotSummary'; import { SnapshotSummaryFromJSON, SnapshotSummaryFromJSONTyped, SnapshotSummaryToJSON, SnapshotSummaryToJSONTyped, } from './SnapshotSummary'; import type { PageInfo } from './PageInfo'; import { PageInfoFromJSON, PageInfoFromJSONTyped, PageInfoToJSON, PageInfoToJSONTyped, } from './PageInfo'; /** * * @export * @interface SnapshotListResponse */ export interface SnapshotListResponse { /** * * @type {boolean} * @memberof SnapshotListResponse */ ok: boolean; /** * * @type {SnapshotListResponseTypeEnum} * @memberof SnapshotListResponse */ type: SnapshotListResponseTypeEnum; /** * * @type {Array} * @memberof SnapshotListResponse */ snapshots: Array; /** * * @type {PageInfo} * @memberof SnapshotListResponse */ pageInfo?: PageInfo; } /** * @export */ export const SnapshotListResponseTypeEnum = { SnapshotList: 'snapshot.list' } as const; export type SnapshotListResponseTypeEnum = typeof SnapshotListResponseTypeEnum[keyof typeof SnapshotListResponseTypeEnum]; /** * Check if a given object implements the SnapshotListResponse interface. */ export function instanceOfSnapshotListResponse(value: object): value is SnapshotListResponse { if (!('ok' in value) || value['ok'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; if (!('snapshots' in value) || value['snapshots'] === undefined) return false; return true; } export function SnapshotListResponseFromJSON(json: any): SnapshotListResponse { return SnapshotListResponseFromJSONTyped(json, false); } export function SnapshotListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SnapshotListResponse { if (json == null) { return json; } return { 'ok': json['ok'], 'type': json['type'], 'snapshots': ((json['snapshots'] as Array).map(SnapshotSummaryFromJSON)), 'pageInfo': json['pageInfo'] == null ? undefined : PageInfoFromJSON(json['pageInfo']), }; } export function SnapshotListResponseToJSON(json: any): SnapshotListResponse { return SnapshotListResponseToJSONTyped(json, false); } export function SnapshotListResponseToJSONTyped(value?: SnapshotListResponse | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'ok': value['ok'], 'type': value['type'], 'snapshots': ((value['snapshots'] as Array).map(SnapshotSummaryToJSON)), 'pageInfo': PageInfoToJSON(value['pageInfo']), }; }