/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeGroupResponse response = new DescribeGroupResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Group", targetDepth)) { var unmarshaller = GroupUnmarshaller.Instance; response.Group = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RequestId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.RequestId = unmarshaller.Unmarshall(context); continue; } } response.Status = (int)context.ResponseData.StatusCode; 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) { DescribeGroupResponse response = new DescribeGroupResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("DisplayName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DisplayName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GroupId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.GroupId = unmarshaller.Unmarshall(context); continue; } } return(response); }
public static DescribeGroupResponse Unmarshall(UnmarshallerContext context) { DescribeGroupResponse describeGroupResponse = new DescribeGroupResponse(); describeGroupResponse.HttpResponse = context.HttpResponse; describeGroupResponse.RequestId = context.StringValue("DescribeGroup.RequestId"); describeGroupResponse.Id = context.StringValue("DescribeGroup.Id"); describeGroupResponse.AliasId = context.StringValue("DescribeGroup.AliasId"); describeGroupResponse.Name = context.StringValue("DescribeGroup.Name"); describeGroupResponse.Description = context.StringValue("DescribeGroup.Description"); describeGroupResponse.App = context.StringValue("DescribeGroup.App"); describeGroupResponse.Region = context.StringValue("DescribeGroup.Region"); describeGroupResponse.InProtocol = context.StringValue("DescribeGroup.InProtocol"); describeGroupResponse.OutProtocol = context.StringValue("DescribeGroup.OutProtocol"); describeGroupResponse.Enabled = context.BooleanValue("DescribeGroup.Enabled"); describeGroupResponse.Status = context.StringValue("DescribeGroup.Status"); describeGroupResponse.CreatedTime = context.StringValue("DescribeGroup.CreatedTime"); describeGroupResponse.PushDomain = context.StringValue("DescribeGroup.PushDomain"); describeGroupResponse.PlayDomain = context.StringValue("DescribeGroup.PlayDomain"); describeGroupResponse.LazyPull = context.BooleanValue("DescribeGroup.LazyPull"); describeGroupResponse.Callback = context.StringValue("DescribeGroup.Callback"); describeGroupResponse.CaptureInterval = context.IntegerValue("DescribeGroup.CaptureInterval"); describeGroupResponse.CaptureImage = context.IntegerValue("DescribeGroup.CaptureImage"); describeGroupResponse.CaptureVideo = context.IntegerValue("DescribeGroup.CaptureVideo"); describeGroupResponse.CaptureOssBucket = context.StringValue("DescribeGroup.CaptureOssBucket"); describeGroupResponse.CaptureOssPath = context.StringValue("DescribeGroup.CaptureOssPath"); describeGroupResponse.GbId = context.StringValue("DescribeGroup.GbId"); describeGroupResponse.GbIp = context.StringValue("DescribeGroup.GbIp"); describeGroupResponse.GbPort = context.LongValue("DescribeGroup.GbPort"); List <string> describeGroupResponse_gbUdpPorts = new List <string>(); for (int i = 0; i < context.Length("DescribeGroup.GbUdpPorts.Length"); i++) { describeGroupResponse_gbUdpPorts.Add(context.StringValue("DescribeGroup.GbUdpPorts[" + i + "]")); } describeGroupResponse.GbUdpPorts = describeGroupResponse_gbUdpPorts; List <string> describeGroupResponse_gbTcpPorts = new List <string>(); for (int i = 0; i < context.Length("DescribeGroup.GbTcpPorts.Length"); i++) { describeGroupResponse_gbTcpPorts.Add(context.StringValue("DescribeGroup.GbTcpPorts[" + i + "]")); } describeGroupResponse.GbTcpPorts = describeGroupResponse_gbTcpPorts; DescribeGroupResponse.DescribeGroup_Stats stats = new DescribeGroupResponse.DescribeGroup_Stats(); stats.DeviceNum = context.LongValue("DescribeGroup.Stats.DeviceNum"); stats.IedNum = context.LongValue("DescribeGroup.Stats.IedNum"); stats.IpcNum = context.LongValue("DescribeGroup.Stats.IpcNum"); stats.PlatformNum = context.LongValue("DescribeGroup.Stats.PlatformNum"); describeGroupResponse.Stats = stats; return(describeGroupResponse); }