-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Legger til request og response for henting av journalpostIder
- Loading branch information
Showing
2 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
.../src/main/java/no/nav/folketrygdloven/kalkulus/request/v1/HentJournalpostIderRequest.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,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<UUID> koblinger; | ||
|
||
|
||
@JsonProperty(value = "saksnummer", required = true) | ||
@NotNull | ||
@Valid | ||
private Saksnummer saksnummer; | ||
|
||
|
||
protected HentJournalpostIderRequest() { | ||
// default ctor | ||
} | ||
|
||
public HentJournalpostIderRequest(@Valid @NotNull @Size(min = 1) List<UUID> koblinger, | ||
@JsonProperty(value = "saksnummer", required = true) @NotNull @Valid Saksnummer saksnummer) { | ||
this.koblinger = koblinger; | ||
this.saksnummer = saksnummer; | ||
} | ||
|
||
public List<UUID> getKoblinger() { | ||
return koblinger; | ||
} | ||
|
||
public Saksnummer getSaksnummer() { | ||
return saksnummer; | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
...kt/src/main/java/no/nav/folketrygdloven/kalkulus/response/v1/JournalpostIderResponse.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 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<JournalpostId> journalpostIder; | ||
|
||
public JournalpostIderResponse() { | ||
} | ||
|
||
public JournalpostIderResponse(@JsonProperty(value = "eksternReferanse") UUID eksternReferanse, @JsonProperty(value = "journalpostider") List<JournalpostId> journalpostIder) { | ||
this.eksternReferanse = eksternReferanse; | ||
this.journalpostIder = journalpostIder; | ||
} | ||
|
||
public UUID getEksternReferanse() { | ||
return eksternReferanse; | ||
} | ||
|
||
public List<JournalpostId> getJournalpostIder() { | ||
return journalpostIder; | ||
} | ||
} |