/** * <p> * The capacity units consumed by the <code>UpdateItem</code> operation. The data returned includes the total * provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. * <code>ConsumedCapacity</code> is only returned if the <code>ReturnConsumedCapacity</code> parameter was * specified. For more information, see <a * href="http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html" * >Provisioned Throughput</a> in the <i>Amazon DynamoDB Developer Guide</i>. * </p> * * @param consumedCapacity * The capacity units consumed by the <code>UpdateItem</code> operation. The data returned includes the total * provisioned throughput consumed, along with statistics for the table and any indexes involved in the * operation. <code>ConsumedCapacity</code> is only returned if the <code>ReturnConsumedCapacity</code> * parameter was specified. For more information, see <a * href="http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html" * >Provisioned Throughput</a> in the <i>Amazon DynamoDB Developer Guide</i>. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateItemResult withConsumedCapacity(ConsumedCapacity consumedCapacity) { setConsumedCapacity(consumedCapacity); return this; }
updateItemResult.setConsumedCapacity(ConsumedCapacityJsonUnmarshaller.getInstance().unmarshall(context));
public UpdateItemResult unmarshall(JsonUnmarshallerContext context) throws Exception { UpdateItemResult updateItemResult = new UpdateItemResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Attributes")) { updateItemResult.setAttributes(new MapUnmarshaller<AttributeValue>( AttributeValueJsonUnmarshaller.getInstance() ) .unmarshall(context)); } else if (name.equals("ConsumedCapacity")) { updateItemResult.setConsumedCapacity(ConsumedCapacityJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("ItemCollectionMetrics")) { updateItemResult.setItemCollectionMetrics(ItemCollectionMetricsJsonUnmarshaller .getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return updateItemResult; }
/** * <p> * The capacity units consumed by the <code>UpdateItem</code> operation. The data returned includes the total * provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. * <code>ConsumedCapacity</code> is only returned if the <code>ReturnConsumedCapacity</code> parameter was * specified. For more information, see <a * href="http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html" * >Provisioned Throughput</a> in the <i>Amazon DynamoDB Developer Guide</i>. * </p> * * @param consumedCapacity * The capacity units consumed by the <code>UpdateItem</code> operation. The data returned includes the total * provisioned throughput consumed, along with statistics for the table and any indexes involved in the * operation. <code>ConsumedCapacity</code> is only returned if the <code>ReturnConsumedCapacity</code> * parameter was specified. For more information, see <a * href="http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html" * >Provisioned Throughput</a> in the <i>Amazon DynamoDB Developer Guide</i>. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateItemResult withConsumedCapacity(ConsumedCapacity consumedCapacity) { setConsumedCapacity(consumedCapacity); return this; }
updateItemResult.setConsumedCapacity(ConsumedCapacityJsonUnmarshaller.getInstance().unmarshall(context));