/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { IBomCompany, BomCompany } from './bom-company.model'; import { BomParticipantRole } from './enums'; export interface IBomParticipantInRole { externalReference?: string; participant?: IBomCompany; role?: BomParticipantRole; } export class BomParticipantInRole extends BaseModel implements IBomParticipantInRole { static EXTERNAL_REFERENCE_FIELD_NAME = 'externalReference'; static PARTICIPANT_FIELD_NAME = 'participant'; static ROLE_FIELD_NAME = 'role'; externalReference: string; participant: BomCompany; role: BomParticipantRole; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.participant = new BomCompany(); 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.externalReference = this.getValue(rawValues, BomParticipantInRole.EXTERNAL_REFERENCE_FIELD_NAME); this.participant.setValues(rawValues.participant); this.role = this.getValue(rawValues, BomParticipantInRole.ROLE_FIELD_NAME); } } }