/* * Copyright 2010-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.iot.model; import java.io.Serializable; /** *
* Data used to transfer a certificate to an Amazon Web Services account. *
*/ public class TransferData implements Serializable { /** ** The transfer message. *
*
* Constraints:
* Length: - 128
* Pattern: [\s\S]*
*/
private String transferMessage;
/**
*
* The reason why the transfer was rejected. *
*
* Constraints:
* Length: - 128
* Pattern: [\s\S]*
*/
private String rejectReason;
/**
*
* The date the transfer took place. *
*/ private java.util.Date transferDate; /** ** The date the transfer was accepted. *
*/ private java.util.Date acceptDate; /** ** The date the transfer was rejected. *
*/ private java.util.Date rejectDate; /** ** The transfer message. *
*
* Constraints:
* Length: - 128
* Pattern: [\s\S]*
*
* @return
* The transfer message. *
*/ public String getTransferMessage() { return transferMessage; } /** ** The transfer message. *
*
* Constraints:
* Length: - 128
* Pattern: [\s\S]*
*
* @param transferMessage
* The transfer message. *
*/ public void setTransferMessage(String transferMessage) { this.transferMessage = transferMessage; } /** ** The transfer message. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 128
* Pattern: [\s\S]*
*
* @param transferMessage
* The transfer message. *
* @return A reference to this updated object so that method calls can be * chained together. */ public TransferData withTransferMessage(String transferMessage) { this.transferMessage = transferMessage; return this; } /** ** The reason why the transfer was rejected. *
*
* Constraints:
* Length: - 128
* Pattern: [\s\S]*
*
* @return
* The reason why the transfer was rejected. *
*/ public String getRejectReason() { return rejectReason; } /** ** The reason why the transfer was rejected. *
*
* Constraints:
* Length: - 128
* Pattern: [\s\S]*
*
* @param rejectReason
* The reason why the transfer was rejected. *
*/ public void setRejectReason(String rejectReason) { this.rejectReason = rejectReason; } /** ** The reason why the transfer was rejected. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 128
* Pattern: [\s\S]*
*
* @param rejectReason
* The reason why the transfer was rejected. *
* @return A reference to this updated object so that method calls can be * chained together. */ public TransferData withRejectReason(String rejectReason) { this.rejectReason = rejectReason; return this; } /** ** The date the transfer took place. *
* * @return* The date the transfer took place. *
*/ public java.util.Date getTransferDate() { return transferDate; } /** ** The date the transfer took place. *
* * @param transferDate* The date the transfer took place. *
*/ public void setTransferDate(java.util.Date transferDate) { this.transferDate = transferDate; } /** ** The date the transfer took place. *
** Returns a reference to this object so that method calls can be chained * together. * * @param transferDate
* The date the transfer took place. *
* @return A reference to this updated object so that method calls can be * chained together. */ public TransferData withTransferDate(java.util.Date transferDate) { this.transferDate = transferDate; return this; } /** ** The date the transfer was accepted. *
* * @return* The date the transfer was accepted. *
*/ public java.util.Date getAcceptDate() { return acceptDate; } /** ** The date the transfer was accepted. *
* * @param acceptDate* The date the transfer was accepted. *
*/ public void setAcceptDate(java.util.Date acceptDate) { this.acceptDate = acceptDate; } /** ** The date the transfer was accepted. *
** Returns a reference to this object so that method calls can be chained * together. * * @param acceptDate
* The date the transfer was accepted. *
* @return A reference to this updated object so that method calls can be * chained together. */ public TransferData withAcceptDate(java.util.Date acceptDate) { this.acceptDate = acceptDate; return this; } /** ** The date the transfer was rejected. *
* * @return* The date the transfer was rejected. *
*/ public java.util.Date getRejectDate() { return rejectDate; } /** ** The date the transfer was rejected. *
* * @param rejectDate* The date the transfer was rejected. *
*/ public void setRejectDate(java.util.Date rejectDate) { this.rejectDate = rejectDate; } /** ** The date the transfer was rejected. *
** Returns a reference to this object so that method calls can be chained * together. * * @param rejectDate
* The date the transfer was rejected. *
* @return A reference to this updated object so that method calls can be * chained together. */ public TransferData withRejectDate(java.util.Date rejectDate) { this.rejectDate = rejectDate; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getTransferMessage() != null) sb.append("transferMessage: " + getTransferMessage() + ","); if (getRejectReason() != null) sb.append("rejectReason: " + getRejectReason() + ","); if (getTransferDate() != null) sb.append("transferDate: " + getTransferDate() + ","); if (getAcceptDate() != null) sb.append("acceptDate: " + getAcceptDate() + ","); if (getRejectDate() != null) sb.append("rejectDate: " + getRejectDate()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTransferMessage() == null) ? 0 : getTransferMessage().hashCode()); hashCode = prime * hashCode + ((getRejectReason() == null) ? 0 : getRejectReason().hashCode()); hashCode = prime * hashCode + ((getTransferDate() == null) ? 0 : getTransferDate().hashCode()); hashCode = prime * hashCode + ((getAcceptDate() == null) ? 0 : getAcceptDate().hashCode()); hashCode = prime * hashCode + ((getRejectDate() == null) ? 0 : getRejectDate().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TransferData == false) return false; TransferData other = (TransferData) obj; if (other.getTransferMessage() == null ^ this.getTransferMessage() == null) return false; if (other.getTransferMessage() != null && other.getTransferMessage().equals(this.getTransferMessage()) == false) return false; if (other.getRejectReason() == null ^ this.getRejectReason() == null) return false; if (other.getRejectReason() != null && other.getRejectReason().equals(this.getRejectReason()) == false) return false; if (other.getTransferDate() == null ^ this.getTransferDate() == null) return false; if (other.getTransferDate() != null && other.getTransferDate().equals(this.getTransferDate()) == false) return false; if (other.getAcceptDate() == null ^ this.getAcceptDate() == null) return false; if (other.getAcceptDate() != null && other.getAcceptDate().equals(this.getAcceptDate()) == false) return false; if (other.getRejectDate() == null ^ this.getRejectDate() == null) return false; if (other.getRejectDate() != null && other.getRejectDate().equals(this.getRejectDate()) == false) return false; return true; } }