
com.amazonaws.services.iot.model.OutgoingCertificate Maven / Gradle / Ivy
/*
* Copyright 2010-2018 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;
/**
*
* A certificate that has been transferred but not yet accepted.
*
*/
public class OutgoingCertificate implements Serializable {
/**
*
* The certificate ARN.
*
*/
private String certificateArn;
/**
*
* The certificate ID.
*
*
* Constraints:
* Length: 64 - 64
* Pattern: (0x)?[a-fA-F0-9]+
*/
private String certificateId;
/**
*
* The AWS account to which the transfer was made.
*
*
* Constraints:
* Pattern: [0-9]{12}
*/
private String transferredTo;
/**
*
* The date the transfer was initiated.
*
*/
private java.util.Date transferDate;
/**
*
* The transfer message.
*
*
* Constraints:
* Length: - 128
*/
private String transferMessage;
/**
*
* The certificate creation date.
*
*/
private java.util.Date creationDate;
/**
*
* The certificate ARN.
*
*
* @return
* The certificate ARN.
*
*/
public String getCertificateArn() {
return certificateArn;
}
/**
*
* The certificate ARN.
*
*
* @param certificateArn
* The certificate ARN.
*
*/
public void setCertificateArn(String certificateArn) {
this.certificateArn = certificateArn;
}
/**
*
* The certificate ARN.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param certificateArn
* The certificate ARN.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public OutgoingCertificate withCertificateArn(String certificateArn) {
this.certificateArn = certificateArn;
return this;
}
/**
*
* The certificate ID.
*
*
* Constraints:
* Length: 64 - 64
* Pattern: (0x)?[a-fA-F0-9]+
*
* @return
* The certificate ID.
*
*/
public String getCertificateId() {
return certificateId;
}
/**
*
* The certificate ID.
*
*
* Constraints:
* Length: 64 - 64
* Pattern: (0x)?[a-fA-F0-9]+
*
* @param certificateId
* The certificate ID.
*
*/
public void setCertificateId(String certificateId) {
this.certificateId = certificateId;
}
/**
*
* The certificate ID.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* Length: 64 - 64
* Pattern: (0x)?[a-fA-F0-9]+
*
* @param certificateId
* The certificate ID.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public OutgoingCertificate withCertificateId(String certificateId) {
this.certificateId = certificateId;
return this;
}
/**
*
* The AWS account to which the transfer was made.
*
*
* Constraints:
* Pattern: [0-9]{12}
*
* @return
* The AWS account to which the transfer was made.
*
*/
public String getTransferredTo() {
return transferredTo;
}
/**
*
* The AWS account to which the transfer was made.
*
*
* Constraints:
* Pattern: [0-9]{12}
*
* @param transferredTo
* The AWS account to which the transfer was made.
*
*/
public void setTransferredTo(String transferredTo) {
this.transferredTo = transferredTo;
}
/**
*
* The AWS account to which the transfer was made.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* Pattern: [0-9]{12}
*
* @param transferredTo
* The AWS account to which the transfer was made.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public OutgoingCertificate withTransferredTo(String transferredTo) {
this.transferredTo = transferredTo;
return this;
}
/**
*
* The date the transfer was initiated.
*
*
* @return
* The date the transfer was initiated.
*
*/
public java.util.Date getTransferDate() {
return transferDate;
}
/**
*
* The date the transfer was initiated.
*
*
* @param transferDate
* The date the transfer was initiated.
*
*/
public void setTransferDate(java.util.Date transferDate) {
this.transferDate = transferDate;
}
/**
*
* The date the transfer was initiated.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param transferDate
* The date the transfer was initiated.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public OutgoingCertificate withTransferDate(java.util.Date transferDate) {
this.transferDate = transferDate;
return this;
}
/**
*
* The transfer message.
*
*
* Constraints:
* Length: - 128
*
* @return
* The transfer message.
*
*/
public String getTransferMessage() {
return transferMessage;
}
/**
*
* The transfer message.
*
*
* Constraints:
* Length: - 128
*
* @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
*
* @param transferMessage
* The transfer message.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public OutgoingCertificate withTransferMessage(String transferMessage) {
this.transferMessage = transferMessage;
return this;
}
/**
*
* The certificate creation date.
*
*
* @return
* The certificate creation date.
*
*/
public java.util.Date getCreationDate() {
return creationDate;
}
/**
*
* The certificate creation date.
*
*
* @param creationDate
* The certificate creation date.
*
*/
public void setCreationDate(java.util.Date creationDate) {
this.creationDate = creationDate;
}
/**
*
* The certificate creation date.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param creationDate
* The certificate creation date.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public OutgoingCertificate withCreationDate(java.util.Date creationDate) {
this.creationDate = creationDate;
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 (getCertificateArn() != null)
sb.append("certificateArn: " + getCertificateArn() + ",");
if (getCertificateId() != null)
sb.append("certificateId: " + getCertificateId() + ",");
if (getTransferredTo() != null)
sb.append("transferredTo: " + getTransferredTo() + ",");
if (getTransferDate() != null)
sb.append("transferDate: " + getTransferDate() + ",");
if (getTransferMessage() != null)
sb.append("transferMessage: " + getTransferMessage() + ",");
if (getCreationDate() != null)
sb.append("creationDate: " + getCreationDate());
sb.append("}");
return sb.toString();
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode
+ ((getCertificateArn() == null) ? 0 : getCertificateArn().hashCode());
hashCode = prime * hashCode
+ ((getCertificateId() == null) ? 0 : getCertificateId().hashCode());
hashCode = prime * hashCode
+ ((getTransferredTo() == null) ? 0 : getTransferredTo().hashCode());
hashCode = prime * hashCode
+ ((getTransferDate() == null) ? 0 : getTransferDate().hashCode());
hashCode = prime * hashCode
+ ((getTransferMessage() == null) ? 0 : getTransferMessage().hashCode());
hashCode = prime * hashCode
+ ((getCreationDate() == null) ? 0 : getCreationDate().hashCode());
return hashCode;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof OutgoingCertificate == false)
return false;
OutgoingCertificate other = (OutgoingCertificate) obj;
if (other.getCertificateArn() == null ^ this.getCertificateArn() == null)
return false;
if (other.getCertificateArn() != null
&& other.getCertificateArn().equals(this.getCertificateArn()) == false)
return false;
if (other.getCertificateId() == null ^ this.getCertificateId() == null)
return false;
if (other.getCertificateId() != null
&& other.getCertificateId().equals(this.getCertificateId()) == false)
return false;
if (other.getTransferredTo() == null ^ this.getTransferredTo() == null)
return false;
if (other.getTransferredTo() != null
&& other.getTransferredTo().equals(this.getTransferredTo()) == 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.getTransferMessage() == null ^ this.getTransferMessage() == null)
return false;
if (other.getTransferMessage() != null
&& other.getTransferMessage().equals(this.getTransferMessage()) == false)
return false;
if (other.getCreationDate() == null ^ this.getCreationDate() == null)
return false;
if (other.getCreationDate() != null
&& other.getCreationDate().equals(this.getCreationDate()) == false)
return false;
return true;
}
}