nl.reinkrul.nuts.auth.SignSessionResponse 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
* 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.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* SignSessionResponse
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-14T14:56:35.626800+02:00[Europe/Amsterdam]")
public class SignSessionResponse {
public static final String SERIALIZED_NAME_SESSION_I_D = "sessionID";
@SerializedName(SERIALIZED_NAME_SESSION_I_D)
private String sessionID;
public static final String SERIALIZED_NAME_SESSION_PTR = "sessionPtr";
@SerializedName(SERIALIZED_NAME_SESSION_PTR)
private Object sessionPtr;
/**
* The means this session uses to sign.
*/
@JsonAdapter(MeansEnum.Adapter.class)
public enum MeansEnum {
IRMA("irma"),
DUMMY("dummy");
private String value;
MeansEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static MeansEnum fromValue(String value) {
for (MeansEnum b : MeansEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final MeansEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public MeansEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return MeansEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_MEANS = "means";
@SerializedName(SERIALIZED_NAME_MEANS)
private MeansEnum means;
public SignSessionResponse sessionID(String sessionID) {
this.sessionID = sessionID;
return this;
}
/**
* Unique identifier of this sign session.
* @return sessionID
**/
@ApiModelProperty(required = true, value = "Unique identifier of this sign session.")
public String getSessionID() {
return sessionID;
}
public void setSessionID(String sessionID) {
this.sessionID = sessionID;
}
public SignSessionResponse sessionPtr(Object sessionPtr) {
this.sessionPtr = sessionPtr;
return this;
}
/**
* A pointer to a sign session. This is an opaque value which only has meaning in the context of the signing means. Can be an URL, base64 encoded image of a QRCode etc.
* @return sessionPtr
**/
@ApiModelProperty(required = true, value = "A pointer to a sign session. This is an opaque value which only has meaning in the context of the signing means. Can be an URL, base64 encoded image of a QRCode etc.")
public Object getSessionPtr() {
return sessionPtr;
}
public void setSessionPtr(Object sessionPtr) {
this.sessionPtr = sessionPtr;
}
public SignSessionResponse means(MeansEnum means) {
this.means = means;
return this;
}
/**
* The means this session uses to sign.
* @return means
**/
@ApiModelProperty(example = "irma", required = true, value = "The means this session uses to sign.")
public MeansEnum getMeans() {
return means;
}
public void setMeans(MeansEnum means) {
this.means = means;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SignSessionResponse signSessionResponse = (SignSessionResponse) o;
return Objects.equals(this.sessionID, signSessionResponse.sessionID) &&
Objects.equals(this.sessionPtr, signSessionResponse.sessionPtr) &&
Objects.equals(this.means, signSessionResponse.means);
}
@Override
public int hashCode() {
return Objects.hash(sessionID, sessionPtr, means);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SignSessionResponse {\n");
sb.append(" sessionID: ").append(toIndentedString(sessionID)).append("\n");
sb.append(" sessionPtr: ").append(toIndentedString(sessionPtr)).append("\n");
sb.append(" means: ").append(toIndentedString(means)).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 ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy