/* tslint:disable */ /* eslint-disable */ /** * ELEMENTS API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { exists, mapValues } from '../runtime'; /** * * @export * @interface Snapshot */ export interface Snapshot { /** * * @type {number} * @memberof Snapshot */ id: number; /** * * @type {number} * @memberof Snapshot */ readonly createdBy: number; /** * * @type {number} * @memberof Snapshot */ workspace: number; /** * * @type {string} * @memberof Snapshot */ name?: string; /** * * @type {Date} * @memberof Snapshot */ readonly createdAt: Date; } export function SnapshotFromJSON(json: any): Snapshot { return SnapshotFromJSONTyped(json, false); } export function SnapshotFromJSONTyped(json: any, ignoreDiscriminator: boolean): Snapshot { if ((json === undefined) || (json === null)) { return json; } return { 'id': json['id'], 'createdBy': json['created_by'], 'workspace': json['workspace'], 'name': !exists(json, 'name') ? undefined : json['name'], 'createdAt': (new Date(json['created_at'])), }; } export function SnapshotToJSON(value?: Snapshot | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'id': value.id, 'workspace': value.workspace, 'name': value.name, }; }