Repository navigation
Expand file tree
/
Copy pathOrgContactItemRequestBuilder.cs
More file actions
296 lines (296 loc) · 18.2 KB
/
Copy pathOrgContactItemRequestBuilder.cs
File metadata and controls
296 lines (296 loc) · 18.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
// <auto-generated/>
#pragma warning disable CS0618
using Microsoft.Graph.Contacts.Item.CheckMemberGroups;
using Microsoft.Graph.Contacts.Item.CheckMemberObjects;
using Microsoft.Graph.Contacts.Item.DirectReports;
using Microsoft.Graph.Contacts.Item.GetMemberGroups;
using Microsoft.Graph.Contacts.Item.GetMemberObjects;
using Microsoft.Graph.Contacts.Item.Manager;
using Microsoft.Graph.Contacts.Item.MemberOf;
using Microsoft.Graph.Contacts.Item.Restore;
using Microsoft.Graph.Contacts.Item.RetryServiceProvisioning;
using Microsoft.Graph.Contacts.Item.ServiceProvisioningErrors;
using Microsoft.Graph.Contacts.Item.TransitiveMemberOf;
using Microsoft.Graph.Models.ODataErrors;
using Microsoft.Graph.Models;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using System.Threading;
using System;
namespace Microsoft.Graph.Contacts.Item
{
/// <summary>
/// Provides operations to manage the collection of orgContact entities.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
public partial class OrgContactItemRequestBuilder : BaseRequestBuilder
{
/// <summary>Provides operations to call the checkMemberGroups method.</summary>
public global::Microsoft.Graph.Contacts.Item.CheckMemberGroups.CheckMemberGroupsRequestBuilder CheckMemberGroups
{
get => new global::Microsoft.Graph.Contacts.Item.CheckMemberGroups.CheckMemberGroupsRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to call the checkMemberObjects method.</summary>
public global::Microsoft.Graph.Contacts.Item.CheckMemberObjects.CheckMemberObjectsRequestBuilder CheckMemberObjects
{
get => new global::Microsoft.Graph.Contacts.Item.CheckMemberObjects.CheckMemberObjectsRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to manage the directReports property of the microsoft.graph.orgContact entity.</summary>
public global::Microsoft.Graph.Contacts.Item.DirectReports.DirectReportsRequestBuilder DirectReports
{
get => new global::Microsoft.Graph.Contacts.Item.DirectReports.DirectReportsRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to call the getMemberGroups method.</summary>
public global::Microsoft.Graph.Contacts.Item.GetMemberGroups.GetMemberGroupsRequestBuilder GetMemberGroups
{
get => new global::Microsoft.Graph.Contacts.Item.GetMemberGroups.GetMemberGroupsRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to call the getMemberObjects method.</summary>
public global::Microsoft.Graph.Contacts.Item.GetMemberObjects.GetMemberObjectsRequestBuilder GetMemberObjects
{
get => new global::Microsoft.Graph.Contacts.Item.GetMemberObjects.GetMemberObjectsRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to manage the manager property of the microsoft.graph.orgContact entity.</summary>
public global::Microsoft.Graph.Contacts.Item.Manager.ManagerRequestBuilder Manager
{
get => new global::Microsoft.Graph.Contacts.Item.Manager.ManagerRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to manage the memberOf property of the microsoft.graph.orgContact entity.</summary>
public global::Microsoft.Graph.Contacts.Item.MemberOf.MemberOfRequestBuilder MemberOf
{
get => new global::Microsoft.Graph.Contacts.Item.MemberOf.MemberOfRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to call the restore method.</summary>
public global::Microsoft.Graph.Contacts.Item.Restore.RestoreRequestBuilder Restore
{
get => new global::Microsoft.Graph.Contacts.Item.Restore.RestoreRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to call the retryServiceProvisioning method.</summary>
public global::Microsoft.Graph.Contacts.Item.RetryServiceProvisioning.RetryServiceProvisioningRequestBuilder RetryServiceProvisioning
{
get => new global::Microsoft.Graph.Contacts.Item.RetryServiceProvisioning.RetryServiceProvisioningRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>The serviceProvisioningErrors property</summary>
public global::Microsoft.Graph.Contacts.Item.ServiceProvisioningErrors.ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors
{
get => new global::Microsoft.Graph.Contacts.Item.ServiceProvisioningErrors.ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to manage the transitiveMemberOf property of the microsoft.graph.orgContact entity.</summary>
public global::Microsoft.Graph.Contacts.Item.TransitiveMemberOf.TransitiveMemberOfRequestBuilder TransitiveMemberOf
{
get => new global::Microsoft.Graph.Contacts.Item.TransitiveMemberOf.TransitiveMemberOfRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>
/// Instantiates a new <see cref="global::Microsoft.Graph.Contacts.Item.OrgContactItemRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="pathParameters">Path parameters for the request</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
public OrgContactItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/contacts/{orgContact%2Did}{?%24expand,%24select}", pathParameters)
{
}
/// <summary>
/// Instantiates a new <see cref="global::Microsoft.Graph.Contacts.Item.OrgContactItemRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
public OrgContactItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/contacts/{orgContact%2Did}{?%24expand,%24select}", rawUrl)
{
}
/// <summary>
/// Delete entity from contacts
/// </summary>
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
/// <exception cref="global::Microsoft.Graph.Models.ODataErrors.ODataError">When receiving a 4XX or 5XX status code</exception>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public async Task DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
{
{ "XXX", global::Microsoft.Graph.Models.ODataErrors.ODataError.CreateFromDiscriminatorValue },
};
await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Get the properties and relationships of an organizational contact.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/orgcontact-get?view=graph-rest-1.0" />
/// </summary>
/// <returns>A <see cref="global::Microsoft.Graph.Models.OrgContact"/></returns>
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
/// <exception cref="global::Microsoft.Graph.Models.ODataErrors.ODataError">When receiving a 4XX or 5XX status code</exception>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public async Task<global::Microsoft.Graph.Models.OrgContact?> GetAsync(Action<RequestConfiguration<global::Microsoft.Graph.Contacts.Item.OrgContactItemRequestBuilder.OrgContactItemRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<global::Microsoft.Graph.Models.OrgContact> GetAsync(Action<RequestConfiguration<global::Microsoft.Graph.Contacts.Item.OrgContactItemRequestBuilder.OrgContactItemRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
{
{ "XXX", global::Microsoft.Graph.Models.ODataErrors.ODataError.CreateFromDiscriminatorValue },
};
return await RequestAdapter.SendAsync<global::Microsoft.Graph.Models.OrgContact>(requestInfo, global::Microsoft.Graph.Models.OrgContact.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Update entity in contacts
/// </summary>
/// <returns>A <see cref="global::Microsoft.Graph.Models.OrgContact"/></returns>
/// <param name="body">The request body</param>
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
/// <exception cref="global::Microsoft.Graph.Models.ODataErrors.ODataError">When receiving a 4XX or 5XX status code</exception>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public async Task<global::Microsoft.Graph.Models.OrgContact?> PatchAsync(global::Microsoft.Graph.Models.OrgContact body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<global::Microsoft.Graph.Models.OrgContact> PatchAsync(global::Microsoft.Graph.Models.OrgContact body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
var requestInfo = ToPatchRequestInformation(body, requestConfiguration);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
{
{ "XXX", global::Microsoft.Graph.Models.ODataErrors.ODataError.CreateFromDiscriminatorValue },
};
return await RequestAdapter.SendAsync<global::Microsoft.Graph.Models.OrgContact>(requestInfo, global::Microsoft.Graph.Models.OrgContact.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Delete entity from contacts
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
requestInfo.Headers.TryAdd("Accept", "application/json");
return requestInfo;
}
/// <summary>
/// Get the properties and relationships of an organizational contact.
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::Microsoft.Graph.Contacts.Item.OrgContactItemRequestBuilder.OrgContactItemRequestBuilderGetQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::Microsoft.Graph.Contacts.Item.OrgContactItemRequestBuilder.OrgContactItemRequestBuilderGetQueryParameters>> requestConfiguration = default)
{
#endif
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
requestInfo.Headers.TryAdd("Accept", "application/json");
return requestInfo;
}
/// <summary>
/// Update entity in contacts
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="body">The request body</param>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Models.OrgContact body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Models.OrgContact body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
requestInfo.Headers.TryAdd("Accept", "application/json");
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
return requestInfo;
}
/// <summary>
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
/// </summary>
/// <returns>A <see cref="global::Microsoft.Graph.Contacts.Item.OrgContactItemRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public global::Microsoft.Graph.Contacts.Item.OrgContactItemRequestBuilder WithUrl(string rawUrl)
{
return new global::Microsoft.Graph.Contacts.Item.OrgContactItemRequestBuilder(rawUrl, RequestAdapter);
}
/// <summary>
/// Configuration for the request such as headers, query parameters, and middleware options.
/// </summary>
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
public partial class OrgContactItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
/// <summary>
/// Get the properties and relationships of an organizational contact.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
public partial class OrgContactItemRequestBuilderGetQueryParameters
{
/// <summary>Expand related entities</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
[QueryParameter("%24expand")]
public string[]? Expand { get; set; }
#nullable restore
#else
[QueryParameter("%24expand")]
public string[] Expand { get; set; }
#endif
/// <summary>Select properties to be returned</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
[QueryParameter("%24select")]
public string[]? Select { get; set; }
#nullable restore
#else
[QueryParameter("%24select")]
public string[] Select { get; set; }
#endif
}
/// <summary>
/// Configuration for the request such as headers, query parameters, and middleware options.
/// </summary>
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
public partial class OrgContactItemRequestBuilderGetRequestConfiguration : RequestConfiguration<global::Microsoft.Graph.Contacts.Item.OrgContactItemRequestBuilder.OrgContactItemRequestBuilderGetQueryParameters>
{
}
/// <summary>
/// Configuration for the request such as headers, query parameters, and middleware options.
/// </summary>
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
public partial class OrgContactItemRequestBuilderPatchRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
}
}
#pragma warning restore CS0618