Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
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.
2 changes: 1 addition & 1 deletion .azure-pipelines/powershell/BuildTools.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Class PackageTypes : System.Management.Automation.IValidateSetValuesGenerator {
[string[]] GetValidValues() {
$PackageTypes = ,"zip"
if ($global:IsMacOS -or $global:IsLinux) {
if (Get-Command -Name tar -CommandType Application -ErrorAction Ignore) {
$PackageTypes += "tar"
}
return [string[]] $PackageTypes
Expand Down
5 changes: 5 additions & 0 deletions .azure-pipelines/release-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ extends:
jobs:
- job: build
displayName: Build and publish
timeoutInMinutes: 60 # Use 1hr timeout
pool:
# Custom high memory pool for building the CLI
name: 1es-ubuntu-latest-ado-cli-mem
os: linux
strategy:
matrix:
'Windows-x64':
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
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
}

Large diffs are not rendered by default.

118 changes: 118 additions & 0 deletions src/generated/AccessReviewDecisions/Count/CountRequestBuilder.cs
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
}
}
}
Loading