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 using Kiota #612

Merged
merged 2 commits into from
Feb 8, 2023
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
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project does NOT adhere to [Semantic Versioning](https://semver.org/spe

## [Unreleased]

- [Breaking] Namespace and Request Builder renaming to align to paths defined in metadata (https://github.com/microsoft/kiota/issues/2209)
- Latest metadata updates from 7th February 2023 snapshot.

## [5.18.0-preview] - 2023-01-16

- Adds support for nullable reference types.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class AccessReviewDecisionsRequestBuilder {
/// <summary>Provides operations to manage the collection of accessReviewDecision entities.</summary>
public AccessReviewDecisionItemRequestBuilder this[string position] { get {
var urlTplParams = new Dictionary<string, object>(PathParameters);
urlTplParams.Add("accessReviewDecision%2Did", position);
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("accessReviewDecision%2Did", position);
return new AccessReviewDecisionItemRequestBuilder(urlTplParams, RequestAdapter);
} }
/// <summary>
Expand All @@ -54,7 +54,7 @@ public AccessReviewDecisionsRequestBuilder(string rawUrl, IRequestAdapter reques
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
UrlTemplate = "{+baseurl}/accessReviewDecisions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}";
var urlTplParams = new Dictionary<string, object>();
urlTplParams.Add("request-raw-url", rawUrl);
if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl);
PathParameters = urlTplParams;
RequestAdapter = requestAdapter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) {
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
UrlTemplate = "{+baseurl}/accessReviewDecisions/$count{?%24search,%24filter}";
var urlTplParams = new Dictionary<string, object>();
urlTplParams.Add("request-raw-url", rawUrl);
if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl);
PathParameters = urlTplParams;
RequestAdapter = requestAdapter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ public AccessReviewDecisionItemRequestBuilder(string rawUrl, IRequestAdapter req
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
UrlTemplate = "{+baseurl}/accessReviewDecisions/{accessReviewDecision%2Did}{?%24select,%24expand}";
var urlTplParams = new Dictionary<string, object>();
urlTplParams.Add("request-raw-url", rawUrl);
if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl);
PathParameters = urlTplParams;
RequestAdapter = requestAdapter;
}
/// <summary>
/// Delete entity from accessReviewDecisions by key (id)
/// Delete entity from accessReviewDecisions
/// </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>
Expand All @@ -66,7 +66,7 @@ public async Task DeleteAsync(Action<AccessReviewDecisionItemRequestBuilderDelet
await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken);
}
/// <summary>
/// Get entity from accessReviewDecisions by key (id)
/// Get entity from accessReviewDecisions by key
/// </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>
Expand All @@ -85,7 +85,7 @@ public async Task<AccessReviewDecision> GetAsync(Action<AccessReviewDecisionItem
return await RequestAdapter.SendAsync<AccessReviewDecision>(requestInfo, AccessReviewDecision.CreateFromDiscriminatorValue, errorMapping, cancellationToken);
}
/// <summary>
/// Update entity in accessReviewDecisions by key (id)
/// Update entity in accessReviewDecisions
/// </summary>
/// <param name="body">The request body</param>
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
Expand All @@ -106,7 +106,7 @@ public async Task<AccessReviewDecision> PatchAsync(AccessReviewDecision body, Ac
return await RequestAdapter.SendAsync<AccessReviewDecision>(requestInfo, AccessReviewDecision.CreateFromDiscriminatorValue, errorMapping, cancellationToken);
}
/// <summary>
/// Delete entity from accessReviewDecisions by key (id)
/// Delete entity from accessReviewDecisions
/// </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
Expand All @@ -130,7 +130,7 @@ public RequestInformation ToDeleteRequestInformation(Action<AccessReviewDecision
return requestInfo;
}
/// <summary>
/// Get entity from accessReviewDecisions by key (id)
/// Get entity from accessReviewDecisions by key
/// </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
Expand All @@ -156,7 +156,7 @@ public RequestInformation ToGetRequestInformation(Action<AccessReviewDecisionIte
return requestInfo;
}
/// <summary>
/// Update entity in accessReviewDecisions by key (id)
/// Update entity in accessReviewDecisions
/// </summary>
/// <param name="body">The request body</param>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
Expand Down Expand Up @@ -200,7 +200,7 @@ public AccessReviewDecisionItemRequestBuilderDeleteRequestConfiguration() {
}
}
/// <summary>
/// Get entity from accessReviewDecisions by key (id)
/// Get entity from accessReviewDecisions by key
/// </summary>
public class AccessReviewDecisionItemRequestBuilderGetQueryParameters {
/// <summary>Expand related entities</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class AccessReviewsRequestBuilder {
/// <summary>Provides operations to manage the collection of accessReview entities.</summary>
public AccessReviewItemRequestBuilder this[string position] { get {
var urlTplParams = new Dictionary<string, object>(PathParameters);
urlTplParams.Add("accessReview%2Did", position);
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("accessReview%2Did", position);
return new AccessReviewItemRequestBuilder(urlTplParams, RequestAdapter);
} }
/// <summary>
Expand All @@ -54,7 +54,7 @@ public AccessReviewsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
UrlTemplate = "{+baseurl}/accessReviews{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}";
var urlTplParams = new Dictionary<string, object>();
urlTplParams.Add("request-raw-url", rawUrl);
if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl);
PathParameters = urlTplParams;
RequestAdapter = requestAdapter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) {
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
UrlTemplate = "{+baseurl}/accessReviews/$count{?%24search,%24filter}";
var urlTplParams = new Dictionary<string, object>();
urlTplParams.Add("request-raw-url", rawUrl);
if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl);
PathParameters = urlTplParams;
RequestAdapter = requestAdapter;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Microsoft.Graph.Beta.AccessReviews.Item.ApplyDecisions;
using Microsoft.Graph.Beta.AccessReviews.Item.Decisions;
using Microsoft.Graph.Beta.AccessReviews.Item.Instances;
using Microsoft.Graph.Beta.AccessReviews.Item.MicrosoftGraphApplyDecisions;
using Microsoft.Graph.Beta.AccessReviews.Item.MicrosoftGraphResetDecisions;
using Microsoft.Graph.Beta.AccessReviews.Item.MicrosoftGraphSendReminder;
using Microsoft.Graph.Beta.AccessReviews.Item.MicrosoftGraphStop;
using Microsoft.Graph.Beta.AccessReviews.Item.MyDecisions;
using Microsoft.Graph.Beta.AccessReviews.Item.ResetDecisions;
using Microsoft.Graph.Beta.AccessReviews.Item.Reviewers;
using Microsoft.Graph.Beta.AccessReviews.Item.SendReminder;
using Microsoft.Graph.Beta.AccessReviews.Item.Stop;
using Microsoft.Graph.Beta.Models;
using Microsoft.Graph.Beta.Models.ODataErrors;
using Microsoft.Kiota.Abstractions;
Expand All @@ -21,10 +21,6 @@ namespace Microsoft.Graph.Beta.AccessReviews.Item {
/// Provides operations to manage the collection of accessReview entities.
/// </summary>
public class AccessReviewItemRequestBuilder {
/// <summary>Provides operations to call the applyDecisions method.</summary>
public ApplyDecisionsRequestBuilder ApplyDecisions { get =>
new ApplyDecisionsRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to manage the decisions property of the microsoft.graph.accessReview entity.</summary>
public DecisionsRequestBuilder Decisions { get =>
new DecisionsRequestBuilder(PathParameters, RequestAdapter);
Expand All @@ -33,6 +29,22 @@ public class AccessReviewItemRequestBuilder {
public InstancesRequestBuilder Instances { get =>
new InstancesRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to call the applyDecisions method.</summary>
public MicrosoftGraphApplyDecisionsRequestBuilder MicrosoftGraphApplyDecisions { get =>
new MicrosoftGraphApplyDecisionsRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to call the resetDecisions method.</summary>
public MicrosoftGraphResetDecisionsRequestBuilder MicrosoftGraphResetDecisions { get =>
new MicrosoftGraphResetDecisionsRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to call the sendReminder method.</summary>
public MicrosoftGraphSendReminderRequestBuilder MicrosoftGraphSendReminder { get =>
new MicrosoftGraphSendReminderRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to call the stop method.</summary>
public MicrosoftGraphStopRequestBuilder MicrosoftGraphStop { get =>
new MicrosoftGraphStopRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to manage the myDecisions property of the microsoft.graph.accessReview entity.</summary>
public MyDecisionsRequestBuilder MyDecisions { get =>
new MyDecisionsRequestBuilder(PathParameters, RequestAdapter);
Expand All @@ -41,22 +53,10 @@ public class AccessReviewItemRequestBuilder {
private Dictionary<string, object> PathParameters { get; set; }
/// <summary>The request adapter to use to execute the requests.</summary>
private IRequestAdapter RequestAdapter { get; set; }
/// <summary>Provides operations to call the resetDecisions method.</summary>
public ResetDecisionsRequestBuilder ResetDecisions { get =>
new ResetDecisionsRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to manage the reviewers property of the microsoft.graph.accessReview entity.</summary>
public ReviewersRequestBuilder Reviewers { get =>
new ReviewersRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to call the sendReminder method.</summary>
public SendReminderRequestBuilder SendReminder { get =>
new SendReminderRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to call the stop method.</summary>
public StopRequestBuilder Stop { get =>
new StopRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Url template to use to build the URL for the current request builder</summary>
private string UrlTemplate { get; set; }
/// <summary>
Expand All @@ -82,7 +82,7 @@ public AccessReviewItemRequestBuilder(string rawUrl, IRequestAdapter requestAdap
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
UrlTemplate = "{+baseurl}/accessReviews/{accessReview%2Did}{?%24select,%24expand}";
var urlTplParams = new Dictionary<string, object>();
urlTplParams.Add("request-raw-url", rawUrl);
if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl);
PathParameters = urlTplParams;
RequestAdapter = requestAdapter;
}
Expand Down
Loading