-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(generation): update request builders and models (#54)
* Update generated files with build 140016 * ci: set build timeout (#57) * ci: use bigger pool for build stage * ci: fix tar format detection --------- Co-authored-by: Microsoft Graph DevX Tooling <[email protected]> Co-authored-by: Caleb Kiage <[email protected]>
- Loading branch information
1 parent
3514252
commit 21f7281
Showing
23,562 changed files
with
2,002,285 additions
and
321,181 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
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
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"omnisharp.organizeImportsOnFormat": true, | ||
"dotnet.defaultSolution": "msgraph-beta-cli.sln" | ||
"dotnet.defaultSolution": "msgraph-beta-cli.sln", | ||
"azure-pipelines.1ESPipelineTemplatesSchemaFile": true | ||
} |
314 changes: 314 additions & 0 deletions
314
src/generated/AccessReviewDecisions/AccessReviewDecisionsRequestBuilder.cs
Large diffs are not rendered by default.
Oops, something went wrong.
118 changes: 118 additions & 0 deletions
118
src/generated/AccessReviewDecisions/Count/CountRequestBuilder.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,118 @@ | ||
// <auto-generated/> | ||
using ApiSdk.Models.ODataErrors; | ||
using Microsoft.Kiota.Abstractions.Serialization; | ||
using Microsoft.Kiota.Abstractions; | ||
using Microsoft.Kiota.Cli.Commons.Extensions; | ||
using Microsoft.Kiota.Cli.Commons.IO; | ||
using Microsoft.Kiota.Cli.Commons; | ||
using System.Collections.Generic; | ||
using System.CommandLine; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Threading; | ||
using System; | ||
namespace ApiSdk.AccessReviewDecisions.Count { | ||
/// <summary> | ||
/// Provides operations to count the resources in the collection. | ||
/// </summary> | ||
public class CountRequestBuilder : BaseCliRequestBuilder | ||
{ | ||
/// <summary> | ||
/// Get the number of the resource | ||
/// </summary> | ||
/// <returns>A <see cref="Command"/></returns> | ||
public Command BuildGetCommand() | ||
{ | ||
var command = new Command("get"); | ||
command.Description = "Get the number of the resource"; | ||
var searchOption = new Option<string>("--search", description: "Search items by search phrases") { | ||
}; | ||
searchOption.IsRequired = false; | ||
command.AddOption(searchOption); | ||
var filterOption = new Option<string>("--filter", description: "Filter items by property values") { | ||
}; | ||
filterOption.IsRequired = false; | ||
command.AddOption(filterOption); | ||
command.SetHandler(async (invocationContext) => { | ||
var search = invocationContext.ParseResult.GetValueForOption(searchOption); | ||
var filter = invocationContext.ParseResult.GetValueForOption(filterOption); | ||
IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); | ||
var cancellationToken = invocationContext.GetCancellationToken(); | ||
var reqAdapter = invocationContext.GetRequestAdapter(); | ||
var requestInfo = ToGetRequestInformation(q => { | ||
if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search; | ||
if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter; | ||
}); | ||
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> { | ||
{"4XX", ODataError.CreateFromDiscriminatorValue}, | ||
{"5XX", ODataError.CreateFromDiscriminatorValue}, | ||
}; | ||
var response = await reqAdapter.SendPrimitiveAsync<Stream>(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; | ||
var formatter = outputFormatterFactory.GetFormatter(FormatterType.TEXT); | ||
await formatter.WriteOutputAsync(response, cancellationToken); | ||
}); | ||
return command; | ||
} | ||
/// <summary> | ||
/// Instantiates a new <see cref="CountRequestBuilder"/> and sets the default values. | ||
/// </summary> | ||
/// <param name="pathParameters">Path parameters for the request</param> | ||
public CountRequestBuilder(Dictionary<string, object> pathParameters) : base("{+baseurl}/accessReviewDecisions/$count{?%24filter,%24search}", pathParameters) | ||
{ | ||
} | ||
/// <summary> | ||
/// 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> | ||
public CountRequestBuilder(string rawUrl) : base("{+baseurl}/accessReviewDecisions/$count{?%24filter,%24search}", rawUrl) | ||
{ | ||
} | ||
/// <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 | ||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<CountRequestBuilderGetQueryParameters>>? requestConfiguration = default) | ||
{ | ||
#nullable restore | ||
#else | ||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<CountRequestBuilderGetQueryParameters>> requestConfiguration = default) | ||
{ | ||
#endif | ||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); | ||
requestInfo.Configure(requestConfiguration); | ||
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); | ||
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 | ||
#nullable enable | ||
[QueryParameter("%24filter")] | ||
public string? Filter { get; set; } | ||
#nullable restore | ||
#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 | ||
#nullable enable | ||
[QueryParameter("%24search")] | ||
public string? Search { get; set; } | ||
#nullable restore | ||
#else | ||
[QueryParameter("%24search")] | ||
public string Search { get; set; } | ||
#endif | ||
} | ||
} | ||
} |
Oops, something went wrong.