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

Commit 10b7be9

Browse files
committed
Add ignored files
1 parent 2da8df5 commit 10b7be9

File tree

4 files changed

+317
-3
lines changed

4 files changed

+317
-3
lines changed

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ DocProject/Help/Html2
371371
DocProject/Help/html
372372

373373
# Click-Once directory
374-
publish/
374+
bin/**/publish/
375375

376376
# Publish Web Output
377377
*.[Pp]ublish.xml
@@ -573,5 +573,4 @@ FodyWeavers.xsd
573573
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,visualstudio,intellij+all,dotnetcore,windows,macos,linux
574574

575575
app-settings.*.json
576-
!app-settings.sample.json
577-
!generated/**/publish
576+
!app-settings.sample.json
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
using ApiSdk.Models.Microsoft.Graph;
2+
using Microsoft.Kiota.Abstractions;
3+
using Microsoft.Kiota.Abstractions.Serialization;
4+
using System;
5+
using System.Collections.Generic;
6+
using System.CommandLine;
7+
using System.CommandLine.Invocation;
8+
using System.IO;
9+
using System.Linq;
10+
using System.Text;
11+
using System.Threading;
12+
using System.Threading.Tasks;
13+
namespace ApiSdk.Education.Me.Assignments.Item.Publish {
14+
/// <summary>Builds and executes requests for operations under \education\me\assignments\{educationAssignment-id}\microsoft.graph.publish</summary>
15+
public class PublishRequestBuilder {
16+
/// <summary>Path parameters for the request</summary>
17+
private Dictionary<string, object> PathParameters { get; set; }
18+
/// <summary>The request adapter to use to execute the requests.</summary>
19+
private IRequestAdapter RequestAdapter { get; set; }
20+
/// <summary>Url template to use to build the URL for the current request builder</summary>
21+
private string UrlTemplate { get; set; }
22+
/// <summary>
23+
/// Invoke action publish
24+
/// </summary>
25+
public Command BuildPostCommand() {
26+
var command = new Command("post");
27+
command.Description = "Invoke action publish";
28+
// Create options for all the parameters
29+
var educationAssignmentIdOption = new Option<string>("--educationassignment-id", description: "key: id of educationAssignment");
30+
educationAssignmentIdOption.IsRequired = true;
31+
command.AddOption(educationAssignmentIdOption);
32+
command.Handler = CommandHandler.Create<string>(async (educationAssignmentId) => {
33+
var requestInfo = CreatePostRequestInformation(q => {
34+
});
35+
var result = await RequestAdapter.SendAsync<PublishResponse>(requestInfo);
36+
// Print request output. What if the request has no return?
37+
using var serializer = RequestAdapter.SerializationWriterFactory.GetSerializationWriter("application/json");
38+
serializer.WriteObjectValue(null, result);
39+
using var content = serializer.GetSerializedContent();
40+
using var reader = new StreamReader(content);
41+
var strContent = await reader.ReadToEndAsync();
42+
Console.Write(strContent + "\n");
43+
});
44+
return command;
45+
}
46+
/// <summary>
47+
/// Instantiates a new PublishRequestBuilder and sets the default values.
48+
/// <param name="pathParameters">Path parameters for the request</param>
49+
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
50+
/// </summary>
51+
public PublishRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) {
52+
_ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters));
53+
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
54+
UrlTemplate = "{+baseurl}/education/me/assignments/{educationAssignment_id}/microsoft.graph.publish";
55+
var urlTplParams = new Dictionary<string, object>(pathParameters);
56+
PathParameters = urlTplParams;
57+
RequestAdapter = requestAdapter;
58+
}
59+
/// <summary>
60+
/// Invoke action publish
61+
/// <param name="h">Request headers</param>
62+
/// <param name="o">Request options</param>
63+
/// </summary>
64+
public RequestInformation CreatePostRequestInformation(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default) {
65+
var requestInfo = new RequestInformation {
66+
HttpMethod = HttpMethod.POST,
67+
UrlTemplate = UrlTemplate,
68+
PathParameters = PathParameters,
69+
};
70+
h?.Invoke(requestInfo.Headers);
71+
requestInfo.AddRequestOptions(o?.ToArray());
72+
return requestInfo;
73+
}
74+
/// <summary>
75+
/// Invoke action publish
76+
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
77+
/// <param name="h">Request headers</param>
78+
/// <param name="o">Request options</param>
79+
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
80+
/// </summary>
81+
public async Task<PublishResponse> PostAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
82+
var requestInfo = CreatePostRequestInformation(h, o);
83+
return await RequestAdapter.SendAsync<PublishResponse>(requestInfo, responseHandler, cancellationToken);
84+
}
85+
/// <summary>Union type wrapper for classes educationAssignment</summary>
86+
public class PublishResponse : IParsable {
87+
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary>
88+
public IDictionary<string, object> AdditionalData { get; set; }
89+
/// <summary>Union type representation for type educationAssignment</summary>
90+
public EducationAssignment EducationAssignment { get; set; }
91+
/// <summary>
92+
/// Instantiates a new publishResponse and sets the default values.
93+
/// </summary>
94+
public PublishResponse() {
95+
AdditionalData = new Dictionary<string, object>();
96+
}
97+
/// <summary>
98+
/// The deserialization information for the current model
99+
/// </summary>
100+
public IDictionary<string, Action<T, IParseNode>> GetFieldDeserializers<T>() {
101+
return new Dictionary<string, Action<T, IParseNode>> {
102+
{"educationAssignment", (o,n) => { (o as PublishResponse).EducationAssignment = n.GetObjectValue<EducationAssignment>(); } },
103+
};
104+
}
105+
/// <summary>
106+
/// Serializes information the current object
107+
/// <param name="writer">Serialization writer to use to serialize this model</param>
108+
/// </summary>
109+
public void Serialize(ISerializationWriter writer) {
110+
_ = writer ?? throw new ArgumentNullException(nameof(writer));
111+
writer.WriteObjectValue<EducationAssignment>("educationAssignment", EducationAssignment);
112+
writer.WriteAdditionalData(AdditionalData);
113+
}
114+
}
115+
}
116+
}
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
using ApiSdk.Models.Microsoft.Graph;
2+
using Microsoft.Kiota.Abstractions;
3+
using Microsoft.Kiota.Abstractions.Serialization;
4+
using System;
5+
using System.Collections.Generic;
6+
using System.CommandLine;
7+
using System.CommandLine.Invocation;
8+
using System.IO;
9+
using System.Linq;
10+
using System.Text;
11+
using System.Threading;
12+
using System.Threading.Tasks;
13+
namespace ApiSdk.Education.Users.Item.Assignments.Item.Publish {
14+
/// <summary>Builds and executes requests for operations under \education\users\{educationUser-id}\assignments\{educationAssignment-id}\microsoft.graph.publish</summary>
15+
public class PublishRequestBuilder {
16+
/// <summary>Path parameters for the request</summary>
17+
private Dictionary<string, object> PathParameters { get; set; }
18+
/// <summary>The request adapter to use to execute the requests.</summary>
19+
private IRequestAdapter RequestAdapter { get; set; }
20+
/// <summary>Url template to use to build the URL for the current request builder</summary>
21+
private string UrlTemplate { get; set; }
22+
/// <summary>
23+
/// Invoke action publish
24+
/// </summary>
25+
public Command BuildPostCommand() {
26+
var command = new Command("post");
27+
command.Description = "Invoke action publish";
28+
// Create options for all the parameters
29+
var educationUserIdOption = new Option<string>("--educationuser-id", description: "key: id of educationUser");
30+
educationUserIdOption.IsRequired = true;
31+
command.AddOption(educationUserIdOption);
32+
var educationAssignmentIdOption = new Option<string>("--educationassignment-id", description: "key: id of educationAssignment");
33+
educationAssignmentIdOption.IsRequired = true;
34+
command.AddOption(educationAssignmentIdOption);
35+
command.Handler = CommandHandler.Create<string, string>(async (educationUserId, educationAssignmentId) => {
36+
var requestInfo = CreatePostRequestInformation(q => {
37+
});
38+
var result = await RequestAdapter.SendAsync<PublishResponse>(requestInfo);
39+
// Print request output. What if the request has no return?
40+
using var serializer = RequestAdapter.SerializationWriterFactory.GetSerializationWriter("application/json");
41+
serializer.WriteObjectValue(null, result);
42+
using var content = serializer.GetSerializedContent();
43+
using var reader = new StreamReader(content);
44+
var strContent = await reader.ReadToEndAsync();
45+
Console.Write(strContent + "\n");
46+
});
47+
return command;
48+
}
49+
/// <summary>
50+
/// Instantiates a new PublishRequestBuilder and sets the default values.
51+
/// <param name="pathParameters">Path parameters for the request</param>
52+
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
53+
/// </summary>
54+
public PublishRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) {
55+
_ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters));
56+
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
57+
UrlTemplate = "{+baseurl}/education/users/{educationUser_id}/assignments/{educationAssignment_id}/microsoft.graph.publish";
58+
var urlTplParams = new Dictionary<string, object>(pathParameters);
59+
PathParameters = urlTplParams;
60+
RequestAdapter = requestAdapter;
61+
}
62+
/// <summary>
63+
/// Invoke action publish
64+
/// <param name="h">Request headers</param>
65+
/// <param name="o">Request options</param>
66+
/// </summary>
67+
public RequestInformation CreatePostRequestInformation(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default) {
68+
var requestInfo = new RequestInformation {
69+
HttpMethod = HttpMethod.POST,
70+
UrlTemplate = UrlTemplate,
71+
PathParameters = PathParameters,
72+
};
73+
h?.Invoke(requestInfo.Headers);
74+
requestInfo.AddRequestOptions(o?.ToArray());
75+
return requestInfo;
76+
}
77+
/// <summary>
78+
/// Invoke action publish
79+
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
80+
/// <param name="h">Request headers</param>
81+
/// <param name="o">Request options</param>
82+
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
83+
/// </summary>
84+
public async Task<PublishResponse> PostAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
85+
var requestInfo = CreatePostRequestInformation(h, o);
86+
return await RequestAdapter.SendAsync<PublishResponse>(requestInfo, responseHandler, cancellationToken);
87+
}
88+
/// <summary>Union type wrapper for classes educationAssignment</summary>
89+
public class PublishResponse : IParsable {
90+
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary>
91+
public IDictionary<string, object> AdditionalData { get; set; }
92+
/// <summary>Union type representation for type educationAssignment</summary>
93+
public EducationAssignment EducationAssignment { get; set; }
94+
/// <summary>
95+
/// Instantiates a new publishResponse and sets the default values.
96+
/// </summary>
97+
public PublishResponse() {
98+
AdditionalData = new Dictionary<string, object>();
99+
}
100+
/// <summary>
101+
/// The deserialization information for the current model
102+
/// </summary>
103+
public IDictionary<string, Action<T, IParseNode>> GetFieldDeserializers<T>() {
104+
return new Dictionary<string, Action<T, IParseNode>> {
105+
{"educationAssignment", (o,n) => { (o as PublishResponse).EducationAssignment = n.GetObjectValue<EducationAssignment>(); } },
106+
};
107+
}
108+
/// <summary>
109+
/// Serializes information the current object
110+
/// <param name="writer">Serialization writer to use to serialize this model</param>
111+
/// </summary>
112+
public void Serialize(ISerializationWriter writer) {
113+
_ = writer ?? throw new ArgumentNullException(nameof(writer));
114+
writer.WriteObjectValue<EducationAssignment>("educationAssignment", EducationAssignment);
115+
writer.WriteAdditionalData(AdditionalData);
116+
}
117+
}
118+
}
119+
}
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
using Microsoft.Kiota.Abstractions;
2+
using Microsoft.Kiota.Abstractions.Serialization;
3+
using System;
4+
using System.Collections.Generic;
5+
using System.CommandLine;
6+
using System.CommandLine.Invocation;
7+
using System.IO;
8+
using System.Linq;
9+
using System.Text;
10+
using System.Threading;
11+
using System.Threading.Tasks;
12+
namespace ApiSdk.Solutions.BookingBusinesses.Item.Publish {
13+
/// <summary>Builds and executes requests for operations under \solutions\bookingBusinesses\{bookingBusiness-id}\microsoft.graph.publish</summary>
14+
public class PublishRequestBuilder {
15+
/// <summary>Path parameters for the request</summary>
16+
private Dictionary<string, object> PathParameters { get; set; }
17+
/// <summary>The request adapter to use to execute the requests.</summary>
18+
private IRequestAdapter RequestAdapter { get; set; }
19+
/// <summary>Url template to use to build the URL for the current request builder</summary>
20+
private string UrlTemplate { get; set; }
21+
/// <summary>
22+
/// Makes the scheduling page of this business available to the general public.
23+
/// </summary>
24+
public Command BuildPostCommand() {
25+
var command = new Command("post");
26+
command.Description = "Makes the scheduling page of this business available to the general public.";
27+
// Create options for all the parameters
28+
var bookingBusinessIdOption = new Option<string>("--bookingbusiness-id", description: "key: id of bookingBusiness");
29+
bookingBusinessIdOption.IsRequired = true;
30+
command.AddOption(bookingBusinessIdOption);
31+
command.Handler = CommandHandler.Create<string>(async (bookingBusinessId) => {
32+
var requestInfo = CreatePostRequestInformation(q => {
33+
});
34+
await RequestAdapter.SendNoContentAsync(requestInfo);
35+
// Print request output. What if the request has no return?
36+
Console.WriteLine("Success");
37+
});
38+
return command;
39+
}
40+
/// <summary>
41+
/// Instantiates a new PublishRequestBuilder and sets the default values.
42+
/// <param name="pathParameters">Path parameters for the request</param>
43+
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
44+
/// </summary>
45+
public PublishRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) {
46+
_ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters));
47+
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
48+
UrlTemplate = "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness_id}/microsoft.graph.publish";
49+
var urlTplParams = new Dictionary<string, object>(pathParameters);
50+
PathParameters = urlTplParams;
51+
RequestAdapter = requestAdapter;
52+
}
53+
/// <summary>
54+
/// Makes the scheduling page of this business available to the general public.
55+
/// <param name="h">Request headers</param>
56+
/// <param name="o">Request options</param>
57+
/// </summary>
58+
public RequestInformation CreatePostRequestInformation(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default) {
59+
var requestInfo = new RequestInformation {
60+
HttpMethod = HttpMethod.POST,
61+
UrlTemplate = UrlTemplate,
62+
PathParameters = PathParameters,
63+
};
64+
h?.Invoke(requestInfo.Headers);
65+
requestInfo.AddRequestOptions(o?.ToArray());
66+
return requestInfo;
67+
}
68+
/// <summary>
69+
/// Makes the scheduling page of this business available to the general public.
70+
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
71+
/// <param name="h">Request headers</param>
72+
/// <param name="o">Request options</param>
73+
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
74+
/// </summary>
75+
public async Task PostAsync(Action<IDictionary<string, string>> h = default, IEnumerable<IRequestOption> o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
76+
var requestInfo = CreatePostRequestInformation(h, o);
77+
await RequestAdapter.SendNoContentAsync(requestInfo, responseHandler, cancellationToken);
78+
}
79+
}
80+
}

0 commit comments

Comments
 (0)