Skip to content

Commit e3993be

Browse files
authored
Merge pull request #2785 from microsoftgraph/kiota/v1.0/pipelinebuild/175190
Generated models and request builders
2 parents 32f66ee + 0c4d1c5 commit e3993be

File tree

135 files changed

+5598
-238
lines changed

Some content is hidden

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

135 files changed

+5598
-238
lines changed

src/Microsoft.Graph/Generated/Chats/Item/Members/MembersRequestBuilder.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Microsoft.Graph.Chats.Item.Members.Add;
44
using Microsoft.Graph.Chats.Item.Members.Count;
55
using Microsoft.Graph.Chats.Item.Members.Item;
6+
using Microsoft.Graph.Chats.Item.Members.Remove;
67
using Microsoft.Graph.Models.ODataErrors;
78
using Microsoft.Graph.Models;
89
using Microsoft.Kiota.Abstractions.Extensions;
@@ -31,6 +32,11 @@ public partial class MembersRequestBuilder : BaseRequestBuilder
3132
{
3233
get => new global::Microsoft.Graph.Chats.Item.Members.Count.CountRequestBuilder(PathParameters, RequestAdapter);
3334
}
35+
/// <summary>Provides operations to call the remove method.</summary>
36+
public global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveRequestBuilder Remove
37+
{
38+
get => new global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveRequestBuilder(PathParameters, RequestAdapter);
39+
}
3440
/// <summary>Provides operations to manage the members property of the microsoft.graph.chat entity.</summary>
3541
/// <param name="position">The unique identifier of conversationMember</param>
3642
/// <returns>A <see cref="global::Microsoft.Graph.Chats.Item.Members.Item.ConversationMemberItemRequestBuilder"/></returns>
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
// <auto-generated/>
2+
#pragma warning disable CS0618
3+
using Microsoft.Graph.Models;
4+
using Microsoft.Kiota.Abstractions.Extensions;
5+
using Microsoft.Kiota.Abstractions.Serialization;
6+
using Microsoft.Kiota.Abstractions.Store;
7+
using System.Collections.Generic;
8+
using System.IO;
9+
using System;
10+
namespace Microsoft.Graph.Chats.Item.Members.Remove
11+
{
12+
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
13+
#pragma warning disable CS1591
14+
public partial class RemovePostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable
15+
#pragma warning restore CS1591
16+
{
17+
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary>
18+
public IDictionary<string, object> AdditionalData
19+
{
20+
get { return BackingStore.Get<IDictionary<string, object>>("AdditionalData") ?? new Dictionary<string, object>(); }
21+
set { BackingStore.Set("AdditionalData", value); }
22+
}
23+
/// <summary>Stores model information.</summary>
24+
public IBackingStore BackingStore { get; private set; }
25+
/// <summary>The values property</summary>
26+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
27+
#nullable enable
28+
public List<global::Microsoft.Graph.Models.ConversationMember>? Values
29+
{
30+
get { return BackingStore?.Get<List<global::Microsoft.Graph.Models.ConversationMember>?>("values"); }
31+
set { BackingStore?.Set("values", value); }
32+
}
33+
#nullable restore
34+
#else
35+
public List<global::Microsoft.Graph.Models.ConversationMember> Values
36+
{
37+
get { return BackingStore?.Get<List<global::Microsoft.Graph.Models.ConversationMember>>("values"); }
38+
set { BackingStore?.Set("values", value); }
39+
}
40+
#endif
41+
/// <summary>
42+
/// Instantiates a new <see cref="global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostRequestBody"/> and sets the default values.
43+
/// </summary>
44+
public RemovePostRequestBody()
45+
{
46+
BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore();
47+
AdditionalData = new Dictionary<string, object>();
48+
}
49+
/// <summary>
50+
/// Creates a new instance of the appropriate class based on discriminator value
51+
/// </summary>
52+
/// <returns>A <see cref="global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostRequestBody"/></returns>
53+
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
54+
public static global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode)
55+
{
56+
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
57+
return new global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostRequestBody();
58+
}
59+
/// <summary>
60+
/// The deserialization information for the current model
61+
/// </summary>
62+
/// <returns>A IDictionary&lt;string, Action&lt;IParseNode&gt;&gt;</returns>
63+
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
64+
{
65+
return new Dictionary<string, Action<IParseNode>>
66+
{
67+
{ "values", n => { Values = n.GetCollectionOfObjectValues<global::Microsoft.Graph.Models.ConversationMember>(global::Microsoft.Graph.Models.ConversationMember.CreateFromDiscriminatorValue)?.AsList(); } },
68+
};
69+
}
70+
/// <summary>
71+
/// Serializes information the current object
72+
/// </summary>
73+
/// <param name="writer">Serialization writer to use to serialize this model</param>
74+
public virtual void Serialize(ISerializationWriter writer)
75+
{
76+
_ = writer ?? throw new ArgumentNullException(nameof(writer));
77+
writer.WriteCollectionOfObjectValues<global::Microsoft.Graph.Models.ConversationMember>("values", Values);
78+
writer.WriteAdditionalData(AdditionalData);
79+
}
80+
}
81+
}
82+
#pragma warning restore CS0618
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// <auto-generated/>
2+
#pragma warning disable CS0618
3+
using Microsoft.Graph.Models;
4+
using Microsoft.Kiota.Abstractions.Extensions;
5+
using Microsoft.Kiota.Abstractions.Serialization;
6+
using System.Collections.Generic;
7+
using System.IO;
8+
using System;
9+
namespace Microsoft.Graph.Chats.Item.Members.Remove
10+
{
11+
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
12+
#pragma warning disable CS1591
13+
public partial class RemovePostResponse : global::Microsoft.Graph.Models.BaseCollectionPaginationCountResponse, IParsable
14+
#pragma warning restore CS1591
15+
{
16+
/// <summary>The value property</summary>
17+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
18+
#nullable enable
19+
public List<global::Microsoft.Graph.Models.ActionResultPart>? Value
20+
{
21+
get { return BackingStore?.Get<List<global::Microsoft.Graph.Models.ActionResultPart>?>("value"); }
22+
set { BackingStore?.Set("value", value); }
23+
}
24+
#nullable restore
25+
#else
26+
public List<global::Microsoft.Graph.Models.ActionResultPart> Value
27+
{
28+
get { return BackingStore?.Get<List<global::Microsoft.Graph.Models.ActionResultPart>>("value"); }
29+
set { BackingStore?.Set("value", value); }
30+
}
31+
#endif
32+
/// <summary>
33+
/// Creates a new instance of the appropriate class based on discriminator value
34+
/// </summary>
35+
/// <returns>A <see cref="global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostResponse"/></returns>
36+
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
37+
public static new global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostResponse CreateFromDiscriminatorValue(IParseNode parseNode)
38+
{
39+
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
40+
return new global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostResponse();
41+
}
42+
/// <summary>
43+
/// The deserialization information for the current model
44+
/// </summary>
45+
/// <returns>A IDictionary&lt;string, Action&lt;IParseNode&gt;&gt;</returns>
46+
public override IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
47+
{
48+
return new Dictionary<string, Action<IParseNode>>(base.GetFieldDeserializers())
49+
{
50+
{ "value", n => { Value = n.GetCollectionOfObjectValues<global::Microsoft.Graph.Models.ActionResultPart>(global::Microsoft.Graph.Models.ActionResultPart.CreateFromDiscriminatorValue)?.AsList(); } },
51+
};
52+
}
53+
/// <summary>
54+
/// Serializes information the current object
55+
/// </summary>
56+
/// <param name="writer">Serialization writer to use to serialize this model</param>
57+
public override void Serialize(ISerializationWriter writer)
58+
{
59+
_ = writer ?? throw new ArgumentNullException(nameof(writer));
60+
base.Serialize(writer);
61+
writer.WriteCollectionOfObjectValues<global::Microsoft.Graph.Models.ActionResultPart>("value", Value);
62+
}
63+
}
64+
}
65+
#pragma warning restore CS0618
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
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.Chats.Item.Members.Remove
13+
{
14+
/// <summary>
15+
/// Provides operations to call the remove method.
16+
/// </summary>
17+
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
18+
public partial class RemoveRequestBuilder : BaseRequestBuilder
19+
{
20+
/// <summary>
21+
/// Instantiates a new <see cref="global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveRequestBuilder"/> 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 RemoveRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/chats/{chat%2Did}/members/remove", pathParameters)
26+
{
27+
}
28+
/// <summary>
29+
/// Instantiates a new <see cref="global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveRequestBuilder"/> 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 RemoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/chats/{chat%2Did}/members/remove", rawUrl)
34+
{
35+
}
36+
/// <summary>
37+
/// Remove multiple members from a team in a single request. The response provides details about which memberships could and couldn&apos;t be removed.
38+
/// Find more info here <see href="https://learn.microsoft.com/graph/api/conversationmember-remove?view=graph-rest-1.0" />
39+
/// </summary>
40+
/// <returns>A <see cref="global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostResponse"/></returns>
41+
/// <param name="body">The request body</param>
42+
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
43+
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
44+
/// <exception cref="global::Microsoft.Graph.Models.ODataErrors.ODataError">When receiving a 4XX or 5XX status code</exception>
45+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
46+
#nullable enable
47+
public async Task<global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostResponse?> PostAsRemovePostResponseAsync(global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
48+
{
49+
#nullable restore
50+
#else
51+
public async Task<global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostResponse> PostAsRemovePostResponseAsync(global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
52+
{
53+
#endif
54+
_ = body ?? throw new ArgumentNullException(nameof(body));
55+
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
56+
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
57+
{
58+
{ "XXX", global::Microsoft.Graph.Models.ODataErrors.ODataError.CreateFromDiscriminatorValue },
59+
};
60+
return await RequestAdapter.SendAsync<global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostResponse>(requestInfo, global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
61+
}
62+
/// <summary>
63+
/// Remove multiple members from a team in a single request. The response provides details about which memberships could and couldn&apos;t be removed.
64+
/// Find more info here <see href="https://learn.microsoft.com/graph/api/conversationmember-remove?view=graph-rest-1.0" />
65+
/// </summary>
66+
/// <returns>A <see cref="global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveResponse"/></returns>
67+
/// <param name="body">The request body</param>
68+
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
69+
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
70+
/// <exception cref="global::Microsoft.Graph.Models.ODataErrors.ODataError">When receiving a 4XX or 5XX status code</exception>
71+
[Obsolete("This method is obsolete. Use PostAsRemovePostResponseAsync instead.")]
72+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
73+
#nullable enable
74+
public async Task<global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveResponse?> PostAsync(global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
75+
{
76+
#nullable restore
77+
#else
78+
public async Task<global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveResponse> PostAsync(global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
79+
{
80+
#endif
81+
_ = body ?? throw new ArgumentNullException(nameof(body));
82+
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
83+
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
84+
{
85+
{ "XXX", global::Microsoft.Graph.Models.ODataErrors.ODataError.CreateFromDiscriminatorValue },
86+
};
87+
return await RequestAdapter.SendAsync<global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveResponse>(requestInfo, global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
88+
}
89+
/// <summary>
90+
/// Remove multiple members from a team in a single request. The response provides details about which memberships could and couldn&apos;t be removed.
91+
/// </summary>
92+
/// <returns>A <see cref="RequestInformation"/></returns>
93+
/// <param name="body">The request body</param>
94+
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
95+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
96+
#nullable enable
97+
public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
98+
{
99+
#nullable restore
100+
#else
101+
public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
102+
{
103+
#endif
104+
_ = body ?? throw new ArgumentNullException(nameof(body));
105+
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
106+
requestInfo.Configure(requestConfiguration);
107+
requestInfo.Headers.TryAdd("Accept", "application/json");
108+
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
109+
return requestInfo;
110+
}
111+
/// <summary>
112+
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
113+
/// </summary>
114+
/// <returns>A <see cref="global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveRequestBuilder"/></returns>
115+
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
116+
public global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveRequestBuilder WithUrl(string rawUrl)
117+
{
118+
return new global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveRequestBuilder(rawUrl, RequestAdapter);
119+
}
120+
/// <summary>
121+
/// Configuration for the request such as headers, query parameters, and middleware options.
122+
/// </summary>
123+
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
124+
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
125+
public partial class RemoveRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
126+
{
127+
}
128+
}
129+
}
130+
#pragma warning restore CS0618
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// <auto-generated/>
2+
#pragma warning disable CS0618
3+
using Microsoft.Kiota.Abstractions.Extensions;
4+
using Microsoft.Kiota.Abstractions.Serialization;
5+
using System.Collections.Generic;
6+
using System.IO;
7+
using System;
8+
namespace Microsoft.Graph.Chats.Item.Members.Remove
9+
{
10+
[Obsolete("This class is obsolete. Use RemovePostResponse instead.")]
11+
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
12+
#pragma warning disable CS1591
13+
public partial class RemoveResponse : global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostResponse, IParsable
14+
#pragma warning restore CS1591
15+
{
16+
/// <summary>
17+
/// Creates a new instance of the appropriate class based on discriminator value
18+
/// </summary>
19+
/// <returns>A <see cref="global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveResponse"/></returns>
20+
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
21+
public static new global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveResponse CreateFromDiscriminatorValue(IParseNode parseNode)
22+
{
23+
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
24+
return new global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveResponse();
25+
}
26+
}
27+
}
28+
#pragma warning restore CS0618

0 commit comments

Comments
 (0)