public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonGameLiftConfig config = new AmazonGameLiftConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonGameLiftClient client = new AmazonGameLiftClient(creds, config); DescribeFleetLocationAttributesResponse resp = new DescribeFleetLocationAttributesResponse(); do { DescribeFleetLocationAttributesRequest req = new DescribeFleetLocationAttributesRequest { NextToken = resp.NextToken , Limit = maxItems }; resp = client.DescribeFleetLocationAttributes(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.LocationAttributes) { AddObject(obj); } foreach (var obj in resp.FleetId) { AddObject(obj); } foreach (var obj in resp.FleetArn) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeFleetLocationAttributesResponse response = new DescribeFleetLocationAttributesResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("FleetArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.FleetArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FleetId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.FleetId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LocationAttributes", targetDepth)) { var unmarshaller = new ListUnmarshaller <LocationAttributes, LocationAttributesUnmarshaller>(LocationAttributesUnmarshaller.Instance); response.LocationAttributes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = unmarshaller.Unmarshall(context); continue; } } return(response); }