Skip to content

Commit

Permalink
feat(generation): update request builders and models
Browse files Browse the repository at this point in the history
Update generated files with build 175190
  • Loading branch information
Microsoft Graph DevX Tooling authored and Microsoft Graph DevX Tooling committed Dec 31, 2024
1 parent 32f66ee commit 0c4d1c5
Show file tree
Hide file tree
Showing 135 changed files with 5,598 additions and 238 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Microsoft.Graph.Chats.Item.Members.Add;
using Microsoft.Graph.Chats.Item.Members.Count;
using Microsoft.Graph.Chats.Item.Members.Item;
using Microsoft.Graph.Chats.Item.Members.Remove;
using Microsoft.Graph.Models.ODataErrors;
using Microsoft.Graph.Models;
using Microsoft.Kiota.Abstractions.Extensions;
Expand Down Expand Up @@ -31,6 +32,11 @@ public partial class MembersRequestBuilder : BaseRequestBuilder
{
get => new global::Microsoft.Graph.Chats.Item.Members.Count.CountRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to call the remove method.</summary>
public global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveRequestBuilder Remove
{
get => new global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to manage the members property of the microsoft.graph.chat entity.</summary>
/// <param name="position">The unique identifier of conversationMember</param>
/// <returns>A <see cref="global::Microsoft.Graph.Chats.Item.Members.Item.ConversationMemberItemRequestBuilder"/></returns>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
// <auto-generated/>
#pragma warning disable CS0618
using Microsoft.Graph.Models;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions.Store;
using System.Collections.Generic;
using System.IO;
using System;
namespace Microsoft.Graph.Chats.Item.Members.Remove
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
#pragma warning disable CS1591
public partial class RemovePostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable
#pragma warning restore CS1591
{
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary>
public IDictionary<string, object> AdditionalData
{
get { return BackingStore.Get<IDictionary<string, object>>("AdditionalData") ?? new Dictionary<string, object>(); }
set { BackingStore.Set("AdditionalData", value); }
}
/// <summary>Stores model information.</summary>
public IBackingStore BackingStore { get; private set; }
/// <summary>The values property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public List<global::Microsoft.Graph.Models.ConversationMember>? Values
{
get { return BackingStore?.Get<List<global::Microsoft.Graph.Models.ConversationMember>?>("values"); }
set { BackingStore?.Set("values", value); }
}
#nullable restore
#else
public List<global::Microsoft.Graph.Models.ConversationMember> Values
{
get { return BackingStore?.Get<List<global::Microsoft.Graph.Models.ConversationMember>>("values"); }
set { BackingStore?.Set("values", value); }
}
#endif
/// <summary>
/// Instantiates a new <see cref="global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostRequestBody"/> and sets the default values.
/// </summary>
public RemovePostRequestBody()
{
BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore();
AdditionalData = new Dictionary<string, object>();
}
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostRequestBody"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostRequestBody();
}
/// <summary>
/// The deserialization information for the current model
/// </summary>
/// <returns>A IDictionary&lt;string, Action&lt;IParseNode&gt;&gt;</returns>
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{ "values", n => { Values = n.GetCollectionOfObjectValues<global::Microsoft.Graph.Models.ConversationMember>(global::Microsoft.Graph.Models.ConversationMember.CreateFromDiscriminatorValue)?.AsList(); } },
};
}
/// <summary>
/// Serializes information the current object
/// </summary>
/// <param name="writer">Serialization writer to use to serialize this model</param>
public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteCollectionOfObjectValues<global::Microsoft.Graph.Models.ConversationMember>("values", Values);
writer.WriteAdditionalData(AdditionalData);
}
}
}
#pragma warning restore CS0618
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// <auto-generated/>
#pragma warning disable CS0618
using Microsoft.Graph.Models;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using System.Collections.Generic;
using System.IO;
using System;
namespace Microsoft.Graph.Chats.Item.Members.Remove
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
#pragma warning disable CS1591
public partial class RemovePostResponse : global::Microsoft.Graph.Models.BaseCollectionPaginationCountResponse, IParsable
#pragma warning restore CS1591
{
/// <summary>The value property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public List<global::Microsoft.Graph.Models.ActionResultPart>? Value
{
get { return BackingStore?.Get<List<global::Microsoft.Graph.Models.ActionResultPart>?>("value"); }
set { BackingStore?.Set("value", value); }
}
#nullable restore
#else
public List<global::Microsoft.Graph.Models.ActionResultPart> Value
{
get { return BackingStore?.Get<List<global::Microsoft.Graph.Models.ActionResultPart>>("value"); }
set { BackingStore?.Set("value", value); }
}
#endif
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostResponse"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static new global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostResponse CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostResponse();
}
/// <summary>
/// The deserialization information for the current model
/// </summary>
/// <returns>A IDictionary&lt;string, Action&lt;IParseNode&gt;&gt;</returns>
public override IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>(base.GetFieldDeserializers())
{
{ "value", n => { Value = n.GetCollectionOfObjectValues<global::Microsoft.Graph.Models.ActionResultPart>(global::Microsoft.Graph.Models.ActionResultPart.CreateFromDiscriminatorValue)?.AsList(); } },
};
}
/// <summary>
/// Serializes information the current object
/// </summary>
/// <param name="writer">Serialization writer to use to serialize this model</param>
public override void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
base.Serialize(writer);
writer.WriteCollectionOfObjectValues<global::Microsoft.Graph.Models.ActionResultPart>("value", Value);
}
}
}
#pragma warning restore CS0618
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
// <auto-generated/>
#pragma warning disable CS0618
using Microsoft.Graph.Models.ODataErrors;
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.Chats.Item.Members.Remove
{
/// <summary>
/// Provides operations to call the remove method.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
public partial class RemoveRequestBuilder : BaseRequestBuilder
{
/// <summary>
/// Instantiates a new <see cref="global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveRequestBuilder"/> 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 RemoveRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/chats/{chat%2Did}/members/remove", pathParameters)
{
}
/// <summary>
/// Instantiates a new <see cref="global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveRequestBuilder"/> 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 RemoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/chats/{chat%2Did}/members/remove", rawUrl)
{
}
/// <summary>
/// Remove multiple members from a team in a single request. The response provides details about which memberships could and couldn&apos;t be removed.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/conversationmember-remove?view=graph-rest-1.0" />
/// </summary>
/// <returns>A <see cref="global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostResponse"/></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.Chats.Item.Members.Remove.RemovePostResponse?> PostAsRemovePostResponseAsync(global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
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)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
{
{ "XXX", global::Microsoft.Graph.Models.ODataErrors.ODataError.CreateFromDiscriminatorValue },
};
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);
}
/// <summary>
/// Remove multiple members from a team in a single request. The response provides details about which memberships could and couldn&apos;t be removed.
/// Find more info here <see href="https://learn.microsoft.com/graph/api/conversationmember-remove?view=graph-rest-1.0" />
/// </summary>
/// <returns>A <see cref="global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveResponse"/></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>
[Obsolete("This method is obsolete. Use PostAsRemovePostResponseAsync instead.")]
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
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)
{
#nullable restore
#else
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)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
{
{ "XXX", global::Microsoft.Graph.Models.ODataErrors.ODataError.CreateFromDiscriminatorValue },
};
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);
}
/// <summary>
/// Remove multiple members from a team in a single request. The response provides details about which memberships could and couldn&apos;t be removed.
/// </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 ToPostRequestInformation(global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation(Method.POST, 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.Chats.Item.Members.Remove.RemoveRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveRequestBuilder WithUrl(string rawUrl)
{
return new global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveRequestBuilder(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 RemoveRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
}
}
#pragma warning restore CS0618
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// <auto-generated/>
#pragma warning disable CS0618
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using System.Collections.Generic;
using System.IO;
using System;
namespace Microsoft.Graph.Chats.Item.Members.Remove
{
[Obsolete("This class is obsolete. Use RemovePostResponse instead.")]
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
#pragma warning disable CS1591
public partial class RemoveResponse : global::Microsoft.Graph.Chats.Item.Members.Remove.RemovePostResponse, IParsable
#pragma warning restore CS1591
{
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveResponse"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static new global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveResponse CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new global::Microsoft.Graph.Chats.Item.Members.Remove.RemoveResponse();
}
}
}
#pragma warning restore CS0618
Loading

0 comments on commit 0c4d1c5

Please sign in to comment.