|
| 1 | +// <auto-generated/> |
| 2 | +#pragma warning disable CS0618 |
| 3 | +using Microsoft.Graph.Beta.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.Beta.Admin.Exchange.Tracing.MessageTraces.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.Beta.Admin.Exchange.Tracing.MessageTraces.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}/admin/exchange/tracing/messageTraces/$count{?%24filter,%24search}", pathParameters) |
| 26 | + { |
| 27 | + } |
| 28 | + /// <summary> |
| 29 | + /// Instantiates a new <see cref="global::Microsoft.Graph.Beta.Admin.Exchange.Tracing.MessageTraces.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}/admin/exchange/tracing/messageTraces/$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.Beta.Models.ODataErrors.ODataError">When receiving a 4XX or 5XX status code</exception> |
| 43 | + [Obsolete("Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15")] |
| 44 | +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER |
| 45 | +#nullable enable |
| 46 | + public async Task<int?> GetAsync(Action<RequestConfiguration<global::Microsoft.Graph.Beta.Admin.Exchange.Tracing.MessageTraces.Count.CountRequestBuilder.CountRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) |
| 47 | + { |
| 48 | +#nullable restore |
| 49 | +#else |
| 50 | + public async Task<int?> GetAsync(Action<RequestConfiguration<global::Microsoft.Graph.Beta.Admin.Exchange.Tracing.MessageTraces.Count.CountRequestBuilder.CountRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) |
| 51 | + { |
| 52 | +#endif |
| 53 | + var requestInfo = ToGetRequestInformation(requestConfiguration); |
| 54 | + var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> |
| 55 | + { |
| 56 | + { "XXX", global::Microsoft.Graph.Beta.Models.ODataErrors.ODataError.CreateFromDiscriminatorValue }, |
| 57 | + }; |
| 58 | + return await RequestAdapter.SendPrimitiveAsync<int?>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); |
| 59 | + } |
| 60 | + /// <summary> |
| 61 | + /// Get the number of the resource |
| 62 | + /// </summary> |
| 63 | + /// <returns>A <see cref="RequestInformation"/></returns> |
| 64 | + /// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param> |
| 65 | + [Obsolete("Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15")] |
| 66 | +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER |
| 67 | +#nullable enable |
| 68 | + public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::Microsoft.Graph.Beta.Admin.Exchange.Tracing.MessageTraces.Count.CountRequestBuilder.CountRequestBuilderGetQueryParameters>>? requestConfiguration = default) |
| 69 | + { |
| 70 | +#nullable restore |
| 71 | +#else |
| 72 | + public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::Microsoft.Graph.Beta.Admin.Exchange.Tracing.MessageTraces.Count.CountRequestBuilder.CountRequestBuilderGetQueryParameters>> requestConfiguration = default) |
| 73 | + { |
| 74 | +#endif |
| 75 | + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); |
| 76 | + requestInfo.Configure(requestConfiguration); |
| 77 | + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); |
| 78 | + return requestInfo; |
| 79 | + } |
| 80 | + /// <summary> |
| 81 | + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. |
| 82 | + /// </summary> |
| 83 | + /// <returns>A <see cref="global::Microsoft.Graph.Beta.Admin.Exchange.Tracing.MessageTraces.Count.CountRequestBuilder"/></returns> |
| 84 | + /// <param name="rawUrl">The raw URL to use for the request builder.</param> |
| 85 | + [Obsolete("Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15")] |
| 86 | + public global::Microsoft.Graph.Beta.Admin.Exchange.Tracing.MessageTraces.Count.CountRequestBuilder WithUrl(string rawUrl) |
| 87 | + { |
| 88 | + return new global::Microsoft.Graph.Beta.Admin.Exchange.Tracing.MessageTraces.Count.CountRequestBuilder(rawUrl, RequestAdapter); |
| 89 | + } |
| 90 | + /// <summary> |
| 91 | + /// Get the number of the resource |
| 92 | + /// </summary> |
| 93 | + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] |
| 94 | + public partial class CountRequestBuilderGetQueryParameters |
| 95 | + { |
| 96 | + /// <summary>Filter items by property values</summary> |
| 97 | +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER |
| 98 | +#nullable enable |
| 99 | + [QueryParameter("%24filter")] |
| 100 | + public string? Filter { get; set; } |
| 101 | +#nullable restore |
| 102 | +#else |
| 103 | + [QueryParameter("%24filter")] |
| 104 | + public string Filter { get; set; } |
| 105 | +#endif |
| 106 | + /// <summary>Search items by search phrases</summary> |
| 107 | +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER |
| 108 | +#nullable enable |
| 109 | + [QueryParameter("%24search")] |
| 110 | + public string? Search { get; set; } |
| 111 | +#nullable restore |
| 112 | +#else |
| 113 | + [QueryParameter("%24search")] |
| 114 | + public string Search { get; set; } |
| 115 | +#endif |
| 116 | + } |
| 117 | + /// <summary> |
| 118 | + /// Configuration for the request such as headers, query parameters, and middleware options. |
| 119 | + /// </summary> |
| 120 | + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] |
| 121 | + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] |
| 122 | + public partial class CountRequestBuilderGetRequestConfiguration : RequestConfiguration<global::Microsoft.Graph.Beta.Admin.Exchange.Tracing.MessageTraces.Count.CountRequestBuilder.CountRequestBuilderGetQueryParameters> |
| 123 | + { |
| 124 | + } |
| 125 | + } |
| 126 | +} |
| 127 | +#pragma warning restore CS0618 |
0 commit comments