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

Commit 5d40dec

Browse files
committed
Update generated code.
Schema version: microsoftgraph/msgraph-metadata@902ba0d7 Generator version: microsoft/kiota@731e58ac
1 parent eef4059 commit 5d40dec

File tree

12,392 files changed

+477732
-486664
lines changed

Some content is hidden

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

12,392 files changed

+477732
-486664
lines changed

src/generated/Admin/AdminRequestBuilder.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ public Command BuildPatchCommand() {
119119
if (model is null) return; // Cannot create a POST request from a null model.
120120
var requestInfo = ToPatchRequestInformation(model, q => {
121121
});
122+
requestInfo.SetContentFromParsable(reqAdapter, "application/json", model);
122123
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
123124
{"4XX", ODataError.CreateFromDiscriminatorValue},
124125
{"5XX", ODataError.CreateFromDiscriminatorValue},

src/generated/Admin/ServiceAnnouncement/HealthOverviews/HealthOverviewsRequestBuilder.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ public Command BuildCreateCommand() {
8686
if (model is null) return; // Cannot create a POST request from a null model.
8787
var requestInfo = ToPostRequestInformation(model, q => {
8888
});
89+
requestInfo.SetContentFromParsable(reqAdapter, "application/json", model);
8990
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
9091
{"4XX", ODataError.CreateFromDiscriminatorValue},
9192
{"5XX", ODataError.CreateFromDiscriminatorValue},

src/generated/Admin/ServiceAnnouncement/HealthOverviews/Item/Issues/Count/CountRequestBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public Command BuildGetCommand() {
2929
var command = new Command("get");
3030
command.Description = "Get the number of the resource";
3131
// Create options for all the parameters
32-
var serviceHealthIdOption = new Option<string>("--service-health-id", description: "key: id of serviceHealth") {
32+
var serviceHealthIdOption = new Option<string>("--service-health-id", description: "The unique identifier of serviceHealth") {
3333
};
3434
serviceHealthIdOption.IsRequired = true;
3535
command.AddOption(serviceHealthIdOption);

src/generated/Admin/ServiceAnnouncement/HealthOverviews/Item/Issues/IssuesRequestBuilder.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public Command BuildCommand() {
3333
var builder = new ServiceHealthIssueItemRequestBuilder(PathParameters);
3434
command.AddCommand(builder.BuildDeleteCommand());
3535
command.AddCommand(builder.BuildGetCommand());
36-
command.AddCommand(builder.BuildMicrosoftGraphIncidentReportCommand());
36+
command.AddCommand(builder.BuildIncidentReportCommand());
3737
command.AddCommand(builder.BuildPatchCommand());
3838
return command;
3939
}
@@ -54,7 +54,7 @@ public Command BuildCreateCommand() {
5454
var command = new Command("create");
5555
command.Description = "Create new navigation property to issues for admin";
5656
// Create options for all the parameters
57-
var serviceHealthIdOption = new Option<string>("--service-health-id", description: "key: id of serviceHealth") {
57+
var serviceHealthIdOption = new Option<string>("--service-health-id", description: "The unique identifier of serviceHealth") {
5858
};
5959
serviceHealthIdOption.IsRequired = true;
6060
command.AddOption(serviceHealthIdOption);
@@ -92,6 +92,7 @@ public Command BuildCreateCommand() {
9292
var requestInfo = ToPostRequestInformation(model, q => {
9393
});
9494
if (serviceHealthId is not null) requestInfo.PathParameters.Add("serviceHealth%2Did", serviceHealthId);
95+
requestInfo.SetContentFromParsable(reqAdapter, "application/json", model);
9596
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
9697
{"4XX", ODataError.CreateFromDiscriminatorValue},
9798
{"5XX", ODataError.CreateFromDiscriminatorValue},
@@ -111,7 +112,7 @@ public Command BuildListCommand() {
111112
var command = new Command("list");
112113
command.Description = "A collection of issues that happened on the service, with detailed information for each issue.";
113114
// Create options for all the parameters
114-
var serviceHealthIdOption = new Option<string>("--service-health-id", description: "key: id of serviceHealth") {
115+
var serviceHealthIdOption = new Option<string>("--service-health-id", description: "The unique identifier of serviceHealth") {
115116
};
116117
serviceHealthIdOption.IsRequired = true;
117118
command.AddOption(serviceHealthIdOption);
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
using ApiSdk.Models.ODataErrors;
2+
using Microsoft.Extensions.DependencyInjection;
3+
using Microsoft.Extensions.Hosting;
4+
using Microsoft.Kiota.Abstractions;
5+
using Microsoft.Kiota.Abstractions.Serialization;
6+
using Microsoft.Kiota.Cli.Commons.Extensions;
7+
using Microsoft.Kiota.Cli.Commons.IO;
8+
using System;
9+
using System.Collections.Generic;
10+
using System.CommandLine;
11+
using System.IO;
12+
using System.Linq;
13+
using System.Text;
14+
using System.Threading;
15+
using System.Threading.Tasks;
16+
namespace ApiSdk.Admin.ServiceAnnouncement.HealthOverviews.Item.Issues.Item.IncidentReport {
17+
/// <summary>
18+
/// Provides operations to call the incidentReport method.
19+
/// </summary>
20+
public class IncidentReportRequestBuilder {
21+
/// <summary>Path parameters for the request</summary>
22+
private Dictionary<string, object> PathParameters { get; set; }
23+
/// <summary>Url template to use to build the URL for the current request builder</summary>
24+
private string UrlTemplate { get; set; }
25+
/// <summary>
26+
/// Invoke function incidentReport
27+
/// </summary>
28+
public Command BuildGetCommand() {
29+
var command = new Command("get");
30+
command.Description = "Invoke function incidentReport";
31+
// Create options for all the parameters
32+
var serviceHealthIdOption = new Option<string>("--service-health-id", description: "The unique identifier of serviceHealth") {
33+
};
34+
serviceHealthIdOption.IsRequired = true;
35+
command.AddOption(serviceHealthIdOption);
36+
var serviceHealthIssueIdOption = new Option<string>("--service-health-issue-id", description: "The unique identifier of serviceHealthIssue") {
37+
};
38+
serviceHealthIssueIdOption.IsRequired = true;
39+
command.AddOption(serviceHealthIssueIdOption);
40+
var fileOption = new Option<FileInfo>("--file");
41+
command.AddOption(fileOption);
42+
command.SetHandler(async (invocationContext) => {
43+
var serviceHealthId = invocationContext.ParseResult.GetValueForOption(serviceHealthIdOption);
44+
var serviceHealthIssueId = invocationContext.ParseResult.GetValueForOption(serviceHealthIssueIdOption);
45+
var file = invocationContext.ParseResult.GetValueForOption(fileOption);
46+
var cancellationToken = invocationContext.GetCancellationToken();
47+
var reqAdapter = invocationContext.GetRequestAdapter();
48+
var requestInfo = ToGetRequestInformation(q => {
49+
});
50+
if (serviceHealthId is not null) requestInfo.PathParameters.Add("serviceHealth%2Did", serviceHealthId);
51+
if (serviceHealthIssueId is not null) requestInfo.PathParameters.Add("serviceHealthIssue%2Did", serviceHealthIssueId);
52+
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
53+
{"4XX", ODataError.CreateFromDiscriminatorValue},
54+
{"5XX", ODataError.CreateFromDiscriminatorValue},
55+
};
56+
var response = await reqAdapter.SendPrimitiveAsync<Stream>(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null;
57+
if (file == null) {
58+
using var reader = new StreamReader(response);
59+
var strContent = reader.ReadToEnd();
60+
Console.Write(strContent);
61+
}
62+
else {
63+
using var writeStream = file.OpenWrite();
64+
await response.CopyToAsync(writeStream);
65+
Console.WriteLine($"Content written to {file.FullName}.");
66+
}
67+
});
68+
return command;
69+
}
70+
/// <summary>
71+
/// Instantiates a new IncidentReportRequestBuilder and sets the default values.
72+
/// </summary>
73+
/// <param name="pathParameters">Path parameters for the request</param>
74+
public IncidentReportRequestBuilder(Dictionary<string, object> pathParameters) {
75+
_ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters));
76+
UrlTemplate = "{+baseurl}/admin/serviceAnnouncement/healthOverviews/{serviceHealth%2Did}/issues/{serviceHealthIssue%2Did}/incidentReport()";
77+
var urlTplParams = new Dictionary<string, object>(pathParameters);
78+
PathParameters = urlTplParams;
79+
}
80+
/// <summary>
81+
/// Invoke function incidentReport
82+
/// </summary>
83+
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
84+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
85+
#nullable enable
86+
public RequestInformation ToGetRequestInformation(Action<IncidentReportRequestBuilderGetRequestConfiguration>? requestConfiguration = default) {
87+
#nullable restore
88+
#else
89+
public RequestInformation ToGetRequestInformation(Action<IncidentReportRequestBuilderGetRequestConfiguration> requestConfiguration = default) {
90+
#endif
91+
var requestInfo = new RequestInformation {
92+
HttpMethod = Method.GET,
93+
UrlTemplate = UrlTemplate,
94+
PathParameters = PathParameters,
95+
};
96+
if (requestConfiguration != null) {
97+
var requestConfig = new IncidentReportRequestBuilderGetRequestConfiguration();
98+
requestConfiguration.Invoke(requestConfig);
99+
requestInfo.AddRequestOptions(requestConfig.Options);
100+
requestInfo.AddHeaders(requestConfig.Headers);
101+
}
102+
return requestInfo;
103+
}
104+
/// <summary>
105+
/// Configuration for the request such as headers, query parameters, and middleware options.
106+
/// </summary>
107+
public class IncidentReportRequestBuilderGetRequestConfiguration {
108+
/// <summary>Request headers</summary>
109+
public RequestHeaders Headers { get; set; }
110+
/// <summary>Request options</summary>
111+
public IList<IRequestOption> Options { get; set; }
112+
/// <summary>
113+
/// Instantiates a new incidentReportRequestBuilderGetRequestConfiguration and sets the default values.
114+
/// </summary>
115+
public IncidentReportRequestBuilderGetRequestConfiguration() {
116+
Options = new List<IRequestOption>();
117+
Headers = new RequestHeaders();
118+
}
119+
}
120+
}
121+
}

src/generated/Admin/ServiceAnnouncement/HealthOverviews/Item/Issues/Item/MicrosoftGraphIncidentReport/MicrosoftGraphIncidentReportRequestBuilder.cs

Lines changed: 0 additions & 121 deletions
This file was deleted.

0 commit comments

Comments
 (0)