/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeAssetResponse response = new DescribeAssetResponse(); 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("egressEndpoints", targetDepth)) { var unmarshaller = new ListUnmarshaller <EgressEndpoint, EgressEndpointUnmarshaller>(EgressEndpointUnmarshaller.Instance); response.EgressEndpoints = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("packagingGroupId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.PackagingGroupId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("resourceId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ResourceId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("sourceArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.SourceArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("sourceRoleArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.SourceRoleArn = 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) { DescribeAssetResponse response = new DescribeAssetResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("assetArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AssetArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("assetCreationDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.AssetCreationDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("assetHierarchies", targetDepth)) { var unmarshaller = new ListUnmarshaller <AssetHierarchy, AssetHierarchyUnmarshaller>(AssetHierarchyUnmarshaller.Instance); response.AssetHierarchies = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("assetId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AssetId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("assetLastUpdateDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.AssetLastUpdateDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("assetModelId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AssetModelId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("assetName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AssetName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("assetProperties", targetDepth)) { var unmarshaller = new ListUnmarshaller <AssetProperty, AssetPropertyUnmarshaller>(AssetPropertyUnmarshaller.Instance); response.AssetProperties = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("assetStatus", targetDepth)) { var unmarshaller = AssetStatusUnmarshaller.Instance; response.AssetStatus = unmarshaller.Unmarshall(context); continue; } } return(response); }