/* 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'; /** * * @export * @interface SnapshotSummary */ export interface SnapshotSummary { /** * * @type {string} * @memberof SnapshotSummary */ id: string; /** * Public Box id this snapshot belongs to. * @type {string} * @memberof SnapshotSummary */ boxId: string; /** * * @type {SnapshotSummaryStatusEnum} * @memberof SnapshotSummary */ status: SnapshotSummaryStatusEnum; /** * `base` (full) or `incremental` (delta on a base). `null` for legacy snapshots. * @type {SnapshotSummaryKindEnum} * @memberof SnapshotSummary */ kind?: SnapshotSummaryKindEnum | null; /** * Position in the incremental chain (0 = base). * @type {number} * @memberof SnapshotSummary */ generation: number; /** * * @type {string} * @memberof SnapshotSummary */ chainId?: string | null; /** * * @type {Date} * @memberof SnapshotSummary */ createdAt: Date; /** * * @type {Date} * @memberof SnapshotSummary */ completedAt?: Date | null; /** * Bytes this snapshot added (its delta), not the full restored size. * @type {number} * @memberof SnapshotSummary */ sizeBytes: number; /** * Inventory entries alive in the chain at this generation (includes base-image system entries). * @type {number} * @memberof SnapshotSummary */ fileCount: number; /** * Total bytes of your data restored by this snapshot (what resume/download returns; base image excluded). `null` on legacy snapshots. * @type {number} * @memberof SnapshotSummary */ contentSizeBytes?: number | null; /** * Number of your files restored by this snapshot (base image excluded). `null` on legacy snapshots. * @type {number} * @memberof SnapshotSummary */ contentFileCount?: number | null; } /** * @export */ export const SnapshotSummaryStatusEnum = { Completed: 'completed' } as const; export type SnapshotSummaryStatusEnum = typeof SnapshotSummaryStatusEnum[keyof typeof SnapshotSummaryStatusEnum]; /** * @export */ export const SnapshotSummaryKindEnum = { Base: 'base', Incremental: 'incremental' } as const; export type SnapshotSummaryKindEnum = typeof SnapshotSummaryKindEnum[keyof typeof SnapshotSummaryKindEnum]; /** * Check if a given object implements the SnapshotSummary interface. */ export function instanceOfSnapshotSummary(value: object): value is SnapshotSummary { if (!('id' in value) || value['id'] === undefined) return false; if (!('boxId' in value) || value['boxId'] === undefined) return false; if (!('status' in value) || value['status'] === undefined) return false; if (!('generation' in value) || value['generation'] === undefined) return false; if (!('createdAt' in value) || value['createdAt'] === undefined) return false; if (!('sizeBytes' in value) || value['sizeBytes'] === undefined) return false; if (!('fileCount' in value) || value['fileCount'] === undefined) return false; return true; } export function SnapshotSummaryFromJSON(json: any): SnapshotSummary { return SnapshotSummaryFromJSONTyped(json, false); } export function SnapshotSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): SnapshotSummary { if (json == null) { return json; } return { 'id': json['id'], 'boxId': json['boxId'], 'status': json['status'], 'kind': json['kind'] == null ? undefined : json['kind'], 'generation': json['generation'], 'chainId': json['chainId'] == null ? undefined : json['chainId'], 'createdAt': (new Date(json['createdAt'])), 'completedAt': json['completedAt'] == null ? undefined : (new Date(json['completedAt'])), 'sizeBytes': json['sizeBytes'], 'fileCount': json['fileCount'], 'contentSizeBytes': json['contentSizeBytes'] == null ? undefined : json['contentSizeBytes'], 'contentFileCount': json['contentFileCount'] == null ? undefined : json['contentFileCount'], }; } export function SnapshotSummaryToJSON(json: any): SnapshotSummary { return SnapshotSummaryToJSONTyped(json, false); } export function SnapshotSummaryToJSONTyped(value?: SnapshotSummary | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'boxId': value['boxId'], 'status': value['status'], 'kind': value['kind'], 'generation': value['generation'], 'chainId': value['chainId'], 'createdAt': value['createdAt'].toISOString(), 'completedAt': value['completedAt'] == null ? value['completedAt'] : value['completedAt'].toISOString(), 'sizeBytes': value['sizeBytes'], 'fileCount': value['fileCount'], 'contentSizeBytes': value['contentSizeBytes'], 'contentFileCount': value['contentFileCount'], }; }