/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { IContractDiffClause, ContractDiffClause } from './contract-diff-clause.model'; import { IContractDiffField, ContractDiffField } from './contract-diff-field.model'; import { IContractDiffWording, ContractDiffWording } from './contract-diff-wording.model'; import { IContractDiffMetadata, ContractDiffMetadata } from './contract-diff-metadata.model'; import { AuditDiffEntryType } from './enums'; export interface IContractDiff { fields?: Array; metadata?: IContractDiffMetadata; nodes?: Array; type?: AuditDiffEntryType; } export class ContractDiff extends BaseModel implements IContractDiff { static FIELDS_FIELD_NAME = 'fields'; static METADATA_FIELD_NAME = 'metadata'; static NODES_FIELD_NAME = 'nodes'; static TYPE_FIELD_NAME = 'type'; fields: Array; metadata: ContractDiffMetadata; nodes: Array; type: AuditDiffEntryType; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.fields = new Array(); this.metadata = new ContractDiffMetadata(); this.nodes = new Array(); 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.fillModelArray(this, ContractDiff.FIELDS_FIELD_NAME, rawValues.fields, ContractDiffClause, SubTypeFactory.createSubTypeInstance); this.metadata.setValues(rawValues.metadata); this.fillModelArray(this, ContractDiff.NODES_FIELD_NAME, rawValues.nodes, ContractDiff, SubTypeFactory.createSubTypeInstance); this.type = this.getValue(rawValues, ContractDiff.TYPE_FIELD_NAME); } } }