-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8455f62
commit b4aa635
Showing
7 changed files
with
74 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/main/java/gov/cms/madie/cqllibraryservice/dto/LibraryListDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package gov.cms.madie.cqllibraryservice.dto; | ||
|
||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import gov.cms.madie.models.common.ModelType; | ||
import gov.cms.madie.models.common.Version; | ||
import gov.cms.madie.models.library.CqlLibrary; | ||
import gov.cms.madie.models.library.LibrarySet; | ||
import gov.cms.madie.models.utils.VersionJsonSerializer; | ||
import gov.cms.madie.models.validators.EnumValidator; | ||
import jakarta.validation.constraints.NotBlank; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import lombok.experimental.SuperBuilder; | ||
import org.springframework.data.mongodb.core.mapping.DBRef; | ||
import org.springframework.data.mongodb.core.mapping.Document; | ||
|
||
@Data | ||
@Document | ||
@SuperBuilder(toBuilder = true) | ||
@NoArgsConstructor | ||
public class LibraryListDTO { | ||
|
||
private String id; | ||
private String librarySetId; | ||
|
||
private String cqlLibraryName; | ||
|
||
@NotBlank(message = "Model is required") | ||
@EnumValidator( | ||
enumClass = ModelType.class, | ||
message = "Model must be one of the supported types in MADiE.", | ||
groups = {CqlLibrary.ValidationOrder4.class}) | ||
private String model; | ||
|
||
@JsonSerialize(using = VersionJsonSerializer.VersionSerializer.class) | ||
@JsonDeserialize(using = VersionJsonSerializer.VersionDeserializer.class) | ||
private Version version; | ||
|
||
@DBRef private LibrarySet librarySet; | ||
|
||
private boolean draft; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters