/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.qldb.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class GetRevisionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The name of the ledger. *

*/ private String name; /** *

* The block location of the document revision to be verified. An address is an Amazon Ion structure that has two * fields: strandId and sequenceNo. *

*

* For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}. *

*/ private ValueHolder blockAddress; /** *

* The UUID (represented in Base62-encoded text) of the document to be verified. *

*/ private String documentId; /** *

* The latest block location covered by the digest for which to request a proof. An address is an Amazon Ion * structure that has two fields: strandId and sequenceNo. *

*

* For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49}. *

*/ private ValueHolder digestTipAddress; /** *

* The name of the ledger. *

* * @param name * The name of the ledger. */ public void setName(String name) { this.name = name; } /** *

* The name of the ledger. *

* * @return The name of the ledger. */ public String getName() { return this.name; } /** *

* The name of the ledger. *

* * @param name * The name of the ledger. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRevisionRequest withName(String name) { setName(name); return this; } /** *

* The block location of the document revision to be verified. An address is an Amazon Ion structure that has two * fields: strandId and sequenceNo. *

*

* For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}. *

* * @param blockAddress * The block location of the document revision to be verified. An address is an Amazon Ion structure that has * two fields: strandId and sequenceNo.

*

* For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}. */ public void setBlockAddress(ValueHolder blockAddress) { this.blockAddress = blockAddress; } /** *

* The block location of the document revision to be verified. An address is an Amazon Ion structure that has two * fields: strandId and sequenceNo. *

*

* For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}. *

* * @return The block location of the document revision to be verified. An address is an Amazon Ion structure that * has two fields: strandId and sequenceNo.

*

* For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}. */ public ValueHolder getBlockAddress() { return this.blockAddress; } /** *

* The block location of the document revision to be verified. An address is an Amazon Ion structure that has two * fields: strandId and sequenceNo. *

*

* For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}. *

* * @param blockAddress * The block location of the document revision to be verified. An address is an Amazon Ion structure that has * two fields: strandId and sequenceNo.

*

* For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRevisionRequest withBlockAddress(ValueHolder blockAddress) { setBlockAddress(blockAddress); return this; } /** *

* The UUID (represented in Base62-encoded text) of the document to be verified. *

* * @param documentId * The UUID (represented in Base62-encoded text) of the document to be verified. */ public void setDocumentId(String documentId) { this.documentId = documentId; } /** *

* The UUID (represented in Base62-encoded text) of the document to be verified. *

* * @return The UUID (represented in Base62-encoded text) of the document to be verified. */ public String getDocumentId() { return this.documentId; } /** *

* The UUID (represented in Base62-encoded text) of the document to be verified. *

* * @param documentId * The UUID (represented in Base62-encoded text) of the document to be verified. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRevisionRequest withDocumentId(String documentId) { setDocumentId(documentId); return this; } /** *

* The latest block location covered by the digest for which to request a proof. An address is an Amazon Ion * structure that has two fields: strandId and sequenceNo. *

*

* For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49}. *

* * @param digestTipAddress * The latest block location covered by the digest for which to request a proof. An address is an Amazon Ion * structure that has two fields: strandId and sequenceNo.

*

* For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49}. */ public void setDigestTipAddress(ValueHolder digestTipAddress) { this.digestTipAddress = digestTipAddress; } /** *

* The latest block location covered by the digest for which to request a proof. An address is an Amazon Ion * structure that has two fields: strandId and sequenceNo. *

*

* For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49}. *

* * @return The latest block location covered by the digest for which to request a proof. An address is an Amazon Ion * structure that has two fields: strandId and sequenceNo.

*

* For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49}. */ public ValueHolder getDigestTipAddress() { return this.digestTipAddress; } /** *

* The latest block location covered by the digest for which to request a proof. An address is an Amazon Ion * structure that has two fields: strandId and sequenceNo. *

*

* For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49}. *

* * @param digestTipAddress * The latest block location covered by the digest for which to request a proof. An address is an Amazon Ion * structure that has two fields: strandId and sequenceNo.

*

* For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49}. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRevisionRequest withDigestTipAddress(ValueHolder digestTipAddress) { setDigestTipAddress(digestTipAddress); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getBlockAddress() != null) sb.append("BlockAddress: ").append("***Sensitive Data Redacted***").append(","); if (getDocumentId() != null) sb.append("DocumentId: ").append(getDocumentId()).append(","); if (getDigestTipAddress() != null) sb.append("DigestTipAddress: ").append("***Sensitive Data Redacted***"); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetRevisionRequest == false) return false; GetRevisionRequest other = (GetRevisionRequest) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getBlockAddress() == null ^ this.getBlockAddress() == null) return false; if (other.getBlockAddress() != null && other.getBlockAddress().equals(this.getBlockAddress()) == false) return false; if (other.getDocumentId() == null ^ this.getDocumentId() == null) return false; if (other.getDocumentId() != null && other.getDocumentId().equals(this.getDocumentId()) == false) return false; if (other.getDigestTipAddress() == null ^ this.getDigestTipAddress() == null) return false; if (other.getDigestTipAddress() != null && other.getDigestTipAddress().equals(this.getDigestTipAddress()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getBlockAddress() == null) ? 0 : getBlockAddress().hashCode()); hashCode = prime * hashCode + ((getDocumentId() == null) ? 0 : getDocumentId().hashCode()); hashCode = prime * hashCode + ((getDigestTipAddress() == null) ? 0 : getDigestTipAddress().hashCode()); return hashCode; } @Override public GetRevisionRequest clone() { return (GetRevisionRequest) super.clone(); } }