Skip to content
Merged
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
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions src/Microsoft.Graph/Generated/Admin/AdminRequestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Microsoft.Graph.Beta.Admin.Dynamics;
using Microsoft.Graph.Beta.Admin.Edge;
using Microsoft.Graph.Beta.Admin.Entra;
using Microsoft.Graph.Beta.Admin.Exchange;
using Microsoft.Graph.Beta.Admin.Forms;
using Microsoft.Graph.Beta.Admin.Microsoft365Apps;
using Microsoft.Graph.Beta.Admin.People;
Expand Down Expand Up @@ -50,6 +51,11 @@ public partial class AdminRequestBuilder : BaseRequestBuilder
{
get => new global::Microsoft.Graph.Beta.Admin.Entra.EntraRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to manage the exchange property of the microsoft.graph.admin entity.</summary>
public global::Microsoft.Graph.Beta.Admin.Exchange.ExchangeRequestBuilder Exchange
{
get => new global::Microsoft.Graph.Beta.Admin.Exchange.ExchangeRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to manage the forms property of the microsoft.graph.admin entity.</summary>
public global::Microsoft.Graph.Beta.Admin.Forms.FormsRequestBuilder Forms
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
// <auto-generated/>
#pragma warning disable CS0618
using Microsoft.Graph.Beta.Admin.Exchange.Mailboxes;
using Microsoft.Graph.Beta.Admin.Exchange.MessageTraces;
using Microsoft.Graph.Beta.Models.ODataErrors;
using Microsoft.Graph.Beta.Models;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using System.Threading;
using System;
namespace Microsoft.Graph.Beta.Admin.Exchange
{
/// <summary>
/// Provides operations to manage the exchange property of the microsoft.graph.admin entity.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
public partial class ExchangeRequestBuilder : BaseRequestBuilder
{
/// <summary>Provides operations to manage the mailboxes property of the microsoft.graph.exchangeAdmin entity.</summary>
[Obsolete("Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport")]
public global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.MailboxesRequestBuilder Mailboxes
{
get => new global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.MailboxesRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to manage the messageTraces property of the microsoft.graph.exchangeAdmin entity.</summary>
[Obsolete("Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport")]
public global::Microsoft.Graph.Beta.Admin.Exchange.MessageTraces.MessageTracesRequestBuilder MessageTraces
{
get => new global::Microsoft.Graph.Beta.Admin.Exchange.MessageTraces.MessageTracesRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>
/// Instantiates a new <see cref="global::Microsoft.Graph.Beta.Admin.Exchange.ExchangeRequestBuilder"/> 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 ExchangeRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/exchange{?%24expand,%24select}", pathParameters)
{
}
/// <summary>
/// Instantiates a new <see cref="global::Microsoft.Graph.Beta.Admin.Exchange.ExchangeRequestBuilder"/> 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 ExchangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/exchange{?%24expand,%24select}", rawUrl)
{
}
/// <summary>
/// Delete navigation property exchange for admin
/// </summary>
/// <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="global::Microsoft.Graph.Beta.Models.ODataErrors.ODataError">When receiving a 4XX or 5XX status code</exception>
[Obsolete("Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport")]
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public async Task DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
{
{ "XXX", global::Microsoft.Graph.Beta.Models.ODataErrors.ODataError.CreateFromDiscriminatorValue },
};
await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// A container for the Exchange admin functionality. Read-only.
/// </summary>
/// <returns>A <see cref="global::Microsoft.Graph.Beta.Models.ExchangeAdmin"/></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="global::Microsoft.Graph.Beta.Models.ODataErrors.ODataError">When receiving a 4XX or 5XX status code</exception>
[Obsolete("Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport")]
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public async Task<global::Microsoft.Graph.Beta.Models.ExchangeAdmin?> GetAsync(Action<RequestConfiguration<global::Microsoft.Graph.Beta.Admin.Exchange.ExchangeRequestBuilder.ExchangeRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<global::Microsoft.Graph.Beta.Models.ExchangeAdmin> GetAsync(Action<RequestConfiguration<global::Microsoft.Graph.Beta.Admin.Exchange.ExchangeRequestBuilder.ExchangeRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
{
{ "XXX", global::Microsoft.Graph.Beta.Models.ODataErrors.ODataError.CreateFromDiscriminatorValue },
};
return await RequestAdapter.SendAsync<global::Microsoft.Graph.Beta.Models.ExchangeAdmin>(requestInfo, global::Microsoft.Graph.Beta.Models.ExchangeAdmin.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Update the navigation property exchange in admin
/// </summary>
/// <returns>A <see cref="global::Microsoft.Graph.Beta.Models.ExchangeAdmin"/></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="global::Microsoft.Graph.Beta.Models.ODataErrors.ODataError">When receiving a 4XX or 5XX status code</exception>
[Obsolete("Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport")]
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public async Task<global::Microsoft.Graph.Beta.Models.ExchangeAdmin?> PatchAsync(global::Microsoft.Graph.Beta.Models.ExchangeAdmin body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<global::Microsoft.Graph.Beta.Models.ExchangeAdmin> PatchAsync(global::Microsoft.Graph.Beta.Models.ExchangeAdmin 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", global::Microsoft.Graph.Beta.Models.ODataErrors.ODataError.CreateFromDiscriminatorValue },
};
return await RequestAdapter.SendAsync<global::Microsoft.Graph.Beta.Models.ExchangeAdmin>(requestInfo, global::Microsoft.Graph.Beta.Models.ExchangeAdmin.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Delete navigation property exchange for admin
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
[Obsolete("Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport")]
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
requestInfo.Headers.TryAdd("Accept", "application/json");
return requestInfo;
}
/// <summary>
/// A container for the Exchange admin functionality. Read-only.
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
[Obsolete("Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport")]
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::Microsoft.Graph.Beta.Admin.Exchange.ExchangeRequestBuilder.ExchangeRequestBuilderGetQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::Microsoft.Graph.Beta.Admin.Exchange.ExchangeRequestBuilder.ExchangeRequestBuilderGetQueryParameters>> requestConfiguration = default)
{
#endif
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
requestInfo.Headers.TryAdd("Accept", "application/json");
return requestInfo;
}
/// <summary>
/// Update the navigation property exchange in admin
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="body">The request body</param>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
[Obsolete("Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport")]
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExchangeAdmin body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExchangeAdmin body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
requestInfo.Headers.TryAdd("Accept", "application/json");
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
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="global::Microsoft.Graph.Beta.Admin.Exchange.ExchangeRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
[Obsolete("Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport")]
public global::Microsoft.Graph.Beta.Admin.Exchange.ExchangeRequestBuilder WithUrl(string rawUrl)
{
return new global::Microsoft.Graph.Beta.Admin.Exchange.ExchangeRequestBuilder(rawUrl, RequestAdapter);
}
/// <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.")]
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
public partial class ExchangeRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
/// <summary>
/// A container for the Exchange admin functionality. Read-only.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
public partial class ExchangeRequestBuilderGetQueryParameters
{
/// <summary>Expand related entities</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
[QueryParameter("%24expand")]
public string[]? Expand { get; set; }
#nullable restore
#else
[QueryParameter("%24expand")]
public string[] Expand { get; set; }
#endif
/// <summary>Select properties to be returned</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
[QueryParameter("%24select")]
public string[]? Select { get; set; }
#nullable restore
#else
[QueryParameter("%24select")]
public string[] Select { 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.")]
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
public partial class ExchangeRequestBuilderGetRequestConfiguration : RequestConfiguration<global::Microsoft.Graph.Beta.Admin.Exchange.ExchangeRequestBuilder.ExchangeRequestBuilderGetQueryParameters>
{
}
/// <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.")]
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
public partial class ExchangeRequestBuilderPatchRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
}
}
#pragma warning restore CS0618
Loading
Loading