public static UpdateSnapshotResponse Unmarshall(UnmarshallerContext context) { UpdateSnapshotResponse updateSnapshotResponse = new UpdateSnapshotResponse(); updateSnapshotResponse.HttpResponse = context.HttpResponse; updateSnapshotResponse.RequestId = context.StringValue("UpdateSnapshot.RequestId"); updateSnapshotResponse.Result = context.BooleanValue("UpdateSnapshot.Result"); return(updateSnapshotResponse); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { UpdateSnapshotResponse response = new UpdateSnapshotResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Snapshot", targetDepth)) { var unmarshaller = SnapshotUnmarshaller.Instance; response.Snapshot = unmarshaller.Unmarshall(context); continue; } } return(response); }
private static void UpdateSnapshot(EvsClient client) { UpdateSnapshotRequest req = new UpdateSnapshotRequest() { SnapshotId = "fc5281ca-5a1b-4193-814f-514cb5d303e7", Body = new UpdateSnapshotRequestBody() { Snapshot = new UpdateSnapshotOption() { Name = "test_update", Description = "test_update" } } }; try { UpdateSnapshotResponse resp = client.UpdateSnapshot(req); Console.WriteLine(resp.Snapshot); Console.WriteLine(resp.HttpStatusCode); } catch (RequestTimeoutException requestTimeoutException) { Console.WriteLine(requestTimeoutException.ErrorMessage); } catch (ServiceResponseException clientRequestException) { Console.WriteLine(clientRequestException.HttpStatusCode); Console.WriteLine(clientRequestException.ErrorCode); Console.WriteLine(clientRequestException.ErrorMsg); } catch (ConnectionException connectionException) { Console.WriteLine(connectionException.ErrorMessage); } }