ElasticSanVolumeResource IOperationSource <ElasticSanVolumeResource> .CreateResult(Response response, CancellationToken cancellationToken)
        {
            using var document = JsonDocument.Parse(response.ContentStream);
            var data = ElasticSanVolumeData.DeserializeElasticSanVolumeData(document.RootElement);

            return(new ElasticSanVolumeResource(_client, data));
        }
        public async Task <Response <ElasticSanVolumeData> > GetAsync(string elasticSanVolumeGroupName, string elasticSanVolumeName, string subscriptionId, string resourceGroupName, string elasticSanName, CancellationToken cancellationToken = default)
        {
            Argument.AssertNotNullOrEmpty(elasticSanVolumeGroupName, nameof(elasticSanVolumeGroupName));
            Argument.AssertNotNullOrEmpty(elasticSanVolumeName, nameof(elasticSanVolumeName));
            Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId));
            Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName));
            Argument.AssertNotNullOrEmpty(elasticSanName, nameof(elasticSanName));

            using var message = CreateGetRequest(elasticSanVolumeGroupName, elasticSanVolumeName, subscriptionId, resourceGroupName, elasticSanName);
            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);

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

                value = ElasticSanVolumeData.DeserializeElasticSanVolumeData(document.RootElement);
                return(Response.FromValue(value, message.Response));
            }