001package org.hl7.fhir.r5.openehr;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.openehr.Enumerations.*;
039import org.hl7.fhir.exceptions.FHIRException;
040import org.hl7.fhir.r5.model.*;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.Child;
043import ca.uhn.fhir.model.api.annotation.ChildOrder;
044import ca.uhn.fhir.model.api.annotation.DatatypeDef;
045import ca.uhn.fhir.model.api.annotation.Description;
046import ca.uhn.fhir.model.api.annotation.Block;
047
048/**
049 * 
050 */
051@DatatypeDef(name="WebTemplateInput")
052public class WebTemplateInput extends LogicalBase implements ICompositeType {
053
054    /**
055     * 
056     */
057    @Child(name = "suffix", type = {StringType.class}, order=0, min=0, max=1, modifier=false, summary=false)
058    @Description(shortDefinition="todo", formalDefinition="" )
059    protected StringType suffix;
060
061    /**
062     * 
063     */
064    @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false)
065    @Description(shortDefinition="todo", formalDefinition="" )
066    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="https://specifications.openehr.org/fhir/valueset-input-type")
067    protected CodeType type;
068
069    /**
070     * 
071     */
072    @Child(name = "defaultValue", type = {StringType.class, IntegerType.class, DecimalType.class, BooleanType.class}, order=2, min=1, max=1, modifier=false, summary=false)
073    @Description(shortDefinition="todo", formalDefinition="" )
074    protected DataType defaultValue;
075
076    /**
077     * 
078     */
079    @Child(name = "terminology", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=false)
080    @Description(shortDefinition="todo", formalDefinition="" )
081    protected CodeType terminology;
082
083    /**
084     * 
085     */
086    @Child(name = "validation", type = {WebTemplateInputValidation.class}, order=4, min=0, max=1, modifier=false, summary=false)
087    @Description(shortDefinition="todo", formalDefinition="" )
088    protected WebTemplateInputValidation validation;
089
090    /**
091     * 
092     */
093    @Child(name = "list", type = {WebTemplateInputListItem.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
094    @Description(shortDefinition="todo", formalDefinition="" )
095    protected List<WebTemplateInputListItem> listList;
096
097    /**
098     * 
099     */
100    @Child(name = "listOpen", type = {BooleanType.class}, order=6, min=0, max=1, modifier=false, summary=false)
101    @Description(shortDefinition="todo", formalDefinition="" )
102    protected BooleanType listOpen;
103
104    private static final long serialVersionUID = 1893964326L;
105
106  /**
107   * Constructor
108   */
109    public WebTemplateInput() {
110      super();
111    }
112
113  /**
114   * Constructor
115   */
116    public WebTemplateInput(String type, DataType defaultValue) {
117      super();
118      this.setType(type);
119      this.setDefaultValue(defaultValue);
120    }
121
122    /**
123     * @return {@link #suffix} (). This is the underlying object with id, value and extensions. The accessor "getSuffix" gives direct access to the value
124     */
125    public StringType getSuffixElement() { 
126      if (this.suffix == null)
127        if (Configuration.errorOnAutoCreate())
128          throw new Error("Attempt to auto-create WebTemplateInput.suffix");
129        else if (Configuration.doAutoCreate())
130          this.suffix = new StringType(); // bb
131      return this.suffix;
132    }
133
134    public boolean hasSuffixElement() { 
135      return this.suffix != null && !this.suffix.isEmpty();
136    }
137
138    public boolean hasSuffix() { 
139      return this.suffix != null && !this.suffix.isEmpty();
140    }
141
142    /**
143     * @param value {@link #suffix} (). This is the underlying object with id, value and extensions. The accessor "getSuffix" gives direct access to the value
144     */
145    public WebTemplateInput setSuffixElement(StringType value) { 
146      this.suffix = value;
147      return this;
148    }
149
150    /**
151     * @return 
152     */
153    public String getSuffix() { 
154      return this.suffix == null ? null : this.suffix.getValue();
155    }
156
157    /**
158     * @param value 
159     */
160    public WebTemplateInput setSuffix(String value) { 
161      if (Utilities.noString(value))
162        this.suffix = null;
163      else {
164        if (this.suffix == null)
165          this.suffix = new StringType();
166        this.suffix.setValue(value);
167      }
168      return this;
169    }
170
171    /**
172     * @return {@link #type} (). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
173     */
174    public CodeType getTypeElement() { 
175      if (this.type == null)
176        if (Configuration.errorOnAutoCreate())
177          throw new Error("Attempt to auto-create WebTemplateInput.type");
178        else if (Configuration.doAutoCreate())
179          this.type = new CodeType(); // bb
180      return this.type;
181    }
182
183    public boolean hasTypeElement() { 
184      return this.type != null && !this.type.isEmpty();
185    }
186
187    public boolean hasType() { 
188      return this.type != null && !this.type.isEmpty();
189    }
190
191    /**
192     * @param value {@link #type} (). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
193     */
194    public WebTemplateInput setTypeElement(CodeType value) { 
195      this.type = value;
196      return this;
197    }
198
199    /**
200     * @return 
201     */
202    public String getType() { 
203      return this.type == null ? null : this.type.getValue();
204    }
205
206    /**
207     * @param value 
208     */
209    public WebTemplateInput setType(String value) { 
210        if (this.type == null)
211          this.type = new CodeType();
212        this.type.setValue(value);
213      return this;
214    }
215
216    /**
217     * @return {@link #defaultValue} ()
218     */
219    public DataType getDefaultValue() { 
220      return this.defaultValue;
221    }
222
223    /**
224     * @return {@link #defaultValue} ()
225     */
226    public StringType getDefaultValueStringType() throws FHIRException { 
227      if (this.defaultValue == null)
228        this.defaultValue = new StringType();
229      if (!(this.defaultValue instanceof StringType))
230        throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
231      return (StringType) this.defaultValue;
232    }
233
234    public boolean hasDefaultValueStringType() {
235        return this.defaultValue instanceof StringType;
236    }
237
238    /**
239     * @return {@link #defaultValue} ()
240     */
241    public IntegerType getDefaultValueIntegerType() throws FHIRException { 
242      if (this.defaultValue == null)
243        this.defaultValue = new IntegerType();
244      if (!(this.defaultValue instanceof IntegerType))
245        throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
246      return (IntegerType) this.defaultValue;
247    }
248
249    public boolean hasDefaultValueIntegerType() {
250        return this.defaultValue instanceof IntegerType;
251    }
252
253    /**
254     * @return {@link #defaultValue} ()
255     */
256    public DecimalType getDefaultValueDecimalType() throws FHIRException { 
257      if (this.defaultValue == null)
258        this.defaultValue = new DecimalType();
259      if (!(this.defaultValue instanceof DecimalType))
260        throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
261      return (DecimalType) this.defaultValue;
262    }
263
264    public boolean hasDefaultValueDecimalType() {
265        return this.defaultValue instanceof DecimalType;
266    }
267
268    /**
269     * @return {@link #defaultValue} ()
270     */
271    public BooleanType getDefaultValueBooleanType() throws FHIRException { 
272      if (this.defaultValue == null)
273        this.defaultValue = new BooleanType();
274      if (!(this.defaultValue instanceof BooleanType))
275        throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
276      return (BooleanType) this.defaultValue;
277    }
278
279    public boolean hasDefaultValueBooleanType() {
280        return this.defaultValue instanceof BooleanType;
281    }
282
283    public boolean hasDefaultValue() { 
284      return this.defaultValue != null && !this.defaultValue.isEmpty();
285    }
286
287    /**
288     * @param value {@link #defaultValue} ()
289     */
290    public WebTemplateInput setDefaultValue(DataType value) { 
291      if (value != null && !(value instanceof StringType || value instanceof IntegerType || value instanceof DecimalType || value instanceof BooleanType))
292        throw new FHIRException("Not the right type for WebTemplateInput.defaultValue: "+value.fhirType());
293      this.defaultValue = value;
294      return this;
295    }
296
297    /**
298     * @return {@link #terminology} (). This is the underlying object with id, value and extensions. The accessor "getTerminology" gives direct access to the value
299     */
300    public CodeType getTerminologyElement() { 
301      if (this.terminology == null)
302        if (Configuration.errorOnAutoCreate())
303          throw new Error("Attempt to auto-create WebTemplateInput.terminology");
304        else if (Configuration.doAutoCreate())
305          this.terminology = new CodeType(); // bb
306      return this.terminology;
307    }
308
309    public boolean hasTerminologyElement() { 
310      return this.terminology != null && !this.terminology.isEmpty();
311    }
312
313    public boolean hasTerminology() { 
314      return this.terminology != null && !this.terminology.isEmpty();
315    }
316
317    /**
318     * @param value {@link #terminology} (). This is the underlying object with id, value and extensions. The accessor "getTerminology" gives direct access to the value
319     */
320    public WebTemplateInput setTerminologyElement(CodeType value) { 
321      this.terminology = value;
322      return this;
323    }
324
325    /**
326     * @return 
327     */
328    public String getTerminology() { 
329      return this.terminology == null ? null : this.terminology.getValue();
330    }
331
332    /**
333     * @param value 
334     */
335    public WebTemplateInput setTerminology(String value) { 
336      if (Utilities.noString(value))
337        this.terminology = null;
338      else {
339        if (this.terminology == null)
340          this.terminology = new CodeType();
341        this.terminology.setValue(value);
342      }
343      return this;
344    }
345
346    /**
347     * @return {@link #validation} ()
348     */
349    public WebTemplateInputValidation getValidation() { 
350      if (this.validation == null)
351        if (Configuration.errorOnAutoCreate())
352          throw new Error("Attempt to auto-create WebTemplateInput.validation");
353        else if (Configuration.doAutoCreate())
354          this.validation = new WebTemplateInputValidation(); // cc
355      return this.validation;
356    }
357
358    public boolean hasValidation() { 
359      return this.validation != null && !this.validation.isEmpty();
360    }
361
362    /**
363     * @param value {@link #validation} ()
364     */
365    public WebTemplateInput setValidation(WebTemplateInputValidation value) { 
366      this.validation = value;
367      return this;
368    }
369
370    /**
371     * @return {@link #list} ()
372     */
373    public List<WebTemplateInputListItem> getListList() { 
374      if (this.listList == null)
375        this.listList = new ArrayList<WebTemplateInputListItem>();
376      return this.listList;
377    }
378
379    /**
380     * @return Returns a reference to <code>this</code> for easy method chaining
381     */
382    public WebTemplateInput setListList(List<WebTemplateInputListItem> theList) { 
383      this.listList = theList;
384      return this;
385    }
386
387    public boolean hasList() { 
388      if (this.listList == null)
389        return false;
390      for (WebTemplateInputListItem item : this.listList)
391        if (!item.isEmpty())
392          return true;
393      return false;
394    }
395
396    public WebTemplateInputListItem addList() { //3a
397      WebTemplateInputListItem t = new WebTemplateInputListItem();
398      if (this.listList == null)
399        this.listList = new ArrayList<WebTemplateInputListItem>();
400      this.listList.add(t);
401      return t;
402    }
403
404    public WebTemplateInput addList(WebTemplateInputListItem t) { //3b
405      if (t == null)
406        return this;
407      if (this.listList == null)
408        this.listList = new ArrayList<WebTemplateInputListItem>();
409      this.listList.add(t);
410      return this;
411    }
412
413    /**
414     * @return The first repetition of repeating field {@link #list}, creating it if it does not already exist {3}
415     */
416    public WebTemplateInputListItem getListFirstRep() { 
417      if (getListList().isEmpty()) {
418        addList();
419      }
420      return getListList().get(0);
421    }
422
423    /**
424     * @return {@link #listOpen} (). This is the underlying object with id, value and extensions. The accessor "getListOpen" gives direct access to the value
425     */
426    public BooleanType getListOpenElement() { 
427      if (this.listOpen == null)
428        if (Configuration.errorOnAutoCreate())
429          throw new Error("Attempt to auto-create WebTemplateInput.listOpen");
430        else if (Configuration.doAutoCreate())
431          this.listOpen = new BooleanType(); // bb
432      return this.listOpen;
433    }
434
435    public boolean hasListOpenElement() { 
436      return this.listOpen != null && !this.listOpen.isEmpty();
437    }
438
439    public boolean hasListOpen() { 
440      return this.listOpen != null && !this.listOpen.isEmpty();
441    }
442
443    /**
444     * @param value {@link #listOpen} (). This is the underlying object with id, value and extensions. The accessor "getListOpen" gives direct access to the value
445     */
446    public WebTemplateInput setListOpenElement(BooleanType value) { 
447      this.listOpen = value;
448      return this;
449    }
450
451    /**
452     * @return 
453     */
454    public boolean getListOpen() { 
455      return this.listOpen == null || this.listOpen.isEmpty() ? false : this.listOpen.getValue();
456    }
457
458    /**
459     * @param value 
460     */
461    public WebTemplateInput setListOpen(boolean value) { 
462        if (this.listOpen == null)
463          this.listOpen = new BooleanType();
464        this.listOpen.setValue(value);
465      return this;
466    }
467
468      protected void listChildren(List<Property> children) {
469        super.listChildren(children);
470        children.add(new Property("suffix", "string", "", 0, 1, suffix));
471        children.add(new Property("type", "code", "", 0, 1, type));
472        children.add(new Property("defaultValue", "string|integer|decimal|boolean", "", 0, 1, defaultValue));
473        children.add(new Property("terminology", "code", "", 0, 1, terminology));
474        children.add(new Property("validation", "http://openehr.org/fhir/StructureDefinition/WebTemplateInputValidation", "", 0, 1, validation));
475        children.add(new Property("list", "http://openehr.org/fhir/StructureDefinition/WebTemplateInputListItem", "", 0, java.lang.Integer.MAX_VALUE, listList));
476        children.add(new Property("listOpen", "boolean", "", 0, 1, listOpen));
477      }
478
479      @Override
480      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
481        switch (_hash) {
482        case -891422895: /*suffix*/  return new Property("suffix", "string", "", 0, 1, suffix);
483        case 3575610: /*type*/  return new Property("type", "code", "", 0, 1, type);
484        case -659125328: /*defaultValue*/  return new Property("defaultValue", "string|integer|decimal|boolean", "", 0, 1, defaultValue);
485        case -1905884493: /*terminology*/  return new Property("terminology", "code", "", 0, 1, terminology);
486        case -43562887: /*validation*/  return new Property("validation", "http://openehr.org/fhir/StructureDefinition/WebTemplateInputValidation", "", 0, 1, validation);
487        case 3322014: /*list*/  return new Property("list", "http://openehr.org/fhir/StructureDefinition/WebTemplateInputListItem", "", 0, java.lang.Integer.MAX_VALUE, listList);
488        case 1345506312: /*listOpen*/  return new Property("listOpen", "boolean", "", 0, 1, listOpen);
489        default: return super.getNamedProperty(_hash, _name, _checkValid);
490        }
491
492      }
493
494      @Override
495      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
496        switch (hash) {
497        case -891422895: /*suffix*/ return this.suffix == null ? new Base[0] : new Base[] {this.suffix}; // StringType
498        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeType
499        case -659125328: /*defaultValue*/ return this.defaultValue == null ? new Base[0] : new Base[] {this.defaultValue}; // DataType
500        case -1905884493: /*terminology*/ return this.terminology == null ? new Base[0] : new Base[] {this.terminology}; // CodeType
501        case -43562887: /*validation*/ return this.validation == null ? new Base[0] : new Base[] {this.validation}; // WebTemplateInputValidation
502        case 3322014: /*list*/ return this.listList == null ? new Base[0] : this.listList.toArray(new Base[this.listList.size()]); // WebTemplateInputListItem
503        case 1345506312: /*listOpen*/ return this.listOpen == null ? new Base[0] : new Base[] {this.listOpen}; // BooleanType
504        default: return super.getProperty(hash, name, checkValid);
505        }
506
507      }
508
509      @Override
510      public Base setProperty(int hash, String name, Base value) throws FHIRException {
511        switch (hash) {
512        case -891422895: // suffix
513          this.suffix = TypeConvertor.castToString(value); // StringType
514          return value;
515        case 3575610: // type
516          this.type = TypeConvertor.castToCode(value); // CodeType
517          return value;
518        case -659125328: // defaultValue
519          this.defaultValue = TypeConvertor.castToType(value); // DataType
520          return value;
521        case -1905884493: // terminology
522          this.terminology = TypeConvertor.castToCode(value); // CodeType
523          return value;
524        case -43562887: // validation
525          this.validation = (WebTemplateInputValidation) value; // WebTemplateInputValidation
526          return value;
527        case 3322014: // list
528          this.getListList().add((WebTemplateInputListItem) value); // WebTemplateInputListItem
529          return value;
530        case 1345506312: // listOpen
531          this.listOpen = TypeConvertor.castToBoolean(value); // BooleanType
532          return value;
533        default: return super.setProperty(hash, name, value);
534        }
535
536      }
537
538      @Override
539      public Base setProperty(String name, Base value) throws FHIRException {
540        if (name.equals("suffix")) {
541          this.suffix = TypeConvertor.castToString(value); // StringType
542        } else if (name.equals("type")) {
543          this.type = TypeConvertor.castToCode(value); // CodeType
544        } else if (name.equals("defaultValue")) {
545          this.defaultValue = TypeConvertor.castToType(value); // DataType
546        } else if (name.equals("terminology")) {
547          this.terminology = TypeConvertor.castToCode(value); // CodeType
548        } else if (name.equals("validation")) {
549          this.validation = (WebTemplateInputValidation) value; // WebTemplateInputValidation
550        } else if (name.equals("list")) {
551          this.getListList().add((WebTemplateInputListItem) value); // WebTemplateInputListItem
552        } else if (name.equals("listOpen")) {
553          this.listOpen = TypeConvertor.castToBoolean(value); // BooleanType
554        } else
555          return super.setProperty(name, value);
556        return value;
557      }
558
559      @Override
560      public Base makeProperty(int hash, String name) throws FHIRException {
561        switch (hash) {
562        case -891422895:  return getSuffixElement();
563        case 3575610:  return getTypeElement();
564        case -659125328:  return getDefaultValue();
565        case -1905884493:  return getTerminologyElement();
566        case -43562887:  return getValidation();
567        case 3322014:  return addList(); 
568        case 1345506312:  return getListOpenElement();
569        default: return super.makeProperty(hash, name);
570        }
571
572      }
573
574      @Override
575      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
576        switch (hash) {
577        case -891422895: /*suffix*/ return new String[] {"string"};
578        case 3575610: /*type*/ return new String[] {"code"};
579        case -659125328: /*defaultValue*/ return new String[] {"string", "integer", "decimal", "boolean"};
580        case -1905884493: /*terminology*/ return new String[] {"code"};
581        case -43562887: /*validation*/ return new String[] {"http://openehr.org/fhir/StructureDefinition/WebTemplateInputValidation"};
582        case 3322014: /*list*/ return new String[] {"http://openehr.org/fhir/StructureDefinition/WebTemplateInputListItem"};
583        case 1345506312: /*listOpen*/ return new String[] {"boolean"};
584        default: return super.getTypesForProperty(hash, name);
585        }
586
587      }
588
589      @Override
590      public Base addChild(String name) throws FHIRException {
591        if (name.equals("suffix")) {
592          throw new FHIRException("Cannot call addChild on a singleton property WebTemplateInput.suffix");
593        }
594        else if (name.equals("type")) {
595          throw new FHIRException("Cannot call addChild on a singleton property WebTemplateInput.type");
596        }
597        else if (name.equals("defaultValue")) {
598          this.defaultValue = new StringType();
599          return this.defaultValue;
600        }
601        else if (name.equals("defaultValue")) {
602          this.defaultValue = new IntegerType();
603          return this.defaultValue;
604        }
605        else if (name.equals("defaultValue")) {
606          this.defaultValue = new DecimalType();
607          return this.defaultValue;
608        }
609        else if (name.equals("defaultValue")) {
610          this.defaultValue = new BooleanType();
611          return this.defaultValue;
612        }
613        else if (name.equals("terminology")) {
614          throw new FHIRException("Cannot call addChild on a singleton property WebTemplateInput.terminology");
615        }
616        else if (name.equals("validation")) {
617          this.validation = new WebTemplateInputValidation();
618          return this.validation;
619        }
620        else if (name.equals("list")) {
621          return addList();
622        }
623        else if (name.equals("listOpen")) {
624          throw new FHIRException("Cannot call addChild on a singleton property WebTemplateInput.listOpen");
625        }
626        else
627          return super.addChild(name);
628      }
629
630  public String fhirType() {
631    return "WebTemplateInput";
632
633  }
634
635      public WebTemplateInput copy() {
636        WebTemplateInput dst = new WebTemplateInput();
637        copyValues(dst);
638        return dst;
639      }
640
641      public void copyValues(WebTemplateInput dst) {
642        super.copyValues(dst);
643        dst.suffix = suffix == null ? null : suffix.copy();
644        dst.type = type == null ? null : type.copy();
645        dst.defaultValue = defaultValue == null ? null : defaultValue.copy();
646        dst.terminology = terminology == null ? null : terminology.copy();
647        dst.validation = validation == null ? null : validation.copy();
648        if (listList != null) {
649          dst.listList = new ArrayList<WebTemplateInputListItem>();
650          for (WebTemplateInputListItem i : listList)
651            dst.listList.add(i.copy());
652        };
653        dst.listOpen = listOpen == null ? null : listOpen.copy();
654      }
655
656      protected WebTemplateInput typedCopy() {
657        return copy();
658      }
659
660      @Override
661      public boolean equalsDeep(Base other_) {
662        if (!super.equalsDeep(other_))
663          return false;
664        if (!(other_ instanceof WebTemplateInput))
665          return false;
666        WebTemplateInput o = (WebTemplateInput) other_;
667        return compareDeep(suffix, o.suffix, true) && compareDeep(type, o.type, true) && compareDeep(defaultValue, o.defaultValue, true)
668           && compareDeep(terminology, o.terminology, true) && compareDeep(validation, o.validation, true)
669           && compareDeep(listList, o.listList, true) && compareDeep(listOpen, o.listOpen, true);
670      }
671
672      @Override
673      public boolean equalsShallow(Base other_) {
674        if (!super.equalsShallow(other_))
675          return false;
676        if (!(other_ instanceof WebTemplateInput))
677          return false;
678        WebTemplateInput o = (WebTemplateInput) other_;
679        return compareValues(suffix, o.suffix, true) && compareValues(type, o.type, true) && compareValues(terminology, o.terminology, true)
680           && compareValues(listOpen, o.listOpen, true);
681      }
682
683      public boolean isEmpty() {
684        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(suffix, type, defaultValue
685          , terminology, validation, listList, listOpen);
686      }
687
688
689}
690