com.github.nagyesta.lowkeyvault.model.common.KeyVaultItemListModel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lowkey-vault-app Show documentation
Show all versions of lowkey-vault-app Show documentation
Assembled application of Lowkey Vault.
package com.github.nagyesta.lowkeyvault.model.common;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NonNull;
import org.springframework.lang.Nullable;
import java.net.URI;
import java.util.List;
import java.util.Optional;
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class KeyVaultItemListModel {
@JsonProperty("nextLink")
private String nextLink;
@JsonProperty("value")
private List value;
public KeyVaultItemListModel(@NonNull final List value,
@Nullable final URI nextLinkUri) {
this.value = List.copyOf(value);
this.nextLink = Optional.ofNullable(nextLinkUri).map(URI::toString).orElse(null);
}
}