/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { IClaimAmount, ClaimAmount } from './claim-amount.model'; import { ISoftReference, SoftReference } from './soft-reference.model'; import { IClaimant, Claimant } from './claimant.model'; import { IClaimee, Claimee } from './claimee.model'; import { ClaimAcceptanceStatus } from './enums'; import { TransactionStatus } from './enums'; export interface IClaim { acceptanceStatus?: ClaimAcceptanceStatus; accountId?: string; amounts?: Array; assignedCoverageId?: string; contract?: ISoftReference; createdAt?: Date; hasHistory?: boolean; id?: string; loss?: ISoftReference; modifiedAt?: Date; partyRoleInClaim?: Array; stateGroupId?: string; transactionStatus?: TransactionStatus; version?: number; } export class Claim extends BaseModel implements IClaim { static ACCEPTANCE_STATUS_FIELD_NAME = 'acceptanceStatus'; static ACCOUNT_ID_FIELD_NAME = 'accountId'; static AMOUNTS_FIELD_NAME = 'amounts'; static ASSIGNED_COVERAGE_ID_FIELD_NAME = 'assignedCoverageId'; static CONTRACT_FIELD_NAME = 'contract'; static CREATED_AT_FIELD_NAME = 'createdAt'; static HAS_HISTORY_FIELD_NAME = 'hasHistory'; static ID_FIELD_NAME = 'id'; static LOSS_FIELD_NAME = 'loss'; static MODIFIED_AT_FIELD_NAME = 'modifiedAt'; static PARTY_ROLE_IN_CLAIM_FIELD_NAME = 'partyRoleInClaim'; static STATE_GROUP_ID_FIELD_NAME = 'stateGroupId'; static TRANSACTION_STATUS_FIELD_NAME = 'transactionStatus'; static VERSION_FIELD_NAME = 'version'; acceptanceStatus: ClaimAcceptanceStatus; accountId: string; amounts: Array; assignedCoverageId: string; contract: SoftReference; createdAt: Date; hasHistory: boolean; id: string; loss: SoftReference; modifiedAt: Date; partyRoleInClaim: Array; stateGroupId: string; transactionStatus: TransactionStatus; 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.amounts = new Array(); this.contract = new SoftReference(); this.loss = new SoftReference(); this.partyRoleInClaim = 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.acceptanceStatus = this.getValue(rawValues, Claim.ACCEPTANCE_STATUS_FIELD_NAME); this.accountId = this.getValue(rawValues, Claim.ACCOUNT_ID_FIELD_NAME); this.fillModelArray(this, Claim.AMOUNTS_FIELD_NAME, rawValues.amounts, ClaimAmount, SubTypeFactory.createSubTypeInstance); this.assignedCoverageId = this.getValue(rawValues, Claim.ASSIGNED_COVERAGE_ID_FIELD_NAME); this.contract.setValues(rawValues.contract); this.createdAt = this.getValue(rawValues, Claim.CREATED_AT_FIELD_NAME); this.hasHistory = this.getValue(rawValues, Claim.HAS_HISTORY_FIELD_NAME); this.id = this.getValue(rawValues, Claim.ID_FIELD_NAME); this.loss.setValues(rawValues.loss); this.modifiedAt = this.getValue(rawValues, Claim.MODIFIED_AT_FIELD_NAME); this.fillModelArray(this, Claim.PARTY_ROLE_IN_CLAIM_FIELD_NAME, rawValues.partyRoleInClaim, Claimant, SubTypeFactory.createSubTypeInstance); this.stateGroupId = this.getValue(rawValues, Claim.STATE_GROUP_ID_FIELD_NAME); this.transactionStatus = this.getValue(rawValues, Claim.TRANSACTION_STATUS_FIELD_NAME); this.version = this.getValue(rawValues, Claim.VERSION_FIELD_NAME); } } }