@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getThingName() == null) ? 0 : getThingName().hashCode()); hashCode = prime * hashCode + ((getExpectedVersion() == null) ? 0 : getExpectedVersion().hashCode()); return hashCode; }
/** * <p> * The expected version of the thing record in the registry. If the version of the record in the registry does not * match the expected version specified in the request, the <code>DeleteThing</code> request is rejected with a * <code>VersionConflictException</code>. * </p> * * @param expectedVersion * The expected version of the thing record in the registry. If the version of the record in the registry * does not match the expected version specified in the request, the <code>DeleteThing</code> request is * rejected with a <code>VersionConflictException</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public DeleteThingRequest withExpectedVersion(Long expectedVersion) { setExpectedVersion(expectedVersion); return this; }
/** * <p> * The name of the thing to delete. * </p> * * @param thingName * The name of the thing to delete. * @return Returns a reference to this object so that method calls can be chained together. */ public DeleteThingRequest withThingName(String thingName) { setThingName(thingName); return this; }
getClient().deleteCertificate(new DeleteCertificateRequest().withCertificateId(certId)); } catch (Exception e) { } getClient().deleteThing(new DeleteThingRequest().withThingName(id)); try { getDataClient().deleteThingShadow(new DeleteThingShadowRequest().withThingName(id));
getClient().deleteCertificate(new DeleteCertificateRequest().withCertificateId(certId)); } catch (Exception e) { } getClient().deleteThing(new DeleteThingRequest().withThingName(id)); try { getDataClient().deleteThingShadow(new DeleteThingShadowRequest().withThingName(id));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DeleteThingRequest == false) return false; DeleteThingRequest other = (DeleteThingRequest) obj; if (other.getThingName() == null ^ this.getThingName() == null) return false; if (other.getThingName() != null && other.getThingName().equals(this.getThingName()) == false) return false; if (other.getExpectedVersion() == null ^ this.getExpectedVersion() == null) return false; if (other.getExpectedVersion() != null && other.getExpectedVersion().equals(this.getExpectedVersion()) == false) return false; return true; }
/** * <p> * The name of the thing to delete. * </p> * * @param thingName * The name of the thing to delete. * @return Returns a reference to this object so that method calls can be chained together. */ public DeleteThingRequest withThingName(String thingName) { setThingName(thingName); return this; }
/** * <p> * The expected version of the thing record in the registry. If the version of the record in the registry does not * match the expected version specified in the request, the <code>DeleteThing</code> request is rejected with a * <code>VersionConflictException</code>. * </p> * * @param expectedVersion * The expected version of the thing record in the registry. If the version of the record in the registry * does not match the expected version specified in the request, the <code>DeleteThing</code> request is * rejected with a <code>VersionConflictException</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public DeleteThingRequest withExpectedVersion(Long expectedVersion) { setExpectedVersion(expectedVersion); 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 (getThingName() != null) sb.append("ThingName: ").append(getThingName()).append(","); if (getExpectedVersion() != null) sb.append("ExpectedVersion: ").append(getExpectedVersion()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(DeleteThingRequest deleteThingRequest, ProtocolMarshaller protocolMarshaller) { if (deleteThingRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deleteThingRequest.getThingName(), THINGNAME_BINDING); protocolMarshaller.marshall(deleteThingRequest.getExpectedVersion(), EXPECTEDVERSION_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getThingName() == null) ? 0 : getThingName().hashCode()); hashCode = prime * hashCode + ((getExpectedVersion() == null) ? 0 : getExpectedVersion().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DeleteThingRequest == false) return false; DeleteThingRequest other = (DeleteThingRequest) obj; if (other.getThingName() == null ^ this.getThingName() == null) return false; if (other.getThingName() != null && other.getThingName().equals(this.getThingName()) == false) return false; if (other.getExpectedVersion() == null ^ this.getExpectedVersion() == null) return false; if (other.getExpectedVersion() != null && other.getExpectedVersion().equals(this.getExpectedVersion()) == 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 (getThingName() != null) sb.append("thingName: " + getThingName() + ","); if (getExpectedVersion() != null) sb.append("expectedVersion: " + getExpectedVersion()); sb.append("}"); return sb.toString(); }
public Request<DeleteThingRequest> marshall(DeleteThingRequest deleteThingRequest) { if (deleteThingRequest == null) { throw new AmazonClientException( "Invalid argument passed to marshall(DeleteThingRequest)"); } Request<DeleteThingRequest> request = new DefaultRequest<DeleteThingRequest>( deleteThingRequest, "AWSIot"); request.setHttpMethod(HttpMethodName.DELETE); String uriResourcePath = "/things/{thingName}"; uriResourcePath = uriResourcePath.replace( "{thingName}", (deleteThingRequest.getThingName() == null) ? "" : StringUtils .fromString(deleteThingRequest.getThingName())); if (deleteThingRequest.getExpectedVersion() != null) { request.addParameter("expectedVersion", StringUtils.fromLong(deleteThingRequest.getExpectedVersion())); } request.setResourcePath(uriResourcePath); if (!request.getHeaders().containsKey("Content-Type")) { request.addHeader("Content-Type", "application/x-amz-json-1.0"); } return request; } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getThingName() == null) ? 0 : getThingName().hashCode()); hashCode = prime * hashCode + ((getExpectedVersion() == null) ? 0 : getExpectedVersion().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getThingName() == null) ? 0 : getThingName().hashCode()); hashCode = prime * hashCode + ((getExpectedVersion() == null) ? 0 : getExpectedVersion().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DeleteThingRequest == false) return false; DeleteThingRequest other = (DeleteThingRequest) obj; if (other.getThingName() == null ^ this.getThingName() == null) return false; if (other.getThingName() != null && other.getThingName().equals(this.getThingName()) == false) return false; if (other.getExpectedVersion() == null ^ this.getExpectedVersion() == null) return false; if (other.getExpectedVersion() != null && other.getExpectedVersion().equals(this.getExpectedVersion()) == false) return false; return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DeleteThingRequest == false) return false; DeleteThingRequest other = (DeleteThingRequest) obj; if (other.getThingName() == null ^ this.getThingName() == null) return false; if (other.getThingName() != null && other.getThingName().equals(this.getThingName()) == false) return false; if (other.getExpectedVersion() == null ^ this.getExpectedVersion() == null) return false; if (other.getExpectedVersion() != null && other.getExpectedVersion().equals(this.getExpectedVersion()) == 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 (getThingName() != null) sb.append("thingName: " + getThingName() + ","); if (getExpectedVersion() != null) sb.append("expectedVersion: " + getExpectedVersion()); sb.append("}"); return sb.toString(); }
/** * 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 (getThingName() != null) sb.append("ThingName: ").append(getThingName()).append(","); if (getExpectedVersion() != null) sb.append("ExpectedVersion: ").append(getExpectedVersion()); sb.append("}"); return sb.toString(); }