/** * <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; }
attributePayload.setMerge(context.getUnmarshaller(Boolean.class).unmarshall(context));
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; }
/** * <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; }
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; }
attributePayload.setMerge(context.getUnmarshaller(Boolean.class).unmarshall(context));