From ec2865e9e8ec7aaf0953707b0616eaccf92b5bd2 Mon Sep 17 00:00:00 2001 From: Espen Johansen Velsvik Date: Fri, 19 Apr 2024 15:30:27 +0200 Subject: [PATCH] Legger til request og response for henting av journalpostIder --- .../v1/HentJournalpostIderRequest.java | 45 +++++++++++++++++++ .../response/v1/JournalpostIderResponse.java | 43 ++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 kontrakt/src/main/java/no/nav/folketrygdloven/kalkulus/request/v1/HentJournalpostIderRequest.java create mode 100644 kontrakt/src/main/java/no/nav/folketrygdloven/kalkulus/response/v1/JournalpostIderResponse.java diff --git a/kontrakt/src/main/java/no/nav/folketrygdloven/kalkulus/request/v1/HentJournalpostIderRequest.java b/kontrakt/src/main/java/no/nav/folketrygdloven/kalkulus/request/v1/HentJournalpostIderRequest.java new file mode 100644 index 00000000..cbfb6a11 --- /dev/null +++ b/kontrakt/src/main/java/no/nav/folketrygdloven/kalkulus/request/v1/HentJournalpostIderRequest.java @@ -0,0 +1,45 @@ +package no.nav.folketrygdloven.kalkulus.request.v1; + +import java.util.List; +import java.util.UUID; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import no.nav.folketrygdloven.kalkulus.felles.v1.Saksnummer; + +public class HentJournalpostIderRequest { + + @JsonProperty(value = "koblinger", required = true) + @Valid + @NotNull + @Size(min=1) + private List koblinger; + + + @JsonProperty(value = "saksnummer", required = true) + @NotNull + @Valid + private Saksnummer saksnummer; + + + protected HentJournalpostIderRequest() { + // default ctor + } + + public HentJournalpostIderRequest(@Valid @NotNull @Size(min = 1) List koblinger, + @JsonProperty(value = "saksnummer", required = true) @NotNull @Valid Saksnummer saksnummer) { + this.koblinger = koblinger; + this.saksnummer = saksnummer; + } + + public List getKoblinger() { + return koblinger; + } + + public Saksnummer getSaksnummer() { + return saksnummer; + } +} diff --git a/kontrakt/src/main/java/no/nav/folketrygdloven/kalkulus/response/v1/JournalpostIderResponse.java b/kontrakt/src/main/java/no/nav/folketrygdloven/kalkulus/response/v1/JournalpostIderResponse.java new file mode 100644 index 00000000..76240af4 --- /dev/null +++ b/kontrakt/src/main/java/no/nav/folketrygdloven/kalkulus/response/v1/JournalpostIderResponse.java @@ -0,0 +1,43 @@ +package no.nav.folketrygdloven.kalkulus.response.v1; + +import java.util.List; +import java.util.UUID; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; + +import jakarta.validation.Valid; +import no.nav.folketrygdloven.kalkulus.felles.v1.JournalpostId; + +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(value = JsonInclude.Include.NON_ABSENT, content = JsonInclude.Include.NON_EMPTY) +@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, creatorVisibility = JsonAutoDetect.Visibility.NONE) +public class JournalpostIderResponse { + + + @JsonProperty(value = "eksternReferanse") + @Valid + private UUID eksternReferanse; + + @JsonProperty(value = "journalpostider") + @Valid + private List journalpostIder; + + public JournalpostIderResponse() { + } + + public JournalpostIderResponse(@JsonProperty(value = "eksternReferanse") UUID eksternReferanse, @JsonProperty(value = "journalpostider") List journalpostIder) { + this.eksternReferanse = eksternReferanse; + this.journalpostIder = journalpostIder; + } + + public UUID getEksternReferanse() { + return eksternReferanse; + } + + public List getJournalpostIder() { + return journalpostIder; + } +}