/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { IClause, Clause } from './clause.model'; import { IPeriod, Period } from './period.model'; import { IBoundedPeriod, BoundedPeriod } from './bounded-period.model'; import { IX500Name, X500Name } from './x-500-name.model'; export interface IPredefinedClause extends IClause{ identifier?: string; version?: number; description?: string; effectivity?: IPeriod | IBoundedPeriod; issuer?: IX500Name; } export class PredefinedClause extends Clause implements IPredefinedClause { static TYPE_SELECTOR = 'PredefinedClause'; static IDENTIFIER_FIELD_NAME = 'identifier'; static VERSION_FIELD_NAME = 'version'; static DESCRIPTION_FIELD_NAME = 'description'; static EFFECTIVITY_FIELD_NAME = 'effectivity'; static ISSUER_FIELD_NAME = 'issuer'; identifier: string; version: number; description: string; effectivity: Period | BoundedPeriod; issuer: X500Name; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.typeSelector = PredefinedClause.TYPE_SELECTOR; this.effectivity = new Period(); this.issuer = new X500Name(); 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.identifier = this.getValue(rawValues, PredefinedClause.IDENTIFIER_FIELD_NAME); this.version = this.getValue(rawValues, PredefinedClause.VERSION_FIELD_NAME); this.description = this.getValue(rawValues, PredefinedClause.DESCRIPTION_FIELD_NAME); if (rawValues.effectivity && rawValues.effectivity.typeSelector && this.effectivity.typeSelector !== rawValues.effectivity.typeSelector) { this.effectivity = SubTypeFactory.createSubTypeInstance(rawValues.effectivity) as Period | BoundedPeriod; } this.effectivity.setValues(rawValues.effectivity); this.issuer.setValues(rawValues.issuer); } } }