public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { AddInstanceGroupsResponse response = new AddInstanceGroupsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("JobFlowId", targetDepth)) { response.JobFlowId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InstanceGroupIds", targetDepth)) { var unmarshaller = new ListUnmarshaller<String,StringUnmarshaller>( StringUnmarshaller.GetInstance()); response.InstanceGroupIds = unmarshaller.Unmarshall(context); continue; } } return response; }
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { AddInstanceGroupsResponse response = new AddInstanceGroupsResponse(); context.Read(); UnmarshallResult(context,response); return response; }
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { AddInstanceGroupsResponse response = new AddInstanceGroupsResponse(); context.Read(); response.AddInstanceGroupsResult = AddInstanceGroupsResultUnmarshaller.GetInstance().Unmarshall(context); return response; }
private static void UnmarshallResult(JsonUnmarshallerContext context,AddInstanceGroupsResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("JobFlowId", targetDepth)) { context.Read(); response.JobFlowId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InstanceGroupIds", targetDepth)) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { response.InstanceGroupIds = null; continue; } response.InstanceGroupIds = new List<String>(); StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } response.InstanceGroupIds.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.CurrentDepth <= originalDepth) { return; } } return; }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { AddInstanceGroupsResponse response = new AddInstanceGroupsResponse(); while (context.Read()) { if (context.IsStartElement) { if(context.TestExpression("AddInstanceGroupsResult", 2)) { response.AddInstanceGroupsResult = AddInstanceGroupsResultUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.GetInstance().Unmarshall(context); } } } return response; }