@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; }
/** * 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(); }
@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; }
/** * 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; }
/** * 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(); }
/** * 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(); }
@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; } }
/** * 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); } }
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; } }