/* 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 SnapshotChunk */ export interface SnapshotChunk { /** * * @type {string} * @memberof SnapshotChunk */ snapshotId: string; /** * * @type {number} * @memberof SnapshotChunk */ generation: number; /** * * @type {number} * @memberof SnapshotChunk */ chunkIndex: number; /** * * @type {string} * @memberof SnapshotChunk */ r2Key: string; /** * * @type {number} * @memberof SnapshotChunk */ sizeBytes: number; /** * * @type {string} * @memberof SnapshotChunk */ sha256: string; /** * Time-limited download URL (see `expiresInSeconds`). * @type {string} * @memberof SnapshotChunk */ signedUrl: string; } /** * Check if a given object implements the SnapshotChunk interface. */ export function instanceOfSnapshotChunk(value: object): value is SnapshotChunk { if (!('snapshotId' in value) || value['snapshotId'] === undefined) return false; if (!('generation' in value) || value['generation'] === undefined) return false; if (!('chunkIndex' in value) || value['chunkIndex'] === undefined) return false; if (!('r2Key' in value) || value['r2Key'] === undefined) return false; if (!('sizeBytes' in value) || value['sizeBytes'] === undefined) return false; if (!('sha256' in value) || value['sha256'] === undefined) return false; if (!('signedUrl' in value) || value['signedUrl'] === undefined) return false; return true; } export function SnapshotChunkFromJSON(json: any): SnapshotChunk { return SnapshotChunkFromJSONTyped(json, false); } export function SnapshotChunkFromJSONTyped(json: any, ignoreDiscriminator: boolean): SnapshotChunk { if (json == null) { return json; } return { 'snapshotId': json['snapshotId'], 'generation': json['generation'], 'chunkIndex': json['chunkIndex'], 'r2Key': json['r2Key'], 'sizeBytes': json['sizeBytes'], 'sha256': json['sha256'], 'signedUrl': json['signedUrl'], }; } export function SnapshotChunkToJSON(json: any): SnapshotChunk { return SnapshotChunkToJSONTyped(json, false); } export function SnapshotChunkToJSONTyped(value?: SnapshotChunk | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'snapshotId': value['snapshotId'], 'generation': value['generation'], 'chunkIndex': value['chunkIndex'], 'r2Key': value['r2Key'], 'sizeBytes': value['sizeBytes'], 'sha256': value['sha256'], 'signedUrl': value['signedUrl'], }; }