001package ca.uhn.fhir.context.api;
002
003import ca.uhn.fhir.context.FhirContext;
004
005/*
006 * #%L
007 * HAPI FHIR - Core Library
008 * %%
009 * Copyright (C) 2014 - 2021 Smile CDR, Inc.
010 * %%
011 * Licensed under the Apache License, Version 2.0 (the "License");
012 * you may not use this file except in compliance with the License.
013 * You may obtain a copy of the License at
014 *
015 *      http://www.apache.org/licenses/LICENSE-2.0
016 *
017 * Unless required by applicable law or agreed to in writing, software
018 * distributed under the License is distributed on an "AS IS" BASIS,
019 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
020 * See the License for the specific language governing permissions and
021 * limitations under the License.
022 * #L%
023 */
024
025/**
026 * RESTful server behaviour for automatically adding profile tags when serializing resources
027 * 
028 * @see FhirContext#setAddProfileTagWhenEncoding(AddProfileTagEnum)
029 */
030public enum AddProfileTagEnum {
031        /**
032         * Do not add profile tags automatically
033         */
034        NEVER,
035
036        /**
037         * Add any profile tags that returned resources appear to conform to
038         * 
039         * @deprecated This mode causes even FHIR's default profiles to be exported in the
040         * resource metadata section. This is not generally expected behaviour from other
041         * systems and it offers no real benefit, so it will be removed at some point. This
042         * option was deprecated in HAPI 1.5
043         */
044        @Deprecated
045        ALWAYS,
046
047        /**
048         * Add any profile tags that returned resources appear to conform to if the resource is a non-standard class (e.g.
049         * it is an instance of a class that extends a built in type, but adds or constrains it)
050         */
051        ONLY_FOR_CUSTOM
052}