-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2470 from microsoftgraph/dev
Release 5.51.0
- Loading branch information
Showing
107 changed files
with
6,688 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 118 additions & 0 deletions
118
src/Microsoft.Graph/Generated/DirectoryNamespace/Subscriptions/Count/CountRequestBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
// <auto-generated/> | ||
using Microsoft.Graph.Models.ODataErrors; | ||
using Microsoft.Kiota.Abstractions.Serialization; | ||
using Microsoft.Kiota.Abstractions; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using System.Threading; | ||
using System; | ||
namespace Microsoft.Graph.DirectoryNamespace.Subscriptions.Count { | ||
/// <summary> | ||
/// Provides operations to count the resources in the collection. | ||
/// </summary> | ||
public class CountRequestBuilder : BaseRequestBuilder | ||
{ | ||
/// <summary> | ||
/// Instantiates a new <see cref="CountRequestBuilder"/> 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 CountRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directory/subscriptions/$count{?%24filter,%24search}", pathParameters) | ||
{ | ||
} | ||
/// <summary> | ||
/// Instantiates a new <see cref="CountRequestBuilder"/> 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 CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directory/subscriptions/$count{?%24filter,%24search}", rawUrl) | ||
{ | ||
} | ||
/// <summary> | ||
/// Get the number of the resource | ||
/// </summary> | ||
/// <returns>A <see cref="int"/></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="ODataError">When receiving a 4XX or 5XX status code</exception> | ||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER | ||
#nullable enable | ||
public async Task<int?> GetAsync(Action<RequestConfiguration<CountRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) | ||
{ | ||
#nullable restore | ||
#else | ||
public async Task<int?> GetAsync(Action<RequestConfiguration<CountRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) | ||
{ | ||
#endif | ||
var requestInfo = ToGetRequestInformation(requestConfiguration); | ||
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> | ||
{ | ||
{"XXX", ODataError.CreateFromDiscriminatorValue}, | ||
}; | ||
return await RequestAdapter.SendPrimitiveAsync<int?>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); | ||
} | ||
/// <summary> | ||
/// Get the number of the resource | ||
/// </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<CountRequestBuilderGetQueryParameters>>? requestConfiguration = default) | ||
{ | ||
#nullable restore | ||
#else | ||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<CountRequestBuilderGetQueryParameters>> requestConfiguration = default) | ||
{ | ||
#endif | ||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); | ||
requestInfo.Configure(requestConfiguration); | ||
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); | ||
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="CountRequestBuilder"/></returns> | ||
/// <param name="rawUrl">The raw URL to use for the request builder.</param> | ||
public CountRequestBuilder WithUrl(string rawUrl) | ||
{ | ||
return new CountRequestBuilder(rawUrl, RequestAdapter); | ||
} | ||
/// <summary> | ||
/// Get the number of the resource | ||
/// </summary> | ||
public class CountRequestBuilderGetQueryParameters | ||
{ | ||
/// <summary>Filter items by property values</summary> | ||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER | ||
#nullable enable | ||
[QueryParameter("%24filter")] | ||
public string? Filter { get; set; } | ||
#nullable restore | ||
#else | ||
[QueryParameter("%24filter")] | ||
public string Filter { get; set; } | ||
#endif | ||
/// <summary>Search items by search phrases</summary> | ||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER | ||
#nullable enable | ||
[QueryParameter("%24search")] | ||
public string? Search { get; set; } | ||
#nullable restore | ||
#else | ||
[QueryParameter("%24search")] | ||
public string Search { 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.")] | ||
public class CountRequestBuilderGetRequestConfiguration : RequestConfiguration<CountRequestBuilderGetQueryParameters> | ||
{ | ||
} | ||
} | ||
} |
Oops, something went wrong.