Skip to content

Commit cdab22e

Browse files
microsoft-graph-devx-bot[bot]Microsoft Graph DevX Tooling
andauthored
feat(generation): update request builders and models (#3178)
Update generated files with build 241182 Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com>
1 parent 16db3a1 commit cdab22e

149 files changed

Lines changed: 16364 additions & 17 deletions

File tree

Some content is hidden

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

‎src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/ChildFolders/Item/Items/Item/MailboxItemItemRequestBuilder.cs‎

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,28 @@ public MailboxItemItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapt
3535
{
3636
}
3737
/// <summary>
38+
/// Delete navigation property items for admin
39+
/// </summary>
40+
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
41+
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
42+
/// <exception cref="global::Microsoft.Graph.Models.ODataErrors.ODataError">When receiving a 4XX or 5XX status code</exception>
43+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
44+
#nullable enable
45+
public async Task DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
46+
{
47+
#nullable restore
48+
#else
49+
public async Task DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
50+
{
51+
#endif
52+
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
53+
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
54+
{
55+
{ "XXX", global::Microsoft.Graph.Models.ODataErrors.ODataError.CreateFromDiscriminatorValue },
56+
};
57+
await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
58+
}
59+
/// <summary>
3860
/// The collection of items in this folder.
3961
/// </summary>
4062
/// <returns>A <see cref="global::Microsoft.Graph.Models.MailboxItem"/></returns>
@@ -58,6 +80,25 @@ public MailboxItemItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapt
5880
return await RequestAdapter.SendAsync<global::Microsoft.Graph.Models.MailboxItem>(requestInfo, global::Microsoft.Graph.Models.MailboxItem.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
5981
}
6082
/// <summary>
83+
/// Delete navigation property items for admin
84+
/// </summary>
85+
/// <returns>A <see cref="RequestInformation"/></returns>
86+
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
87+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
88+
#nullable enable
89+
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
90+
{
91+
#nullable restore
92+
#else
93+
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
94+
{
95+
#endif
96+
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
97+
requestInfo.Configure(requestConfiguration);
98+
requestInfo.Headers.TryAdd("Accept", "application/json");
99+
return requestInfo;
100+
}
101+
/// <summary>
61102
/// The collection of items in this folder.
62103
/// </summary>
63104
/// <returns>A <see cref="RequestInformation"/></returns>
@@ -86,6 +127,14 @@ public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<gl
86127
return new global::Microsoft.Graph.Admin.Exchange.Mailboxes.Item.Folders.Item.ChildFolders.Item.Items.Item.MailboxItemItemRequestBuilder(rawUrl, RequestAdapter);
87128
}
88129
/// <summary>
130+
/// Configuration for the request such as headers, query parameters, and middleware options.
131+
/// </summary>
132+
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
133+
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
134+
public partial class MailboxItemItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
135+
{
136+
}
137+
/// <summary>
89138
/// The collection of items in this folder.
90139
/// </summary>
91140
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]

‎src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/Items/Item/MailboxItemItemRequestBuilder.cs‎

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,29 @@ public MailboxItemItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapt
3535
{
3636
}
3737
/// <summary>
38+
/// Delete a mailboxItem from a mailboxFolder in a mailbox. Use the disposalType query parameter to specify whether to soft-delete or hard-delete the item.
39+
/// Find more info here <see href="https://learn.microsoft.com/graph/api/mailboxfolder-delete-items?view=graph-rest-1.0" />
40+
/// </summary>
41+
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
42+
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
43+
/// <exception cref="global::Microsoft.Graph.Models.ODataErrors.ODataError">When receiving a 4XX or 5XX status code</exception>
44+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
45+
#nullable enable
46+
public async Task DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
47+
{
48+
#nullable restore
49+
#else
50+
public async Task DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
51+
{
52+
#endif
53+
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
54+
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
55+
{
56+
{ "XXX", global::Microsoft.Graph.Models.ODataErrors.ODataError.CreateFromDiscriminatorValue },
57+
};
58+
await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
59+
}
60+
/// <summary>
3861
/// Read the properties and relationships of a mailboxItem object.
3962
/// Find more info here <see href="https://learn.microsoft.com/graph/api/mailboxitem-get?view=graph-rest-1.0" />
4063
/// </summary>
@@ -59,6 +82,25 @@ public MailboxItemItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapt
5982
return await RequestAdapter.SendAsync<global::Microsoft.Graph.Models.MailboxItem>(requestInfo, global::Microsoft.Graph.Models.MailboxItem.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
6083
}
6184
/// <summary>
85+
/// Delete a mailboxItem from a mailboxFolder in a mailbox. Use the disposalType query parameter to specify whether to soft-delete or hard-delete the item.
86+
/// </summary>
87+
/// <returns>A <see cref="RequestInformation"/></returns>
88+
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
89+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
90+
#nullable enable
91+
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
92+
{
93+
#nullable restore
94+
#else
95+
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
96+
{
97+
#endif
98+
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
99+
requestInfo.Configure(requestConfiguration);
100+
requestInfo.Headers.TryAdd("Accept", "application/json");
101+
return requestInfo;
102+
}
103+
/// <summary>
62104
/// Read the properties and relationships of a mailboxItem object.
63105
/// </summary>
64106
/// <returns>A <see cref="RequestInformation"/></returns>
@@ -87,6 +129,14 @@ public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<gl
87129
return new global::Microsoft.Graph.Admin.Exchange.Mailboxes.Item.Folders.Item.Items.Item.MailboxItemItemRequestBuilder(rawUrl, RequestAdapter);
88130
}
89131
/// <summary>
132+
/// Configuration for the request such as headers, query parameters, and middleware options.
133+
/// </summary>
134+
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
135+
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
136+
public partial class MailboxItemItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
137+
{
138+
}
139+
/// <summary>
90140
/// Read the properties and relationships of a mailboxItem object.
91141
/// </summary>
92142
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]

‎src/Microsoft.Graph/Generated/Communications/CommunicationsRequestBuilder.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public CommunicationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte
109109
/// Update communications
110110
/// </summary>
111111
/// <returns>A <see cref="global::Microsoft.Graph.Models.CloudCommunications"/></returns>
112-
/// <param name="body">Represents a container that exposes navigation properties for cloud communications resources.</param>
112+
/// <param name="body">The request body</param>
113113
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
114114
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
115115
/// <exception cref="global::Microsoft.Graph.Models.ODataErrors.ODataError">When receiving a 4XX or 5XX status code</exception>
@@ -153,7 +153,7 @@ public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<gl
153153
/// Update communications
154154
/// </summary>
155155
/// <returns>A <see cref="RequestInformation"/></returns>
156-
/// <param name="body">Represents a container that exposes navigation properties for cloud communications resources.</param>
156+
/// <param name="body">The request body</param>
157157
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
158158
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
159159
#nullable enable

‎src/Microsoft.Graph/Generated/DirectoryNamespace/DirectoryRequestBuilder.cs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using Microsoft.Graph.DirectoryNamespace.RemoteTenantGroups;
1313
using Microsoft.Graph.DirectoryNamespace.Subscriptions;
1414
using Microsoft.Graph.DirectoryNamespace.SubscriptionsWithCommerceSubscriptionId;
15+
using Microsoft.Graph.DirectoryNamespace.TenantGovernance;
1516
using Microsoft.Graph.Models.ODataErrors;
1617
using Microsoft.Graph.Models;
1718
using Microsoft.Kiota.Abstractions.Extensions;
@@ -85,6 +86,11 @@ public partial class DirectoryRequestBuilder : BaseRequestBuilder
8586
{
8687
get => new global::Microsoft.Graph.DirectoryNamespace.Subscriptions.SubscriptionsRequestBuilder(PathParameters, RequestAdapter);
8788
}
89+
/// <summary>Provides operations to manage the tenantGovernance property of the microsoft.graph.directory entity.</summary>
90+
public global::Microsoft.Graph.DirectoryNamespace.TenantGovernance.TenantGovernanceRequestBuilder TenantGovernance
91+
{
92+
get => new global::Microsoft.Graph.DirectoryNamespace.TenantGovernance.TenantGovernanceRequestBuilder(PathParameters, RequestAdapter);
93+
}
8894
/// <summary>
8995
/// Instantiates a new <see cref="global::Microsoft.Graph.DirectoryNamespace.DirectoryRequestBuilder"/> and sets the default values.
9096
/// </summary>
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
// <auto-generated/>
2+
#pragma warning disable CS0618
3+
using Microsoft.Graph.Models.ODataErrors;
4+
using Microsoft.Kiota.Abstractions.Extensions;
5+
using Microsoft.Kiota.Abstractions.Serialization;
6+
using Microsoft.Kiota.Abstractions;
7+
using System.Collections.Generic;
8+
using System.IO;
9+
using System.Threading.Tasks;
10+
using System.Threading;
11+
using System;
12+
namespace Microsoft.Graph.DirectoryNamespace.TenantGovernance.GovernanceInvitations.Count
13+
{
14+
/// <summary>
15+
/// Provides operations to count the resources in the collection.
16+
/// </summary>
17+
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
18+
public partial class CountRequestBuilder : BaseRequestBuilder
19+
{
20+
/// <summary>
21+
/// Instantiates a new <see cref="global::Microsoft.Graph.DirectoryNamespace.TenantGovernance.GovernanceInvitations.Count.CountRequestBuilder"/> and sets the default values.
22+
/// </summary>
23+
/// <param name="pathParameters">Path parameters for the request</param>
24+
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
25+
public CountRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directory/tenantGovernance/governanceInvitations/$count{?%24filter,%24search}", pathParameters)
26+
{
27+
}
28+
/// <summary>
29+
/// Instantiates a new <see cref="global::Microsoft.Graph.DirectoryNamespace.TenantGovernance.GovernanceInvitations.Count.CountRequestBuilder"/> and sets the default values.
30+
/// </summary>
31+
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
32+
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
33+
public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directory/tenantGovernance/governanceInvitations/$count{?%24filter,%24search}", rawUrl)
34+
{
35+
}
36+
/// <summary>
37+
/// Get the number of the resource
38+
/// </summary>
39+
/// <returns>A <see cref="int"/></returns>
40+
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
41+
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
42+
/// <exception cref="global::Microsoft.Graph.Models.ODataErrors.ODataError">When receiving a 4XX or 5XX status code</exception>
43+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
44+
#nullable enable
45+
public async Task<int?> GetAsync(Action<RequestConfiguration<global::Microsoft.Graph.DirectoryNamespace.TenantGovernance.GovernanceInvitations.Count.CountRequestBuilder.CountRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
46+
{
47+
#nullable restore
48+
#else
49+
public async Task<int?> GetAsync(Action<RequestConfiguration<global::Microsoft.Graph.DirectoryNamespace.TenantGovernance.GovernanceInvitations.Count.CountRequestBuilder.CountRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
50+
{
51+
#endif
52+
var requestInfo = ToGetRequestInformation(requestConfiguration);
53+
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
54+
{
55+
{ "XXX", global::Microsoft.Graph.Models.ODataErrors.ODataError.CreateFromDiscriminatorValue },
56+
};
57+
return await RequestAdapter.SendPrimitiveAsync<int?>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
58+
}
59+
/// <summary>
60+
/// Get the number of the resource
61+
/// </summary>
62+
/// <returns>A <see cref="RequestInformation"/></returns>
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<global::Microsoft.Graph.DirectoryNamespace.TenantGovernance.GovernanceInvitations.Count.CountRequestBuilder.CountRequestBuilderGetQueryParameters>>? requestConfiguration = default)
67+
{
68+
#nullable restore
69+
#else
70+
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::Microsoft.Graph.DirectoryNamespace.TenantGovernance.GovernanceInvitations.Count.CountRequestBuilder.CountRequestBuilderGetQueryParameters>> requestConfiguration = default)
71+
{
72+
#endif
73+
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
74+
requestInfo.Configure(requestConfiguration);
75+
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
76+
return requestInfo;
77+
}
78+
/// <summary>
79+
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
80+
/// </summary>
81+
/// <returns>A <see cref="global::Microsoft.Graph.DirectoryNamespace.TenantGovernance.GovernanceInvitations.Count.CountRequestBuilder"/></returns>
82+
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
83+
public global::Microsoft.Graph.DirectoryNamespace.TenantGovernance.GovernanceInvitations.Count.CountRequestBuilder WithUrl(string rawUrl)
84+
{
85+
return new global::Microsoft.Graph.DirectoryNamespace.TenantGovernance.GovernanceInvitations.Count.CountRequestBuilder(rawUrl, RequestAdapter);
86+
}
87+
/// <summary>
88+
/// Get the number of the resource
89+
/// </summary>
90+
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
91+
public partial class CountRequestBuilderGetQueryParameters
92+
{
93+
/// <summary>Filter items by property values</summary>
94+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
95+
#nullable enable
96+
[QueryParameter("%24filter")]
97+
public string? Filter { get; set; }
98+
#nullable restore
99+
#else
100+
[QueryParameter("%24filter")]
101+
public string Filter { get; set; }
102+
#endif
103+
/// <summary>Search items by search phrases</summary>
104+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
105+
#nullable enable
106+
[QueryParameter("%24search")]
107+
public string? Search { get; set; }
108+
#nullable restore
109+
#else
110+
[QueryParameter("%24search")]
111+
public string Search { get; set; }
112+
#endif
113+
}
114+
/// <summary>
115+
/// Configuration for the request such as headers, query parameters, and middleware options.
116+
/// </summary>
117+
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
118+
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
119+
public partial class CountRequestBuilderGetRequestConfiguration : RequestConfiguration<global::Microsoft.Graph.DirectoryNamespace.TenantGovernance.GovernanceInvitations.Count.CountRequestBuilder.CountRequestBuilderGetQueryParameters>
120+
{
121+
}
122+
}
123+
}
124+
#pragma warning restore CS0618

0 commit comments

Comments
 (0)