@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getThingName() == null) ? 0 : getThingName().hashCode()); hashCode = prime * hashCode + ((getThingArn() == null) ? 0 : getThingArn().hashCode()); hashCode = prime * hashCode + ((getThingId() == null) ? 0 : getThingId().hashCode()); return hashCode; }
/** * <p> * The ARN of the new thing. * </p> * * @param thingArn * The ARN of the new thing. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateThingResult withThingArn(String thingArn) { setThingArn(thingArn); return this; }
/** * <p> * The thing ID. * </p> * * @param thingId * The thing ID. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateThingResult withThingId(String thingId) { setThingId(thingId); return this; }
public CreateThingResult unmarshall(JsonUnmarshallerContext context) throws Exception { CreateThingResult createThingResult = new CreateThingResult(); if (context.testExpression("thingName", targetDepth)) { context.nextToken(); createThingResult.setThingName(context.getUnmarshaller(String.class).unmarshall(context)); createThingResult.setThingArn(context.getUnmarshaller(String.class).unmarshall(context)); createThingResult.setThingId(context.getUnmarshaller(String.class).unmarshall(context));
new CreateKeysAndCertificateRequest().withSetAsActive(true)); String accountId = getAccountIdFromARN(resp1.getThingArn()); String policyString = (String) (thing.getDeviceMetadata().containsKey("policyJSON") ? thing.getDeviceMetadata().get("policyJSON") : getDefaultPolicyDocument(accountId, id)); thing.getDeviceMetadata().put("thingId", thing.getId()); thing.getDeviceMetadata().put("thingName", id); thing.getDeviceMetadata().put("thingARN", resp1.getThingArn()); thing.getDeviceMetadata().put("clientId", id); thing.getDeviceMetadata().put("clientCertId", resp2.getCertificateId());
/** * <p> * The name of the new thing. * </p> * * @param thingName * The name of the new thing. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateThingResult withThingName(String thingName) { setThingName(thingName); return this; }
public CreateThingResult unmarshall(JsonUnmarshallerContext context) throws Exception { CreateThingResult createThingResult = new CreateThingResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("thingName")) { createThingResult.setThingName(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("thingArn")) { createThingResult.setThingArn(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("thingId")) { createThingResult.setThingId(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return createThingResult; }
new CreateKeysAndCertificateRequest().withSetAsActive(true)); String accountId = getAccountIdFromARN(resp1.getThingArn()); String policyString = (String) (thing.getDeviceMetadata().containsKey("policyJSON") ? thing.getDeviceMetadata().get("policyJSON") : getDefaultPolicyDocument(accountId, id)); thing.getDeviceMetadata().put("thingId", thing.getId()); thing.getDeviceMetadata().put("thingName", id); thing.getDeviceMetadata().put("thingARN", resp1.getThingArn()); thing.getDeviceMetadata().put("clientId", id); thing.getDeviceMetadata().put("clientCertId", resp2.getCertificateId());
/** * <p> * The name of the new thing. * </p> * * @param thingName * The name of the new thing. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateThingResult withThingName(String thingName) { setThingName(thingName); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateThingResult == false) return false; CreateThingResult other = (CreateThingResult) obj; if (other.getThingName() == null ^ this.getThingName() == null) return false; if (other.getThingName() != null && other.getThingName().equals(this.getThingName()) == false) return false; if (other.getThingArn() == null ^ this.getThingArn() == null) return false; if (other.getThingArn() != null && other.getThingArn().equals(this.getThingArn()) == false) return false; if (other.getThingId() == null ^ this.getThingId() == null) return false; if (other.getThingId() != null && other.getThingId().equals(this.getThingId()) == false) return false; return true; }
public CreateThingResult unmarshall(JsonUnmarshallerContext context) throws Exception { CreateThingResult createThingResult = new CreateThingResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("thingName")) { createThingResult.setThingName(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("thingArn")) { createThingResult.setThingArn(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("thingId")) { createThingResult.setThingId(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return createThingResult; }
/** * <p> * The ARN of the new thing. * </p> * * @param thingArn * The ARN of the new thing. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateThingResult withThingArn(String thingArn) { setThingArn(thingArn); return this; }
/** * <p> * The thing ID. * </p> * * @param thingId * The thing ID. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateThingResult withThingId(String thingId) { setThingId(thingId); 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 (getThingArn() != null) sb.append("ThingArn: ").append(getThingArn()).append(","); if (getThingId() != null) sb.append("ThingId: ").append(getThingId()); sb.append("}"); return sb.toString(); }
public CreateThingResult unmarshall(JsonUnmarshallerContext context) throws Exception { CreateThingResult createThingResult = new CreateThingResult(); if (context.testExpression("thingName", targetDepth)) { context.nextToken(); createThingResult.setThingName(context.getUnmarshaller(String.class).unmarshall(context)); createThingResult.setThingArn(context.getUnmarshaller(String.class).unmarshall(context)); createThingResult.setThingId(context.getUnmarshaller(String.class).unmarshall(context));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getThingName() == null) ? 0 : getThingName().hashCode()); hashCode = prime * hashCode + ((getThingArn() == null) ? 0 : getThingArn().hashCode()); hashCode = prime * hashCode + ((getThingId() == null) ? 0 : getThingId().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateThingResult == false) return false; CreateThingResult other = (CreateThingResult) obj; if (other.getThingName() == null ^ this.getThingName() == null) return false; if (other.getThingName() != null && other.getThingName().equals(this.getThingName()) == false) return false; if (other.getThingArn() == null ^ this.getThingArn() == null) return false; if (other.getThingArn() != null && other.getThingArn().equals(this.getThingArn()) == false) return false; if (other.getThingId() == null ^ this.getThingId() == null) return false; if (other.getThingId() != null && other.getThingId().equals(this.getThingId()) == 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 (getThingArn() != null) sb.append("thingArn: " + getThingArn() + ","); if (getThingId() != null) sb.append("thingId: " + getThingId()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getThingName() == null) ? 0 : getThingName().hashCode()); hashCode = prime * hashCode + ((getThingArn() == null) ? 0 : getThingArn().hashCode()); hashCode = prime * hashCode + ((getThingId() == null) ? 0 : getThingId().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 + ((getThingArn() == null) ? 0 : getThingArn().hashCode()); hashCode = prime * hashCode + ((getThingId() == null) ? 0 : getThingId().hashCode()); return hashCode; }