com.amazonaws.services.iot.model.TransferData Maven / Gradle / Ivy
Show all versions of aws-java-sdk-iot Show documentation
/*
 * Copyright 2010-2016 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 AWS account.
 * 
 */
public class TransferData implements Serializable, Cloneable {
    /**
     * 
     * The transfer message.
     * 
     */
    private String transferMessage;
    /**
     * 
     * The reason why the transfer was rejected.
     * 
     */
    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.
     * 
     * 
     * @param transferMessage
     *        The transfer message.
     */
    public void setTransferMessage(String transferMessage) {
        this.transferMessage = transferMessage;
    }
    /**
     * 
     * The transfer message.
     * 
     * 
     * @return The transfer message.
     */
    public String getTransferMessage() {
        return this.transferMessage;
    }
    /**
     * 
     * The transfer message.
     * 
     * 
     * @param transferMessage
     *        The transfer message.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */
    public TransferData withTransferMessage(String transferMessage) {
        setTransferMessage(transferMessage);
        return this;
    }
    /**
     * 
     * The reason why the transfer was rejected.
     * 
     * 
     * @param rejectReason
     *        The reason why the transfer was rejected.
     */
    public void setRejectReason(String rejectReason) {
        this.rejectReason = rejectReason;
    }
    /**
     * 
     * The reason why the transfer was rejected.
     * 
     * 
     * @return The reason why the transfer was rejected.
     */
    public String getRejectReason() {
        return this.rejectReason;
    }
    /**
     * 
     * The reason why the transfer was rejected.
     * 
     * 
     * @param rejectReason
     *        The reason why the transfer was rejected.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */
    public TransferData withRejectReason(String rejectReason) {
        setRejectReason(rejectReason);
        return this;
    }
    /**
     * 
     * 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.
     * 
     * 
     * @return The date the transfer took place.
     */
    public java.util.Date getTransferDate() {
        return this.transferDate;
    }
    /**
     * 
     * The date the transfer took place.
     * 
     * 
     * @param transferDate
     *        The date the transfer took place.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */
    public TransferData withTransferDate(java.util.Date transferDate) {
        setTransferDate(transferDate);
        return this;
    }
    /**
     * 
     * 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.
     * 
     * 
     * @return The date the transfer was accepted.
     */
    public java.util.Date getAcceptDate() {
        return this.acceptDate;
    }
    /**
     * 
     * The date the transfer was accepted.
     * 
     * 
     * @param acceptDate
     *        The date the transfer was accepted.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */
    public TransferData withAcceptDate(java.util.Date acceptDate) {
        setAcceptDate(acceptDate);
        return this;
    }
    /**
     * 
     * 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.
     * 
     * 
     * @return The date the transfer was rejected.
     */
    public java.util.Date getRejectDate() {
        return this.rejectDate;
    }
    /**
     * 
     * The date the transfer was rejected.
     * 
     * 
     * @param rejectDate
     *        The date the transfer was rejected.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */
    public TransferData withRejectDate(java.util.Date rejectDate) {
        setRejectDate(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 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;
    }
    @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 TransferData clone() {
        try {
            return (TransferData) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                            + "even though we're Cloneable!", e);
        }
    }
}