/** * <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; }
if (context.testExpression("attributes", targetDepth)) { context.nextToken(); attributePayload.setAttributes(new MapUnmarshaller<String, String>(context.getUnmarshaller(String.class), context .getUnmarshaller(String.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> * 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; }
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; }
if (context.testExpression("attributes", targetDepth)) { context.nextToken(); attributePayload.setAttributes(new MapUnmarshaller<String, String>(context.getUnmarshaller(String.class), context .getUnmarshaller(String.class)).unmarshall(context));