Skip to content

Commit

Permalink
AutoPr-Storage-huizlAzure-REST Spec PrNumber 5562 (#5723)
Browse files Browse the repository at this point in the history
* .NET SDK Resource Provider:'Storage'
REST Spec PR 'Azure/azure-rest-api-specs#5562'
REST Spec PR Author 'huizlAzure'
REST Spec PR Last commit

* .NET SDK Resource Provider:'Storage'
REST Spec PR 'Azure/azure-rest-api-specs#5562'
REST Spec PR Author 'huizlAzure'
REST Spec PR Last commit

* .NET SDK Resource Provider:'Storage'
REST Spec PR 'Azure/azure-rest-api-specs#5562'
REST Spec PR Author 'huizlAzure'
REST Spec PR Last commit
  • Loading branch information
adxsdknet authored and dsgouda committed May 6, 2019
1 parent 9ad1d0f commit 583fd10
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ internal BlobContainersOperations(StorageManagementClient client)
/// Storage account names must be between 3 and 24 characters in length and use
/// numbers and lower-case letters only.
/// </param>
/// <param name='skipToken'>
/// Optional. Continuation token for the list operation.
/// </param>
/// <param name='maxpagesize'>
/// Optional. Specified maximum number of containers that can be included in
/// the list.
/// </param>
/// <param name='filter'>
/// Optional. When specified, only container names starting with the filter
/// will be listed.
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
/// </param>
Expand All @@ -84,7 +95,7 @@ internal BlobContainersOperations(StorageManagementClient client)
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<AzureOperationResponse<ListContainerItems>> ListWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<AzureOperationResponse<ListContainerItems>> ListWithHttpMessagesAsync(string resourceGroupName, string accountName, string skipToken = default(string), string maxpagesize = default(string), string filter = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
Expand Down Expand Up @@ -151,6 +162,9 @@ internal BlobContainersOperations(StorageManagementClient client)
Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("accountName", accountName);
tracingParameters.Add("skipToken", skipToken);
tracingParameters.Add("maxpagesize", maxpagesize);
tracingParameters.Add("filter", filter);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
}
Expand All @@ -165,6 +179,18 @@ internal BlobContainersOperations(StorageManagementClient client)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
}
if (skipToken != null)
{
_queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken)));
}
if (maxpagesize != null)
{
_queryParameters.Add(string.Format("$maxpagesize={0}", System.Uri.EscapeDataString(maxpagesize)));
}
if (filter != null)
{
_queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter)));
}
if (_queryParameters.Count > 0)
{
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,20 @@ public static partial class BlobContainersOperationsExtensions
/// Storage account names must be between 3 and 24 characters in length and use
/// numbers and lower-case letters only.
/// </param>
public static ListContainerItems List(this IBlobContainersOperations operations, string resourceGroupName, string accountName)
/// <param name='skipToken'>
/// Optional. Continuation token for the list operation.
/// </param>
/// <param name='maxpagesize'>
/// Optional. Specified maximum number of containers that can be included in
/// the list.
/// </param>
/// <param name='filter'>
/// Optional. When specified, only container names starting with the filter
/// will be listed.
/// </param>
public static ListContainerItems List(this IBlobContainersOperations operations, string resourceGroupName, string accountName, string skipToken = default(string), string maxpagesize = default(string), string filter = default(string))
{
return operations.ListAsync(resourceGroupName, accountName).GetAwaiter().GetResult();
return operations.ListAsync(resourceGroupName, accountName, skipToken, maxpagesize, filter).GetAwaiter().GetResult();
}

/// <summary>
Expand All @@ -60,12 +71,23 @@ public static ListContainerItems List(this IBlobContainersOperations operations,
/// Storage account names must be between 3 and 24 characters in length and use
/// numbers and lower-case letters only.
/// </param>
/// <param name='skipToken'>
/// Optional. Continuation token for the list operation.
/// </param>
/// <param name='maxpagesize'>
/// Optional. Specified maximum number of containers that can be included in
/// the list.
/// </param>
/// <param name='filter'>
/// Optional. When specified, only container names starting with the filter
/// will be listed.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ListContainerItems> ListAsync(this IBlobContainersOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
public static async Task<ListContainerItems> ListAsync(this IBlobContainersOperations operations, string resourceGroupName, string accountName, string skipToken = default(string), string maxpagesize = default(string), string filter = default(string), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false))
using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, accountName, skipToken, maxpagesize, filter, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ public partial interface IBlobContainersOperations
/// group. Storage account names must be between 3 and 24 characters in
/// length and use numbers and lower-case letters only.
/// </param>
/// <param name='skipToken'>
/// Optional. Continuation token for the list operation.
/// </param>
/// <param name='maxpagesize'>
/// Optional. Specified maximum number of containers that can be
/// included in the list.
/// </param>
/// <param name='filter'>
/// Optional. When specified, only container names starting with the
/// filter will be listed.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
Expand All @@ -51,7 +62,7 @@ public partial interface IBlobContainersOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<ListContainerItems>> ListWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<ListContainerItems>> ListWithHttpMessagesAsync(string resourceGroupName, string accountName, string skipToken = default(string), string maxpagesize = default(string), string filter = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Creates a new container under the specified account as described by
/// request body. The container resource includes metadata and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ namespace Microsoft.Azure.Management.Storage.Models
using System.Linq;

/// <summary>
/// The list of blob containers.
/// Response schema. Contains list of blobs returned, and if paging is
/// requested or required, a URL to next page of containers.
/// </summary>
public partial class ListContainerItems
{
Expand All @@ -31,10 +32,14 @@ public ListContainerItems()
/// <summary>
/// Initializes a new instance of the ListContainerItems class.
/// </summary>
/// <param name="value">The list of blob containers.</param>
public ListContainerItems(IList<ListContainerItem> value = default(IList<ListContainerItem>))
/// <param name="value">List of blobs containers returned.</param>
/// <param name="nextLink">Request URL that can be used to query next
/// page of containers. Returned when total number of requested
/// containers exceed maximum page size.</param>
public ListContainerItems(IList<ListContainerItem> value = default(IList<ListContainerItem>), string nextLink = default(string))
{
Value = value;
NextLink = nextLink;
CustomInit();
}

Expand All @@ -44,10 +49,18 @@ public ListContainerItems()
partial void CustomInit();

/// <summary>
/// Gets or sets the list of blob containers.
/// Gets list of blobs containers returned.
/// </summary>
[JsonProperty(PropertyName = "value")]
public IList<ListContainerItem> Value { get; set; }
public IList<ListContainerItem> Value { get; private set; }

/// <summary>
/// Gets request URL that can be used to query next page of containers.
/// Returned when total number of requested containers exceed maximum
/// page size.
/// </summary>
[JsonProperty(PropertyName = "nextLink")]
public string NextLink { get; private set; }

}
}

0 comments on commit 583fd10

Please sign in to comment.