/** * @return The first repetition of repeating field {@link #designation}, creating it if it does not already exist */ public ConceptReferenceDesignationComponent getDesignationFirstRep() { if (getDesignation().isEmpty()) { addDesignation(); } return getDesignation().get(0); }
@Override public Base addChild(String name) throws FHIRException { if (name.equals("system")) { throw new FHIRException("Cannot call addChild on a primitive type ValueSet.system"); } else if (name.equals("abstract")) { throw new FHIRException("Cannot call addChild on a primitive type ValueSet.abstract"); } else if (name.equals("inactive")) { throw new FHIRException("Cannot call addChild on a primitive type ValueSet.inactive"); } else if (name.equals("version")) { throw new FHIRException("Cannot call addChild on a primitive type ValueSet.version"); } else if (name.equals("code")) { throw new FHIRException("Cannot call addChild on a primitive type ValueSet.code"); } else if (name.equals("display")) { throw new FHIRException("Cannot call addChild on a primitive type ValueSet.display"); } else if (name.equals("designation")) { return addDesignation(); } else if (name.equals("contains")) { return addContains(); } else return super.addChild(name); }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case -887328209: return getSystemElement(); case 1732898850: return getAbstractElement(); case 24665195: return getInactiveElement(); case 351608024: return getVersionElement(); case 3059181: return getCodeElement(); case 1671764162: return getDisplayElement(); case -900931593: return addDesignation(); case -567445985: return addContains(); default: return super.makeProperty(hash, name); } }