001/*-
002 * #%L
003 * Smile CDR - CDR
004 * %%
005 * Copyright (C) 2016 - 2026 Smile CDR, Inc.
006 * %%
007 * All rights reserved.
008 * #L%
009 */
010package ca.cdr.api.model.json.oauth;
011
012import ca.uhn.fhir.model.api.IModelJson;
013import com.fasterxml.jackson.annotation.JsonAnyGetter;
014import com.fasterxml.jackson.annotation.JsonAnySetter;
015import com.fasterxml.jackson.annotation.JsonInclude;
016import com.fasterxml.jackson.annotation.JsonProperty;
017import io.swagger.v3.oas.annotations.media.Schema;
018
019import java.util.ArrayList;
020import java.util.LinkedHashMap;
021import java.util.List;
022import java.util.Map;
023
024@Schema(
025                name = "SmartConfiguration",
026                description =
027                                "The SMART App Launch discovery document served at a FHIR endpoint's .well-known/smart-configuration")
028@JsonInclude(JsonInclude.Include.NON_NULL)
029public class SmartConfigurationJson implements IModelJson {
030
031        /* CHECKSTYLE.OFF: RegexpSingleLine - these properties are spec compliant and should not be changed */
032
033        @JsonProperty("issuer")
034        private String myIssuer;
035
036        @JsonProperty("jwks_uri")
037        private String myJwksUri;
038
039        @JsonProperty("authorization_endpoint")
040        private String myAuthorizationEndpoint;
041
042        @JsonProperty("token_endpoint")
043        private String myTokenEndpoint;
044
045        @JsonProperty("management_endpoint")
046        private String myManagementEndpoint;
047
048        @JsonProperty("introspection_endpoint")
049        private String myIntrospectionEndpoint;
050
051        @JsonProperty("revocation_endpoint")
052        private String myRevocationEndpoint;
053
054        @JsonProperty("scopes_supported")
055        private List<String> myScopesSupported;
056
057        @JsonProperty("response_types_supported")
058        private List<String> myResponseTypesSupported;
059
060        @JsonProperty("grant_types_supported")
061        private List<String> myGrantTypesSupported;
062
063        @JsonProperty("code_challenge_methods_supported")
064        private List<String> myCodeChallengeMethodsSupported;
065
066        @JsonProperty("capabilities")
067        private List<String> myCapabilities;
068
069        /* CHECKSTYLE.ON: RegexpSingleLine */
070
071        private final Map<String, Object> myAdditionalProperties = new LinkedHashMap<>();
072
073        public String getIssuer() {
074                return myIssuer;
075        }
076
077        public void setIssuer(String theIssuer) {
078                myIssuer = theIssuer;
079        }
080
081        public String getJwksUri() {
082                return myJwksUri;
083        }
084
085        public void setJwksUri(String theJwksUri) {
086                myJwksUri = theJwksUri;
087        }
088
089        public String getAuthorizationEndpoint() {
090                return myAuthorizationEndpoint;
091        }
092
093        public void setAuthorizationEndpoint(String theAuthorizationEndpoint) {
094                myAuthorizationEndpoint = theAuthorizationEndpoint;
095        }
096
097        public String getTokenEndpoint() {
098                return myTokenEndpoint;
099        }
100
101        public void setTokenEndpoint(String theTokenEndpoint) {
102                myTokenEndpoint = theTokenEndpoint;
103        }
104
105        public String getManagementEndpoint() {
106                return myManagementEndpoint;
107        }
108
109        public void setManagementEndpoint(String theManagementEndpoint) {
110                myManagementEndpoint = theManagementEndpoint;
111        }
112
113        public String getIntrospectionEndpoint() {
114                return myIntrospectionEndpoint;
115        }
116
117        public void setIntrospectionEndpoint(String theIntrospectionEndpoint) {
118                myIntrospectionEndpoint = theIntrospectionEndpoint;
119        }
120
121        public String getRevocationEndpoint() {
122                return myRevocationEndpoint;
123        }
124
125        public void setRevocationEndpoint(String theRevocationEndpoint) {
126                myRevocationEndpoint = theRevocationEndpoint;
127        }
128
129        public List<String> getScopesSupported() {
130                if (myScopesSupported == null) {
131                        myScopesSupported = new ArrayList<>();
132                }
133                return myScopesSupported;
134        }
135
136        public void setScopesSupported(List<String> theScopesSupported) {
137                myScopesSupported = theScopesSupported;
138        }
139
140        public List<String> getResponseTypesSupported() {
141                if (myResponseTypesSupported == null) {
142                        myResponseTypesSupported = new ArrayList<>();
143                }
144                return myResponseTypesSupported;
145        }
146
147        public void setResponseTypesSupported(List<String> theResponseTypesSupported) {
148                myResponseTypesSupported = theResponseTypesSupported;
149        }
150
151        public List<String> getGrantTypesSupported() {
152                if (myGrantTypesSupported == null) {
153                        myGrantTypesSupported = new ArrayList<>();
154                }
155                return myGrantTypesSupported;
156        }
157
158        public void setGrantTypesSupported(List<String> theGrantTypesSupported) {
159                myGrantTypesSupported = theGrantTypesSupported;
160        }
161
162        public List<String> getCodeChallengeMethodsSupported() {
163                if (myCodeChallengeMethodsSupported == null) {
164                        myCodeChallengeMethodsSupported = new ArrayList<>();
165                }
166                return myCodeChallengeMethodsSupported;
167        }
168
169        public void setCodeChallengeMethodsSupported(List<String> theCodeChallengeMethodsSupported) {
170                myCodeChallengeMethodsSupported = theCodeChallengeMethodsSupported;
171        }
172
173        public List<String> getCapabilities() {
174                if (myCapabilities == null) {
175                        myCapabilities = new ArrayList<>();
176                }
177                return myCapabilities;
178        }
179
180        public void setCapabilities(List<String> theCapabilities) {
181                myCapabilities = theCapabilities;
182        }
183
184        @JsonAnyGetter
185        public Map<String, Object> getAdditionalProperties() {
186                return myAdditionalProperties;
187        }
188
189        @JsonAnySetter
190        public void setAdditionalProperty(String theName, Object theValue) {
191                myAdditionalProperties.put(theName, theValue);
192        }
193}