Skip to content

Commit

Permalink
Merge pull request #604 from microsoftgraph/kiota/beta/pipelinebuild/…
Browse files Browse the repository at this point in the history
…102354

Generated beta models and request builders using Kiota
  • Loading branch information
andrueastman authored Jan 18, 2023
2 parents cf2281b + 8bf3511 commit 600a7a8
Show file tree
Hide file tree
Showing 22,370 changed files with 522,931 additions and 6,667 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ and this project does NOT adhere to [Semantic Versioning](https://semver.org/spe
### Changed

- Fixed a regression where passing custom base url would not be reflected in the requests.
- Latest metadata updates from 12th January 2023 snapshot
- Latest metadata updates from 12th January 2023 snapshot.

## [5.16.0-preview] - 2023-01-11

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ public AccessReviewDecisionsRequestBuilder(string rawUrl, IRequestAdapter reques
/// </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
public async Task<AccessReviewDecisionCollectionResponse?> GetAsync(Action<AccessReviewDecisionsRequestBuilderGetRequestConfiguration>? requestConfiguration = default, CancellationToken cancellationToken = default) {
#else
public async Task<AccessReviewDecisionCollectionResponse> GetAsync(Action<AccessReviewDecisionsRequestBuilderGetRequestConfiguration> requestConfiguration = default, CancellationToken cancellationToken = default) {
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
{"4XX", ODataError.CreateFromDiscriminatorValue},
Expand All @@ -77,7 +81,11 @@ public async Task<AccessReviewDecisionCollectionResponse> GetAsync(Action<Access
/// <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>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
public async Task<AccessReviewDecision?> PostAsync(AccessReviewDecision body, Action<AccessReviewDecisionsRequestBuilderPostRequestConfiguration>? requestConfiguration = default, CancellationToken cancellationToken = default) {
#else
public async Task<AccessReviewDecision> PostAsync(AccessReviewDecision body, Action<AccessReviewDecisionsRequestBuilderPostRequestConfiguration> requestConfiguration = default, CancellationToken cancellationToken = default) {
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
Expand All @@ -90,7 +98,11 @@ public async Task<AccessReviewDecision> PostAsync(AccessReviewDecision body, Act
/// Get entities 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
public RequestInformation ToGetRequestInformation(Action<AccessReviewDecisionsRequestBuilderGetRequestConfiguration>? requestConfiguration = default) {
#else
public RequestInformation ToGetRequestInformation(Action<AccessReviewDecisionsRequestBuilderGetRequestConfiguration> requestConfiguration = default) {
#endif
var requestInfo = new RequestInformation {
HttpMethod = Method.GET,
UrlTemplate = UrlTemplate,
Expand All @@ -111,7 +123,11 @@ public RequestInformation ToGetRequestInformation(Action<AccessReviewDecisionsRe
/// </summary>
/// <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
public RequestInformation ToPostRequestInformation(AccessReviewDecision body, Action<AccessReviewDecisionsRequestBuilderPostRequestConfiguration>? requestConfiguration = default) {
#else
public RequestInformation ToPostRequestInformation(AccessReviewDecision body, Action<AccessReviewDecisionsRequestBuilderPostRequestConfiguration> requestConfiguration = default) {
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation {
HttpMethod = Method.POST,
Expand All @@ -136,20 +152,45 @@ public class AccessReviewDecisionsRequestBuilderGetQueryParameters {
[QueryParameter("%24count")]
public bool? Count { get; set; }
/// <summary>Expand related entities</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
[QueryParameter("%24expand")]
public string[]? Expand { get; set; }
#else
[QueryParameter("%24expand")]
public string[] Expand { get; set; }
#endif
/// <summary>Filter items by property values</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
[QueryParameter("%24filter")]
public string? Filter { get; set; }
#else
[QueryParameter("%24filter")]
public string Filter { get; set; }
#endif
/// <summary>Order items by property values</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
[QueryParameter("%24orderby")]
public string[]? Orderby { get; set; }
#else
[QueryParameter("%24orderby")]
public string[] Orderby { get; set; }
#endif
/// <summary>Search items by search phrases</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
[QueryParameter("%24search")]
public string? Search { get; set; }
#else
[QueryParameter("%24search")]
public string Search { get; set; }
#endif
/// <summary>Select properties to be returned</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
[QueryParameter("%24select")]
public string[]? Select { get; set; }
#else
[QueryParameter("%24select")]
public string[] Select { get; set; }
#endif
/// <summary>Skip the first n items</summary>
[QueryParameter("%24skip")]
public int? Skip { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class CountRequestBuilder {
public CountRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) {
_ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters));
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
UrlTemplate = "{+baseurl}/accessReviewDecisions/$count";
UrlTemplate = "{+baseurl}/accessReviewDecisions/$count{?%24search,%24filter}";
var urlTplParams = new Dictionary<string, object>(pathParameters);
PathParameters = urlTplParams;
RequestAdapter = requestAdapter;
Expand All @@ -39,7 +39,7 @@ public CountRequestBuilder(Dictionary<string, object> pathParameters, IRequestAd
public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) {
if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl));
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
UrlTemplate = "{+baseurl}/accessReviewDecisions/$count";
UrlTemplate = "{+baseurl}/accessReviewDecisions/$count{?%24search,%24filter}";
var urlTplParams = new Dictionary<string, object>();
urlTplParams.Add("request-raw-url", rawUrl);
PathParameters = urlTplParams;
Expand All @@ -50,7 +50,11 @@ public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) {
/// </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
public async Task<int??> GetAsync(Action<CountRequestBuilderGetRequestConfiguration>? requestConfiguration = default, CancellationToken cancellationToken = default) {
#else
public async Task<int?> GetAsync(Action<CountRequestBuilderGetRequestConfiguration> requestConfiguration = default, CancellationToken cancellationToken = default) {
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
{"4XX", ODataError.CreateFromDiscriminatorValue},
Expand All @@ -62,7 +66,11 @@ public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) {
/// Get the number of the resource
/// </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
public RequestInformation ToGetRequestInformation(Action<CountRequestBuilderGetRequestConfiguration>? requestConfiguration = default) {
#else
public RequestInformation ToGetRequestInformation(Action<CountRequestBuilderGetRequestConfiguration> requestConfiguration = default) {
#endif
var requestInfo = new RequestInformation {
HttpMethod = Method.GET,
UrlTemplate = UrlTemplate,
Expand All @@ -72,19 +80,43 @@ public RequestInformation ToGetRequestInformation(Action<CountRequestBuilderGetR
if (requestConfiguration != null) {
var requestConfig = new CountRequestBuilderGetRequestConfiguration();
requestConfiguration.Invoke(requestConfig);
requestInfo.AddQueryParameters(requestConfig.QueryParameters);
requestInfo.AddRequestOptions(requestConfig.Options);
requestInfo.AddHeaders(requestConfig.Headers);
}
return requestInfo;
}
/// <summary>
/// Get the number of the resource
/// </summary>
public class CountRequestBuilderGetQueryParameters {
/// <summary>Filter items by property values</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
[QueryParameter("%24filter")]
public string? Filter { get; set; }
#else
[QueryParameter("%24filter")]
public string Filter { get; set; }
#endif
/// <summary>Search items by search phrases</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
[QueryParameter("%24search")]
public string? Search { get; set; }
#else
[QueryParameter("%24search")]
public string Search { get; set; }
#endif
}
/// <summary>
/// Configuration for the request such as headers, query parameters, and middleware options.
/// </summary>
public class CountRequestBuilderGetRequestConfiguration {
/// <summary>Request headers</summary>
public RequestHeaders Headers { get; set; }
/// <summary>Request options</summary>
public IList<IRequestOption> Options { get; set; }
/// <summary>Request query parameters</summary>
public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters();
/// <summary>
/// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values.
/// </summary>
Expand Down
Loading

0 comments on commit 600a7a8

Please sign in to comment.