public async Task <Response <ModelContainerResourceArmPaginatedResult> > ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, int?count = null, ListViewType?listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, skip, count, listViewType); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { ModelContainerResourceArmPaginatedResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); value = ModelContainerResourceArmPaginatedResult.DeserializeModelContainerResourceArmPaginatedResult(document.RootElement); return(Response.FromValue(value, message.Response)); }
public async Task <Response <ModelContainerResourceArmPaginatedResult> > ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, int?count = null, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { throw new ArgumentNullException(nameof(resourceGroupName)); } if (workspaceName == null) { throw new ArgumentNullException(nameof(workspaceName)); } using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken, count); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { ModelContainerResourceArmPaginatedResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); value = ModelContainerResourceArmPaginatedResult.DeserializeModelContainerResourceArmPaginatedResult(document.RootElement); return(Response.FromValue(value, message.Response)); }