
001/*- 002 * #%L 003 * HAPI FHIR JPA Server 004 * %% 005 * Copyright (C) 2014 - 2025 Smile CDR, Inc. 006 * %% 007 * Licensed under the Apache License, Version 2.0 (the "License"); 008 * you may not use this file except in compliance with the License. 009 * You may obtain a copy of the License at 010 * 011 * http://www.apache.org/licenses/LICENSE-2.0 012 * 013 * Unless required by applicable law or agreed to in writing, software 014 * distributed under the License is distributed on an "AS IS" BASIS, 015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 016 * See the License for the specific language governing permissions and 017 * limitations under the License. 018 * #L% 019 */ 020package ca.uhn.fhir.jpa.packages; 021 022import ca.uhn.fhir.context.FhirVersionEnum; 023import com.fasterxml.jackson.annotation.JsonAutoDetect; 024import com.fasterxml.jackson.annotation.JsonInclude; 025import com.fasterxml.jackson.annotation.JsonProperty; 026import io.swagger.v3.oas.annotations.media.Schema; 027 028@Schema(description = "Represents details of an NPM resource and its associated package") 029@JsonInclude(JsonInclude.Include.NON_NULL) 030@JsonAutoDetect( 031 creatorVisibility = JsonAutoDetect.Visibility.NONE, 032 fieldVisibility = JsonAutoDetect.Visibility.NONE, 033 getterVisibility = JsonAutoDetect.Visibility.NONE, 034 isGetterVisibility = JsonAutoDetect.Visibility.NONE, 035 setterVisibility = JsonAutoDetect.Visibility.NONE) 036public class NpmPackageAssetInfoJson { 037 @JsonProperty("resourceId") 038 private String myFhirId; 039 040 @JsonProperty("canonicalUrl") 041 private String myCanonicalUrl; 042 043 @JsonProperty("fhirVersion") 044 private FhirVersionEnum myFhirVersion; 045 046 @JsonProperty("packageId") 047 private String myPackageId; 048 049 @JsonProperty("packageVersion") 050 private String myVersion; 051 052 public NpmPackageAssetInfoJson() { 053 // empty constructor for serialization 054 this(null, null, null, null, null); 055 } 056 057 public NpmPackageAssetInfoJson( 058 String theFhirId, 059 String theCanonicalUrl, 060 FhirVersionEnum theFhirVersion, 061 String thePackageId, 062 String theVersion) { 063 myFhirId = theFhirId; 064 myCanonicalUrl = theCanonicalUrl; 065 myFhirVersion = theFhirVersion; 066 myPackageId = thePackageId; 067 myVersion = theVersion; 068 } 069 070 public String getFhirId() { 071 return myFhirId; 072 } 073 074 public NpmPackageAssetInfoJson setFhirId(String theFhirId) { 075 this.myFhirId = theFhirId; 076 return this; 077 } 078 079 public String getCanonicalUrl() { 080 return myCanonicalUrl; 081 } 082 083 public NpmPackageAssetInfoJson setCanonicalUrl(String theCanonicalUrl) { 084 this.myCanonicalUrl = theCanonicalUrl; 085 return this; 086 } 087 088 public FhirVersionEnum getFhirVersion() { 089 return myFhirVersion; 090 } 091 092 public NpmPackageAssetInfoJson setFhirVersion(FhirVersionEnum theFhirVersion) { 093 this.myFhirVersion = theFhirVersion; 094 return this; 095 } 096 097 public String getPackageId() { 098 return myPackageId; 099 } 100 101 public NpmPackageAssetInfoJson setPackageId(String thePackageId) { 102 this.myPackageId = thePackageId; 103 return this; 104 } 105 106 public String getVersion() { 107 return myVersion; 108 } 109 110 public NpmPackageAssetInfoJson setVersion(String theVersion) { 111 this.myVersion = theVersion; 112 return this; 113 } 114}