Skip to content

Commit

Permalink
[Security] Use autorest.powershell to generate sdk (#23049)
Browse files Browse the repository at this point in the history
* [Security] Use autorest.powershell to generate sdk

* update ChangeLog.md

* remove an empty line

* remove empty space
  • Loading branch information
YanaXu authored Oct 24, 2023
1 parent 1e47061 commit 5b2fb61
Show file tree
Hide file tree
Showing 641 changed files with 43,275 additions and 41,004 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,168 +1,151 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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.
// </auto-generated>

// Changes may cause incorrect behavior and will be lost if the code is regenerated.
namespace Microsoft.Azure.Management.Security
{
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
using System.Threading;
using System.Threading.Tasks;

/// <summary>
/// Extension methods for AdaptiveApplicationControlsOperations.
/// Extension methods for AdaptiveApplicationControlsOperations
/// </summary>
public static partial class AdaptiveApplicationControlsOperationsExtensions
{
/// <summary>
/// Gets a list of application control machine groups for the subscription.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='includePathRecommendations'>
/// Include the policy rules
/// </param>
/// <param name='summary'>
/// Return output in a summarized form
/// </param>
public static AdaptiveApplicationControlGroups List(this IAdaptiveApplicationControlsOperations operations, bool? includePathRecommendations = default(bool?), bool? summary = default(bool?))
{
return operations.ListAsync(includePathRecommendations, summary).GetAwaiter().GetResult();
}

/// <summary>
/// Gets a list of application control machine groups for the subscription.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='includePathRecommendations'>
/// Include the policy rules
/// </param>
/// <param name='summary'>
/// Return output in a summarized form
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<AdaptiveApplicationControlGroups> ListAsync(this IAdaptiveApplicationControlsOperations operations, bool? includePathRecommendations = default(bool?), bool? summary = default(bool?), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListWithHttpMessagesAsync(includePathRecommendations, summary, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

/// <summary>
/// Gets an application control VM/server group.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='groupName'>
/// Name of an application control machine group
/// </param>
public static AdaptiveApplicationControlGroup Get(this IAdaptiveApplicationControlsOperations operations, string groupName)
{
return operations.GetAsync(groupName).GetAwaiter().GetResult();
}

/// <summary>
/// Gets an application control VM/server group.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='groupName'>
/// Name of an application control machine group
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<AdaptiveApplicationControlGroup> GetAsync(this IAdaptiveApplicationControlsOperations operations, string groupName, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.GetWithHttpMessagesAsync(groupName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

/// <summary>
/// Update an application control machine group
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='groupName'>
/// Name of an application control machine group
/// </param>
/// <param name='body'>
/// </param>
public static AdaptiveApplicationControlGroup Put(this IAdaptiveApplicationControlsOperations operations, string groupName, AdaptiveApplicationControlGroup body)
{
return operations.PutAsync(groupName, body).GetAwaiter().GetResult();
}
/// <summary>
/// Gets a list of application control machine groups for the subscription.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='includePathRecommendations'>
/// Include the policy rules
/// </param>
/// <param name='summary'>
/// Return output in a summarized form
/// </param>
public static AdaptiveApplicationControlGroups List(this IAdaptiveApplicationControlsOperations operations, bool? includePathRecommendations = default(bool?), bool? summary = default(bool?))
{
return ((IAdaptiveApplicationControlsOperations)operations).ListAsync(includePathRecommendations, summary).GetAwaiter().GetResult();
}

/// <summary>
/// Update an application control machine group
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='groupName'>
/// Name of an application control machine group
/// </param>
/// <param name='body'>
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<AdaptiveApplicationControlGroup> PutAsync(this IAdaptiveApplicationControlsOperations operations, string groupName, AdaptiveApplicationControlGroup body, CancellationToken cancellationToken = default(CancellationToken))
/// <summary>
/// Gets a list of application control machine groups for the subscription.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='includePathRecommendations'>
/// Include the policy rules
/// </param>
/// <param name='summary'>
/// Return output in a summarized form
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<AdaptiveApplicationControlGroups> ListAsync(this IAdaptiveApplicationControlsOperations operations, bool? includePathRecommendations = default(bool?), bool? summary = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.ListWithHttpMessagesAsync(includePathRecommendations, summary, null, cancellationToken).ConfigureAwait(false))
{
using (var _result = await operations.PutWithHttpMessagesAsync(groupName, body, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
return _result.Body;
}
}
/// <summary>
/// Gets an application control VM/server group.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='groupName'>
/// Name of an application control machine group
/// </param>
public static AdaptiveApplicationControlGroup Get(this IAdaptiveApplicationControlsOperations operations, string groupName)
{
return ((IAdaptiveApplicationControlsOperations)operations).GetAsync(groupName).GetAwaiter().GetResult();
}

/// <summary>
/// Delete an application control machine group
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='groupName'>
/// Name of an application control machine group
/// </param>
public static void Delete(this IAdaptiveApplicationControlsOperations operations, string groupName)
/// <summary>
/// Gets an application control VM/server group.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='groupName'>
/// Name of an application control machine group
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<AdaptiveApplicationControlGroup> GetAsync(this IAdaptiveApplicationControlsOperations operations, string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.GetWithHttpMessagesAsync(groupName, null, cancellationToken).ConfigureAwait(false))
{
operations.DeleteAsync(groupName).GetAwaiter().GetResult();
return _result.Body;
}
}
/// <summary>
/// Update an application control machine group
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='groupName'>
/// Name of an application control machine group
/// </param>
public static AdaptiveApplicationControlGroup Put(this IAdaptiveApplicationControlsOperations operations, string groupName, AdaptiveApplicationControlGroup body)
{
return ((IAdaptiveApplicationControlsOperations)operations).PutAsync(groupName, body).GetAwaiter().GetResult();
}

/// <summary>
/// Delete an application control machine group
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='groupName'>
/// Name of an application control machine group
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task DeleteAsync(this IAdaptiveApplicationControlsOperations operations, string groupName, CancellationToken cancellationToken = default(CancellationToken))
/// <summary>
/// Update an application control machine group
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='groupName'>
/// Name of an application control machine group
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<AdaptiveApplicationControlGroup> PutAsync(this IAdaptiveApplicationControlsOperations operations, string groupName, AdaptiveApplicationControlGroup body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.PutWithHttpMessagesAsync(groupName, body, null, cancellationToken).ConfigureAwait(false))
{
(await operations.DeleteWithHttpMessagesAsync(groupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
return _result.Body;
}
}
/// <summary>
/// Delete an application control machine group
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='groupName'>
/// Name of an application control machine group
/// </param>
public static void Delete(this IAdaptiveApplicationControlsOperations operations, string groupName)
{
((IAdaptiveApplicationControlsOperations)operations).DeleteAsync(groupName).GetAwaiter().GetResult();
}

/// <summary>
/// Delete an application control machine group
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='groupName'>
/// Name of an application control machine group
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task DeleteAsync(this IAdaptiveApplicationControlsOperations operations, string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
(await operations.DeleteWithHttpMessagesAsync(groupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
}
}
Loading

0 comments on commit 5b2fb61

Please sign in to comment.