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.portal;
011
012import ca.cdr.api.model.json.AbstractModelJson;
013import com.fasterxml.jackson.annotation.JsonCreator;
014import com.fasterxml.jackson.annotation.JsonProperty;
015import io.swagger.v3.oas.annotations.media.Schema;
016import jakarta.annotation.Nonnull;
017
018import java.util.Map;
019
020/**
021 * Web applications served by smile portal module via its web UI jar (apps bundled with the portal)
022 *      ie: prior authorization, payer to payer, patient management, terminology, web admin console, etc
023 */
024public class BundledAppJson extends AbstractModelJson implements IAppType {
025        @Schema(description = "label to display app on menu")
026        public final String label;
027
028        @Schema(description = "used to group menu items together")
029        public final String group;
030
031        @Schema(description = "base URL of the REST API serving this application")
032        public final String url;
033
034        @Schema(description = "application type to be used in smile-portal")
035        public final String appType;
036
037        @Schema(description = "used for custom configuration for the apps (optional)")
038        public Map<String, Object> additionalParameters;
039
040        @JsonCreator
041        public BundledAppJson(
042                        @Nonnull @JsonProperty(value = "label", required = true) String theLabel,
043                        @Nonnull @JsonProperty(value = "group", required = true) String theGroup,
044                        @Nonnull @JsonProperty(value = "url", required = true) String theUrl,
045                        @Nonnull @JsonProperty(value = "appType", required = true) String theAppType) {
046                label = theLabel;
047                group = theGroup;
048                url = theUrl;
049                appType = theAppType;
050        }
051
052        @Override
053        public String getAppType() {
054                return appType;
055        }
056}