Skip to content

Commit

Permalink
Legger til request og response for henting av journalpostIder
Browse files Browse the repository at this point in the history
  • Loading branch information
espenjv committed Apr 19, 2024
1 parent 3054701 commit ec2865e
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 0 deletions.
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;
}
}
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;
}
}

0 comments on commit ec2865e

Please sign in to comment.