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 #2615

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all 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.
76 changes: 40 additions & 36 deletions src/Microsoft.Graph/Generated/Admin/AdminRequestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
using Microsoft.Graph.Admin.Sharepoint;
using Microsoft.Graph.Models.ODataErrors;
using Microsoft.Graph.Models;
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 @@ -19,43 +19,44 @@ namespace Microsoft.Graph.Admin
/// <summary>
/// Provides operations to manage the admin singleton.
/// </summary>
public class AdminRequestBuilder : BaseRequestBuilder
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.17.0")]
public partial class AdminRequestBuilder : BaseRequestBuilder
{
/// <summary>Provides operations to manage the edge property of the microsoft.graph.admin entity.</summary>
public Microsoft.Graph.Admin.Edge.EdgeRequestBuilder Edge
public global::Microsoft.Graph.Admin.Edge.EdgeRequestBuilder Edge
{
get => new Microsoft.Graph.Admin.Edge.EdgeRequestBuilder(PathParameters, RequestAdapter);
get => new global::Microsoft.Graph.Admin.Edge.EdgeRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to manage the microsoft365Apps property of the microsoft.graph.admin entity.</summary>
public Microsoft.Graph.Admin.Microsoft365Apps.Microsoft365AppsRequestBuilder Microsoft365Apps
public global::Microsoft.Graph.Admin.Microsoft365Apps.Microsoft365AppsRequestBuilder Microsoft365Apps
{
get => new Microsoft.Graph.Admin.Microsoft365Apps.Microsoft365AppsRequestBuilder(PathParameters, RequestAdapter);
get => new global::Microsoft.Graph.Admin.Microsoft365Apps.Microsoft365AppsRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to manage the people property of the microsoft.graph.admin entity.</summary>
public Microsoft.Graph.Admin.People.PeopleRequestBuilder People
public global::Microsoft.Graph.Admin.People.PeopleRequestBuilder People
{
get => new Microsoft.Graph.Admin.People.PeopleRequestBuilder(PathParameters, RequestAdapter);
get => new global::Microsoft.Graph.Admin.People.PeopleRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to manage the serviceAnnouncement property of the microsoft.graph.admin entity.</summary>
public Microsoft.Graph.Admin.ServiceAnnouncement.ServiceAnnouncementRequestBuilder ServiceAnnouncement
public global::Microsoft.Graph.Admin.ServiceAnnouncement.ServiceAnnouncementRequestBuilder ServiceAnnouncement
{
get => new Microsoft.Graph.Admin.ServiceAnnouncement.ServiceAnnouncementRequestBuilder(PathParameters, RequestAdapter);
get => new global::Microsoft.Graph.Admin.ServiceAnnouncement.ServiceAnnouncementRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to manage the sharepoint property of the microsoft.graph.admin entity.</summary>
public Microsoft.Graph.Admin.Sharepoint.SharepointRequestBuilder Sharepoint
public global::Microsoft.Graph.Admin.Sharepoint.SharepointRequestBuilder Sharepoint
{
get => new Microsoft.Graph.Admin.Sharepoint.SharepointRequestBuilder(PathParameters, RequestAdapter);
get => new global::Microsoft.Graph.Admin.Sharepoint.SharepointRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>
/// Instantiates a new <see cref="Microsoft.Graph.Admin.AdminRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="global::Microsoft.Graph.Admin.AdminRequestBuilder"/> 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 AdminRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin{?%24expand,%24select}", pathParameters)
{
}
/// <summary>
/// Instantiates a new <see cref="Microsoft.Graph.Admin.AdminRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="global::Microsoft.Graph.Admin.AdminRequestBuilder"/> 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 @@ -65,50 +66,50 @@ public AdminRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base
/// <summary>
/// Get admin
/// </summary>
/// <returns>A <see cref="Microsoft.Graph.Models.Admin"/></returns>
/// <returns>A <see cref="global::Microsoft.Graph.Models.Admin"/></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<Microsoft.Graph.Models.Admin?> GetAsync(Action<RequestConfiguration<Microsoft.Graph.Admin.AdminRequestBuilder.AdminRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
public async Task<global::Microsoft.Graph.Models.Admin?> GetAsync(Action<RequestConfiguration<global::Microsoft.Graph.Admin.AdminRequestBuilder.AdminRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<Microsoft.Graph.Models.Admin> GetAsync(Action<RequestConfiguration<Microsoft.Graph.Admin.AdminRequestBuilder.AdminRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
public async Task<global::Microsoft.Graph.Models.Admin> GetAsync(Action<RequestConfiguration<global::Microsoft.Graph.Admin.AdminRequestBuilder.AdminRequestBuilderGetQueryParameters>> 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.SendAsync<Microsoft.Graph.Models.Admin>(requestInfo, Microsoft.Graph.Models.Admin.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
return await RequestAdapter.SendAsync<global::Microsoft.Graph.Models.Admin>(requestInfo, global::Microsoft.Graph.Models.Admin.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Update admin
/// </summary>
/// <returns>A <see cref="Microsoft.Graph.Models.Admin"/></returns>
/// <returns>A <see cref="global::Microsoft.Graph.Models.Admin"/></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="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<Microsoft.Graph.Models.Admin?> PatchAsync(Microsoft.Graph.Models.Admin body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
public async Task<global::Microsoft.Graph.Models.Admin?> PatchAsync(global::Microsoft.Graph.Models.Admin body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<Microsoft.Graph.Models.Admin> PatchAsync(Microsoft.Graph.Models.Admin body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
public async Task<global::Microsoft.Graph.Models.Admin> PatchAsync(global::Microsoft.Graph.Models.Admin body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToPatchRequestInformation(body, 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.SendAsync<Microsoft.Graph.Models.Admin>(requestInfo, Microsoft.Graph.Models.Admin.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
return await RequestAdapter.SendAsync<global::Microsoft.Graph.Models.Admin>(requestInfo, global::Microsoft.Graph.Models.Admin.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Get admin
Expand All @@ -117,11 +118,11 @@ public AdminRequestBuilder(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.AdminRequestBuilder.AdminRequestBuilderGetQueryParameters>>? requestConfiguration = default)
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::Microsoft.Graph.Admin.AdminRequestBuilder.AdminRequestBuilderGetQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<Microsoft.Graph.Admin.AdminRequestBuilder.AdminRequestBuilderGetQueryParameters>> requestConfiguration = default)
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::Microsoft.Graph.Admin.AdminRequestBuilder.AdminRequestBuilderGetQueryParameters>> requestConfiguration = default)
{
#endif
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
Expand All @@ -137,11 +138,11 @@ public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<Mi
/// <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 ToPatchRequestInformation(Microsoft.Graph.Models.Admin body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Models.Admin body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.Admin body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Models.Admin body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
Expand All @@ -154,16 +155,17 @@ public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.Admin
/// <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.AdminRequestBuilder"/></returns>
/// <returns>A <see cref="global::Microsoft.Graph.Admin.AdminRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public Microsoft.Graph.Admin.AdminRequestBuilder WithUrl(string rawUrl)
public global::Microsoft.Graph.Admin.AdminRequestBuilder WithUrl(string rawUrl)
{
return new Microsoft.Graph.Admin.AdminRequestBuilder(rawUrl, RequestAdapter);
return new global::Microsoft.Graph.Admin.AdminRequestBuilder(rawUrl, RequestAdapter);
}
/// <summary>
/// Get admin
/// </summary>
public class AdminRequestBuilderGetQueryParameters
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.17.0")]
public partial class AdminRequestBuilderGetQueryParameters
{
/// <summary>Expand related entities</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
Expand All @@ -190,14 +192,16 @@ public class AdminRequestBuilderGetQueryParameters
/// 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 AdminRequestBuilderGetRequestConfiguration : RequestConfiguration<Microsoft.Graph.Admin.AdminRequestBuilder.AdminRequestBuilderGetQueryParameters>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.17.0")]
public partial class AdminRequestBuilderGetRequestConfiguration : RequestConfiguration<global::Microsoft.Graph.Admin.AdminRequestBuilder.AdminRequestBuilderGetQueryParameters>
{
}
/// <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 AdminRequestBuilderPatchRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.17.0")]
public partial class AdminRequestBuilderPatchRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
}
Expand Down
Loading
Loading