Skip to content

Commit

Permalink
ADLA Swagger Update (#3198)
Browse files Browse the repository at this point in the history
This swagger update is from PR:
Azure/azure-rest-api-specs#1214
* Rename ComputePolicy operation to ComputePolicies

ComputePolicy was never published, so this is not a breaking change and
it was caught as part of a sanity check prior to publishing, so there is
no risk in this change.
  • Loading branch information
begoldsm authored and shahabhijeet committed May 11, 2017
1 parent a9a4bc1 commit 4b0c751
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public void ComputePolicyCrudTest()

// validate compute policy CRUD
// add another account
var computePolicy = clientToUse.ComputePolicy.CreateOrUpdate(
var computePolicy = clientToUse.ComputePolicies.CreateOrUpdate(
commonData.ResourceGroupName,
adlaAccountName,
groupPolicyName,
Expand All @@ -308,7 +308,7 @@ public void ComputePolicyCrudTest()
Assert.Equal(AADObjectType.Group, computePolicy.ObjectType);

// Get the compute policy
computePolicy = clientToUse.ComputePolicy.Get(
computePolicy = clientToUse.ComputePolicies.Get(
commonData.ResourceGroupName,
adlaAccountName,
groupPolicyName);
Expand All @@ -319,19 +319,19 @@ public void ComputePolicyCrudTest()
Assert.Equal(AADObjectType.Group, computePolicy.ObjectType);

// list all policies
var policyList = clientToUse.ComputePolicy.ListByAccount(
var policyList = clientToUse.ComputePolicies.ListByAccount(
commonData.ResourceGroupName,
adlaAccountName);

Assert.Equal(2, policyList.Count());

// Remove the new policy
clientToUse.ComputePolicy.Delete(
clientToUse.ComputePolicies.Delete(
commonData.ResourceGroupName,
adlaAccountName,
groupPolicyName);

policyList = clientToUse.ComputePolicy.ListByAccount(
policyList = clientToUse.ComputePolicies.ListByAccount(
commonData.ResourceGroupName,
adlaAccountName);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ namespace Microsoft.Azure.Management.DataLake.Analytics
using System.Threading.Tasks;

/// <summary>
/// ComputePolicyOperations operations.
/// ComputePoliciesOperations operations.
/// </summary>
internal partial class ComputePolicyOperations : IServiceOperations<DataLakeAnalyticsAccountManagementClient>, IComputePolicyOperations
internal partial class ComputePoliciesOperations : IServiceOperations<DataLakeAnalyticsAccountManagementClient>, IComputePoliciesOperations
{
/// <summary>
/// Initializes a new instance of the ComputePolicyOperations class.
/// Initializes a new instance of the ComputePoliciesOperations class.
/// </summary>
/// <param name='client'>
/// Reference to the service client.
/// </param>
/// <exception cref="System.ArgumentNullException">
/// Thrown when a required parameter is null
/// </exception>
internal ComputePolicyOperations(DataLakeAnalyticsAccountManagementClient client)
internal ComputePoliciesOperations(DataLakeAnalyticsAccountManagementClient client)
{
if (client == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ namespace Microsoft.Azure.Management.DataLake.Analytics
using System.Threading.Tasks;

/// <summary>
/// Extension methods for ComputePolicyOperations.
/// Extension methods for ComputePoliciesOperations.
/// </summary>
public static partial class ComputePolicyOperationsExtensions
public static partial class ComputePoliciesOperationsExtensions
{
/// <summary>
/// Creates or updates the specified compute policy. During update, the compute
Expand All @@ -46,7 +46,7 @@ public static partial class ComputePolicyOperationsExtensions
/// of parallelism per job property, min priority per job property, or both
/// must be present.
/// </param>
public static ComputePolicy CreateOrUpdate(this IComputePolicyOperations operations, string resourceGroupName, string accountName, string computePolicyName, ComputePolicyCreateOrUpdateParameters parameters)
public static ComputePolicy CreateOrUpdate(this IComputePoliciesOperations operations, string resourceGroupName, string accountName, string computePolicyName, ComputePolicyCreateOrUpdateParameters parameters)
{
return operations.CreateOrUpdateAsync(resourceGroupName, accountName, computePolicyName, parameters).GetAwaiter().GetResult();
}
Expand Down Expand Up @@ -78,7 +78,7 @@ public static ComputePolicy CreateOrUpdate(this IComputePolicyOperations operati
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ComputePolicy> CreateOrUpdateAsync(this IComputePolicyOperations operations, string resourceGroupName, string accountName, string computePolicyName, ComputePolicyCreateOrUpdateParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
public static async Task<ComputePolicy> CreateOrUpdateAsync(this IComputePoliciesOperations operations, string resourceGroupName, string accountName, string computePolicyName, ComputePolicyCreateOrUpdateParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, accountName, computePolicyName, parameters, null, cancellationToken).ConfigureAwait(false))
{
Expand Down Expand Up @@ -106,7 +106,7 @@ public static ComputePolicy CreateOrUpdate(this IComputePolicyOperations operati
/// <param name='parameters'>
/// Parameters supplied to update the compute policy.
/// </param>
public static ComputePolicy Update(this IComputePolicyOperations operations, string resourceGroupName, string accountName, string computePolicyName, ComputePolicy parameters = default(ComputePolicy))
public static ComputePolicy Update(this IComputePoliciesOperations operations, string resourceGroupName, string accountName, string computePolicyName, ComputePolicy parameters = default(ComputePolicy))
{
return operations.UpdateAsync(resourceGroupName, accountName, computePolicyName, parameters).GetAwaiter().GetResult();
}
Expand Down Expand Up @@ -134,7 +134,7 @@ public static ComputePolicy CreateOrUpdate(this IComputePolicyOperations operati
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ComputePolicy> UpdateAsync(this IComputePolicyOperations operations, string resourceGroupName, string accountName, string computePolicyName, ComputePolicy parameters = default(ComputePolicy), CancellationToken cancellationToken = default(CancellationToken))
public static async Task<ComputePolicy> UpdateAsync(this IComputePoliciesOperations operations, string resourceGroupName, string accountName, string computePolicyName, ComputePolicy parameters = default(ComputePolicy), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, accountName, computePolicyName, parameters, null, cancellationToken).ConfigureAwait(false))
{
Expand All @@ -160,7 +160,7 @@ public static ComputePolicy CreateOrUpdate(this IComputePolicyOperations operati
/// <param name='computePolicyName'>
/// The name of the compute policy to delete.
/// </param>
public static void Delete(this IComputePolicyOperations operations, string resourceGroupName, string accountName, string computePolicyName)
public static void Delete(this IComputePoliciesOperations operations, string resourceGroupName, string accountName, string computePolicyName)
{
operations.DeleteAsync(resourceGroupName, accountName, computePolicyName).GetAwaiter().GetResult();
}
Expand All @@ -186,7 +186,7 @@ public static void Delete(this IComputePolicyOperations operations, string resou
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task DeleteAsync(this IComputePolicyOperations operations, string resourceGroupName, string accountName, string computePolicyName, CancellationToken cancellationToken = default(CancellationToken))
public static async Task DeleteAsync(this IComputePoliciesOperations operations, string resourceGroupName, string accountName, string computePolicyName, CancellationToken cancellationToken = default(CancellationToken))
{
(await operations.DeleteWithHttpMessagesAsync(resourceGroupName, accountName, computePolicyName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
Expand All @@ -208,7 +208,7 @@ public static void Delete(this IComputePolicyOperations operations, string resou
/// <param name='computePolicyName'>
/// The name of the compute policy to retrieve.
/// </param>
public static ComputePolicy Get(this IComputePolicyOperations operations, string resourceGroupName, string accountName, string computePolicyName)
public static ComputePolicy Get(this IComputePoliciesOperations operations, string resourceGroupName, string accountName, string computePolicyName)
{
return operations.GetAsync(resourceGroupName, accountName, computePolicyName).GetAwaiter().GetResult();
}
Expand All @@ -233,7 +233,7 @@ public static ComputePolicy Get(this IComputePolicyOperations operations, string
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ComputePolicy> GetAsync(this IComputePolicyOperations operations, string resourceGroupName, string accountName, string computePolicyName, CancellationToken cancellationToken = default(CancellationToken))
public static async Task<ComputePolicy> GetAsync(this IComputePoliciesOperations operations, string resourceGroupName, string accountName, string computePolicyName, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, accountName, computePolicyName, null, cancellationToken).ConfigureAwait(false))
{
Expand All @@ -256,7 +256,7 @@ public static ComputePolicy Get(this IComputePolicyOperations operations, string
/// The name of the Data Lake Analytics account from which to get the compute
/// policies.
/// </param>
public static IPage<ComputePolicy> ListByAccount(this IComputePolicyOperations operations, string resourceGroupName, string accountName)
public static IPage<ComputePolicy> ListByAccount(this IComputePoliciesOperations operations, string resourceGroupName, string accountName)
{
return operations.ListByAccountAsync(resourceGroupName, accountName).GetAwaiter().GetResult();
}
Expand All @@ -279,7 +279,7 @@ public static IPage<ComputePolicy> ListByAccount(this IComputePolicyOperations o
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IPage<ComputePolicy>> ListByAccountAsync(this IComputePolicyOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
public static async Task<IPage<ComputePolicy>> ListByAccountAsync(this IComputePoliciesOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListByAccountWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false))
{
Expand All @@ -297,7 +297,7 @@ public static IPage<ComputePolicy> ListByAccount(this IComputePolicyOperations o
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
public static IPage<ComputePolicy> ListByAccountNext(this IComputePolicyOperations operations, string nextPageLink)
public static IPage<ComputePolicy> ListByAccountNext(this IComputePoliciesOperations operations, string nextPageLink)
{
return operations.ListByAccountNextAsync(nextPageLink).GetAwaiter().GetResult();
}
Expand All @@ -315,7 +315,7 @@ public static IPage<ComputePolicy> ListByAccountNext(this IComputePolicyOperatio
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IPage<ComputePolicy>> ListByAccountNextAsync(this IComputePolicyOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
public static async Task<IPage<ComputePolicy>> ListByAccountNextAsync(this IComputePoliciesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListByAccountNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ public partial class DataLakeAnalyticsAccountManagementClient : ServiceClient<Da
public bool? GenerateClientRequestId { get; set; }

/// <summary>
/// Gets the IComputePolicyOperations.
/// Gets the IComputePoliciesOperations.
/// </summary>
public virtual IComputePolicyOperations ComputePolicy { get; private set; }
public virtual IComputePoliciesOperations ComputePolicies { get; private set; }

/// <summary>
/// Gets the IFirewallRulesOperations.
Expand Down Expand Up @@ -302,7 +302,7 @@ internal DataLakeAnalyticsAccountManagementClient(System.Uri baseUri, ServiceCli
/// </summary>
private void Initialize()
{
ComputePolicy = new ComputePolicyOperations(this);
ComputePolicies = new ComputePoliciesOperations(this);
FirewallRules = new FirewallRulesOperations(this);
StorageAccounts = new StorageAccountsOperations(this);
DataLakeStoreAccounts = new DataLakeStoreAccountsOperations(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ namespace Microsoft.Azure.Management.DataLake.Analytics
using System.Threading.Tasks;

/// <summary>
/// ComputePolicyOperations operations.
/// ComputePoliciesOperations operations.
/// </summary>
public partial interface IComputePolicyOperations
public partial interface IComputePoliciesOperations
{
/// <summary>
/// Creates or updates the specified compute policy. During update, the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ public partial interface IDataLakeAnalyticsAccountManagementClient : System.IDis


/// <summary>
/// Gets the IComputePolicyOperations.
/// Gets the IComputePoliciesOperations.
/// </summary>
IComputePolicyOperations ComputePolicy { get; }
IComputePoliciesOperations ComputePolicies { get; }

/// <summary>
/// Gets the IFirewallRulesOperations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
@echo off
setlocal

set accountSpecFile="https://raw.githubusercontent.com/Azure/azure-rest-api-specs/156cd442edf6badb940149878cecfba2d3198776/arm-datalake-analytics/account/2016-11-01/swagger/account.json"
set jobSpecFile="https://raw.githubusercontent.com/Azure/azure-rest-api-specs/156cd442edf6badb940149878cecfba2d3198776/arm-datalake-analytics/job/2016-11-01/swagger/job.json"
set catalogSpecFile="https://raw.githubusercontent.com/Azure/azure-rest-api-specs/156cd442edf6badb940149878cecfba2d3198776/arm-datalake-analytics/catalog/2016-11-01/swagger/catalog.json"
set accountSpecFile="https://raw.githubusercontent.com/Azure/azure-rest-api-specs/12b641f181711ec1e9a50f1dcfc7861721aa3242/arm-datalake-analytics/account/2016-11-01/swagger/account.json"
set jobSpecFile="https://raw.githubusercontent.com/Azure/azure-rest-api-specs/12b641f181711ec1e9a50f1dcfc7861721aa3242/arm-datalake-analytics/job/2016-11-01/swagger/job.json"
set catalogSpecFile="https://raw.githubusercontent.com/Azure/azure-rest-api-specs/12b641f181711ec1e9a50f1dcfc7861721aa3242/arm-datalake-analytics/catalog/2016-11-01/swagger/catalog.json"

set repoRoot=%~dp0..\..\..\..
set generateFolder=%~dp0Generated
Expand Down

0 comments on commit 4b0c751

Please sign in to comment.