-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update generated files with build 107290
- Loading branch information
Microsoft Graph DevX Tooling
authored and
Microsoft Graph DevX Tooling
committed
Feb 28, 2023
1 parent
e442aa3
commit 8ab8ac2
Showing
15,910 changed files
with
725,813 additions
and
746,620 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
109 changes: 109 additions & 0 deletions
109
...crosoft.Graph/Generated/AccessReviews/Item/ApplyDecisions/ApplyDecisionsRequestBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
using Microsoft.Graph.Beta.Models.ODataErrors; | ||
using Microsoft.Kiota.Abstractions; | ||
using Microsoft.Kiota.Abstractions.Serialization; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
namespace Microsoft.Graph.Beta.AccessReviews.Item.ApplyDecisions { | ||
/// <summary> | ||
/// Provides operations to call the applyDecisions method. | ||
/// </summary> | ||
public class ApplyDecisionsRequestBuilder { | ||
/// <summary>Path parameters for the request</summary> | ||
private Dictionary<string, object> PathParameters { get; set; } | ||
/// <summary>The request adapter to use to execute the requests.</summary> | ||
private IRequestAdapter RequestAdapter { get; set; } | ||
/// <summary>Url template to use to build the URL for the current request builder</summary> | ||
private string UrlTemplate { get; set; } | ||
/// <summary> | ||
/// Instantiates a new ApplyDecisionsRequestBuilder and sets the default values. | ||
/// </summary> | ||
/// <param name="pathParameters">Path parameters for the request</param> | ||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param> | ||
public ApplyDecisionsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) { | ||
_ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); | ||
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); | ||
UrlTemplate = "{+baseurl}/accessReviews/{accessReview%2Did}/applyDecisions"; | ||
var urlTplParams = new Dictionary<string, object>(pathParameters); | ||
PathParameters = urlTplParams; | ||
RequestAdapter = requestAdapter; | ||
} | ||
/// <summary> | ||
/// Instantiates a new ApplyDecisionsRequestBuilder and sets the default values. | ||
/// </summary> | ||
/// <param name="rawUrl">The raw URL to use for the request builder.</param> | ||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param> | ||
public ApplyDecisionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { | ||
if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); | ||
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); | ||
UrlTemplate = "{+baseurl}/accessReviews/{accessReview%2Did}/applyDecisions"; | ||
var urlTplParams = new Dictionary<string, object>(); | ||
if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); | ||
PathParameters = urlTplParams; | ||
RequestAdapter = requestAdapter; | ||
} | ||
/// <summary> | ||
/// In the Azure AD access reviews feature, apply the decisions of a completed accessReview. The target object can be either a one-time access review, or an instance of a recurring access review. After an access review is finished, either because it reached the end date or an administrator stopped it manually, and auto-apply wasn't configured for the review, you can call Apply to apply the changes. Until apply occurs, the decisions to remove access rights do not appear on the source resource, the users for instance retain their group memberships. By calling apply, the outcome of the review is implemented by updating the group or application. If a user's access was denied in the review, when an administrator calls this API, Azure AD removes their membership or application assignment. After an access review is finished, and auto-apply was configured, then the status of the review will change from Completed through intermediate states and finally will change to state Applied. You should expect to see denied users, if any, being removed from the resource group membership or app assignment in a few minutes. A configured auto applying review, or selecting Apply doesn't have an effect on a group that originates in an on-premises directory or a dynamic group. If you want to change a group that originates on-premises, download the results and apply those changes to the representation of the group in that directory. | ||
/// Find more info here <see href="https://docs.microsoft.com/graph/api/accessreview-apply?view=graph-rest-1.0" /> | ||
/// </summary> | ||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param> | ||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param> | ||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER | ||
#nullable enable | ||
public async Task PostAsync(Action<ApplyDecisionsRequestBuilderPostRequestConfiguration>? requestConfiguration = default, CancellationToken cancellationToken = default) { | ||
#nullable restore | ||
#else | ||
public async Task PostAsync(Action<ApplyDecisionsRequestBuilderPostRequestConfiguration> requestConfiguration = default, CancellationToken cancellationToken = default) { | ||
#endif | ||
var requestInfo = ToPostRequestInformation(requestConfiguration); | ||
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> { | ||
{"4XX", ODataError.CreateFromDiscriminatorValue}, | ||
{"5XX", ODataError.CreateFromDiscriminatorValue}, | ||
}; | ||
await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); | ||
} | ||
/// <summary> | ||
/// In the Azure AD access reviews feature, apply the decisions of a completed accessReview. The target object can be either a one-time access review, or an instance of a recurring access review. After an access review is finished, either because it reached the end date or an administrator stopped it manually, and auto-apply wasn't configured for the review, you can call Apply to apply the changes. Until apply occurs, the decisions to remove access rights do not appear on the source resource, the users for instance retain their group memberships. By calling apply, the outcome of the review is implemented by updating the group or application. If a user's access was denied in the review, when an administrator calls this API, Azure AD removes their membership or application assignment. After an access review is finished, and auto-apply was configured, then the status of the review will change from Completed through intermediate states and finally will change to state Applied. You should expect to see denied users, if any, being removed from the resource group membership or app assignment in a few minutes. A configured auto applying review, or selecting Apply doesn't have an effect on a group that originates in an on-premises directory or a dynamic group. If you want to change a group that originates on-premises, download the results and apply those changes to the representation of the group in that directory. | ||
/// </summary> | ||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param> | ||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER | ||
#nullable enable | ||
public RequestInformation ToPostRequestInformation(Action<ApplyDecisionsRequestBuilderPostRequestConfiguration>? requestConfiguration = default) { | ||
#nullable restore | ||
#else | ||
public RequestInformation ToPostRequestInformation(Action<ApplyDecisionsRequestBuilderPostRequestConfiguration> requestConfiguration = default) { | ||
#endif | ||
var requestInfo = new RequestInformation { | ||
HttpMethod = Method.POST, | ||
UrlTemplate = UrlTemplate, | ||
PathParameters = PathParameters, | ||
}; | ||
if (requestConfiguration != null) { | ||
var requestConfig = new ApplyDecisionsRequestBuilderPostRequestConfiguration(); | ||
requestConfiguration.Invoke(requestConfig); | ||
requestInfo.AddRequestOptions(requestConfig.Options); | ||
requestInfo.AddHeaders(requestConfig.Headers); | ||
} | ||
return requestInfo; | ||
} | ||
/// <summary> | ||
/// Configuration for the request such as headers, query parameters, and middleware options. | ||
/// </summary> | ||
public class ApplyDecisionsRequestBuilderPostRequestConfiguration { | ||
/// <summary>Request headers</summary> | ||
public RequestHeaders Headers { get; set; } | ||
/// <summary>Request options</summary> | ||
public IList<IRequestOption> Options { get; set; } | ||
/// <summary> | ||
/// Instantiates a new applyDecisionsRequestBuilderPostRequestConfiguration and sets the default values. | ||
/// </summary> | ||
public ApplyDecisionsRequestBuilderPostRequestConfiguration() { | ||
Options = new List<IRequestOption>(); | ||
Headers = new RequestHeaders(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.