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

[Az.Resources]migrate to autorest.powershell #24297

Merged
merged 11 commits into from
Apr 8, 2024
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion src/Resources/ResourceManager/ResourceManager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Resources.Sdk\Resources.Sdk.csproj" />
<ProjectReference Include="..\Resources.Management.Sdk\Resources.Management.Sdk.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ internal PSDeploymentStack(DeploymentStack deploymentStack)
this.provisioningState = deploymentStack.ProvisioningState;
this.deploymentScope = deploymentStack.DeploymentScope;
this.description = deploymentStack.Description;
this.resources = deploymentStack.ResourcesProperty;
this.resources = deploymentStack.Resources;
this.denySettings = deploymentStack.DenySettings;
this.detachedResources = deploymentStack.DetachedResources;
this.deletedResources = deploymentStack.DeletedResources;
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
namespace Microsoft.Azure.Management.Resources
{
using Microsoft.Rest.Azure;
using Models;

/// <summary>
/// Extension methods for FeatureClient
/// </summary>
public static partial class FeatureClientExtensions
{
/// <summary>
/// Lists all of the available Microsoft.Features REST API operations.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
public static Microsoft.Rest.Azure.IPage<Operation> ListOperations(this IFeatureClient operations)
{
return ((IFeatureClient)operations).ListOperationsAsync().GetAwaiter().GetResult();
}

/// <summary>
/// Lists all of the available Microsoft.Features REST API operations.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<Operation>> ListOperationsAsync(this IFeatureClient operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.ListOperationsWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <summary>
/// Lists all of the available Microsoft.Features REST API operations.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
public static Microsoft.Rest.Azure.IPage<Operation> ListOperationsNext(this IFeatureClient operations, string nextPageLink)
{
return ((IFeatureClient)operations).ListOperationsNextAsync(nextPageLink).GetAwaiter().GetResult();
}

/// <summary>
/// Lists all of the available Microsoft.Features REST API operations.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<Operation>> ListOperationsNextAsync(this IFeatureClient operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.ListOperationsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
}
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,267 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
namespace Microsoft.Azure.Management.Resources
{
using Microsoft.Rest.Azure;
using Models;

/// <summary>
/// Extension methods for FeaturesOperations
/// </summary>
public static partial class FeaturesOperationsExtensions
{
/// <summary>
/// Gets all the preview features that are available through AFEC for the
/// subscription.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
public static Microsoft.Rest.Azure.IPage<FeatureResult> ListAll(this IFeaturesOperations operations)
{
return ((IFeaturesOperations)operations).ListAllAsync().GetAwaiter().GetResult();
}

/// <summary>
/// Gets all the preview features that are available through AFEC for the
/// subscription.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<FeatureResult>> ListAllAsync(this IFeaturesOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.ListAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <summary>
/// Gets all the preview features in a provider namespace that are available
/// through AFEC for the subscription.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceProviderNamespace'>
/// The namespace of the resource provider for getting features.
/// </param>
public static Microsoft.Rest.Azure.IPage<FeatureResult> List(this IFeaturesOperations operations, string resourceProviderNamespace)
{
return ((IFeaturesOperations)operations).ListAsync(resourceProviderNamespace).GetAwaiter().GetResult();
}

/// <summary>
/// Gets all the preview features in a provider namespace that are available
/// through AFEC for the subscription.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceProviderNamespace'>
/// The namespace of the resource provider for getting features.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<FeatureResult>> ListAsync(this IFeaturesOperations operations, string resourceProviderNamespace, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.ListWithHttpMessagesAsync(resourceProviderNamespace, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <summary>
/// Gets the preview feature with the specified name.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceProviderNamespace'>
/// The resource provider namespace for the feature.
/// </param>
/// <param name='featureName'>
/// The name of the feature to get.
/// </param>
public static FeatureResult Get(this IFeaturesOperations operations, string resourceProviderNamespace, string featureName)
{
return ((IFeaturesOperations)operations).GetAsync(resourceProviderNamespace, featureName).GetAwaiter().GetResult();
}

/// <summary>
/// Gets the preview feature with the specified name.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceProviderNamespace'>
/// The resource provider namespace for the feature.
/// </param>
/// <param name='featureName'>
/// The name of the feature to get.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<FeatureResult> GetAsync(this IFeaturesOperations operations, string resourceProviderNamespace, string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.GetWithHttpMessagesAsync(resourceProviderNamespace, featureName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <summary>
/// Registers the preview feature for the subscription.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceProviderNamespace'>
/// The namespace of the resource provider.
/// </param>
/// <param name='featureName'>
/// The name of the feature to register.
/// </param>
public static FeatureResult Register(this IFeaturesOperations operations, string resourceProviderNamespace, string featureName)
{
return ((IFeaturesOperations)operations).RegisterAsync(resourceProviderNamespace, featureName).GetAwaiter().GetResult();
}

/// <summary>
/// Registers the preview feature for the subscription.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceProviderNamespace'>
/// The namespace of the resource provider.
/// </param>
/// <param name='featureName'>
/// The name of the feature to register.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<FeatureResult> RegisterAsync(this IFeaturesOperations operations, string resourceProviderNamespace, string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.RegisterWithHttpMessagesAsync(resourceProviderNamespace, featureName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <summary>
/// Unregisters the preview feature for the subscription.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceProviderNamespace'>
/// The namespace of the resource provider.
/// </param>
/// <param name='featureName'>
/// The name of the feature to unregister.
/// </param>
public static FeatureResult Unregister(this IFeaturesOperations operations, string resourceProviderNamespace, string featureName)
{
return ((IFeaturesOperations)operations).UnregisterAsync(resourceProviderNamespace, featureName).GetAwaiter().GetResult();
}

/// <summary>
/// Unregisters the preview feature for the subscription.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceProviderNamespace'>
/// The namespace of the resource provider.
/// </param>
/// <param name='featureName'>
/// The name of the feature to unregister.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<FeatureResult> UnregisterAsync(this IFeaturesOperations operations, string resourceProviderNamespace, string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.UnregisterWithHttpMessagesAsync(resourceProviderNamespace, featureName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <summary>
/// Gets all the preview features that are available through AFEC for the
/// subscription.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
public static Microsoft.Rest.Azure.IPage<FeatureResult> ListAllNext(this IFeaturesOperations operations, string nextPageLink)
{
return ((IFeaturesOperations)operations).ListAllNextAsync(nextPageLink).GetAwaiter().GetResult();
}

/// <summary>
/// Gets all the preview features that are available through AFEC for the
/// subscription.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<FeatureResult>> ListAllNextAsync(this IFeaturesOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.ListAllNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <summary>
/// Gets all the preview features in a provider namespace that are available
/// through AFEC for the subscription.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
public static Microsoft.Rest.Azure.IPage<FeatureResult> ListNext(this IFeaturesOperations operations, string nextPageLink)
{
return ((IFeaturesOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult();
}

/// <summary>
/// Gets all the preview features in a provider namespace that are available
/// through AFEC for the subscription.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<FeatureResult>> ListNextAsync(this IFeaturesOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
}
}
Loading