Skip to content

Commit f79244d

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
feat(generation): update request builders and models
Update generated files with build 201423
1 parent 609cef2 commit f79244d

31 files changed

+3204
-4
lines changed
Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
// <auto-generated/>
2+
#pragma warning disable CS0618
3+
using Microsoft.Graph.Me.CloudPCs.Count;
4+
using Microsoft.Graph.Me.CloudPCs.Item;
5+
using Microsoft.Graph.Models.ODataErrors;
6+
using Microsoft.Graph.Models;
7+
using Microsoft.Kiota.Abstractions.Extensions;
8+
using Microsoft.Kiota.Abstractions.Serialization;
9+
using Microsoft.Kiota.Abstractions;
10+
using System.Collections.Generic;
11+
using System.IO;
12+
using System.Threading.Tasks;
13+
using System.Threading;
14+
using System;
15+
namespace Microsoft.Graph.Me.CloudPCs
16+
{
17+
/// <summary>
18+
/// Provides operations to manage the cloudPCs property of the microsoft.graph.user entity.
19+
/// </summary>
20+
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
21+
public partial class CloudPCsRequestBuilder : BaseRequestBuilder
22+
{
23+
/// <summary>Provides operations to count the resources in the collection.</summary>
24+
public global::Microsoft.Graph.Me.CloudPCs.Count.CountRequestBuilder Count
25+
{
26+
get => new global::Microsoft.Graph.Me.CloudPCs.Count.CountRequestBuilder(PathParameters, RequestAdapter);
27+
}
28+
/// <summary>Provides operations to manage the cloudPCs property of the microsoft.graph.user entity.</summary>
29+
/// <param name="position">The unique identifier of cloudPC</param>
30+
/// <returns>A <see cref="global::Microsoft.Graph.Me.CloudPCs.Item.CloudPCItemRequestBuilder"/></returns>
31+
public global::Microsoft.Graph.Me.CloudPCs.Item.CloudPCItemRequestBuilder this[string position]
32+
{
33+
get
34+
{
35+
var urlTplParams = new Dictionary<string, object>(PathParameters);
36+
urlTplParams.Add("cloudPC%2Did", position);
37+
return new global::Microsoft.Graph.Me.CloudPCs.Item.CloudPCItemRequestBuilder(urlTplParams, RequestAdapter);
38+
}
39+
}
40+
/// <summary>
41+
/// Instantiates a new <see cref="global::Microsoft.Graph.Me.CloudPCs.CloudPCsRequestBuilder"/> and sets the default values.
42+
/// </summary>
43+
/// <param name="pathParameters">Path parameters for the request</param>
44+
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
45+
public CloudPCsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/cloudPCs{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters)
46+
{
47+
}
48+
/// <summary>
49+
/// Instantiates a new <see cref="global::Microsoft.Graph.Me.CloudPCs.CloudPCsRequestBuilder"/> and sets the default values.
50+
/// </summary>
51+
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
52+
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
53+
public CloudPCsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/cloudPCs{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl)
54+
{
55+
}
56+
/// <summary>
57+
/// List the cloudPC devices that are attributed to the signed-in user.
58+
/// Find more info here <see href="https://learn.microsoft.com/graph/api/user-list-cloudpcs?view=graph-rest-1.0" />
59+
/// </summary>
60+
/// <returns>A <see cref="global::Microsoft.Graph.Models.CloudPCCollectionResponse"/></returns>
61+
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
62+
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
63+
/// <exception cref="global::Microsoft.Graph.Models.ODataErrors.ODataError">When receiving a 4XX or 5XX status code</exception>
64+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
65+
#nullable enable
66+
public async Task<global::Microsoft.Graph.Models.CloudPCCollectionResponse?> GetAsync(Action<RequestConfiguration<global::Microsoft.Graph.Me.CloudPCs.CloudPCsRequestBuilder.CloudPCsRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
67+
{
68+
#nullable restore
69+
#else
70+
public async Task<global::Microsoft.Graph.Models.CloudPCCollectionResponse> GetAsync(Action<RequestConfiguration<global::Microsoft.Graph.Me.CloudPCs.CloudPCsRequestBuilder.CloudPCsRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
71+
{
72+
#endif
73+
var requestInfo = ToGetRequestInformation(requestConfiguration);
74+
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
75+
{
76+
{ "XXX", global::Microsoft.Graph.Models.ODataErrors.ODataError.CreateFromDiscriminatorValue },
77+
};
78+
return await RequestAdapter.SendAsync<global::Microsoft.Graph.Models.CloudPCCollectionResponse>(requestInfo, global::Microsoft.Graph.Models.CloudPCCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
79+
}
80+
/// <summary>
81+
/// Create new navigation property to cloudPCs for me
82+
/// </summary>
83+
/// <returns>A <see cref="global::Microsoft.Graph.Models.CloudPC"/></returns>
84+
/// <param name="body">The request body</param>
85+
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
86+
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
87+
/// <exception cref="global::Microsoft.Graph.Models.ODataErrors.ODataError">When receiving a 4XX or 5XX status code</exception>
88+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
89+
#nullable enable
90+
public async Task<global::Microsoft.Graph.Models.CloudPC?> PostAsync(global::Microsoft.Graph.Models.CloudPC body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
91+
{
92+
#nullable restore
93+
#else
94+
public async Task<global::Microsoft.Graph.Models.CloudPC> PostAsync(global::Microsoft.Graph.Models.CloudPC body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
95+
{
96+
#endif
97+
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
98+
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
99+
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
100+
{
101+
{ "XXX", global::Microsoft.Graph.Models.ODataErrors.ODataError.CreateFromDiscriminatorValue },
102+
};
103+
return await RequestAdapter.SendAsync<global::Microsoft.Graph.Models.CloudPC>(requestInfo, global::Microsoft.Graph.Models.CloudPC.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
104+
}
105+
/// <summary>
106+
/// List the cloudPC devices that are attributed to the signed-in user.
107+
/// </summary>
108+
/// <returns>A <see cref="RequestInformation"/></returns>
109+
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
110+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
111+
#nullable enable
112+
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::Microsoft.Graph.Me.CloudPCs.CloudPCsRequestBuilder.CloudPCsRequestBuilderGetQueryParameters>>? requestConfiguration = default)
113+
{
114+
#nullable restore
115+
#else
116+
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::Microsoft.Graph.Me.CloudPCs.CloudPCsRequestBuilder.CloudPCsRequestBuilderGetQueryParameters>> requestConfiguration = default)
117+
{
118+
#endif
119+
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
120+
requestInfo.Configure(requestConfiguration);
121+
requestInfo.Headers.TryAdd("Accept", "application/json");
122+
return requestInfo;
123+
}
124+
/// <summary>
125+
/// Create new navigation property to cloudPCs for me
126+
/// </summary>
127+
/// <returns>A <see cref="RequestInformation"/></returns>
128+
/// <param name="body">The request body</param>
129+
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
130+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
131+
#nullable enable
132+
public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Models.CloudPC body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
133+
{
134+
#nullable restore
135+
#else
136+
public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Models.CloudPC body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
137+
{
138+
#endif
139+
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
140+
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
141+
requestInfo.Configure(requestConfiguration);
142+
requestInfo.Headers.TryAdd("Accept", "application/json");
143+
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
144+
return requestInfo;
145+
}
146+
/// <summary>
147+
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
148+
/// </summary>
149+
/// <returns>A <see cref="global::Microsoft.Graph.Me.CloudPCs.CloudPCsRequestBuilder"/></returns>
150+
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
151+
public global::Microsoft.Graph.Me.CloudPCs.CloudPCsRequestBuilder WithUrl(string rawUrl)
152+
{
153+
return new global::Microsoft.Graph.Me.CloudPCs.CloudPCsRequestBuilder(rawUrl, RequestAdapter);
154+
}
155+
/// <summary>
156+
/// List the cloudPC devices that are attributed to the signed-in user.
157+
/// </summary>
158+
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
159+
public partial class CloudPCsRequestBuilderGetQueryParameters
160+
{
161+
/// <summary>Include count of items</summary>
162+
[QueryParameter("%24count")]
163+
public bool? Count { get; set; }
164+
/// <summary>Expand related entities</summary>
165+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
166+
#nullable enable
167+
[QueryParameter("%24expand")]
168+
public string[]? Expand { get; set; }
169+
#nullable restore
170+
#else
171+
[QueryParameter("%24expand")]
172+
public string[] Expand { get; set; }
173+
#endif
174+
/// <summary>Filter items by property values</summary>
175+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
176+
#nullable enable
177+
[QueryParameter("%24filter")]
178+
public string? Filter { get; set; }
179+
#nullable restore
180+
#else
181+
[QueryParameter("%24filter")]
182+
public string Filter { get; set; }
183+
#endif
184+
/// <summary>Order items by property values</summary>
185+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
186+
#nullable enable
187+
[QueryParameter("%24orderby")]
188+
public string[]? Orderby { get; set; }
189+
#nullable restore
190+
#else
191+
[QueryParameter("%24orderby")]
192+
public string[] Orderby { get; set; }
193+
#endif
194+
/// <summary>Search items by search phrases</summary>
195+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
196+
#nullable enable
197+
[QueryParameter("%24search")]
198+
public string? Search { get; set; }
199+
#nullable restore
200+
#else
201+
[QueryParameter("%24search")]
202+
public string Search { get; set; }
203+
#endif
204+
/// <summary>Select properties to be returned</summary>
205+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
206+
#nullable enable
207+
[QueryParameter("%24select")]
208+
public string[]? Select { get; set; }
209+
#nullable restore
210+
#else
211+
[QueryParameter("%24select")]
212+
public string[] Select { get; set; }
213+
#endif
214+
/// <summary>Skip the first n items</summary>
215+
[QueryParameter("%24skip")]
216+
public int? Skip { get; set; }
217+
/// <summary>Show only the first n items</summary>
218+
[QueryParameter("%24top")]
219+
public int? Top { get; set; }
220+
}
221+
/// <summary>
222+
/// Configuration for the request such as headers, query parameters, and middleware options.
223+
/// </summary>
224+
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
225+
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
226+
public partial class CloudPCsRequestBuilderGetRequestConfiguration : RequestConfiguration<global::Microsoft.Graph.Me.CloudPCs.CloudPCsRequestBuilder.CloudPCsRequestBuilderGetQueryParameters>
227+
{
228+
}
229+
/// <summary>
230+
/// Configuration for the request such as headers, query parameters, and middleware options.
231+
/// </summary>
232+
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
233+
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
234+
public partial class CloudPCsRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
235+
{
236+
}
237+
}
238+
}
239+
#pragma warning restore CS0618

0 commit comments

Comments
 (0)