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.easyshare;
011
012import ca.uhn.fhir.model.api.IModelJson;
013import com.fasterxml.jackson.annotation.JsonProperty;
014
015import java.util.ArrayList;
016import java.util.List;
017
018public class ShlManifestResponseJson implements IModelJson {
019
020        @JsonProperty("files")
021        private List<File> myFiles;
022
023        public List<File> getFiles() {
024                if (myFiles == null) {
025                        myFiles = new ArrayList<>();
026                }
027                return myFiles;
028        }
029
030        public void addFile(String theContentType, String theId) {
031                File file = new File();
032                file.setContentType(theContentType);
033                file.setLocation(theId);
034                getFiles().add(file);
035        }
036
037        public static class File implements IModelJson {
038
039                @JsonProperty("contentType")
040                private String myContentType;
041
042                /** Fully qualified url */
043                @JsonProperty("location")
044                private String myLocation;
045
046                public String getContentType() {
047                        return myContentType;
048                }
049
050                public void setContentType(String theContentType) {
051                        myContentType = theContentType;
052                }
053
054                public String getLocation() {
055                        return myLocation;
056                }
057
058                public void setLocation(String theLocation) {
059                        myLocation = theLocation;
060                }
061        }
062}