/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { IAzureFile, AzureFile } from './azure-file.model'; import { IBomX500Name, BomX500Name } from './bom-x-500-name.model'; import { DocumentStatus } from './enums'; import { DocumentType } from './enums'; export interface IBomDocument { azureFile?: IAzureFile; createdAt?: Date; createdBy?: IBomX500Name; fileId?: string; id?: string; lastModifiedAt?: Date; name?: string; status?: DocumentStatus; title?: string; type?: DocumentType; version?: number; } export class BomDocument extends BaseModel implements IBomDocument { static AZURE_FILE_FIELD_NAME = 'azureFile'; static CREATED_AT_FIELD_NAME = 'createdAt'; static CREATED_BY_FIELD_NAME = 'createdBy'; static FILE_ID_FIELD_NAME = 'fileId'; static ID_FIELD_NAME = 'id'; static LAST_MODIFIED_AT_FIELD_NAME = 'lastModifiedAt'; static NAME_FIELD_NAME = 'name'; static STATUS_FIELD_NAME = 'status'; static TITLE_FIELD_NAME = 'title'; static TYPE_FIELD_NAME = 'type'; static VERSION_FIELD_NAME = 'version'; azureFile: AzureFile; createdAt: Date; createdBy: BomX500Name; fileId: string; id: string; lastModifiedAt: Date; name: string; status: DocumentStatus; title: string; type: DocumentType; version: number; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.azureFile = new AzureFile(); this.createdBy = new BomX500Name(); if (values) { this.setValues(values); } } /** * set the values. * @param values Can be used to set a webapi response to this newly constructed model */ setValues(values: Partial): void { if (values) { const rawValues = values this.azureFile.setValues(rawValues.azureFile); this.createdAt = this.getValue(rawValues, BomDocument.CREATED_AT_FIELD_NAME); this.createdBy.setValues(rawValues.createdBy); this.fileId = this.getValue(rawValues, BomDocument.FILE_ID_FIELD_NAME); this.id = this.getValue(rawValues, BomDocument.ID_FIELD_NAME); this.lastModifiedAt = this.getValue(rawValues, BomDocument.LAST_MODIFIED_AT_FIELD_NAME); this.name = this.getValue(rawValues, BomDocument.NAME_FIELD_NAME); this.status = this.getValue(rawValues, BomDocument.STATUS_FIELD_NAME); this.title = this.getValue(rawValues, BomDocument.TITLE_FIELD_NAME); this.type = this.getValue(rawValues, BomDocument.TYPE_FIELD_NAME); this.version = this.getValue(rawValues, BomDocument.VERSION_FIELD_NAME); } } }