All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nl.reinkrul.nuts.vdr.DIDDocumentMetadata Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
/*
 * 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;
import java.util.ArrayList;
import java.util.List;

/**
 * The DID document metadata.
 */
@ApiModel(description = "The DID document metadata.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-14T14:56:34.319584+02:00[Europe/Amsterdam]")
public class DIDDocumentMetadata {
  public static final String SERIALIZED_NAME_CREATED = "created";
  @SerializedName(SERIALIZED_NAME_CREATED)
  private String created;

  public static final String SERIALIZED_NAME_UPDATED = "updated";
  @SerializedName(SERIALIZED_NAME_UPDATED)
  private String updated;

  public static final String SERIALIZED_NAME_HASH = "hash";
  @SerializedName(SERIALIZED_NAME_HASH)
  private String hash;

  public static final String SERIALIZED_NAME_PREVIOUS_HASH = "previousHash";
  @SerializedName(SERIALIZED_NAME_PREVIOUS_HASH)
  private String previousHash;

  public static final String SERIALIZED_NAME_TXS = "txs";
  @SerializedName(SERIALIZED_NAME_TXS)
  private List txs = new ArrayList();

  public static final String SERIALIZED_NAME_DEACTIVATED = "deactivated";
  @SerializedName(SERIALIZED_NAME_DEACTIVATED)
  private Boolean deactivated;


  public DIDDocumentMetadata created(String created) {
    
    this.created = created;
    return this;
  }

   /**
   * Time when DID document was created in rfc3339 form.
   * @return created
  **/
  @ApiModelProperty(required = true, value = "Time when DID document was created in rfc3339 form.")

  public String getCreated() {
    return created;
  }


  public void setCreated(String created) {
    this.created = created;
  }


  public DIDDocumentMetadata updated(String updated) {
    
    this.updated = updated;
    return this;
  }

   /**
   * Time when DID document was updated in rfc3339 form.
   * @return updated
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Time when DID document was updated in rfc3339 form.")

  public String getUpdated() {
    return updated;
  }


  public void setUpdated(String updated) {
    this.updated = updated;
  }


  public DIDDocumentMetadata hash(String hash) {
    
    this.hash = hash;
    return this;
  }

   /**
   * Sha256 in hex form of the DID document contents.
   * @return hash
  **/
  @ApiModelProperty(required = true, value = "Sha256 in hex form of the DID document contents.")

  public String getHash() {
    return hash;
  }


  public void setHash(String hash) {
    this.hash = hash;
  }


  public DIDDocumentMetadata previousHash(String previousHash) {
    
    this.previousHash = previousHash;
    return this;
  }

   /**
   * Sha256 in hex form of the previous version of this DID document.
   * @return previousHash
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Sha256 in hex form of the previous version of this DID document.")

  public String getPreviousHash() {
    return previousHash;
  }


  public void setPreviousHash(String previousHash) {
    this.previousHash = previousHash;
  }


  public DIDDocumentMetadata txs(List txs) {
    
    this.txs = txs;
    return this;
  }

  public DIDDocumentMetadata addTxsItem(String txsItem) {
    this.txs.add(txsItem);
    return this;
  }

   /**
   * txs lists the transaction(s) that created the current version of this DID Document. If multiple transactions are listed, the DID Document is conflicted 
   * @return txs
  **/
  @ApiModelProperty(required = true, value = "txs lists the transaction(s) that created the current version of this DID Document. If multiple transactions are listed, the DID Document is conflicted ")

  public List getTxs() {
    return txs;
  }


  public void setTxs(List txs) {
    this.txs = txs;
  }


  public DIDDocumentMetadata deactivated(Boolean deactivated) {
    
    this.deactivated = deactivated;
    return this;
  }

   /**
   * Whether the DID document has been deactivated.
   * @return deactivated
  **/
  @ApiModelProperty(required = true, value = "Whether the DID document has been deactivated.")

  public Boolean getDeactivated() {
    return deactivated;
  }


  public void setDeactivated(Boolean deactivated) {
    this.deactivated = deactivated;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DIDDocumentMetadata diDDocumentMetadata = (DIDDocumentMetadata) o;
    return Objects.equals(this.created, diDDocumentMetadata.created) &&
        Objects.equals(this.updated, diDDocumentMetadata.updated) &&
        Objects.equals(this.hash, diDDocumentMetadata.hash) &&
        Objects.equals(this.previousHash, diDDocumentMetadata.previousHash) &&
        Objects.equals(this.txs, diDDocumentMetadata.txs) &&
        Objects.equals(this.deactivated, diDDocumentMetadata.deactivated);
  }

  @Override
  public int hashCode() {
    return Objects.hash(created, updated, hash, previousHash, txs, deactivated);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DIDDocumentMetadata {\n");
    sb.append("    created: ").append(toIndentedString(created)).append("\n");
    sb.append("    updated: ").append(toIndentedString(updated)).append("\n");
    sb.append("    hash: ").append(toIndentedString(hash)).append("\n");
    sb.append("    previousHash: ").append(toIndentedString(previousHash)).append("\n");
    sb.append("    txs: ").append(toIndentedString(txs)).append("\n");
    sb.append("    deactivated: ").append(toIndentedString(deactivated)).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