/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { IAbstractDiffField, AbstractDiffField } from './abstract-diff-field.model'; export interface IContractDiffField extends IAbstractDiffField{ fieldName?: string; fieldType?: string; previousValue?: object; currentValue?: object; } export class ContractDiffField extends AbstractDiffField implements IContractDiffField { static TYPE_SELECTOR = 'ContractDiffField'; static FIELD_NAME_FIELD_NAME = 'fieldName'; static FIELD_TYPE_FIELD_NAME = 'fieldType'; static PREVIOUS_VALUE_FIELD_NAME = 'previousValue'; static CURRENT_VALUE_FIELD_NAME = 'currentValue'; fieldName: string; fieldType: string; previousValue: object; currentValue: object; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.typeSelector = ContractDiffField.TYPE_SELECTOR; 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) { super.setValues(values) const rawValues = values this.fieldName = this.getValue(rawValues, ContractDiffField.FIELD_NAME_FIELD_NAME); this.fieldType = this.getValue(rawValues, ContractDiffField.FIELD_TYPE_FIELD_NAME); this.previousValue = this.getValue(rawValues, ContractDiffField.PREVIOUS_VALUE_FIELD_NAME); this.currentValue = this.getValue(rawValues, ContractDiffField.CURRENT_VALUE_FIELD_NAME); } } }