nl.reinkrul.nuts.auth.SignatureVerificationResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-client Show documentation
Show all versions of java-client Show documentation
Java client library for using the Nuts Node's REST API.
/*
* Nuts Auth Service API spec
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package nl.reinkrul.nuts.auth;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* Contains the signature verification result.
*/
@JsonPropertyOrder({
SignatureVerificationResponse.JSON_PROPERTY_VALIDITY,
SignatureVerificationResponse.JSON_PROPERTY_VP_TYPE,
SignatureVerificationResponse.JSON_PROPERTY_ISSUER_ATTRIBUTES,
SignatureVerificationResponse.JSON_PROPERTY_CREDENTIALS
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-05-12T15:13:45.138986+02:00[Europe/Amsterdam]")
public class SignatureVerificationResponse {
public static final String JSON_PROPERTY_VALIDITY = "validity";
private Boolean validity;
public static final String JSON_PROPERTY_VP_TYPE = "vpType";
private String vpType;
public static final String JSON_PROPERTY_ISSUER_ATTRIBUTES = "issuerAttributes";
private Object issuerAttributes;
public static final String JSON_PROPERTY_CREDENTIALS = "credentials";
private Object credentials;
public SignatureVerificationResponse() {
}
public SignatureVerificationResponse validity(Boolean validity) {
this.validity = validity;
return this;
}
/**
* Indicates the validity of the signature.
* @return validity
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_VALIDITY)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Boolean getValidity() {
return validity;
}
@JsonProperty(JSON_PROPERTY_VALIDITY)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setValidity(Boolean validity) {
this.validity = validity;
}
public SignatureVerificationResponse vpType(String vpType) {
this.vpType = vpType;
return this;
}
/**
* Type of Verifiable credential.
* @return vpType
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_VP_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getVpType() {
return vpType;
}
@JsonProperty(JSON_PROPERTY_VP_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setVpType(String vpType) {
this.vpType = vpType;
}
public SignatureVerificationResponse issuerAttributes(Object issuerAttributes) {
this.issuerAttributes = issuerAttributes;
return this;
}
/**
* Key vale pairs containing the attributes of the issuer.
* @return issuerAttributes
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ISSUER_ATTRIBUTES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Object getIssuerAttributes() {
return issuerAttributes;
}
@JsonProperty(JSON_PROPERTY_ISSUER_ATTRIBUTES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setIssuerAttributes(Object issuerAttributes) {
this.issuerAttributes = issuerAttributes;
}
public SignatureVerificationResponse credentials(Object credentials) {
this.credentials = credentials;
return this;
}
/**
* Key value pairs containing claims and their values.
* @return credentials
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CREDENTIALS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Object getCredentials() {
return credentials;
}
@JsonProperty(JSON_PROPERTY_CREDENTIALS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCredentials(Object credentials) {
this.credentials = credentials;
}
/**
* Return true if this SignatureVerificationResponse object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SignatureVerificationResponse signatureVerificationResponse = (SignatureVerificationResponse) o;
return Objects.equals(this.validity, signatureVerificationResponse.validity) &&
Objects.equals(this.vpType, signatureVerificationResponse.vpType) &&
Objects.equals(this.issuerAttributes, signatureVerificationResponse.issuerAttributes) &&
Objects.equals(this.credentials, signatureVerificationResponse.credentials);
}
@Override
public int hashCode() {
return Objects.hash(validity, vpType, issuerAttributes, credentials);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SignatureVerificationResponse {\n");
sb.append(" validity: ").append(toIndentedString(validity)).append("\n");
sb.append(" vpType: ").append(toIndentedString(vpType)).append("\n");
sb.append(" issuerAttributes: ").append(toIndentedString(issuerAttributes)).append("\n");
sb.append(" credentials: ").append(toIndentedString(credentials)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
/**
* Convert the instance into URL query string.
*
* @return URL query string
*/
public String toUrlQueryString() {
return toUrlQueryString(null);
}
/**
* Convert the instance into URL query string.
*
* @param prefix prefix of the query string
* @return URL query string
*/
public String toUrlQueryString(String prefix) {
String suffix = "";
String containerSuffix = "";
String containerPrefix = "";
if (prefix == null) {
// style=form, explode=true, e.g. /pet?name=cat&type=manx
prefix = "";
} else {
// deepObject style e.g. /pet?id[name]=cat&id[type]=manx
prefix = prefix + "[";
suffix = "]";
containerSuffix = "]";
containerPrefix = "[";
}
StringJoiner joiner = new StringJoiner("&");
// add `validity` to the URL query string
if (getValidity() != null) {
joiner.add(String.format("%svalidity%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getValidity()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `vpType` to the URL query string
if (getVpType() != null) {
joiner.add(String.format("%svpType%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getVpType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `issuerAttributes` to the URL query string
if (getIssuerAttributes() != null) {
joiner.add(String.format("%sissuerAttributes%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIssuerAttributes()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `credentials` to the URL query string
if (getCredentials() != null) {
joiner.add(String.format("%scredentials%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCredentials()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
return joiner.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy