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.consent;
011
012import ca.cdr.api.model.json.UserSessionDetailsJson;
013
014/**
015 * A consent fixed policy request containing:
016 * <ol>
017 *     <li>The policy name which should be mapped to a new instance of an {@link ca.uhn.fhir.rest.server.interceptor.consent.IConsentService}</li>
018 *     <li>The {@link UserSessionDetailsJson} of the user making the request.</li>
019 * </ol>
020 *
021 * <p>Fixed policies are simple policies that do not accept query parameters.
022 * For policies that require configuration via query parameters, use {@link ConsentParameterizedPolicyRequest} instead.
023 */
024public class ConsentFixedPolicyRequest {
025        private final String myPolicyName;
026        private final UserSessionDetailsJson myUserSessionDetailsJson;
027
028        public ConsentFixedPolicyRequest(String thePolicyName, UserSessionDetailsJson theUserSessionDetails) {
029                myPolicyName = thePolicyName;
030                myUserSessionDetailsJson = theUserSessionDetails;
031        }
032
033        public String getPolicyName() {
034                return myPolicyName;
035        }
036
037        public UserSessionDetailsJson getUserSessionDetailsJson() {
038                return myUserSessionDetailsJson;
039        }
040}