@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCertificateId() == null) ? 0 : getCertificateId().hashCode()); hashCode = prime * hashCode + ((getNewStatus() == null) ? 0 : getNewStatus().hashCode()); return hashCode; }
/** * <p> * The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.) * </p> * * @param certificateId * The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.) * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateCertificateRequest withCertificateId(String certificateId) { setCertificateId(certificateId); return this; }
/** * <p> * The new status. * </p> * <p> * <b>Note:</b> Setting the status to PENDING_TRANSFER will result in an exception being thrown. PENDING_TRANSFER is * a status used internally by AWS IoT. It is not intended for developer use. * </p> * <p> * <b>Note:</b> The status value REGISTER_INACTIVE is deprecated and should not be used. * </p> * * @param newStatus * The new status.</p> * <p> * <b>Note:</b> Setting the status to PENDING_TRANSFER will result in an exception being thrown. * PENDING_TRANSFER is a status used internally by AWS IoT. It is not intended for developer use. * </p> * <p> * <b>Note:</b> The status value REGISTER_INACTIVE is deprecated and should not be used. * @return Returns a reference to this object so that method calls can be chained together. * @see CertificateStatus */ public UpdateCertificateRequest withNewStatus(String newStatus) { setNewStatus(newStatus); return this; }
iotClient.deletePolicy(deletePolicyRequest); UpdateCertificateRequest updateCertificateRequest = new UpdateCertificateRequest(); updateCertificateRequest.setCertificateId(certResult.getCertificateId()); updateCertificateRequest.setNewStatus(CertificateStatus.INACTIVE); iotClient.updateCertificate(updateCertificateRequest);
} catch (Exception e) { } try { getClient().updateCertificate(new UpdateCertificateRequest().withCertificateId(certId). withNewStatus(CertificateStatus.INACTIVE)); } catch (Exception e) { } try {
/** * <p> * The new status. * </p> * <p> * <b>Note:</b> Setting the status to PENDING_TRANSFER will result in an exception being thrown. PENDING_TRANSFER is * a status used internally by AWS IoT. It is not intended for developer use. * </p> * <p> * <b>Note:</b> The status value REGISTER_INACTIVE is deprecated and should not be used. * </p> * * @param newStatus * The new status.</p> * <p> * <b>Note:</b> Setting the status to PENDING_TRANSFER will result in an exception being thrown. * PENDING_TRANSFER is a status used internally by AWS IoT. It is not intended for developer use. * </p> * <p> * <b>Note:</b> The status value REGISTER_INACTIVE is deprecated and should not be used. * @see CertificateStatus */ public void setNewStatus(CertificateStatus newStatus) { withNewStatus(newStatus); }
iotClient.deletePolicy(deletePolicyRequest); UpdateCertificateRequest updateCertificateRequest = new UpdateCertificateRequest(); updateCertificateRequest.setCertificateId(certResult.getCertificateId()); updateCertificateRequest.setNewStatus(CertificateStatus.INACTIVE); iotClient.updateCertificate(updateCertificateRequest);
} catch (Exception e) { } try { getClient().updateCertificate(new UpdateCertificateRequest().withCertificateId(certId). withNewStatus(CertificateStatus.INACTIVE)); } catch (Exception e) { } try {
/** * <p> * The new status. * </p> * <p> * <b>Note:</b> Setting the status to PENDING_TRANSFER will result in an exception being thrown. PENDING_TRANSFER is * a status used internally by AWS IoT. It is not intended for developer use. * </p> * <p> * <b>Note:</b> The status value REGISTER_INACTIVE is deprecated and should not be used. * </p> * * @param newStatus * The new status.</p> * <p> * <b>Note:</b> Setting the status to PENDING_TRANSFER will result in an exception being thrown. * PENDING_TRANSFER is a status used internally by AWS IoT. It is not intended for developer use. * </p> * <p> * <b>Note:</b> The status value REGISTER_INACTIVE is deprecated and should not be used. * @see CertificateStatus */ public void setNewStatus(CertificateStatus newStatus) { withNewStatus(newStatus); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateCertificateRequest == false) return false; UpdateCertificateRequest other = (UpdateCertificateRequest) obj; if (other.getCertificateId() == null ^ this.getCertificateId() == null) return false; if (other.getCertificateId() != null && other.getCertificateId().equals(this.getCertificateId()) == false) return false; if (other.getNewStatus() == null ^ this.getNewStatus() == null) return false; if (other.getNewStatus() != null && other.getNewStatus().equals(this.getNewStatus()) == false) return false; return true; }
iotClient.deletePolicy(deletePolicyRequest); UpdateCertificateRequest updateCertificateRequest = new UpdateCertificateRequest(); updateCertificateRequest.setCertificateId(certResult.getCertificateId()); updateCertificateRequest.setNewStatus(CertificateStatus.INACTIVE); iotClient.updateCertificate(updateCertificateRequest);
/** * <p> * The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.) * </p> * * @param certificateId * The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.) * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateCertificateRequest withCertificateId(String certificateId) { setCertificateId(certificateId); return this; }
/** * <p> * The new status. * </p> * <p> * <b>Note:</b> Setting the status to PENDING_TRANSFER will result in an exception being thrown. PENDING_TRANSFER is * a status used internally by AWS IoT. It is not intended for developer use. * </p> * <p> * <b>Note:</b> The status value REGISTER_INACTIVE is deprecated and should not be used. * </p> * * @param newStatus * The new status.</p> * <p> * <b>Note:</b> Setting the status to PENDING_TRANSFER will result in an exception being thrown. * PENDING_TRANSFER is a status used internally by AWS IoT. It is not intended for developer use. * </p> * <p> * <b>Note:</b> The status value REGISTER_INACTIVE is deprecated and should not be used. * @return Returns a reference to this object so that method calls can be chained together. * @see CertificateStatus */ public UpdateCertificateRequest withNewStatus(String newStatus) { setNewStatus(newStatus); 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 (getCertificateId() != null) sb.append("CertificateId: ").append(getCertificateId()).append(","); if (getNewStatus() != null) sb.append("NewStatus: ").append(getNewStatus()); sb.append("}"); return sb.toString(); }
iotClient.deletePolicy(deletePolicyRequest); UpdateCertificateRequest updateCertificateRequest = new UpdateCertificateRequest(); updateCertificateRequest.setCertificateId(certResult.getCertificateId()); updateCertificateRequest.setNewStatus(CertificateStatus.INACTIVE); iotClient.updateCertificate(updateCertificateRequest);
/** * Marshall the given parameter object. */ public void marshall(UpdateCertificateRequest updateCertificateRequest, ProtocolMarshaller protocolMarshaller) { if (updateCertificateRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(updateCertificateRequest.getCertificateId(), CERTIFICATEID_BINDING); protocolMarshaller.marshall(updateCertificateRequest.getNewStatus(), NEWSTATUS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
iotClient.deletePolicy(deletePolicyRequest); UpdateCertificateRequest updateCertificateRequest = new UpdateCertificateRequest(); updateCertificateRequest.setCertificateId(certResult.getCertificateId()); updateCertificateRequest.setNewStatus(CertificateStatus.INACTIVE); iotClient.updateCertificate(updateCertificateRequest);
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCertificateId() == null) ? 0 : getCertificateId().hashCode()); hashCode = prime * hashCode + ((getNewStatus() == null) ? 0 : getNewStatus().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateCertificateRequest == false) return false; UpdateCertificateRequest other = (UpdateCertificateRequest) obj; if (other.getCertificateId() == null ^ this.getCertificateId() == null) return false; if (other.getCertificateId() != null && other.getCertificateId().equals(this.getCertificateId()) == false) return false; if (other.getNewStatus() == null ^ this.getNewStatus() == null) return false; if (other.getNewStatus() != null && other.getNewStatus().equals(this.getNewStatus()) == false) return false; return true; } }
/** * 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 (getCertificateId() != null) sb.append("certificateId: " + getCertificateId() + ","); if (getNewStatus() != null) sb.append("newStatus: " + getNewStatus()); sb.append("}"); return sb.toString(); }