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 5377 #5435

Merged
merged 1 commit into from
Mar 19, 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
2 changes: 1 addition & 1 deletion src/SDKs/Storage/AzSdk.RP.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--This file and it's contents are updated at build time moving or editing might result in build failure. Take due deligence while editing this file-->
<PropertyGroup>
<AzureApiTag>Storage_2018-07-01;Storage_2018-03-01-preview;</AzureApiTag>
<AzureApiTag>Storage_2018-11-01;</AzureApiTag>
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags>
</PropertyGroup>
</Project>

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,17 @@ internal BlobServicesOperations(StorageManagementClient client)
throw new ValidationException(ValidationRules.MinLength, "accountName", 3);
}
}
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
if (Client.ApiVersion != null)
{
if (Client.ApiVersion.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
}
}
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
Expand All @@ -144,7 +155,6 @@ internal BlobServicesOperations(StorageManagementClient client)
{
parameters.Validate();
}
string apiVersion = "2018-07-01";
string blobServicesName = "default";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
Expand All @@ -155,7 +165,6 @@ internal BlobServicesOperations(StorageManagementClient client)
Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("accountName", accountName);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("blobServicesName", blobServicesName);
tracingParameters.Add("parameters", parameters);
tracingParameters.Add("cancellationToken", cancellationToken);
Expand All @@ -169,9 +178,9 @@ internal BlobServicesOperations(StorageManagementClient client)
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{BlobServicesName}", System.Uri.EscapeDataString(blobServicesName));
List<string> _queryParameters = new List<string>();
if (apiVersion != null)
if (Client.ApiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
}
if (_queryParameters.Count > 0)
{
Expand Down Expand Up @@ -375,6 +384,17 @@ internal BlobServicesOperations(StorageManagementClient client)
throw new ValidationException(ValidationRules.MinLength, "accountName", 3);
}
}
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
if (Client.ApiVersion != null)
{
if (Client.ApiVersion.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
}
}
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
Expand All @@ -386,7 +406,6 @@ internal BlobServicesOperations(StorageManagementClient client)
throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
}
}
string apiVersion = "2018-07-01";
string blobServicesName = "default";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
Expand All @@ -397,7 +416,6 @@ internal BlobServicesOperations(StorageManagementClient client)
Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("accountName", accountName);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("blobServicesName", blobServicesName);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "GetServiceProperties", tracingParameters);
Expand All @@ -410,9 +428,9 @@ internal BlobServicesOperations(StorageManagementClient client)
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{BlobServicesName}", System.Uri.EscapeDataString(blobServicesName));
List<string> _queryParameters = new List<string>();
if (apiVersion != null)
if (Client.ApiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
}
if (_queryParameters.Count > 0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace Microsoft.Azure.Management.Storage
public partial interface IManagementPoliciesOperations
{
/// <summary>
/// Gets the data policy rules associated with the specified storage
/// Gets the managementpolicy associated with the specified storage
/// account.
/// </summary>
/// <param name='resourceGroupName'>
Expand All @@ -51,10 +51,9 @@ public partial interface IManagementPoliciesOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<StorageAccountManagementPolicies>> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<ManagementPolicy>> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Sets the data policy rules associated with the specified storage
/// account.
/// Sets the managementpolicy to the specified storage account.
/// </summary>
/// <param name='resourceGroupName'>
/// The name of the resource group within the user's subscription. The
Expand All @@ -66,8 +65,8 @@ public partial interface IManagementPoliciesOperations
/// length and use numbers and lower-case letters only.
/// </param>
/// <param name='policy'>
/// The Storage Account ManagementPolicies Rules, in JSON format. See
/// more details in:
/// The Storage Account ManagementPolicy, in JSON format. See more
/// details in:
/// https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
/// </param>
/// <param name='customHeaders'>
Expand All @@ -85,9 +84,9 @@ public partial interface IManagementPoliciesOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<StorageAccountManagementPolicies>> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, object policy = default(object), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<ManagementPolicy>> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, ManagementPolicySchema policy, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Deletes the data policy rules associated with the specified storage
/// Deletes the managementpolicy associated with the specified storage
/// account.
/// </summary>
/// <param name='resourceGroupName'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ public partial interface IStorageManagementClient : System.IDisposable
/// </summary>
string SubscriptionId { get; set; }

/// <summary>
/// The API version to use for this operation.
/// </summary>
string ApiVersion { get; }

/// <summary>
/// The preferred language for the response.
/// </summary>
Expand Down Expand Up @@ -84,6 +89,11 @@ public partial interface IStorageManagementClient : System.IDisposable
/// </summary>
IUsagesOperations Usages { get; }

/// <summary>
/// Gets the IManagementPoliciesOperations.
/// </summary>
IManagementPoliciesOperations ManagementPolicies { get; }

/// <summary>
/// Gets the IBlobServicesOperations.
/// </summary>
Expand All @@ -94,10 +104,5 @@ public partial interface IStorageManagementClient : System.IDisposable
/// </summary>
IBlobContainersOperations BlobContainers { get; }

/// <summary>
/// Gets the IManagementPoliciesOperations.
/// </summary>
IManagementPoliciesOperations ManagementPolicies { get; }

}
}
Loading