Ejemplo n.º 1
0
        public async Task ListPools()
        {
            BigDataPoolsClient client = CreateClient();
            BigDataPoolResourceInfoListResult pools = await client.ListAsync();

            Assert.GreaterOrEqual(1, pools.Value.Count);
        }
        public async Task <Response <BigDataPoolResourceInfoListResult> > ListAsync(CancellationToken cancellationToken = default)
        {
            using var message = CreateListRequest();
            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);

            switch (message.Response.Status)
            {
            case 200:
            {
                BigDataPoolResourceInfoListResult value = default;
                using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);

                value = BigDataPoolResourceInfoListResult.DeserializeBigDataPoolResourceInfoListResult(document.RootElement);
                return(Response.FromValue(value, message.Response));
            }