nl.reinkrul.nuts.vdr.VerificationMethod 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 Verifiable Data Registry API spec
* API specification for the Verifiable Data Registry
*
* 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.vdr;
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;
/**
* A public key in JWK form.
*/
@ApiModel(description = "A public key in JWK form.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-14T14:56:34.319584+02:00[Europe/Amsterdam]")
public class VerificationMethod {
public static final String SERIALIZED_NAME_CONTROLLER = "controller";
@SerializedName(SERIALIZED_NAME_CONTROLLER)
private String controller;
public static final String SERIALIZED_NAME_ID = "id";
@SerializedName(SERIALIZED_NAME_ID)
private String id;
public static final String SERIALIZED_NAME_PUBLIC_KEY_JWK = "publicKeyJwk";
@SerializedName(SERIALIZED_NAME_PUBLIC_KEY_JWK)
private Object publicKeyJwk;
public static final String SERIALIZED_NAME_TYPE = "type";
@SerializedName(SERIALIZED_NAME_TYPE)
private String type;
public VerificationMethod controller(String controller) {
this.controller = controller;
return this;
}
/**
* The DID subject this key belongs to.
* @return controller
**/
@ApiModelProperty(example = "did:nuts:1", required = true, value = "The DID subject this key belongs to.")
public String getController() {
return controller;
}
public void setController(String controller) {
this.controller = controller;
}
public VerificationMethod id(String id) {
this.id = id;
return this;
}
/**
* The ID of the key, used as KID in various JWX technologies.
* @return id
**/
@ApiModelProperty(required = true, value = "The ID of the key, used as KID in various JWX technologies.")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public VerificationMethod publicKeyJwk(Object publicKeyJwk) {
this.publicKeyJwk = publicKeyJwk;
return this;
}
/**
* The public key formatted according rfc7517.
* @return publicKeyJwk
**/
@ApiModelProperty(required = true, value = "The public key formatted according rfc7517.")
public Object getPublicKeyJwk() {
return publicKeyJwk;
}
public void setPublicKeyJwk(Object publicKeyJwk) {
this.publicKeyJwk = publicKeyJwk;
}
public VerificationMethod type(String type) {
this.type = type;
return this;
}
/**
* The type of the key.
* @return type
**/
@ApiModelProperty(example = "JsonWebKey2020", required = true, value = "The type of the key.")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
VerificationMethod verificationMethod = (VerificationMethod) o;
return Objects.equals(this.controller, verificationMethod.controller) &&
Objects.equals(this.id, verificationMethod.id) &&
Objects.equals(this.publicKeyJwk, verificationMethod.publicKeyJwk) &&
Objects.equals(this.type, verificationMethod.type);
}
@Override
public int hashCode() {
return Objects.hash(controller, id, publicKeyJwk, type);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class VerificationMethod {\n");
sb.append(" controller: ").append(toIndentedString(controller)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" publicKeyJwk: ").append(toIndentedString(publicKeyJwk)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).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