Skip to content

Commit 450212b

Browse files
authored
Merge pull request #1067 from microsoftgraph/kiota/beta/pipelinebuild/203832
Generated beta models and request builders
2 parents 2c11155 + a030dc0 commit 450212b

File tree

692 files changed

+30544
-47993
lines changed

Some content is hidden

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

692 files changed

+30544
-47993
lines changed

src/Microsoft.Graph/Generated/AdministrativeUnits/Item/Restore/RestoreRequestBuilder.cs

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

0 commit comments

Comments
 (0)