/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { UpdateVolumeResponse response = new UpdateVolumeResponse(); return(response); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { UpdateVolumeResponse response = new UpdateVolumeResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Volume", targetDepth)) { var unmarshaller = VolumeUnmarshaller.Instance; response.Volume = unmarshaller.Unmarshall(context); continue; } } return(response); }
private static void UpdateVolume(EvsClient client) { UpdateVolumeRequest req = new UpdateVolumeRequest() { VolumeId = "3c759440-0552-4a5f-9c40-782ace254314", Body = new UpdateVolumeRequestBody { Volume = new UpdateVolumeOption() { Name = "update", Description = "update" } } }; try { UpdateVolumeResponse resp = client.UpdateVolume(req); Console.WriteLine(resp.Id); 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); } }