001package org.hl7.fhir.r5.model;
002
003
004/*
005 * #%L
006 * org.hl7.fhir.r5
007 * %%
008 * Copyright (C) 2014 - 2019 Health Level 7
009 * %%
010 * Licensed under the Apache License, Version 2.0 (the \"License\");
011 * you may not use this file except in compliance with the License.
012 * You may obtain a copy of the License at
013 * 
014 *      http://www.apache.org/licenses/LICENSE-2.0
015 * 
016 * Unless required by applicable law or agreed to in writing, software
017 * distributed under the License is distributed on an \"AS IS\" BASIS,
018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
019 * See the License for the specific language governing permissions and
020 * limitations under the License.
021 * #L%
022 */
023
024/*
025  Copyright (c) 2011+, HL7, Inc.
026  All rights reserved.
027  
028  Redistribution and use in source and binary forms, with or without modification, \
029  are permitted provided that the following conditions are met:
030  
031   * Redistributions of source code must retain the above copyright notice, this \
032     list of conditions and the following disclaimer.
033   * Redistributions in binary form must reproduce the above copyright notice, \
034     this list of conditions and the following disclaimer in the documentation \
035     and/or other materials provided with the distribution.
036   * Neither the name of HL7 nor the names of its contributors may be used to 
037     endorse or promote products derived from this software without specific 
038     prior written permission.
039  
040  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
041  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
042  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
043  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
044  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
045  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
046  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
047  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
048  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
049  POSSIBILITY OF SUCH DAMAGE.
050  */
051
052// Generated on Tue, Dec 31, 2019 12:12+1100 for FHIR vcurrent
053
054import java.util.ArrayList;
055import java.util.Date;
056import java.util.List;
057import org.hl7.fhir.r5.model.Enumerations.*;
058import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
059import org.hl7.fhir.exceptions.FHIRException;
060import org.hl7.fhir.instance.model.api.ICompositeType;
061import ca.uhn.fhir.model.api.annotation.ResourceDef;
062import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
063import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
064import ca.uhn.fhir.model.api.annotation.Child;
065import ca.uhn.fhir.model.api.annotation.ChildOrder;
066import ca.uhn.fhir.model.api.annotation.Description;
067import ca.uhn.fhir.model.api.annotation.Block;
068
069/**
070 * Common Ancestor declaration for conformance and knowledge artifact resources.
071 */
072public abstract class MetadataResource extends CanonicalResource {
073
074    private static final long serialVersionUID = 0L;
075
076  /**
077   * Constructor
078   */
079    public MetadataResource() {
080      super();
081    }
082
083    /**
084     * How many allowed for this property by the implementation
085     */
086    public int getApprovalDateMax() { 
087      return 1;
088    }
089    /**
090     * @return {@link #approvalDate} (The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value
091     */
092    public abstract DateType getApprovalDateElement(); 
093
094    public abstract boolean hasApprovalDateElement(); 
095    public abstract boolean hasApprovalDate(); 
096
097    /**
098     * @param value {@link #approvalDate} (The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value
099     */
100    public abstract MetadataResource setApprovalDateElement(DateType value); 
101    /**
102     * @return The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
103     */
104    public abstract Date getApprovalDate(); 
105    /**
106     * @param value The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
107     */
108    public abstract MetadataResource setApprovalDate(Date value); 
109    /**
110     * How many allowed for this property by the implementation
111     */
112    public int getLastReviewDateMax() { 
113      return 1;
114    }
115    /**
116     * @return {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value
117     */
118    public abstract DateType getLastReviewDateElement(); 
119
120    public abstract boolean hasLastReviewDateElement(); 
121    public abstract boolean hasLastReviewDate(); 
122
123    /**
124     * @param value {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value
125     */
126    public abstract MetadataResource setLastReviewDateElement(DateType value); 
127    /**
128     * @return The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.
129     */
130    public abstract Date getLastReviewDate(); 
131    /**
132     * @param value The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.
133     */
134    public abstract MetadataResource setLastReviewDate(Date value); 
135    /**
136     * How many allowed for this property by the implementation
137     */
138    public int getEffectivePeriodMax() { 
139      return 1;
140    }
141    /**
142     * @return {@link #effectivePeriod} (The period during which the metadata resource content was or is planned to be in active use.)
143     */
144    public abstract Period getEffectivePeriod(); 
145    public abstract boolean hasEffectivePeriod(); 
146    /**
147     * @param value {@link #effectivePeriod} (The period during which the metadata resource content was or is planned to be in active use.)
148     */
149    public abstract MetadataResource setEffectivePeriod(Period value); 
150
151      protected void listChildren(List<Property> children) {
152        super.listChildren(children);
153      }
154
155      @Override
156      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
157        switch (_hash) {
158        default: return super.getNamedProperty(_hash, _name, _checkValid);
159        }
160
161      }
162
163      @Override
164      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
165        switch (hash) {
166        default: return super.getProperty(hash, name, checkValid);
167        }
168
169      }
170
171      @Override
172      public Base setProperty(int hash, String name, Base value) throws FHIRException {
173        switch (hash) {
174        default: return super.setProperty(hash, name, value);
175        }
176
177      }
178
179      @Override
180      public Base setProperty(String name, Base value) throws FHIRException {
181          return super.setProperty(name, value);
182      }
183
184      @Override
185      public Base makeProperty(int hash, String name) throws FHIRException {
186        switch (hash) {
187        default: return super.makeProperty(hash, name);
188        }
189
190      }
191
192      @Override
193      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
194        switch (hash) {
195        default: return super.getTypesForProperty(hash, name);
196        }
197
198      }
199
200      @Override
201      public Base addChild(String name) throws FHIRException {
202          return super.addChild(name);
203      }
204
205  public String fhirType() {
206    return "MetadataResource";
207
208  }
209
210      public abstract MetadataResource copy();
211
212      public void copyValues(MetadataResource dst) {
213        super.copyValues(dst);
214      }
215
216      @Override
217      public boolean equalsDeep(Base other_) {
218        if (!super.equalsDeep(other_))
219          return false;
220        if (!(other_ instanceof MetadataResource))
221          return false;
222        MetadataResource o = (MetadataResource) other_;
223        return true;
224      }
225
226      @Override
227      public boolean equalsShallow(Base other_) {
228        if (!super.equalsShallow(other_))
229          return false;
230        if (!(other_ instanceof MetadataResource))
231          return false;
232        MetadataResource o = (MetadataResource) other_;
233        return true;
234      }
235
236      public boolean isEmpty() {
237        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty();
238      }
239
240
241}
242