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

Generated beta models and request builders #801

Closed
wants to merge 1 commit into from
Closed
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
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,33 @@ public class AccessReviewDecisionsRequestBuilder : BaseRequestBuilder {
}
/// <summary>Provides operations to manage the collection of accessReviewDecision entities.</summary>
/// <param name="position">The unique identifier of accessReviewDecision</param>
/// <returns>A <see cref="AccessReviewDecisionItemRequestBuilder"/></returns>
public AccessReviewDecisionItemRequestBuilder this[string position] { get {
var urlTplParams = new Dictionary<string, object>(PathParameters);
urlTplParams.Add("accessReviewDecision%2Did", position);
return new AccessReviewDecisionItemRequestBuilder(urlTplParams, RequestAdapter);
} }
/// <summary>
/// Instantiates a new AccessReviewDecisionsRequestBuilder and sets the default values.
/// Instantiates a new <see cref="AccessReviewDecisionsRequestBuilder"/> 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 AccessReviewDecisionsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/accessReviewDecisions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) {
public AccessReviewDecisionsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/accessReviewDecisions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) {
}
/// <summary>
/// Instantiates a new AccessReviewDecisionsRequestBuilder and sets the default values.
/// Instantiates a new <see cref="AccessReviewDecisionsRequestBuilder"/> 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 AccessReviewDecisionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/accessReviewDecisions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) {
public AccessReviewDecisionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/accessReviewDecisions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) {
}
/// <summary>
/// Get entities from accessReviewDecisions
/// </summary>
/// <returns>A <see cref="AccessReviewDecisionCollectionResponse"/></returns>
/// <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>
/// <exception cref="ODataError">When receiving a 4XX or 5XX status code</exception>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public async Task<AccessReviewDecisionCollectionResponse?> GetAsync(Action<RequestConfiguration<AccessReviewDecisionsRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
Expand All @@ -55,17 +58,18 @@ public async Task<AccessReviewDecisionCollectionResponse> GetAsync(Action<Reques
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
{"4XX", ODataError.CreateFromDiscriminatorValue},
{"5XX", ODataError.CreateFromDiscriminatorValue},
{"XXX", ODataError.CreateFromDiscriminatorValue},
};
return await RequestAdapter.SendAsync<AccessReviewDecisionCollectionResponse>(requestInfo, AccessReviewDecisionCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Add new entity to accessReviewDecisions
/// </summary>
/// <returns>A <see cref="AccessReviewDecision"/></returns>
/// <param name="body">The request body</param>
/// <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>
/// <exception cref="ODataError">When receiving a 4XX or 5XX status code</exception>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public async Task<AccessReviewDecision?> PostAsync(AccessReviewDecision body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
Expand All @@ -76,14 +80,14 @@ public async Task<AccessReviewDecision> PostAsync(AccessReviewDecision body, Act
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
{"4XX", ODataError.CreateFromDiscriminatorValue},
{"5XX", ODataError.CreateFromDiscriminatorValue},
{"XXX", ODataError.CreateFromDiscriminatorValue},
};
return await RequestAdapter.SendAsync<AccessReviewDecision>(requestInfo, AccessReviewDecision.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Get entities from accessReviewDecisions
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <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
Expand All @@ -100,6 +104,7 @@ public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<Ac
/// <summary>
/// Add new entity to accessReviewDecisions
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="body">The request body</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
Expand All @@ -110,7 +115,7 @@ public RequestInformation ToPostRequestInformation(AccessReviewDecision body, Ac
public RequestInformation ToPostRequestInformation(AccessReviewDecision body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/accessReviewDecisions", PathParameters);
requestInfo.Configure(requestConfiguration);
requestInfo.Headers.TryAdd("Accept", "application/json");
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
Expand All @@ -119,6 +124,7 @@ public RequestInformation ToPostRequestInformation(AccessReviewDecision body, Ac
/// <summary>
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
/// </summary>
/// <returns>A <see cref="AccessReviewDecisionsRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public AccessReviewDecisionsRequestBuilder WithUrl(string rawUrl) {
return new AccessReviewDecisionsRequestBuilder(rawUrl, RequestAdapter);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,26 @@
/// </summary>
public class CountRequestBuilder : BaseRequestBuilder {
/// <summary>
/// Instantiates a new CountRequestBuilder and sets the default values.
/// Instantiates a new <see cref="CountRequestBuilder"/> 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 CountRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/accessReviewDecisions/$count{?%24search,%24filter}", pathParameters) {
public CountRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/accessReviewDecisions/$count{?%24filter,%24search}", pathParameters) {
}
/// <summary>
/// Instantiates a new CountRequestBuilder and sets the default values.
/// Instantiates a new <see cref="CountRequestBuilder"/> 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 CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/accessReviewDecisions/$count{?%24search,%24filter}", rawUrl) {
public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/accessReviewDecisions/$count{?%24filter,%24search}", rawUrl) {
}
/// <summary>
/// Get the number of the resource
/// </summary>
/// <returns>A <see cref="int?"/></returns>

Check warning on line 33 in src/Microsoft.Graph/Generated/AccessReviewDecisions/Count/CountRequestBuilder.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has syntactically incorrect cref attribute 'int?'

Check warning on line 33 in src/Microsoft.Graph/Generated/AccessReviewDecisions/Count/CountRequestBuilder.cs

View workflow job for this annotation

GitHub Actions / build

Syntax error, '.' expected. See also error CS1003.

Check warning on line 33 in src/Microsoft.Graph/Generated/AccessReviewDecisions/Count/CountRequestBuilder.cs

View workflow job for this annotation

GitHub Actions / build

Identifier expected. See also error CS1001.

Check warning on line 33 in src/Microsoft.Graph/Generated/AccessReviewDecisions/Count/CountRequestBuilder.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has syntactically incorrect cref attribute 'int?'

Check warning on line 33 in src/Microsoft.Graph/Generated/AccessReviewDecisions/Count/CountRequestBuilder.cs

View workflow job for this annotation

GitHub Actions / build

Syntax error, '.' expected. See also error CS1003.

Check warning on line 33 in src/Microsoft.Graph/Generated/AccessReviewDecisions/Count/CountRequestBuilder.cs

View workflow job for this annotation

GitHub Actions / build

Identifier expected. See also error CS1001.
/// <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>
/// <exception cref="ODataError">When receiving a 4XX or 5XX status code</exception>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public async Task<int?> GetAsync(Action<RequestConfiguration<CountRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
Expand All @@ -41,14 +43,14 @@
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
{"4XX", ODataError.CreateFromDiscriminatorValue},
{"5XX", ODataError.CreateFromDiscriminatorValue},
{"XXX", ODataError.CreateFromDiscriminatorValue},
};
return await RequestAdapter.SendPrimitiveAsync<int?>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Get the number of the resource
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <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
Expand All @@ -65,6 +67,7 @@
/// <summary>
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
/// </summary>
/// <returns>A <see cref="CountRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public CountRequestBuilder WithUrl(string rawUrl) {
return new CountRequestBuilder(rawUrl, RequestAdapter);
Expand Down
Loading
Loading