Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit 787792c

Browse files
authored
Update generated code. (#287)
Schema version: microsoftgraph/msgraph-metadata@bb00cdf Generator version: microsoft/kiota@35700c9
1 parent a2a7046 commit 787792c

File tree

10,510 files changed

+122860
-60053
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

10,510 files changed

+122860
-60053
lines changed

src/generated/Admin/AdminRequestBuilder.cs

Lines changed: 53 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,49 @@
1+
using ApiSdk.Admin.Edge;
12
using ApiSdk.Admin.ServiceAnnouncement;
2-
using ApiSdk.Models;
3+
using ApiSdk.Admin.Sharepoint;
34
using ApiSdk.Models.ODataErrors;
4-
using Microsoft.Kiota.Abstractions;
5+
using ApiSdk.Models;
56
using Microsoft.Kiota.Abstractions.Serialization;
6-
using Microsoft.Kiota.Cli.Commons;
7+
using Microsoft.Kiota.Abstractions;
78
using Microsoft.Kiota.Cli.Commons.Extensions;
89
using Microsoft.Kiota.Cli.Commons.IO;
9-
using System;
10+
using Microsoft.Kiota.Cli.Commons;
1011
using System.Collections.Generic;
1112
using System.CommandLine;
1213
using System.IO;
1314
using System.Linq;
1415
using System.Text;
15-
using System.Threading;
1616
using System.Threading.Tasks;
17+
using System.Threading;
18+
using System;
1719
namespace ApiSdk.Admin {
1820
/// <summary>
1921
/// Provides operations to manage the admin singleton.
2022
/// </summary>
2123
public class AdminRequestBuilder : BaseCliRequestBuilder {
24+
/// <summary>
25+
/// Provides operations to manage the edge property of the microsoft.graph.admin entity.
26+
/// </summary>
27+
public Command BuildEdgeNavCommand() {
28+
var command = new Command("edge");
29+
command.Description = "Provides operations to manage the edge property of the microsoft.graph.admin entity.";
30+
var builder = new EdgeRequestBuilder(PathParameters);
31+
var execCommands = new List<Command>();
32+
var nonExecCommands = new List<Command>();
33+
execCommands.Add(builder.BuildDeleteCommand());
34+
execCommands.Add(builder.BuildGetCommand());
35+
nonExecCommands.Add(builder.BuildInternetExplorerModeNavCommand());
36+
execCommands.Add(builder.BuildPatchCommand());
37+
foreach (var cmd in execCommands)
38+
{
39+
command.AddCommand(cmd);
40+
}
41+
foreach (var cmd in nonExecCommands)
42+
{
43+
command.AddCommand(cmd);
44+
}
45+
return command;
46+
}
2247
/// <summary>
2348
/// Get admin
2449
/// </summary>
@@ -151,6 +176,29 @@ public Command BuildServiceAnnouncementNavCommand() {
151176
return command;
152177
}
153178
/// <summary>
179+
/// Provides operations to manage the sharepoint property of the microsoft.graph.admin entity.
180+
/// </summary>
181+
public Command BuildSharepointNavCommand() {
182+
var command = new Command("sharepoint");
183+
command.Description = "Provides operations to manage the sharepoint property of the microsoft.graph.admin entity.";
184+
var builder = new SharepointRequestBuilder(PathParameters);
185+
var execCommands = new List<Command>();
186+
var nonExecCommands = new List<Command>();
187+
execCommands.Add(builder.BuildDeleteCommand());
188+
execCommands.Add(builder.BuildGetCommand());
189+
execCommands.Add(builder.BuildPatchCommand());
190+
nonExecCommands.Add(builder.BuildSettingsNavCommand());
191+
foreach (var cmd in execCommands)
192+
{
193+
command.AddCommand(cmd);
194+
}
195+
foreach (var cmd in nonExecCommands)
196+
{
197+
command.AddCommand(cmd);
198+
}
199+
return command;
200+
}
201+
/// <summary>
154202
/// Instantiates a new AdminRequestBuilder and sets the default values.
155203
/// </summary>
156204
/// <param name="pathParameters">Path parameters for the request</param>

src/generated/Admin/Edge/EdgeRequestBuilder.cs

Lines changed: 289 additions & 0 deletions
Large diffs are not rendered by default.

src/generated/Admin/Edge/InternetExplorerMode/InternetExplorerModeRequestBuilder.cs

Lines changed: 291 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
using ApiSdk.Models.ODataErrors;
2+
using Microsoft.Kiota.Abstractions.Serialization;
3+
using Microsoft.Kiota.Abstractions;
4+
using Microsoft.Kiota.Cli.Commons.Extensions;
5+
using Microsoft.Kiota.Cli.Commons.IO;
6+
using Microsoft.Kiota.Cli.Commons;
7+
using System.Collections.Generic;
8+
using System.CommandLine;
9+
using System.IO;
10+
using System.Linq;
11+
using System.Text;
12+
using System.Threading.Tasks;
13+
using System.Threading;
14+
using System;
15+
namespace ApiSdk.Admin.Edge.InternetExplorerMode.SiteLists.Count {
16+
/// <summary>
17+
/// Provides operations to count the resources in the collection.
18+
/// </summary>
19+
public class CountRequestBuilder : BaseCliRequestBuilder {
20+
/// <summary>
21+
/// Get the number of the resource
22+
/// </summary>
23+
public Command BuildGetCommand() {
24+
var command = new Command("get");
25+
command.Description = "Get the number of the resource";
26+
var searchOption = new Option<string>("--search", description: "Search items by search phrases") {
27+
};
28+
searchOption.IsRequired = false;
29+
command.AddOption(searchOption);
30+
var filterOption = new Option<string>("--filter", description: "Filter items by property values") {
31+
};
32+
filterOption.IsRequired = false;
33+
command.AddOption(filterOption);
34+
command.SetHandler(async (invocationContext) => {
35+
var search = invocationContext.ParseResult.GetValueForOption(searchOption);
36+
var filter = invocationContext.ParseResult.GetValueForOption(filterOption);
37+
IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory");
38+
var cancellationToken = invocationContext.GetCancellationToken();
39+
var reqAdapter = invocationContext.GetRequestAdapter();
40+
var requestInfo = ToGetRequestInformation(q => {
41+
if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search;
42+
if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter;
43+
});
44+
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
45+
{"4XX", ODataError.CreateFromDiscriminatorValue},
46+
{"5XX", ODataError.CreateFromDiscriminatorValue},
47+
};
48+
var response = await reqAdapter.SendPrimitiveAsync<Stream>(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null;
49+
var formatter = outputFormatterFactory.GetFormatter(FormatterType.TEXT);
50+
await formatter.WriteOutputAsync(response, null, cancellationToken);
51+
});
52+
return command;
53+
}
54+
/// <summary>
55+
/// Instantiates a new CountRequestBuilder and sets the default values.
56+
/// </summary>
57+
/// <param name="pathParameters">Path parameters for the request</param>
58+
public CountRequestBuilder(Dictionary<string, object> pathParameters) : base("{+baseurl}/admin/edge/internetExplorerMode/siteLists/$count{?%24search,%24filter}", pathParameters) {
59+
}
60+
/// <summary>
61+
/// Get the number of the resource
62+
/// </summary>
63+
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
64+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
65+
#nullable enable
66+
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<CountRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
67+
#nullable restore
68+
#else
69+
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<CountRequestBuilderGetQueryParameters>> requestConfiguration = default) {
70+
#endif
71+
var requestInfo = new RequestInformation {
72+
HttpMethod = Method.GET,
73+
UrlTemplate = UrlTemplate,
74+
PathParameters = PathParameters,
75+
};
76+
requestInfo.Headers.Add("Accept", "text/plain");
77+
if (requestConfiguration != null) {
78+
var requestConfig = new RequestConfiguration<CountRequestBuilderGetQueryParameters>();
79+
requestConfiguration.Invoke(requestConfig);
80+
requestInfo.AddQueryParameters(requestConfig.QueryParameters);
81+
requestInfo.AddRequestOptions(requestConfig.Options);
82+
requestInfo.AddHeaders(requestConfig.Headers);
83+
}
84+
return requestInfo;
85+
}
86+
/// <summary>
87+
/// Get the number of the resource
88+
/// </summary>
89+
public class CountRequestBuilderGetQueryParameters {
90+
/// <summary>Filter items by property values</summary>
91+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
92+
#nullable enable
93+
[QueryParameter("%24filter")]
94+
public string? Filter { get; set; }
95+
#nullable restore
96+
#else
97+
[QueryParameter("%24filter")]
98+
public string Filter { get; set; }
99+
#endif
100+
/// <summary>Search items by search phrases</summary>
101+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
102+
#nullable enable
103+
[QueryParameter("%24search")]
104+
public string? Search { get; set; }
105+
#nullable restore
106+
#else
107+
[QueryParameter("%24search")]
108+
public string Search { get; set; }
109+
#endif
110+
}
111+
}
112+
}

0 commit comments

Comments
 (0)