Beispiel #1
0
        public async Task <PutItemResult> PutItemAsync(PutItemRequest request)
        {
            var httpRequest = Setup("PutItem", request.ToJson());

            var json = await SendAndReadJsonElementAsync(httpRequest).ConfigureAwait(false);

            return(PutItemResult.FromJsonElement(json));
        }
Beispiel #2
0
        public async Task <PutItemResult> PutItemAsync(PutItemRequest request)
        {
            var httpRequest = Setup("PutItem", request.ToJson());

            var responseText = await SendAsync(httpRequest).ConfigureAwait(false);

            var responseJson = JsonObject.Parse(responseText);

            return(PutItemResult.FromJson(responseJson));
        }
Beispiel #3
0
        public static PutItemResult FromJson(JsonObject json)
        {
            var result = new PutItemResult();

            if (json.ContainsKey("ConsumedCapacity"))
            {
                result.ConsumedCapacity = ConsumedCapacity.FromJson((JsonObject)json["ConsumedCapacity"]);
            }

            if (json.ContainsKey("Attributes"))
            {
                result.Attributes = AttributeCollection.FromJson((JsonObject)json["Attributes"]);
            }

            return(result);
        }