/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeInputResponse response = new DescribeInputResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("input", targetDepth)) { var unmarshaller = InputUnmarshaller.Instance; response.Input = unmarshaller.Unmarshall(context); continue; } } 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) { DescribeInputResponse response = new DescribeInputResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("arn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Arn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("attachedChannels", targetDepth)) { var unmarshaller = new ListUnmarshaller <string, StringUnmarshaller>(StringUnmarshaller.Instance); response.AttachedChannels = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("destinations", targetDepth)) { var unmarshaller = new ListUnmarshaller <InputDestination, InputDestinationUnmarshaller>(InputDestinationUnmarshaller.Instance); response.Destinations = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("inputClass", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.InputClass = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("inputDevices", targetDepth)) { var unmarshaller = new ListUnmarshaller <InputDeviceSettings, InputDeviceSettingsUnmarshaller>(InputDeviceSettingsUnmarshaller.Instance); response.InputDevices = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("inputSourceType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.InputSourceType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("mediaConnectFlows", targetDepth)) { var unmarshaller = new ListUnmarshaller <MediaConnectFlow, MediaConnectFlowUnmarshaller>(MediaConnectFlowUnmarshaller.Instance); response.MediaConnectFlows = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("roleArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.RoleArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("securityGroups", targetDepth)) { var unmarshaller = new ListUnmarshaller <string, StringUnmarshaller>(StringUnmarshaller.Instance); response.SecurityGroups = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("sources", targetDepth)) { var unmarshaller = new ListUnmarshaller <InputSource, InputSourceUnmarshaller>(InputSourceUnmarshaller.Instance); response.Sources = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("state", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.State = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("tags", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); response.Tags = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("type", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Type = unmarshaller.Unmarshall(context); continue; } } return(response); }