Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated models and request builders #2649

Merged
merged 4 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
84 changes: 48 additions & 36 deletions src/Microsoft.Graph/Generated/Admin/AdminRequestBuilder.cs

Large diffs are not rendered by default.

69 changes: 38 additions & 31 deletions src/Microsoft.Graph/Generated/Admin/Edge/EdgeRequestBuilder.cs

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// <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.Linq;
using System.Threading.Tasks;
using System.Threading;
using System;
Expand All @@ -13,18 +14,19 @@ namespace Microsoft.Graph.Admin.Edge.InternetExplorerMode.SiteLists.Count
/// <summary>
/// Provides operations to count the resources in the collection.
/// </summary>
public class CountRequestBuilder : BaseRequestBuilder
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")]
public partial class CountRequestBuilder : BaseRequestBuilder
{
/// <summary>
/// Instantiates a new <see cref="Microsoft.Graph.Admin.Edge.InternetExplorerMode.SiteLists.Count.CountRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="global::Microsoft.Graph.Admin.Edge.InternetExplorerMode.SiteLists.Count.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}/admin/edge/internetExplorerMode/siteLists/$count{?%24filter,%24search}", pathParameters)
{
}
/// <summary>
/// Instantiates a new <see cref="Microsoft.Graph.Admin.Edge.InternetExplorerMode.SiteLists.Count.CountRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="global::Microsoft.Graph.Admin.Edge.InternetExplorerMode.SiteLists.Count.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>
Expand All @@ -37,20 +39,20 @@ public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base
/// <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="Microsoft.Graph.Models.ODataErrors.ODataError">When receiving a 4XX or 5XX status code</exception>
/// <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<int?> GetAsync(Action<RequestConfiguration<Microsoft.Graph.Admin.Edge.InternetExplorerMode.SiteLists.Count.CountRequestBuilder.CountRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
public async Task<int?> GetAsync(Action<RequestConfiguration<global::Microsoft.Graph.Admin.Edge.InternetExplorerMode.SiteLists.Count.CountRequestBuilder.CountRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<int?> GetAsync(Action<RequestConfiguration<Microsoft.Graph.Admin.Edge.InternetExplorerMode.SiteLists.Count.CountRequestBuilder.CountRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
public async Task<int?> GetAsync(Action<RequestConfiguration<global::Microsoft.Graph.Admin.Edge.InternetExplorerMode.SiteLists.Count.CountRequestBuilder.CountRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
{
{ "XXX", Microsoft.Graph.Models.ODataErrors.ODataError.CreateFromDiscriminatorValue },
{ "XXX", global::Microsoft.Graph.Models.ODataErrors.ODataError.CreateFromDiscriminatorValue },
};
return await RequestAdapter.SendPrimitiveAsync<int?>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
}
Expand All @@ -61,11 +63,11 @@ public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base
/// <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<Microsoft.Graph.Admin.Edge.InternetExplorerMode.SiteLists.Count.CountRequestBuilder.CountRequestBuilderGetQueryParameters>>? requestConfiguration = default)
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::Microsoft.Graph.Admin.Edge.InternetExplorerMode.SiteLists.Count.CountRequestBuilder.CountRequestBuilderGetQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<Microsoft.Graph.Admin.Edge.InternetExplorerMode.SiteLists.Count.CountRequestBuilder.CountRequestBuilderGetQueryParameters>> requestConfiguration = default)
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::Microsoft.Graph.Admin.Edge.InternetExplorerMode.SiteLists.Count.CountRequestBuilder.CountRequestBuilderGetQueryParameters>> requestConfiguration = default)
{
#endif
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
Expand All @@ -76,16 +78,17 @@ public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<Mi
/// <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="Microsoft.Graph.Admin.Edge.InternetExplorerMode.SiteLists.Count.CountRequestBuilder"/></returns>
/// <returns>A <see cref="global::Microsoft.Graph.Admin.Edge.InternetExplorerMode.SiteLists.Count.CountRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public Microsoft.Graph.Admin.Edge.InternetExplorerMode.SiteLists.Count.CountRequestBuilder WithUrl(string rawUrl)
public global::Microsoft.Graph.Admin.Edge.InternetExplorerMode.SiteLists.Count.CountRequestBuilder WithUrl(string rawUrl)
{
return new Microsoft.Graph.Admin.Edge.InternetExplorerMode.SiteLists.Count.CountRequestBuilder(rawUrl, RequestAdapter);
return new global::Microsoft.Graph.Admin.Edge.InternetExplorerMode.SiteLists.Count.CountRequestBuilder(rawUrl, RequestAdapter);
}
/// <summary>
/// Get the number of the resource
/// </summary>
public class CountRequestBuilderGetQueryParameters
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")]
public partial class CountRequestBuilderGetQueryParameters
{
/// <summary>Filter items by property values</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
Expand All @@ -112,8 +115,10 @@ public class CountRequestBuilderGetQueryParameters
/// 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<Microsoft.Graph.Admin.Edge.InternetExplorerMode.SiteLists.Count.CountRequestBuilder.CountRequestBuilderGetQueryParameters>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")]
public partial class CountRequestBuilderGetRequestConfiguration : RequestConfiguration<global::Microsoft.Graph.Admin.Edge.InternetExplorerMode.SiteLists.Count.CountRequestBuilder.CountRequestBuilderGetQueryParameters>
{
}
}
}
#pragma warning restore CS0618
Loading