|
| 1 | +// <auto-generated/> |
| 2 | +#pragma warning disable CS0618 |
| 3 | +using Microsoft.Kiota.Abstractions.Extensions; |
| 4 | +using Microsoft.Kiota.Abstractions.Serialization; |
| 5 | +using Microsoft.Kiota.Abstractions; |
| 6 | +using System.Collections.Generic; |
| 7 | +using System.IO; |
| 8 | +using System.Threading.Tasks; |
| 9 | +using System.Threading; |
| 10 | +using System; |
| 11 | +using TodoApp.Client.Models; |
| 12 | +namespace TodoApp.Client.Api.Items.Find |
| 13 | +{ |
| 14 | + /// <summary> |
| 15 | + /// Builds and executes requests for operations under \api\items\find |
| 16 | + /// </summary> |
| 17 | + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] |
| 18 | + public partial class FindRequestBuilder : BaseRequestBuilder |
| 19 | + { |
| 20 | + /// <summary> |
| 21 | + /// Instantiates a new <see cref="global::TodoApp.Client.Api.Items.Find.FindRequestBuilder"/> 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 FindRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/items/find?IsCompleted={IsCompleted}&Text={Text}", pathParameters) |
| 26 | + { |
| 27 | + } |
| 28 | + /// <summary> |
| 29 | + /// Instantiates a new <see cref="global::TodoApp.Client.Api.Items.Find.FindRequestBuilder"/> 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 FindRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/items/find?IsCompleted={IsCompleted}&Text={Text}", rawUrl) |
| 34 | + { |
| 35 | + } |
| 36 | + /// <returns>A <see cref="global::TodoApp.Client.Models.TodoListViewModel"/></returns> |
| 37 | + /// <param name="cancellationToken">Cancellation token to use when cancelling requests</param> |
| 38 | + /// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param> |
| 39 | +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER |
| 40 | +#nullable enable |
| 41 | + public async Task<global::TodoApp.Client.Models.TodoListViewModel?> GetAsync(Action<RequestConfiguration<global::TodoApp.Client.Api.Items.Find.FindRequestBuilder.FindRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) |
| 42 | + { |
| 43 | +#nullable restore |
| 44 | +#else |
| 45 | + public async Task<global::TodoApp.Client.Models.TodoListViewModel> GetAsync(Action<RequestConfiguration<global::TodoApp.Client.Api.Items.Find.FindRequestBuilder.FindRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) |
| 46 | + { |
| 47 | +#endif |
| 48 | + var requestInfo = ToGetRequestInformation(requestConfiguration); |
| 49 | + return await RequestAdapter.SendAsync<global::TodoApp.Client.Models.TodoListViewModel>(requestInfo, global::TodoApp.Client.Models.TodoListViewModel.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); |
| 50 | + } |
| 51 | + /// <returns>A <see cref="RequestInformation"/></returns> |
| 52 | + /// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param> |
| 53 | +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER |
| 54 | +#nullable enable |
| 55 | + public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::TodoApp.Client.Api.Items.Find.FindRequestBuilder.FindRequestBuilderGetQueryParameters>>? requestConfiguration = default) |
| 56 | + { |
| 57 | +#nullable restore |
| 58 | +#else |
| 59 | + public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::TodoApp.Client.Api.Items.Find.FindRequestBuilder.FindRequestBuilderGetQueryParameters>> requestConfiguration = default) |
| 60 | + { |
| 61 | +#endif |
| 62 | + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); |
| 63 | + requestInfo.Configure(requestConfiguration); |
| 64 | + requestInfo.Headers.TryAdd("Accept", "application/json"); |
| 65 | + return requestInfo; |
| 66 | + } |
| 67 | + /// <summary> |
| 68 | + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. |
| 69 | + /// </summary> |
| 70 | + /// <returns>A <see cref="global::TodoApp.Client.Api.Items.Find.FindRequestBuilder"/></returns> |
| 71 | + /// <param name="rawUrl">The raw URL to use for the request builder.</param> |
| 72 | + public global::TodoApp.Client.Api.Items.Find.FindRequestBuilder WithUrl(string rawUrl) |
| 73 | + { |
| 74 | + return new global::TodoApp.Client.Api.Items.Find.FindRequestBuilder(rawUrl, RequestAdapter); |
| 75 | + } |
| 76 | + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] |
| 77 | + #pragma warning disable CS1591 |
| 78 | + public partial class FindRequestBuilderGetQueryParameters |
| 79 | + #pragma warning restore CS1591 |
| 80 | + { |
| 81 | + /// <summary>Gets or sets a value indicating whether to search completed Todo items.</summary> |
| 82 | + public bool? IsCompleted { get; set; } |
| 83 | + /// <summary>Gets or sets the text of the filter.</summary> |
| 84 | +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER |
| 85 | +#nullable enable |
| 86 | + public string? Text { get; set; } |
| 87 | +#nullable restore |
| 88 | +#else |
| 89 | + public string Text { get; set; } |
| 90 | +#endif |
| 91 | + } |
| 92 | + } |
| 93 | +} |
| 94 | +#pragma warning restore CS0618 |
0 commit comments