Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoPr-Storage-huizlAzure-REST Spec PrNumber 5562 #5723

Merged
merged 3 commits into from
May 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,19 @@ public partial class StorageManagementClient : ServiceClient<StorageManagementCl
/// </summary>
public virtual IBlobContainersOperations BlobContainers { get; private set; }

/// <summary>
/// Initializes a new instance of the StorageManagementClient class.
/// </summary>
/// <param name='httpClient'>
/// HttpClient to be used
/// </param>
/// <param name='disposeHttpClient'>
/// True: will dispose the provided httpClient on calling StorageManagementClient.Dispose(). False: will not dispose provided httpClient</param>
protected StorageManagementClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)
{
Initialize();
}

/// <summary>
/// Initializes a new instance of the StorageManagementClient class.
/// </summary>
Expand Down Expand Up @@ -204,6 +217,33 @@ public StorageManagementClient(ServiceClientCredentials credentials, params Dele
}
}

/// <summary>
/// Initializes a new instance of the StorageManagementClient class.
/// </summary>
/// <param name='credentials'>
/// Required. Credentials needed for the client to connect to Azure.
/// </param>
/// <param name='httpClient'>
/// HttpClient to be used
/// </param>
/// <param name='disposeHttpClient'>
/// True: will dispose the provided httpClient on calling StorageManagementClient.Dispose(). False: will not dispose provided httpClient</param>
/// <exception cref="System.ArgumentNullException">
/// Thrown when a required parameter is null
/// </exception>
public StorageManagementClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)
{
if (credentials == null)
{
throw new System.ArgumentNullException("credentials");
}
Credentials = credentials;
if (Credentials != null)
{
Credentials.InitializeServiceClient(this);
}
}

/// <summary>
/// Initializes a new instance of the StorageManagementClient class.
/// </summary>
Expand Down