/** * <p> * The capacity units consumed by the <code>GetItem</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>GetItem</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 GetItemResult withConsumedCapacity(ConsumedCapacity consumedCapacity) { setConsumedCapacity(consumedCapacity); return this; }
getItemResult.setConsumedCapacity(ConsumedCapacityJsonUnmarshaller.getInstance().unmarshall(context));
public GetItemResult unmarshall(JsonUnmarshallerContext context) throws Exception { GetItemResult getItemResult = new GetItemResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Item")) { getItemResult.setItem(new MapUnmarshaller<AttributeValue>( AttributeValueJsonUnmarshaller.getInstance() ) .unmarshall(context)); } else if (name.equals("ConsumedCapacity")) { getItemResult.setConsumedCapacity(ConsumedCapacityJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return getItemResult; }
/** * <p> * The capacity units consumed by the <code>GetItem</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>GetItem</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 GetItemResult withConsumedCapacity(ConsumedCapacity consumedCapacity) { setConsumedCapacity(consumedCapacity); return this; }
getItemResult.setConsumedCapacity(ConsumedCapacityJsonUnmarshaller.getInstance().unmarshall(context));