/* * 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; /** *
* An object that contains information about a server certificate. *
*/ public class ServerCertificateSummary implements Serializable { /** ** The ARN of the server certificate. *
*
* Constraints:
* Length: 1 - 2048
* Pattern:
* arn:aws(-cn|-us-gov|-iso-b|-iso)?:acm:[a-z]{2}-(gov-|iso-|
* isob-)?[a-z]{4,9}-\d{1}:\d{12}:certificate/[a-zA-Z0-9/-]+
*/
private String serverCertificateArn;
/**
*
* The status of the server certificate. *
*
* Constraints:
* Allowed Values: INVALID, VALID
*/
private String serverCertificateStatus;
/**
*
* Details that explain the status of the server certificate. *
*/ private String serverCertificateStatusDetail; /** ** The ARN of the server certificate. *
*
* Constraints:
* Length: 1 - 2048
* Pattern:
* arn:aws(-cn|-us-gov|-iso-b|-iso)?:acm:[a-z]{2}-(gov-|iso-|
* isob-)?[a-z]{4,9}-\d{1}:\d{12}:certificate/[a-zA-Z0-9/-]+
*
* @return
* The ARN of the server certificate. *
*/ public String getServerCertificateArn() { return serverCertificateArn; } /** ** The ARN of the server certificate. *
*
* Constraints:
* Length: 1 - 2048
* Pattern:
* arn:aws(-cn|-us-gov|-iso-b|-iso)?:acm:[a-z]{2}-(gov-|iso-|
* isob-)?[a-z]{4,9}-\d{1}:\d{12}:certificate/[a-zA-Z0-9/-]+
*
* @param serverCertificateArn
* The ARN of the server certificate. *
*/ public void setServerCertificateArn(String serverCertificateArn) { this.serverCertificateArn = serverCertificateArn; } /** ** The ARN of the server certificate. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 2048
* Pattern:
* arn:aws(-cn|-us-gov|-iso-b|-iso)?:acm:[a-z]{2}-(gov-|iso-|
* isob-)?[a-z]{4,9}-\d{1}:\d{12}:certificate/[a-zA-Z0-9/-]+
*
* @param serverCertificateArn
* The ARN of the server certificate. *
* @return A reference to this updated object so that method calls can be * chained together. */ public ServerCertificateSummary withServerCertificateArn(String serverCertificateArn) { this.serverCertificateArn = serverCertificateArn; return this; } /** ** The status of the server certificate. *
*
* Constraints:
* Allowed Values: INVALID, VALID
*
* @return
* The status of the server certificate. *
* @see ServerCertificateStatus */ public String getServerCertificateStatus() { return serverCertificateStatus; } /** ** The status of the server certificate. *
*
* Constraints:
* Allowed Values: INVALID, VALID
*
* @param serverCertificateStatus
* The status of the server certificate. *
* @see ServerCertificateStatus */ public void setServerCertificateStatus(String serverCertificateStatus) { this.serverCertificateStatus = serverCertificateStatus; } /** ** The status of the server certificate. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: INVALID, VALID
*
* @param serverCertificateStatus
* The status of the server certificate. *
* @return A reference to this updated object so that method calls can be * chained together. * @see ServerCertificateStatus */ public ServerCertificateSummary withServerCertificateStatus(String serverCertificateStatus) { this.serverCertificateStatus = serverCertificateStatus; return this; } /** ** The status of the server certificate. *
*
* Constraints:
* Allowed Values: INVALID, VALID
*
* @param serverCertificateStatus
* The status of the server certificate. *
* @see ServerCertificateStatus */ public void setServerCertificateStatus(ServerCertificateStatus serverCertificateStatus) { this.serverCertificateStatus = serverCertificateStatus.toString(); } /** ** The status of the server certificate. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: INVALID, VALID
*
* @param serverCertificateStatus
* The status of the server certificate. *
* @return A reference to this updated object so that method calls can be * chained together. * @see ServerCertificateStatus */ public ServerCertificateSummary withServerCertificateStatus( ServerCertificateStatus serverCertificateStatus) { this.serverCertificateStatus = serverCertificateStatus.toString(); return this; } /** ** Details that explain the status of the server certificate. *
* * @return* Details that explain the status of the server certificate. *
*/ public String getServerCertificateStatusDetail() { return serverCertificateStatusDetail; } /** ** Details that explain the status of the server certificate. *
* * @param serverCertificateStatusDetail* Details that explain the status of the server certificate. *
*/ public void setServerCertificateStatusDetail(String serverCertificateStatusDetail) { this.serverCertificateStatusDetail = serverCertificateStatusDetail; } /** ** Details that explain the status of the server certificate. *
** Returns a reference to this object so that method calls can be chained * together. * * @param serverCertificateStatusDetail
* Details that explain the status of the server certificate. *
* @return A reference to this updated object so that method calls can be * chained together. */ public ServerCertificateSummary withServerCertificateStatusDetail( String serverCertificateStatusDetail) { this.serverCertificateStatusDetail = serverCertificateStatusDetail; 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 (getServerCertificateArn() != null) sb.append("serverCertificateArn: " + getServerCertificateArn() + ","); if (getServerCertificateStatus() != null) sb.append("serverCertificateStatus: " + getServerCertificateStatus() + ","); if (getServerCertificateStatusDetail() != null) sb.append("serverCertificateStatusDetail: " + getServerCertificateStatusDetail()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getServerCertificateArn() == null) ? 0 : getServerCertificateArn().hashCode()); hashCode = prime * hashCode + ((getServerCertificateStatus() == null) ? 0 : getServerCertificateStatus() .hashCode()); hashCode = prime * hashCode + ((getServerCertificateStatusDetail() == null) ? 0 : getServerCertificateStatusDetail().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ServerCertificateSummary == false) return false; ServerCertificateSummary other = (ServerCertificateSummary) obj; if (other.getServerCertificateArn() == null ^ this.getServerCertificateArn() == null) return false; if (other.getServerCertificateArn() != null && other.getServerCertificateArn().equals(this.getServerCertificateArn()) == false) return false; if (other.getServerCertificateStatus() == null ^ this.getServerCertificateStatus() == null) return false; if (other.getServerCertificateStatus() != null && other.getServerCertificateStatus().equals(this.getServerCertificateStatus()) == false) return false; if (other.getServerCertificateStatusDetail() == null ^ this.getServerCertificateStatusDetail() == null) return false; if (other.getServerCertificateStatusDetail() != null && other.getServerCertificateStatusDetail().equals( this.getServerCertificateStatusDetail()) == false) return false; return true; } }