public AttributePayload unmarshall(JsonUnmarshallerContext context) throws Exception { AttributePayload attributePayload = new AttributePayload(); if (context.testExpression("attributes", targetDepth)) { context.nextToken(); attributePayload.setAttributes(new MapUnmarshaller<String, String>(context.getUnmarshaller(String.class), context .getUnmarshaller(String.class)).unmarshall(context)); attributePayload.setMerge(context.getUnmarshaller(Boolean.class).unmarshall(context));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode()); hashCode = prime * hashCode + ((getMerge() == null) ? 0 : getMerge().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getThingGroupDescription() == null) ? 0 : getThingGroupDescription().hashCode()); hashCode = prime * hashCode + ((getAttributePayload() == null) ? 0 : getAttributePayload().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ThingGroupProperties == false) return false; ThingGroupProperties other = (ThingGroupProperties) obj; if (other.getThingGroupDescription() == null ^ this.getThingGroupDescription() == null) return false; if (other.getThingGroupDescription() != null && other.getThingGroupDescription().equals(this.getThingGroupDescription()) == false) return false; if (other.getAttributePayload() == null ^ this.getAttributePayload() == null) return false; if (other.getAttributePayload() != null && other.getAttributePayload().equals(this.getAttributePayload()) == false) return false; return true; }
withAttributePayload(new AttributePayload().addAttributesEntry(Config._APPID, appid)));
/** * <p> * A JSON string containing up to three key-value pair in JSON format. For example: * </p> * <p> * <code>{\"attributes\":{\"string1\":\"string2\"}}</code> * </p> * * @param attributes * A JSON string containing up to three key-value pair in JSON format. For example:</p> * <p> * <code>{\"attributes\":{\"string1\":\"string2\"}}</code> * @return Returns a reference to this object so that method calls can be chained together. */ public AttributePayload withAttributes(java.util.Map<String, String> attributes) { setAttributes(attributes); return this; }
/** * <p> * Specifies whether the list of attributes provided in the <code>AttributePayload</code> is merged with the * attributes stored in the registry, instead of overwriting them. * </p> * <p> * To remove an attribute, call <code>UpdateThing</code> with an empty attribute value. * </p> * <note> * <p> * The <code>merge</code> attribute is only valid when calling <code>UpdateThing</code>. * </p> * </note> * * @param merge * Specifies whether the list of attributes provided in the <code>AttributePayload</code> is merged with the * attributes stored in the registry, instead of overwriting them.</p> * <p> * To remove an attribute, call <code>UpdateThing</code> with an empty attribute value. * </p> * <note> * <p> * The <code>merge</code> attribute is only valid when calling <code>UpdateThing</code>. * </p> * @return Returns a reference to this object so that method calls can be chained together. */ public AttributePayload withMerge(Boolean merge) { setMerge(merge); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateThingRequest == false) return false; CreateThingRequest other = (CreateThingRequest) obj; if (other.getThingName() == null ^ this.getThingName() == null) return false; if (other.getThingName() != null && other.getThingName().equals(this.getThingName()) == false) return false; if (other.getThingTypeName() == null ^ this.getThingTypeName() == null) return false; if (other.getThingTypeName() != null && other.getThingTypeName().equals(this.getThingTypeName()) == false) return false; if (other.getAttributePayload() == null ^ this.getAttributePayload() == null) return false; if (other.getAttributePayload() != null && other.getAttributePayload().equals(this.getAttributePayload()) == false) return false; if (other.getBillingGroupName() == null ^ this.getBillingGroupName() == null) return false; if (other.getBillingGroupName() != null && other.getBillingGroupName().equals(this.getBillingGroupName()) == false) return false; return true; }
withAttributePayload(new AttributePayload().addAttributesEntry(Config._APPID, appid)));
/** * <p> * A JSON string containing up to three key-value pair in JSON format. For example: * </p> * <p> * <code>{\"attributes\":{\"string1\":\"string2\"}}</code> * </p> * * @param attributes * A JSON string containing up to three key-value pair in JSON format. For example:</p> * <p> * <code>{\"attributes\":{\"string1\":\"string2\"}}</code> * @return Returns a reference to this object so that method calls can be chained together. */ public AttributePayload withAttributes(java.util.Map<String, String> attributes) { setAttributes(attributes); return this; }
/** * <p> * Specifies whether the list of attributes provided in the <code>AttributePayload</code> is merged with the * attributes stored in the registry, instead of overwriting them. * </p> * <p> * To remove an attribute, call <code>UpdateThing</code> with an empty attribute value. * </p> * <note> * <p> * The <code>merge</code> attribute is only valid when calling <code>UpdateThing</code>. * </p> * </note> * * @param merge * Specifies whether the list of attributes provided in the <code>AttributePayload</code> is merged with the * attributes stored in the registry, instead of overwriting them.</p> * <p> * To remove an attribute, call <code>UpdateThing</code> with an empty attribute value. * </p> * <note> * <p> * The <code>merge</code> attribute is only valid when calling <code>UpdateThing</code>. * </p> * @return Returns a reference to this object so that method calls can be chained together. */ public AttributePayload withMerge(Boolean merge) { setMerge(merge); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AttributePayload == false) return false; AttributePayload other = (AttributePayload) obj; if (other.getAttributes() == null ^ this.getAttributes() == null) return false; if (other.getAttributes() != null && other.getAttributes().equals(this.getAttributes()) == false) return false; if (other.getMerge() == null ^ this.getMerge() == null) return false; if (other.getMerge() != null && other.getMerge().equals(this.getMerge()) == false) return false; return true; }
public AttributePayload unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } AttributePayload attributePayload = new AttributePayload(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("attributes")) { attributePayload.setAttributes(new MapUnmarshaller<String>(StringJsonUnmarshaller .getInstance() ) .unmarshall(context)); } else if (name.equals("merge")) { attributePayload.setMerge(BooleanJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return attributePayload; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getThingName() == null) ? 0 : getThingName().hashCode()); hashCode = prime * hashCode + ((getThingTypeName() == null) ? 0 : getThingTypeName().hashCode()); hashCode = prime * hashCode + ((getAttributePayload() == null) ? 0 : getAttributePayload().hashCode()); hashCode = prime * hashCode + ((getBillingGroupName() == null) ? 0 : getBillingGroupName().hashCode()); return hashCode; }
if (other.getAttributePayload() == null ^ this.getAttributePayload() == null) return false; if (other.getAttributePayload() != null && other.getAttributePayload().equals(this.getAttributePayload()) == false) return false; if (other.getExpectedVersion() == null ^ this.getExpectedVersion() == null)
/** * 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 (getAttributes() != null) sb.append("Attributes: ").append(getAttributes()).append(","); if (getMerge() != null) sb.append("Merge: ").append(getMerge()); sb.append("}"); return sb.toString(); }
public AttributePayload unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } AttributePayload attributePayload = new AttributePayload(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("attributes")) { attributePayload.setAttributes(new MapUnmarshaller<String>(StringJsonUnmarshaller .getInstance() ) .unmarshall(context)); } else if (name.equals("merge")) { attributePayload.setMerge(BooleanJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return attributePayload; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getThingName() == null) ? 0 : getThingName().hashCode()); hashCode = prime * hashCode + ((getThingTypeName() == null) ? 0 : getThingTypeName().hashCode()); hashCode = prime * hashCode + ((getAttributePayload() == null) ? 0 : getAttributePayload().hashCode()); hashCode = prime * hashCode + ((getExpectedVersion() == null) ? 0 : getExpectedVersion().hashCode()); hashCode = prime * hashCode + ((getRemoveThingType() == null) ? 0 : getRemoveThingType().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ThingGroupProperties == false) return false; ThingGroupProperties other = (ThingGroupProperties) obj; if (other.getThingGroupDescription() == null ^ this.getThingGroupDescription() == null) return false; if (other.getThingGroupDescription() != null && other.getThingGroupDescription().equals(this.getThingGroupDescription()) == false) return false; if (other.getAttributePayload() == null ^ this.getAttributePayload() == null) return false; if (other.getAttributePayload() != null && other.getAttributePayload().equals(this.getAttributePayload()) == false) return false; return true; } }
/** * Marshall the given parameter object. */ public void marshall(AttributePayload attributePayload, ProtocolMarshaller protocolMarshaller) { if (attributePayload == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(attributePayload.getAttributes(), ATTRIBUTES_BINDING); protocolMarshaller.marshall(attributePayload.getMerge(), MERGE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }