public static DescribeContactResponse Unmarshall(UnmarshallerContext context) { DescribeContactResponse describeContactResponse = new DescribeContactResponse(); describeContactResponse.HttpResponse = context.HttpResponse; describeContactResponse.RequestId = context.StringValue("DescribeContact.RequestId"); describeContactResponse.Success = context.BooleanValue("DescribeContact.Success"); describeContactResponse.Code = context.IntegerValue("DescribeContact.Code"); describeContactResponse.Message = context.StringValue("DescribeContact.Message"); DescribeContactResponse.DescribeContact_Datapoints datapoints = new DescribeContactResponse.DescribeContact_Datapoints(); datapoints.Name = context.StringValue("DescribeContact.Datapoints.Name"); List <DescribeContactResponse.DescribeContact_Datapoints.DescribeContact_Channel> datapoints_channels = new List <DescribeContactResponse.DescribeContact_Datapoints.DescribeContact_Channel>(); for (int i = 0; i < context.Length("DescribeContact.Datapoints.Channels.Length"); i++) { DescribeContactResponse.DescribeContact_Datapoints.DescribeContact_Channel channel = new DescribeContactResponse.DescribeContact_Datapoints.DescribeContact_Channel(); channel.Type = context.StringValue("DescribeContact.Datapoints.Channels[" + i + "].Type"); channel._Value = context.StringValue("DescribeContact.Datapoints.Channels[" + i + "].Value"); datapoints_channels.Add(channel); } datapoints.Channels = datapoints_channels; describeContactResponse.Datapoints = datapoints; return(describeContactResponse); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeContactResponse response = new DescribeContactResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Contact", targetDepth)) { var unmarshaller = ContactUnmarshaller.Instance; response.Contact = 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) { DescribeContactResponse response = new DescribeContactResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("contactId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ContactId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("contactStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ContactStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("dataflowList", targetDepth)) { var unmarshaller = new ListUnmarshaller <DataflowDetail, DataflowDetailUnmarshaller>(DataflowDetailUnmarshaller.Instance); response.DataflowList = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("endTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.EndTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("errorMessage", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ErrorMessage = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("groundStation", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.GroundStation = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("maximumElevation", targetDepth)) { var unmarshaller = ElevationUnmarshaller.Instance; response.MaximumElevation = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("missionProfileArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.MissionProfileArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("postPassEndTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.PostPassEndTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("prePassStartTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.PrePassStartTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("region", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Region = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("satelliteArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.SatelliteArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("startTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.StartTime = 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; } } return(response); }