@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeThingRequest == false) return false; DescribeThingRequest other = (DescribeThingRequest) obj; if (other.getThingName() == null ^ this.getThingName() == null) return false; if (other.getThingName() != null && other.getThingName().equals(this.getThingName()) == false) return false; return true; }
/** * <p> * The name of the thing. * </p> * * @param thingName * The name of the thing. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeThingRequest withThingName(String thingName) { setThingName(thingName); return this; }
@Override public boolean existsThing(Thing thing) { if (thing == null) { return false; } try { return getClient().describeThing(new DescribeThingRequest().withThingName(cloudIDForThing(thing))) != null; } catch (Exception e) { return false; } }
@Override public boolean existsThing(Thing thing) { if (thing == null) { return false; } try { return getClient().describeThing(new DescribeThingRequest().withThingName(cloudIDForThing(thing))) != null; } catch (Exception e) { return false; } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getThingName() == null) ? 0 : getThingName().hashCode()); return hashCode; }
/** * <p> * The name of the thing. * </p> * * @param thingName * The name of the thing. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeThingRequest withThingName(String thingName) { setThingName(thingName); 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()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(DescribeThingRequest describeThingRequest, ProtocolMarshaller protocolMarshaller) { if (describeThingRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(describeThingRequest.getThingName(), THINGNAME_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeThingRequest == false) return false; DescribeThingRequest other = (DescribeThingRequest) obj; if (other.getThingName() == null ^ this.getThingName() == null) return false; if (other.getThingName() != null && other.getThingName().equals(this.getThingName()) == false) return false; return true; } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getThingName() == null) ? 0 : getThingName().hashCode()); return hashCode; }
/** * 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()); sb.append("}"); return sb.toString(); }
public Request<DescribeThingRequest> marshall(DescribeThingRequest describeThingRequest) { if (describeThingRequest == null) { throw new AmazonClientException( "Invalid argument passed to marshall(DescribeThingRequest)"); } Request<DescribeThingRequest> request = new DefaultRequest<DescribeThingRequest>( describeThingRequest, "AWSIot"); request.setHttpMethod(HttpMethodName.GET); String uriResourcePath = "/things/{thingName}"; uriResourcePath = uriResourcePath.replace( "{thingName}", (describeThingRequest.getThingName() == null) ? "" : StringUtils .fromString(describeThingRequest.getThingName())); 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()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeThingRequest == false) return false; DescribeThingRequest other = (DescribeThingRequest) obj; if (other.getThingName() == null ^ this.getThingName() == null) return false; if (other.getThingName() != null && other.getThingName().equals(this.getThingName()) == false) return false; return true; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getThingName() == null) ? 0 : getThingName().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeThingRequest == false) return false; DescribeThingRequest other = (DescribeThingRequest) obj; if (other.getThingName() == null ^ this.getThingName() == null) return false; if (other.getThingName() != null && other.getThingName().equals(this.getThingName()) == 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()); 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()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(DescribeThingRequest describeThingRequest, ProtocolMarshaller protocolMarshaller) { if (describeThingRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(describeThingRequest.getThingName(), THINGNAME_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
public Request<DescribeThingRequest> marshall(DescribeThingRequest describeThingRequest) { if (describeThingRequest == null) { throw new AmazonClientException( "Invalid argument passed to marshall(DescribeThingRequest)"); } Request<DescribeThingRequest> request = new DefaultRequest<DescribeThingRequest>( describeThingRequest, "AWSIot"); request.setHttpMethod(HttpMethodName.GET); String uriResourcePath = "/things/{thingName}"; uriResourcePath = uriResourcePath.replace( "{thingName}", (describeThingRequest.getThingName() == null) ? "" : StringUtils .fromString(describeThingRequest.getThingName())); request.setResourcePath(uriResourcePath); if (!request.getHeaders().containsKey("Content-Type")) { request.addHeader("Content-Type", "application/x-amz-json-1.0"); } return request; } }