diff --git a/CHANGELOG.md b/CHANGELOG.md index 433fced545b..a6fc1cdb8c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ and this project does adheres to [Semantic Versioning](https://semver.org/spec/v ## [Unreleased] +## [5.9.0] - 2023-05-03 + +- Latest metadata updates from 2nd May 2023 +- Fixes missing printJob paths in metadata (https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/1823) +- Fixes incorrect path for methods in security namespace (https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/1823, https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/1691) +- Fixes incorrect paths for methods in call records namespace (https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/1787) + ## [5.8.0] - 2023-04-27 - Latest metadata updates from 25th April 2023 diff --git a/docs/upgrade-to-v5.md b/docs/upgrade-to-v5.md index b675aa30566..9e80ee5a049 100644 --- a/docs/upgrade-to-v5.md +++ b/docs/upgrade-to-v5.md @@ -244,6 +244,19 @@ var groupDriveId = driveItem.Id; var children = await graphServiceClient.Drives[groupDriveId].Items["itemId"].Children.GetAsync(); ``` +#### Upload a small file with conflictBehavior set + +To upload a small file (remember the size should not exceed 4mb according to the [docs](https://learn.microsoft.com/en-us/graph/api/driveitem-put-content?view=graph-rest-1.0&tabs=http)) and at the same time, set the `conflictBehavior` [instance attribute](https://learn.microsoft.com/en-us/graph/api/resources/driveitem?view=graph-rest-1.0#instance-attributes) you'll need to do it this way: + +```cs +var requestInformation = graphClient.Drives[drive.Id.ToString()].Root.ItemWithPath("MediaMeta.xml").Content.ToPutRequestInformation(file); +requestInformation.URI = new Uri(requestInformation.URI.OriginalString +"?@microsoft.graph.conflictBehavior=rename"); + +var result = await graphClient.RequestAdapter.SendAsync(requestInformation, DriveItem.CreateFromDiscriminatorValue); +``` + +To [upload large files](https://learn.microsoft.com/en-us/graph/sdks/large-file-upload?view=graph-rest-1.0&tabs=csharp#upload-large-file-to-onedrive), the method is slightly different. + ## New Features ### Backing Store diff --git a/src/Microsoft.Graph/Generated/Communications/CallRecords/CallRecordsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/CallRecords/CallRecordsRequestBuilder.cs index 3d28bf9e21f..c0e06c4cb6e 100644 --- a/src/Microsoft.Graph/Generated/Communications/CallRecords/CallRecordsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/CallRecords/CallRecordsRequestBuilder.cs @@ -1,7 +1,7 @@ -using Microsoft.Graph.Communications.CallRecords.CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime; -using Microsoft.Graph.Communications.CallRecords.CallRecordsGetPstnCallsWithFromDateTimeWithToDateTime; using Microsoft.Graph.Communications.CallRecords.Count; using Microsoft.Graph.Communications.CallRecords.Item; +using Microsoft.Graph.Communications.CallRecords.MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime; +using Microsoft.Graph.Communications.CallRecords.MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime; using Microsoft.Graph.Models.CallRecords; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Kiota.Abstractions.Serialization; @@ -28,26 +28,6 @@ public CallRecordItemRequestBuilder this[string position] { get { return new CallRecordItemRequestBuilder(urlTplParams, RequestAdapter); } } /// - /// Provides operations to call the getDirectRoutingCalls method. - /// - /// Usage: fromDateTime={fromDateTime} - /// Usage: toDateTime={toDateTime} - public CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime(DateTimeOffset? fromDateTime, DateTimeOffset? toDateTime) { - _ = fromDateTime ?? throw new ArgumentNullException(nameof(fromDateTime)); - _ = toDateTime ?? throw new ArgumentNullException(nameof(toDateTime)); - return new CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder(PathParameters, RequestAdapter, fromDateTime, toDateTime); - } - /// - /// Provides operations to call the getPstnCalls method. - /// - /// Usage: fromDateTime={fromDateTime} - /// Usage: toDateTime={toDateTime} - public CallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder CallRecordsGetPstnCallsWithFromDateTimeWithToDateTime(DateTimeOffset? fromDateTime, DateTimeOffset? toDateTime) { - _ = fromDateTime ?? throw new ArgumentNullException(nameof(fromDateTime)); - _ = toDateTime ?? throw new ArgumentNullException(nameof(toDateTime)); - return new CallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder(PathParameters, RequestAdapter, fromDateTime, toDateTime); - } - /// /// Instantiates a new CallRecordsRequestBuilder and sets the default values. /// /// Path parameters for the request @@ -81,6 +61,26 @@ public async Task GetAsync(Action(requestInfo, CallRecordCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// + /// Provides operations to call the getDirectRoutingCalls method. + /// + /// Usage: fromDateTime={fromDateTime} + /// Usage: toDateTime={toDateTime} + public MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime(DateTimeOffset? fromDateTime, DateTimeOffset? toDateTime) { + _ = fromDateTime ?? throw new ArgumentNullException(nameof(fromDateTime)); + _ = toDateTime ?? throw new ArgumentNullException(nameof(toDateTime)); + return new MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder(PathParameters, RequestAdapter, fromDateTime, toDateTime); + } + /// + /// Provides operations to call the getPstnCalls method. + /// + /// Usage: fromDateTime={fromDateTime} + /// Usage: toDateTime={toDateTime} + public MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime(DateTimeOffset? fromDateTime, DateTimeOffset? toDateTime) { + _ = fromDateTime ?? throw new ArgumentNullException(nameof(fromDateTime)); + _ = toDateTime ?? throw new ArgumentNullException(nameof(toDateTime)); + return new MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder(PathParameters, RequestAdapter, fromDateTime, toDateTime); + } + /// /// Create new navigation property to callRecords for communications /// /// The request body diff --git a/src/Microsoft.Graph/Generated/Communications/CallRecords/CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime/GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse.cs b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime/GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse.cs similarity index 94% rename from src/Microsoft.Graph/Generated/Communications/CallRecords/CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime/GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse.cs rename to src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime/GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse.cs index 1e465452a19..df47dee5406 100644 --- a/src/Microsoft.Graph/Generated/Communications/CallRecords/CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime/GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime/GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse.cs @@ -5,7 +5,7 @@ using System.IO; using System.Linq; using System; -namespace Microsoft.Graph.Communications.CallRecords.CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime { +namespace Microsoft.Graph.Communications.CallRecords.MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime { public class GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse : BaseCollectionPaginationCountResponse, IParsable { /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Communications/CallRecords/CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime/CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime/MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder.cs similarity index 62% rename from src/Microsoft.Graph/Generated/Communications/CallRecords/CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime/CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime/MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder.cs index ba1e845da97..c92b61f8052 100644 --- a/src/Microsoft.Graph/Generated/Communications/CallRecords/CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime/CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime/MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder.cs @@ -7,28 +7,28 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Communications.CallRecords.CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime { +namespace Microsoft.Graph.Communications.CallRecords.MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime { /// /// Provides operations to call the getDirectRoutingCalls method. /// - public class CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder : BaseRequestBuilder { + public class MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder and sets the default values. /// /// Usage: fromDateTime={fromDateTime} /// Path parameters for the request /// The request adapter to use to execute the requests. /// Usage: toDateTime={toDateTime} - public CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter, DateTimeOffset? fromDateTime = default, DateTimeOffset? toDateTime = default) : base(requestAdapter, "{+baseurl}/communications/callRecords/callRecords.getDirectRoutingCalls(fromDateTime={fromDateTime},toDateTime={toDateTime}){?%24top,%24skip,%24search,%24filter,%24count}", pathParameters) { + public MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter, DateTimeOffset? fromDateTime = default, DateTimeOffset? toDateTime = default) : base(requestAdapter, "{+baseurl}/communications/callRecords/microsoft.graph.callRecords.getDirectRoutingCalls(fromDateTime={fromDateTime},toDateTime={toDateTime}){?%24top,%24skip,%24search,%24filter,%24count}", pathParameters) { if (fromDateTime is not null) PathParameters.Add("fromDateTime", fromDateTime); if (toDateTime is not null) PathParameters.Add("toDateTime", toDateTime); } /// - /// Instantiates a new CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/communications/callRecords/callRecords.getDirectRoutingCalls(fromDateTime={fromDateTime},toDateTime={toDateTime}){?%24top,%24skip,%24search,%24filter,%24count}", rawUrl) { + public MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/communications/callRecords/microsoft.graph.callRecords.getDirectRoutingCalls(fromDateTime={fromDateTime},toDateTime={toDateTime}){?%24top,%24skip,%24search,%24filter,%24count}", rawUrl) { } /// /// Invoke function getDirectRoutingCalls @@ -37,10 +37,10 @@ public CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuil /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif var requestInfo = ToGetRequestInformation(requestConfiguration); var errorMapping = new Dictionary> { @@ -55,10 +55,10 @@ public async Task G /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { #endif var requestInfo = new RequestInformation { HttpMethod = Method.GET, @@ -67,7 +67,7 @@ public RequestInformation ToGetRequestInformation(Action /// Invoke function getDirectRoutingCalls /// - public class CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilderGetQueryParameters { + public class MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilderGetQueryParameters { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -112,17 +112,17 @@ public class CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeReque /// /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilderGetRequestConfiguration { + public class MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilderGetRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// Request query parameters - public CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilderGetQueryParameters(); + public MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilderGetQueryParameters(); /// - /// Instantiates a new callRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilderGetRequestConfiguration and sets the default values. + /// Instantiates a new microsoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilderGetRequestConfiguration and sets the default values. /// - public CallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilderGetRequestConfiguration() { + public MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilderGetRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/Communications/CallRecords/CallRecordsGetPstnCallsWithFromDateTimeWithToDateTime/GetPstnCallsWithFromDateTimeWithToDateTimeResponse.cs b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime/GetPstnCallsWithFromDateTimeWithToDateTimeResponse.cs similarity index 95% rename from src/Microsoft.Graph/Generated/Communications/CallRecords/CallRecordsGetPstnCallsWithFromDateTimeWithToDateTime/GetPstnCallsWithFromDateTimeWithToDateTimeResponse.cs rename to src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime/GetPstnCallsWithFromDateTimeWithToDateTimeResponse.cs index 2afef10fc69..442c6e23b9a 100644 --- a/src/Microsoft.Graph/Generated/Communications/CallRecords/CallRecordsGetPstnCallsWithFromDateTimeWithToDateTime/GetPstnCallsWithFromDateTimeWithToDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime/GetPstnCallsWithFromDateTimeWithToDateTimeResponse.cs @@ -5,7 +5,7 @@ using System.IO; using System.Linq; using System; -namespace Microsoft.Graph.Communications.CallRecords.CallRecordsGetPstnCallsWithFromDateTimeWithToDateTime { +namespace Microsoft.Graph.Communications.CallRecords.MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime { public class GetPstnCallsWithFromDateTimeWithToDateTimeResponse : BaseCollectionPaginationCountResponse, IParsable { /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Communications/CallRecords/CallRecordsGetPstnCallsWithFromDateTimeWithToDateTime/CallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime/MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder.cs similarity index 63% rename from src/Microsoft.Graph/Generated/Communications/CallRecords/CallRecordsGetPstnCallsWithFromDateTimeWithToDateTime/CallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime/MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder.cs index d8f6ee0b985..bad5723b5d2 100644 --- a/src/Microsoft.Graph/Generated/Communications/CallRecords/CallRecordsGetPstnCallsWithFromDateTimeWithToDateTime/CallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime/MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder.cs @@ -7,28 +7,28 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Communications.CallRecords.CallRecordsGetPstnCallsWithFromDateTimeWithToDateTime { +namespace Microsoft.Graph.Communications.CallRecords.MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime { /// /// Provides operations to call the getPstnCalls method. /// - public class CallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder : BaseRequestBuilder { + public class MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new CallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder and sets the default values. /// /// Usage: fromDateTime={fromDateTime} /// Path parameters for the request /// The request adapter to use to execute the requests. /// Usage: toDateTime={toDateTime} - public CallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter, DateTimeOffset? fromDateTime = default, DateTimeOffset? toDateTime = default) : base(requestAdapter, "{+baseurl}/communications/callRecords/callRecords.getPstnCalls(fromDateTime={fromDateTime},toDateTime={toDateTime}){?%24top,%24skip,%24search,%24filter,%24count}", pathParameters) { + public MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter, DateTimeOffset? fromDateTime = default, DateTimeOffset? toDateTime = default) : base(requestAdapter, "{+baseurl}/communications/callRecords/microsoft.graph.callRecords.getPstnCalls(fromDateTime={fromDateTime},toDateTime={toDateTime}){?%24top,%24skip,%24search,%24filter,%24count}", pathParameters) { if (fromDateTime is not null) PathParameters.Add("fromDateTime", fromDateTime); if (toDateTime is not null) PathParameters.Add("toDateTime", toDateTime); } /// - /// Instantiates a new CallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public CallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/communications/callRecords/callRecords.getPstnCalls(fromDateTime={fromDateTime},toDateTime={toDateTime}){?%24top,%24skip,%24search,%24filter,%24count}", rawUrl) { + public MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/communications/callRecords/microsoft.graph.callRecords.getPstnCalls(fromDateTime={fromDateTime},toDateTime={toDateTime}){?%24top,%24skip,%24search,%24filter,%24count}", rawUrl) { } /// /// Invoke function getPstnCalls @@ -37,10 +37,10 @@ public CallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder(strin /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif var requestInfo = ToGetRequestInformation(requestConfiguration); var errorMapping = new Dictionary> { @@ -55,10 +55,10 @@ public async Task GetAsync(A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { #endif var requestInfo = new RequestInformation { HttpMethod = Method.GET, @@ -67,7 +67,7 @@ public RequestInformation ToGetRequestInformation(Action /// Invoke function getPstnCalls /// - public class CallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilderGetQueryParameters { + public class MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilderGetQueryParameters { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -112,17 +112,17 @@ public class CallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder /// /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class CallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilderGetRequestConfiguration { + public class MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilderGetRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// Request query parameters - public CallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilderGetQueryParameters(); + public MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilderGetQueryParameters(); /// - /// Instantiates a new callRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilderGetRequestConfiguration and sets the default values. + /// Instantiates a new microsoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilderGetRequestConfiguration and sets the default values. /// - public CallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilderGetRequestConfiguration() { + public MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilderGetRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/AndroidManagedAppProtectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/AndroidManagedAppProtectionItemRequestBuilder.cs index c65784f19cf..e27ee5b0a2f 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/AndroidManagedAppProtectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/AndroidManagedAppProtectionItemRequestBuilder.cs @@ -1,4 +1,5 @@ using Microsoft.Graph.DeviceAppManagement.AndroidManagedAppProtections.Item.Apps; +using Microsoft.Graph.DeviceAppManagement.AndroidManagedAppProtections.Item.Assignments; using Microsoft.Graph.DeviceAppManagement.AndroidManagedAppProtections.Item.DeploymentSummary; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; @@ -19,6 +20,10 @@ public class AndroidManagedAppProtectionItemRequestBuilder : BaseRequestBuilder public AppsRequestBuilder Apps { get => new AppsRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the assignments property of the microsoft.graph.targetedManagedAppProtection entity. + public AssignmentsRequestBuilder Assignments { get => + new AssignmentsRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the deploymentSummary property of the microsoft.graph.androidManagedAppProtection entity. public DeploymentSummaryRequestBuilder DeploymentSummary { get => new DeploymentSummaryRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Assignments/AssignmentsRequestBuilder.cs new file mode 100644 index 00000000000..ac158eff13d --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Assignments/AssignmentsRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceAppManagement.AndroidManagedAppProtections.Item.Assignments.Count; +using Microsoft.Graph.DeviceAppManagement.AndroidManagedAppProtections.Item.Assignments.Item; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.DeviceAppManagement.AndroidManagedAppProtections.Item.Assignments { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.targetedManagedAppProtection entity. + /// + public class AssignmentsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the assignments property of the microsoft.graph.targetedManagedAppProtection entity. + public TargetedManagedAppPolicyAssignmentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("targetedManagedAppPolicyAssignment%2Did", position); + return new TargetedManagedAppPolicyAssignmentItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new AssignmentsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AssignmentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections/{androidManagedAppProtection%2Did}/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AssignmentsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections/{androidManagedAppProtection%2Did}/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Navigation property to list of inclusion and exclusion groups to which the policy is deployed. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, TargetedManagedAppPolicyAssignmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to assignments for deviceAppManagement + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(TargetedManagedAppPolicyAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(TargetedManagedAppPolicyAssignment body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, TargetedManagedAppPolicyAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Navigation property to list of inclusion and exclusion groups to which the policy is deployed. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new AssignmentsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to assignments for deviceAppManagement + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(TargetedManagedAppPolicyAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(TargetedManagedAppPolicyAssignment body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new AssignmentsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Navigation property to list of inclusion and exclusion groups to which the policy is deployed. + /// + public class AssignmentsRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AssignmentsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AssignmentsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AssignmentsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new assignmentsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AssignmentsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AssignmentsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new assignmentsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public AssignmentsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Assignments/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Assignments/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..30c35a4b648 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Assignments/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +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.DeviceAppManagement.AndroidManagedAppProtections.Item.Assignments.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections/{androidManagedAppProtection%2Did}/assignments/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections/{androidManagedAppProtection%2Did}/assignments/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs new file mode 100644 index 00000000000..0514a1936ba --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.DeviceAppManagement.AndroidManagedAppProtections.Item.Assignments.Item { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.targetedManagedAppProtection entity. + /// + public class TargetedManagedAppPolicyAssignmentItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new TargetedManagedAppPolicyAssignmentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TargetedManagedAppPolicyAssignmentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections/{androidManagedAppProtection%2Did}/assignments/{targetedManagedAppPolicyAssignment%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TargetedManagedAppPolicyAssignmentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TargetedManagedAppPolicyAssignmentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections/{androidManagedAppProtection%2Did}/assignments/{targetedManagedAppPolicyAssignment%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property assignments for deviceAppManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Navigation property to list of inclusion and exclusion groups to which the policy is deployed. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, TargetedManagedAppPolicyAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property assignments in deviceAppManagement + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(TargetedManagedAppPolicyAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(TargetedManagedAppPolicyAssignment body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, TargetedManagedAppPolicyAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property assignments for deviceAppManagement + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new TargetedManagedAppPolicyAssignmentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Navigation property to list of inclusion and exclusion groups to which the policy is deployed. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TargetedManagedAppPolicyAssignmentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property assignments in deviceAppManagement + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(TargetedManagedAppPolicyAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(TargetedManagedAppPolicyAssignment body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new TargetedManagedAppPolicyAssignmentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TargetedManagedAppPolicyAssignmentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new TargetedManagedAppPolicyAssignmentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public TargetedManagedAppPolicyAssignmentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Navigation property to list of inclusion and exclusion groups to which the policy is deployed. + /// + public class TargetedManagedAppPolicyAssignmentItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TargetedManagedAppPolicyAssignmentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TargetedManagedAppPolicyAssignmentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TargetedManagedAppPolicyAssignmentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new TargetedManagedAppPolicyAssignmentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TargetedManagedAppPolicyAssignmentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TargetedManagedAppPolicyAssignmentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new TargetedManagedAppPolicyAssignmentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public TargetedManagedAppPolicyAssignmentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Assignments/AssignmentsRequestBuilder.cs new file mode 100644 index 00000000000..535d44fd019 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Assignments/AssignmentsRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceAppManagement.IosManagedAppProtections.Item.Assignments.Count; +using Microsoft.Graph.DeviceAppManagement.IosManagedAppProtections.Item.Assignments.Item; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.DeviceAppManagement.IosManagedAppProtections.Item.Assignments { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.targetedManagedAppProtection entity. + /// + public class AssignmentsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the assignments property of the microsoft.graph.targetedManagedAppProtection entity. + public TargetedManagedAppPolicyAssignmentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("targetedManagedAppPolicyAssignment%2Did", position); + return new TargetedManagedAppPolicyAssignmentItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new AssignmentsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AssignmentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections/{iosManagedAppProtection%2Did}/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AssignmentsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections/{iosManagedAppProtection%2Did}/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Navigation property to list of inclusion and exclusion groups to which the policy is deployed. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, TargetedManagedAppPolicyAssignmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to assignments for deviceAppManagement + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(TargetedManagedAppPolicyAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(TargetedManagedAppPolicyAssignment body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, TargetedManagedAppPolicyAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Navigation property to list of inclusion and exclusion groups to which the policy is deployed. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new AssignmentsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to assignments for deviceAppManagement + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(TargetedManagedAppPolicyAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(TargetedManagedAppPolicyAssignment body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new AssignmentsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Navigation property to list of inclusion and exclusion groups to which the policy is deployed. + /// + public class AssignmentsRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AssignmentsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AssignmentsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AssignmentsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new assignmentsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AssignmentsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AssignmentsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new assignmentsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public AssignmentsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Assignments/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Assignments/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..de56414569f --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Assignments/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +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.DeviceAppManagement.IosManagedAppProtections.Item.Assignments.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections/{iosManagedAppProtection%2Did}/assignments/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections/{iosManagedAppProtection%2Did}/assignments/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs new file mode 100644 index 00000000000..2bd1fa4fd32 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.DeviceAppManagement.IosManagedAppProtections.Item.Assignments.Item { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.targetedManagedAppProtection entity. + /// + public class TargetedManagedAppPolicyAssignmentItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new TargetedManagedAppPolicyAssignmentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TargetedManagedAppPolicyAssignmentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections/{iosManagedAppProtection%2Did}/assignments/{targetedManagedAppPolicyAssignment%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TargetedManagedAppPolicyAssignmentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TargetedManagedAppPolicyAssignmentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections/{iosManagedAppProtection%2Did}/assignments/{targetedManagedAppPolicyAssignment%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property assignments for deviceAppManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Navigation property to list of inclusion and exclusion groups to which the policy is deployed. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, TargetedManagedAppPolicyAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property assignments in deviceAppManagement + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(TargetedManagedAppPolicyAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(TargetedManagedAppPolicyAssignment body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, TargetedManagedAppPolicyAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property assignments for deviceAppManagement + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new TargetedManagedAppPolicyAssignmentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Navigation property to list of inclusion and exclusion groups to which the policy is deployed. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TargetedManagedAppPolicyAssignmentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property assignments in deviceAppManagement + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(TargetedManagedAppPolicyAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(TargetedManagedAppPolicyAssignment body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new TargetedManagedAppPolicyAssignmentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TargetedManagedAppPolicyAssignmentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new TargetedManagedAppPolicyAssignmentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public TargetedManagedAppPolicyAssignmentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Navigation property to list of inclusion and exclusion groups to which the policy is deployed. + /// + public class TargetedManagedAppPolicyAssignmentItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TargetedManagedAppPolicyAssignmentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TargetedManagedAppPolicyAssignmentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TargetedManagedAppPolicyAssignmentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new TargetedManagedAppPolicyAssignmentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TargetedManagedAppPolicyAssignmentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TargetedManagedAppPolicyAssignmentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new TargetedManagedAppPolicyAssignmentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public TargetedManagedAppPolicyAssignmentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/IosManagedAppProtectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/IosManagedAppProtectionItemRequestBuilder.cs index b53e7c80e52..de803c0733e 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/IosManagedAppProtectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/IosManagedAppProtectionItemRequestBuilder.cs @@ -1,4 +1,5 @@ using Microsoft.Graph.DeviceAppManagement.IosManagedAppProtections.Item.Apps; +using Microsoft.Graph.DeviceAppManagement.IosManagedAppProtections.Item.Assignments; using Microsoft.Graph.DeviceAppManagement.IosManagedAppProtections.Item.DeploymentSummary; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; @@ -19,6 +20,10 @@ public class IosManagedAppProtectionItemRequestBuilder : BaseRequestBuilder { public AppsRequestBuilder Apps { get => new AppsRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the assignments property of the microsoft.graph.targetedManagedAppProtection entity. + public AssignmentsRequestBuilder Assignments { get => + new AssignmentsRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the deploymentSummary property of the microsoft.graph.iosManagedAppProtection entity. public DeploymentSummaryRequestBuilder DeploymentSummary { get => new DeploymentSummaryRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/Assignments/AssignmentsRequestBuilder.cs new file mode 100644 index 00000000000..add238ff4ed --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/Assignments/AssignmentsRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.Item.Assignments.Count; +using Microsoft.Graph.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.Item.Assignments.Item; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.Item.Assignments { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.windowsInformationProtection entity. + /// + public class AssignmentsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the assignments property of the microsoft.graph.windowsInformationProtection entity. + public TargetedManagedAppPolicyAssignmentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("targetedManagedAppPolicyAssignment%2Did", position); + return new TargetedManagedAppPolicyAssignmentItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new AssignmentsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AssignmentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AssignmentsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Navigation property to list of security groups targeted for policy. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, TargetedManagedAppPolicyAssignmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to assignments for deviceAppManagement + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(TargetedManagedAppPolicyAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(TargetedManagedAppPolicyAssignment body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, TargetedManagedAppPolicyAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Navigation property to list of security groups targeted for policy. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new AssignmentsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to assignments for deviceAppManagement + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(TargetedManagedAppPolicyAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(TargetedManagedAppPolicyAssignment body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new AssignmentsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Navigation property to list of security groups targeted for policy. + /// + public class AssignmentsRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AssignmentsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AssignmentsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AssignmentsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new assignmentsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AssignmentsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AssignmentsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new assignmentsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public AssignmentsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/Assignments/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/Assignments/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..5e5dea3af35 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/Assignments/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +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.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.Item.Assignments.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/assignments/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/assignments/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs new file mode 100644 index 00000000000..6fa1be387eb --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.Item.Assignments.Item { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.windowsInformationProtection entity. + /// + public class TargetedManagedAppPolicyAssignmentItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new TargetedManagedAppPolicyAssignmentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TargetedManagedAppPolicyAssignmentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/assignments/{targetedManagedAppPolicyAssignment%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TargetedManagedAppPolicyAssignmentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TargetedManagedAppPolicyAssignmentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/assignments/{targetedManagedAppPolicyAssignment%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property assignments for deviceAppManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Navigation property to list of security groups targeted for policy. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, TargetedManagedAppPolicyAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property assignments in deviceAppManagement + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(TargetedManagedAppPolicyAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(TargetedManagedAppPolicyAssignment body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, TargetedManagedAppPolicyAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property assignments for deviceAppManagement + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new TargetedManagedAppPolicyAssignmentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Navigation property to list of security groups targeted for policy. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TargetedManagedAppPolicyAssignmentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property assignments in deviceAppManagement + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(TargetedManagedAppPolicyAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(TargetedManagedAppPolicyAssignment body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new TargetedManagedAppPolicyAssignmentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TargetedManagedAppPolicyAssignmentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new TargetedManagedAppPolicyAssignmentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public TargetedManagedAppPolicyAssignmentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Navigation property to list of security groups targeted for policy. + /// + public class TargetedManagedAppPolicyAssignmentItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TargetedManagedAppPolicyAssignmentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TargetedManagedAppPolicyAssignmentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TargetedManagedAppPolicyAssignmentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new TargetedManagedAppPolicyAssignmentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TargetedManagedAppPolicyAssignmentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TargetedManagedAppPolicyAssignmentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new TargetedManagedAppPolicyAssignmentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public TargetedManagedAppPolicyAssignmentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..3e3f54d7e38 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +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.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.Item.ExemptAppLockerFiles.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/exemptAppLockerFiles/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/exemptAppLockerFiles/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/ExemptAppLockerFilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/ExemptAppLockerFilesRequestBuilder.cs new file mode 100644 index 00000000000..ecf3fa5d8a8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/ExemptAppLockerFilesRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.Item.ExemptAppLockerFiles.Count; +using Microsoft.Graph.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.Item.ExemptAppLockerFiles.Item; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.Item.ExemptAppLockerFiles { + /// + /// Provides operations to manage the exemptAppLockerFiles property of the microsoft.graph.windowsInformationProtection entity. + /// + public class ExemptAppLockerFilesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the exemptAppLockerFiles property of the microsoft.graph.windowsInformationProtection entity. + public WindowsInformationProtectionAppLockerFileItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("windowsInformationProtectionAppLockerFile%2Did", position); + return new WindowsInformationProtectionAppLockerFileItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ExemptAppLockerFilesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ExemptAppLockerFilesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/exemptAppLockerFiles{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ExemptAppLockerFilesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ExemptAppLockerFilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/exemptAppLockerFiles{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Another way to input exempt apps through xml files + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, WindowsInformationProtectionAppLockerFileCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to exemptAppLockerFiles for deviceAppManagement + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(WindowsInformationProtectionAppLockerFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(WindowsInformationProtectionAppLockerFile body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, WindowsInformationProtectionAppLockerFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Another way to input exempt apps through xml files + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new ExemptAppLockerFilesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to exemptAppLockerFiles for deviceAppManagement + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(WindowsInformationProtectionAppLockerFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(WindowsInformationProtectionAppLockerFile body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new ExemptAppLockerFilesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Another way to input exempt apps through xml files + /// + public class ExemptAppLockerFilesRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ExemptAppLockerFilesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ExemptAppLockerFilesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ExemptAppLockerFilesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new exemptAppLockerFilesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ExemptAppLockerFilesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ExemptAppLockerFilesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new exemptAppLockerFilesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ExemptAppLockerFilesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs new file mode 100644 index 00000000000..4c437d6b2fb --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.Item.ExemptAppLockerFiles.Item { + /// + /// Provides operations to manage the exemptAppLockerFiles property of the microsoft.graph.windowsInformationProtection entity. + /// + public class WindowsInformationProtectionAppLockerFileItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new WindowsInformationProtectionAppLockerFileItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WindowsInformationProtectionAppLockerFileItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/exemptAppLockerFiles/{windowsInformationProtectionAppLockerFile%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new WindowsInformationProtectionAppLockerFileItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WindowsInformationProtectionAppLockerFileItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/exemptAppLockerFiles/{windowsInformationProtectionAppLockerFile%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property exemptAppLockerFiles for deviceAppManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Another way to input exempt apps through xml files + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, WindowsInformationProtectionAppLockerFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property exemptAppLockerFiles in deviceAppManagement + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(WindowsInformationProtectionAppLockerFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(WindowsInformationProtectionAppLockerFile body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, WindowsInformationProtectionAppLockerFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property exemptAppLockerFiles for deviceAppManagement + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new WindowsInformationProtectionAppLockerFileItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Another way to input exempt apps through xml files + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new WindowsInformationProtectionAppLockerFileItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property exemptAppLockerFiles in deviceAppManagement + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(WindowsInformationProtectionAppLockerFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(WindowsInformationProtectionAppLockerFile body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new WindowsInformationProtectionAppLockerFileItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsInformationProtectionAppLockerFileItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new WindowsInformationProtectionAppLockerFileItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public WindowsInformationProtectionAppLockerFileItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Another way to input exempt apps through xml files + /// + public class WindowsInformationProtectionAppLockerFileItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsInformationProtectionAppLockerFileItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public WindowsInformationProtectionAppLockerFileItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new WindowsInformationProtectionAppLockerFileItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new WindowsInformationProtectionAppLockerFileItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public WindowsInformationProtectionAppLockerFileItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsInformationProtectionAppLockerFileItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new WindowsInformationProtectionAppLockerFileItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public WindowsInformationProtectionAppLockerFileItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/MdmWindowsInformationProtectionPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/MdmWindowsInformationProtectionPolicyItemRequestBuilder.cs index be497a675bc..4728d7569c6 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/MdmWindowsInformationProtectionPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/MdmWindowsInformationProtectionPolicyItemRequestBuilder.cs @@ -1,3 +1,6 @@ +using Microsoft.Graph.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.Item.Assignments; +using Microsoft.Graph.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.Item.ExemptAppLockerFiles; +using Microsoft.Graph.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.Item.ProtectedAppLockerFiles; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,6 +16,18 @@ namespace Microsoft.Graph.DeviceAppManagement.MdmWindowsInformationProtectionPol /// Provides operations to manage the mdmWindowsInformationProtectionPolicies property of the microsoft.graph.deviceAppManagement entity. /// public class MdmWindowsInformationProtectionPolicyItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the assignments property of the microsoft.graph.windowsInformationProtection entity. + public AssignmentsRequestBuilder Assignments { get => + new AssignmentsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the exemptAppLockerFiles property of the microsoft.graph.windowsInformationProtection entity. + public ExemptAppLockerFilesRequestBuilder ExemptAppLockerFiles { get => + new ExemptAppLockerFilesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the protectedAppLockerFiles property of the microsoft.graph.windowsInformationProtection entity. + public ProtectedAppLockerFilesRequestBuilder ProtectedAppLockerFiles { get => + new ProtectedAppLockerFilesRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new MdmWindowsInformationProtectionPolicyItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..344696c5651 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +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.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.Item.ProtectedAppLockerFiles.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/protectedAppLockerFiles/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/protectedAppLockerFiles/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs new file mode 100644 index 00000000000..49c3d1645fd --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.Item.ProtectedAppLockerFiles.Item { + /// + /// Provides operations to manage the protectedAppLockerFiles property of the microsoft.graph.windowsInformationProtection entity. + /// + public class WindowsInformationProtectionAppLockerFileItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new WindowsInformationProtectionAppLockerFileItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WindowsInformationProtectionAppLockerFileItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/protectedAppLockerFiles/{windowsInformationProtectionAppLockerFile%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new WindowsInformationProtectionAppLockerFileItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WindowsInformationProtectionAppLockerFileItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/protectedAppLockerFiles/{windowsInformationProtectionAppLockerFile%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property protectedAppLockerFiles for deviceAppManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Another way to input protected apps through xml files + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, WindowsInformationProtectionAppLockerFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property protectedAppLockerFiles in deviceAppManagement + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(WindowsInformationProtectionAppLockerFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(WindowsInformationProtectionAppLockerFile body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, WindowsInformationProtectionAppLockerFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property protectedAppLockerFiles for deviceAppManagement + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new WindowsInformationProtectionAppLockerFileItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Another way to input protected apps through xml files + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new WindowsInformationProtectionAppLockerFileItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property protectedAppLockerFiles in deviceAppManagement + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(WindowsInformationProtectionAppLockerFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(WindowsInformationProtectionAppLockerFile body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new WindowsInformationProtectionAppLockerFileItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsInformationProtectionAppLockerFileItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new WindowsInformationProtectionAppLockerFileItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public WindowsInformationProtectionAppLockerFileItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Another way to input protected apps through xml files + /// + public class WindowsInformationProtectionAppLockerFileItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsInformationProtectionAppLockerFileItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public WindowsInformationProtectionAppLockerFileItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new WindowsInformationProtectionAppLockerFileItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new WindowsInformationProtectionAppLockerFileItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public WindowsInformationProtectionAppLockerFileItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsInformationProtectionAppLockerFileItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new WindowsInformationProtectionAppLockerFileItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public WindowsInformationProtectionAppLockerFileItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/ProtectedAppLockerFilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/ProtectedAppLockerFilesRequestBuilder.cs new file mode 100644 index 00000000000..5187c4b9f7f --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/ProtectedAppLockerFilesRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.Item.ProtectedAppLockerFiles.Count; +using Microsoft.Graph.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.Item.ProtectedAppLockerFiles.Item; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.Item.ProtectedAppLockerFiles { + /// + /// Provides operations to manage the protectedAppLockerFiles property of the microsoft.graph.windowsInformationProtection entity. + /// + public class ProtectedAppLockerFilesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the protectedAppLockerFiles property of the microsoft.graph.windowsInformationProtection entity. + public WindowsInformationProtectionAppLockerFileItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("windowsInformationProtectionAppLockerFile%2Did", position); + return new WindowsInformationProtectionAppLockerFileItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ProtectedAppLockerFilesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProtectedAppLockerFilesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/protectedAppLockerFiles{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ProtectedAppLockerFilesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProtectedAppLockerFilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/protectedAppLockerFiles{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Another way to input protected apps through xml files + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, WindowsInformationProtectionAppLockerFileCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to protectedAppLockerFiles for deviceAppManagement + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(WindowsInformationProtectionAppLockerFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(WindowsInformationProtectionAppLockerFile body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, WindowsInformationProtectionAppLockerFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Another way to input protected apps through xml files + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new ProtectedAppLockerFilesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to protectedAppLockerFiles for deviceAppManagement + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(WindowsInformationProtectionAppLockerFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(WindowsInformationProtectionAppLockerFile body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new ProtectedAppLockerFilesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Another way to input protected apps through xml files + /// + public class ProtectedAppLockerFilesRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ProtectedAppLockerFilesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ProtectedAppLockerFilesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ProtectedAppLockerFilesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new protectedAppLockerFilesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ProtectedAppLockerFilesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ProtectedAppLockerFilesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new protectedAppLockerFilesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ProtectedAppLockerFilesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/Assignments/AssignmentsRequestBuilder.cs new file mode 100644 index 00000000000..f363868a976 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/Assignments/AssignmentsRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceAppManagement.WindowsInformationProtectionPolicies.Item.Assignments.Count; +using Microsoft.Graph.DeviceAppManagement.WindowsInformationProtectionPolicies.Item.Assignments.Item; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.DeviceAppManagement.WindowsInformationProtectionPolicies.Item.Assignments { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.windowsInformationProtection entity. + /// + public class AssignmentsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the assignments property of the microsoft.graph.windowsInformationProtection entity. + public TargetedManagedAppPolicyAssignmentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("targetedManagedAppPolicyAssignment%2Did", position); + return new TargetedManagedAppPolicyAssignmentItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new AssignmentsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AssignmentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AssignmentsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Navigation property to list of security groups targeted for policy. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, TargetedManagedAppPolicyAssignmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to assignments for deviceAppManagement + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(TargetedManagedAppPolicyAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(TargetedManagedAppPolicyAssignment body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, TargetedManagedAppPolicyAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Navigation property to list of security groups targeted for policy. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new AssignmentsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to assignments for deviceAppManagement + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(TargetedManagedAppPolicyAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(TargetedManagedAppPolicyAssignment body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new AssignmentsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Navigation property to list of security groups targeted for policy. + /// + public class AssignmentsRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AssignmentsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AssignmentsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AssignmentsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new assignmentsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AssignmentsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AssignmentsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new assignmentsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public AssignmentsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/Assignments/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/Assignments/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..694cd361064 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/Assignments/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +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.DeviceAppManagement.WindowsInformationProtectionPolicies.Item.Assignments.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/assignments/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/assignments/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs new file mode 100644 index 00000000000..c8e8bbeae09 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.DeviceAppManagement.WindowsInformationProtectionPolicies.Item.Assignments.Item { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.windowsInformationProtection entity. + /// + public class TargetedManagedAppPolicyAssignmentItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new TargetedManagedAppPolicyAssignmentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TargetedManagedAppPolicyAssignmentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/assignments/{targetedManagedAppPolicyAssignment%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TargetedManagedAppPolicyAssignmentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TargetedManagedAppPolicyAssignmentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/assignments/{targetedManagedAppPolicyAssignment%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property assignments for deviceAppManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Navigation property to list of security groups targeted for policy. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, TargetedManagedAppPolicyAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property assignments in deviceAppManagement + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(TargetedManagedAppPolicyAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(TargetedManagedAppPolicyAssignment body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, TargetedManagedAppPolicyAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property assignments for deviceAppManagement + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new TargetedManagedAppPolicyAssignmentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Navigation property to list of security groups targeted for policy. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TargetedManagedAppPolicyAssignmentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property assignments in deviceAppManagement + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(TargetedManagedAppPolicyAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(TargetedManagedAppPolicyAssignment body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new TargetedManagedAppPolicyAssignmentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TargetedManagedAppPolicyAssignmentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new TargetedManagedAppPolicyAssignmentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public TargetedManagedAppPolicyAssignmentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Navigation property to list of security groups targeted for policy. + /// + public class TargetedManagedAppPolicyAssignmentItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TargetedManagedAppPolicyAssignmentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TargetedManagedAppPolicyAssignmentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TargetedManagedAppPolicyAssignmentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new TargetedManagedAppPolicyAssignmentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TargetedManagedAppPolicyAssignmentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TargetedManagedAppPolicyAssignmentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new TargetedManagedAppPolicyAssignmentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public TargetedManagedAppPolicyAssignmentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..e5ee5b8d8b7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +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.DeviceAppManagement.WindowsInformationProtectionPolicies.Item.ExemptAppLockerFiles.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/exemptAppLockerFiles/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/exemptAppLockerFiles/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/ExemptAppLockerFilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/ExemptAppLockerFilesRequestBuilder.cs new file mode 100644 index 00000000000..96682a75c29 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/ExemptAppLockerFilesRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceAppManagement.WindowsInformationProtectionPolicies.Item.ExemptAppLockerFiles.Count; +using Microsoft.Graph.DeviceAppManagement.WindowsInformationProtectionPolicies.Item.ExemptAppLockerFiles.Item; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.DeviceAppManagement.WindowsInformationProtectionPolicies.Item.ExemptAppLockerFiles { + /// + /// Provides operations to manage the exemptAppLockerFiles property of the microsoft.graph.windowsInformationProtection entity. + /// + public class ExemptAppLockerFilesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the exemptAppLockerFiles property of the microsoft.graph.windowsInformationProtection entity. + public WindowsInformationProtectionAppLockerFileItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("windowsInformationProtectionAppLockerFile%2Did", position); + return new WindowsInformationProtectionAppLockerFileItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ExemptAppLockerFilesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ExemptAppLockerFilesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/exemptAppLockerFiles{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ExemptAppLockerFilesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ExemptAppLockerFilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/exemptAppLockerFiles{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Another way to input exempt apps through xml files + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, WindowsInformationProtectionAppLockerFileCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to exemptAppLockerFiles for deviceAppManagement + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(WindowsInformationProtectionAppLockerFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(WindowsInformationProtectionAppLockerFile body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, WindowsInformationProtectionAppLockerFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Another way to input exempt apps through xml files + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new ExemptAppLockerFilesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to exemptAppLockerFiles for deviceAppManagement + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(WindowsInformationProtectionAppLockerFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(WindowsInformationProtectionAppLockerFile body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new ExemptAppLockerFilesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Another way to input exempt apps through xml files + /// + public class ExemptAppLockerFilesRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ExemptAppLockerFilesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ExemptAppLockerFilesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ExemptAppLockerFilesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new exemptAppLockerFilesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ExemptAppLockerFilesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ExemptAppLockerFilesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new exemptAppLockerFilesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ExemptAppLockerFilesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs new file mode 100644 index 00000000000..890c4decbb5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.DeviceAppManagement.WindowsInformationProtectionPolicies.Item.ExemptAppLockerFiles.Item { + /// + /// Provides operations to manage the exemptAppLockerFiles property of the microsoft.graph.windowsInformationProtection entity. + /// + public class WindowsInformationProtectionAppLockerFileItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new WindowsInformationProtectionAppLockerFileItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WindowsInformationProtectionAppLockerFileItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/exemptAppLockerFiles/{windowsInformationProtectionAppLockerFile%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new WindowsInformationProtectionAppLockerFileItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WindowsInformationProtectionAppLockerFileItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/exemptAppLockerFiles/{windowsInformationProtectionAppLockerFile%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property exemptAppLockerFiles for deviceAppManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Another way to input exempt apps through xml files + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, WindowsInformationProtectionAppLockerFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property exemptAppLockerFiles in deviceAppManagement + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(WindowsInformationProtectionAppLockerFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(WindowsInformationProtectionAppLockerFile body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, WindowsInformationProtectionAppLockerFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property exemptAppLockerFiles for deviceAppManagement + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new WindowsInformationProtectionAppLockerFileItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Another way to input exempt apps through xml files + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new WindowsInformationProtectionAppLockerFileItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property exemptAppLockerFiles in deviceAppManagement + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(WindowsInformationProtectionAppLockerFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(WindowsInformationProtectionAppLockerFile body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new WindowsInformationProtectionAppLockerFileItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsInformationProtectionAppLockerFileItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new WindowsInformationProtectionAppLockerFileItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public WindowsInformationProtectionAppLockerFileItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Another way to input exempt apps through xml files + /// + public class WindowsInformationProtectionAppLockerFileItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsInformationProtectionAppLockerFileItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public WindowsInformationProtectionAppLockerFileItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new WindowsInformationProtectionAppLockerFileItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new WindowsInformationProtectionAppLockerFileItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public WindowsInformationProtectionAppLockerFileItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsInformationProtectionAppLockerFileItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new WindowsInformationProtectionAppLockerFileItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public WindowsInformationProtectionAppLockerFileItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..56f36736f9d --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +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.DeviceAppManagement.WindowsInformationProtectionPolicies.Item.ProtectedAppLockerFiles.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/protectedAppLockerFiles/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/protectedAppLockerFiles/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs new file mode 100644 index 00000000000..f779cd713fa --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.DeviceAppManagement.WindowsInformationProtectionPolicies.Item.ProtectedAppLockerFiles.Item { + /// + /// Provides operations to manage the protectedAppLockerFiles property of the microsoft.graph.windowsInformationProtection entity. + /// + public class WindowsInformationProtectionAppLockerFileItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new WindowsInformationProtectionAppLockerFileItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WindowsInformationProtectionAppLockerFileItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/protectedAppLockerFiles/{windowsInformationProtectionAppLockerFile%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new WindowsInformationProtectionAppLockerFileItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WindowsInformationProtectionAppLockerFileItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/protectedAppLockerFiles/{windowsInformationProtectionAppLockerFile%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property protectedAppLockerFiles for deviceAppManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Another way to input protected apps through xml files + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, WindowsInformationProtectionAppLockerFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property protectedAppLockerFiles in deviceAppManagement + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(WindowsInformationProtectionAppLockerFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(WindowsInformationProtectionAppLockerFile body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, WindowsInformationProtectionAppLockerFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property protectedAppLockerFiles for deviceAppManagement + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new WindowsInformationProtectionAppLockerFileItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Another way to input protected apps through xml files + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new WindowsInformationProtectionAppLockerFileItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property protectedAppLockerFiles in deviceAppManagement + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(WindowsInformationProtectionAppLockerFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(WindowsInformationProtectionAppLockerFile body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new WindowsInformationProtectionAppLockerFileItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsInformationProtectionAppLockerFileItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new WindowsInformationProtectionAppLockerFileItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public WindowsInformationProtectionAppLockerFileItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Another way to input protected apps through xml files + /// + public class WindowsInformationProtectionAppLockerFileItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsInformationProtectionAppLockerFileItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public WindowsInformationProtectionAppLockerFileItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new WindowsInformationProtectionAppLockerFileItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new WindowsInformationProtectionAppLockerFileItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public WindowsInformationProtectionAppLockerFileItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsInformationProtectionAppLockerFileItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new WindowsInformationProtectionAppLockerFileItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public WindowsInformationProtectionAppLockerFileItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/ProtectedAppLockerFilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/ProtectedAppLockerFilesRequestBuilder.cs new file mode 100644 index 00000000000..07e181d5965 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/ProtectedAppLockerFilesRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceAppManagement.WindowsInformationProtectionPolicies.Item.ProtectedAppLockerFiles.Count; +using Microsoft.Graph.DeviceAppManagement.WindowsInformationProtectionPolicies.Item.ProtectedAppLockerFiles.Item; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.DeviceAppManagement.WindowsInformationProtectionPolicies.Item.ProtectedAppLockerFiles { + /// + /// Provides operations to manage the protectedAppLockerFiles property of the microsoft.graph.windowsInformationProtection entity. + /// + public class ProtectedAppLockerFilesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the protectedAppLockerFiles property of the microsoft.graph.windowsInformationProtection entity. + public WindowsInformationProtectionAppLockerFileItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("windowsInformationProtectionAppLockerFile%2Did", position); + return new WindowsInformationProtectionAppLockerFileItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ProtectedAppLockerFilesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProtectedAppLockerFilesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/protectedAppLockerFiles{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ProtectedAppLockerFilesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProtectedAppLockerFilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/protectedAppLockerFiles{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Another way to input protected apps through xml files + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, WindowsInformationProtectionAppLockerFileCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to protectedAppLockerFiles for deviceAppManagement + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(WindowsInformationProtectionAppLockerFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(WindowsInformationProtectionAppLockerFile body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, WindowsInformationProtectionAppLockerFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Another way to input protected apps through xml files + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new ProtectedAppLockerFilesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to protectedAppLockerFiles for deviceAppManagement + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(WindowsInformationProtectionAppLockerFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(WindowsInformationProtectionAppLockerFile body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new ProtectedAppLockerFilesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Another way to input protected apps through xml files + /// + public class ProtectedAppLockerFilesRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ProtectedAppLockerFilesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ProtectedAppLockerFilesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ProtectedAppLockerFilesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new protectedAppLockerFilesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ProtectedAppLockerFilesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ProtectedAppLockerFilesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new protectedAppLockerFilesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ProtectedAppLockerFilesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/WindowsInformationProtectionPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/WindowsInformationProtectionPolicyItemRequestBuilder.cs index 7dde1692aea..ee761112835 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/WindowsInformationProtectionPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/WindowsInformationProtectionPolicyItemRequestBuilder.cs @@ -1,3 +1,6 @@ +using Microsoft.Graph.DeviceAppManagement.WindowsInformationProtectionPolicies.Item.Assignments; +using Microsoft.Graph.DeviceAppManagement.WindowsInformationProtectionPolicies.Item.ExemptAppLockerFiles; +using Microsoft.Graph.DeviceAppManagement.WindowsInformationProtectionPolicies.Item.ProtectedAppLockerFiles; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,6 +16,18 @@ namespace Microsoft.Graph.DeviceAppManagement.WindowsInformationProtectionPolici /// Provides operations to manage the windowsInformationProtectionPolicies property of the microsoft.graph.deviceAppManagement entity. /// public class WindowsInformationProtectionPolicyItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the assignments property of the microsoft.graph.windowsInformationProtection entity. + public AssignmentsRequestBuilder Assignments { get => + new AssignmentsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the exemptAppLockerFiles property of the microsoft.graph.windowsInformationProtection entity. + public ExemptAppLockerFilesRequestBuilder ExemptAppLockerFiles { get => + new ExemptAppLockerFilesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the protectedAppLockerFiles property of the microsoft.graph.windowsInformationProtection entity. + public ProtectedAppLockerFilesRequestBuilder ProtectedAppLockerFiles { get => + new ProtectedAppLockerFilesRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new WindowsInformationProtectionPolicyItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleAssignments/Item/DeviceAndAppManagementRoleAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleAssignments/Item/DeviceAndAppManagementRoleAssignmentItemRequestBuilder.cs index a6c450a0b78..2fb61dc5f0d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RoleAssignments/Item/DeviceAndAppManagementRoleAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleAssignments/Item/DeviceAndAppManagementRoleAssignmentItemRequestBuilder.cs @@ -1,3 +1,4 @@ +using Microsoft.Graph.DeviceManagement.RoleAssignments.Item.RoleDefinition; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,6 +14,10 @@ namespace Microsoft.Graph.DeviceManagement.RoleAssignments.Item { /// Provides operations to manage the roleAssignments property of the microsoft.graph.deviceManagement entity. /// public class DeviceAndAppManagementRoleAssignmentItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the roleDefinition property of the microsoft.graph.roleAssignment entity. + public RoleDefinitionRequestBuilder RoleDefinition { get => + new RoleDefinitionRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new DeviceAndAppManagementRoleAssignmentItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleAssignments/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleAssignments/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs new file mode 100644 index 00000000000..761c0a48e06 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleAssignments/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.DeviceManagement.RoleAssignments.Item.RoleDefinition { + /// + /// Provides operations to manage the roleDefinition property of the microsoft.graph.roleAssignment entity. + /// + public class RoleDefinitionRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RoleDefinitionRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RoleDefinitionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/roleAssignments/{deviceAndAppManagementRoleAssignment%2Did}/roleDefinition{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new RoleDefinitionRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RoleDefinitionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/roleAssignments/{deviceAndAppManagementRoleAssignment%2Did}/roleDefinition{?%24select,%24expand}", rawUrl) { + } + /// + /// Role definition this assignment is part of. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.RoleDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Role definition this assignment is part of. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new RoleDefinitionRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Role definition this assignment is part of. + /// + public class RoleDefinitionRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RoleDefinitionRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public RoleDefinitionRequestBuilderGetQueryParameters QueryParameters { get; set; } = new RoleDefinitionRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new roleDefinitionRequestBuilderGetRequestConfiguration and sets the default values. + /// + public RoleDefinitionRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Drives/Item/CreatedByUser/CreatedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/CreatedByUser/CreatedByUserRequestBuilder.cs new file mode 100644 index 00000000000..bd99b6f7d1e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/CreatedByUser/CreatedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Drives.Item.CreatedByUser.MailboxSettings; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Drives.Item.CreatedByUser { + /// + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + /// + public class CreatedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/createdByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/createdByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new CreatedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who created the item. Read-only. + /// + public class CreatedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CreatedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CreatedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CreatedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new createdByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CreatedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Drives/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..fa0153a5a63 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Drives.Item.CreatedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \drives\{drive-id}\createdByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/createdByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/createdByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Drives/Item/DriveItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/DriveItemRequestBuilder.cs index c2b7c6450e7..5b19e5cc212 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/DriveItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/DriveItemRequestBuilder.cs @@ -1,6 +1,8 @@ using Microsoft.Graph.Drives.Item.Bundles; +using Microsoft.Graph.Drives.Item.CreatedByUser; using Microsoft.Graph.Drives.Item.Following; using Microsoft.Graph.Drives.Item.Items; +using Microsoft.Graph.Drives.Item.LastModifiedByUser; using Microsoft.Graph.Drives.Item.List; using Microsoft.Graph.Drives.Item.Recent; using Microsoft.Graph.Drives.Item.Root; @@ -26,6 +28,10 @@ public class DriveItemRequestBuilder : BaseRequestBuilder { public BundlesRequestBuilder Bundles { get => new BundlesRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + public CreatedByUserRequestBuilder CreatedByUser { get => + new CreatedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the following property of the microsoft.graph.drive entity. public FollowingRequestBuilder Following { get => new FollowingRequestBuilder(PathParameters, RequestAdapter); @@ -34,6 +40,10 @@ public class DriveItemRequestBuilder : BaseRequestBuilder { public ItemsRequestBuilder Items { get => new ItemsRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + public LastModifiedByUserRequestBuilder LastModifiedByUser { get => + new LastModifiedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the list property of the microsoft.graph.drive entity. public ListRequestBuilder List { get => new ListRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreatedByUser/CreatedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreatedByUser/CreatedByUserRequestBuilder.cs new file mode 100644 index 00000000000..0f43483a8f1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreatedByUser/CreatedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Drives.Item.Items.Item.CreatedByUser.MailboxSettings; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Drives.Item.Items.Item.CreatedByUser { + /// + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + /// + public class CreatedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/createdByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/createdByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new CreatedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who created the item. Read-only. + /// + public class CreatedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CreatedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CreatedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CreatedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new createdByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CreatedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..1ec2f9b85c3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Drives.Item.Items.Item.CreatedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \drives\{drive-id}\items\{driveItem-id}\createdByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/createdByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/createdByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/DriveItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/DriveItemItemRequestBuilder.cs index 9776a9025dd..f14f2c29dfd 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/DriveItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/DriveItemItemRequestBuilder.cs @@ -6,12 +6,14 @@ using Microsoft.Graph.Drives.Item.Items.Item.Copy; using Microsoft.Graph.Drives.Item.Items.Item.CreateLink; using Microsoft.Graph.Drives.Item.Items.Item.CreateUploadSession; +using Microsoft.Graph.Drives.Item.Items.Item.CreatedByUser; using Microsoft.Graph.Drives.Item.Items.Item.Delta; using Microsoft.Graph.Drives.Item.Items.Item.DeltaWithToken; using Microsoft.Graph.Drives.Item.Items.Item.Follow; using Microsoft.Graph.Drives.Item.Items.Item.GetActivitiesByInterval; using Microsoft.Graph.Drives.Item.Items.Item.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval; using Microsoft.Graph.Drives.Item.Items.Item.Invite; +using Microsoft.Graph.Drives.Item.Items.Item.LastModifiedByUser; using Microsoft.Graph.Drives.Item.Items.Item.ListItem; using Microsoft.Graph.Drives.Item.Items.Item.Permissions; using Microsoft.Graph.Drives.Item.Items.Item.Preview; @@ -62,6 +64,10 @@ public class DriveItemItemRequestBuilder : BaseRequestBuilder { public CopyRequestBuilder Copy { get => new CopyRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + public CreatedByUserRequestBuilder CreatedByUser { get => + new CreatedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to call the createLink method. public CreateLinkRequestBuilder CreateLink { get => new CreateLinkRequestBuilder(PathParameters, RequestAdapter); @@ -86,6 +92,10 @@ public class DriveItemItemRequestBuilder : BaseRequestBuilder { public InviteRequestBuilder Invite { get => new InviteRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + public LastModifiedByUserRequestBuilder LastModifiedByUser { get => + new LastModifiedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the listItem property of the microsoft.graph.driveItem entity. public ListItemRequestBuilder ListItem { get => new ListItemRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs new file mode 100644 index 00000000000..3b3d72c3192 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Drives.Item.Items.Item.LastModifiedByUser.MailboxSettings; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Drives.Item.Items.Item.LastModifiedByUser { + /// + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + /// + public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/lastModifiedByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/lastModifiedByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new LastModifiedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + public class LastModifiedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class LastModifiedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LastModifiedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LastModifiedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new lastModifiedByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LastModifiedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..f8ec0787376 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Drives.Item.Items.Item.LastModifiedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \drives\{drive-id}\items\{driveItem-id}\lastModifiedByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Operations/OperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Operations/OperationsRequestBuilder.cs index 843f5e7a048..3f5e26128dc 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Operations/OperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Operations/OperationsRequestBuilder.cs @@ -1,4 +1,3 @@ -using Microsoft.Graph.Drives.Item.Items.Item.Workbook.Operations.Count; using Microsoft.Graph.Drives.Item.Items.Item.Workbook.Operations.Item; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; @@ -15,10 +14,6 @@ namespace Microsoft.Graph.Drives.Item.Items.Item.Workbook.Operations { /// Provides operations to manage the operations property of the microsoft.graph.workbook entity. /// public class OperationsRequestBuilder : BaseRequestBuilder { - /// Provides operations to count the resources in the collection. - public CountRequestBuilder Count { get => - new CountRequestBuilder(PathParameters, RequestAdapter); - } /// Provides operations to manage the operations property of the microsoft.graph.workbook entity. public WorkbookOperationItemRequestBuilder this[string position] { get { var urlTplParams = new Dictionary(PathParameters); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs new file mode 100644 index 00000000000..040afcd697e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Drives.Item.LastModifiedByUser.MailboxSettings; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Drives.Item.LastModifiedByUser { + /// + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + /// + public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/lastModifiedByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/lastModifiedByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new LastModifiedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + public class LastModifiedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class LastModifiedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LastModifiedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LastModifiedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new lastModifiedByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LastModifiedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Drives/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..e4a7faeaa85 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Drives.Item.LastModifiedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \drives\{drive-id}\lastModifiedByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/CreatedByUser/CreatedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/CreatedByUser/CreatedByUserRequestBuilder.cs new file mode 100644 index 00000000000..067885b3730 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/CreatedByUser/CreatedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Drives.Item.List.CreatedByUser.MailboxSettings; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Drives.Item.List.CreatedByUser { + /// + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + /// + public class CreatedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/createdByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/createdByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new CreatedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who created the item. Read-only. + /// + public class CreatedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CreatedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CreatedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CreatedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new createdByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CreatedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..04da9f3616f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Drives.Item.List.CreatedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \drives\{drive-id}\list\createdByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/createdByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/createdByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/CreatedByUser/CreatedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/CreatedByUser/CreatedByUserRequestBuilder.cs new file mode 100644 index 00000000000..4d45824905f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/CreatedByUser/CreatedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Drives.Item.List.Items.Item.CreatedByUser.MailboxSettings; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Drives.Item.List.Items.Item.CreatedByUser { + /// + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + /// + public class CreatedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/items/{listItem%2Did}/createdByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/items/{listItem%2Did}/createdByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new CreatedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who created the item. Read-only. + /// + public class CreatedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CreatedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CreatedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CreatedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new createdByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CreatedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..966c1243208 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Drives.Item.List.Items.Item.CreatedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \drives\{drive-id}\list\items\{listItem-id}\createdByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/items/{listItem%2Did}/createdByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/items/{listItem%2Did}/createdByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DocumentSetVersions/Item/DocumentSetVersionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DocumentSetVersions/Item/DocumentSetVersionItemRequestBuilder.cs index da3ca9ac4c0..593cb65debe 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DocumentSetVersions/Item/DocumentSetVersionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DocumentSetVersions/Item/DocumentSetVersionItemRequestBuilder.cs @@ -1,3 +1,4 @@ +using Microsoft.Graph.Drives.Item.List.Items.Item.DocumentSetVersions.Item.Fields; using Microsoft.Graph.Drives.Item.List.Items.Item.DocumentSetVersions.Item.Restore; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Drives.Item.List.Items.Item.DocumentSetVersions.Item { /// Provides operations to manage the documentSetVersions property of the microsoft.graph.listItem entity. /// public class DocumentSetVersionItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the fields property of the microsoft.graph.listItemVersion entity. + public FieldsRequestBuilder Fields { get => + new FieldsRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to call the restore method. public RestoreRequestBuilder Restore { get => new RestoreRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DocumentSetVersions/Item/Fields/FieldsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DocumentSetVersions/Item/Fields/FieldsRequestBuilder.cs new file mode 100644 index 00000000000..1333edb5895 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DocumentSetVersions/Item/Fields/FieldsRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Drives.Item.List.Items.Item.DocumentSetVersions.Item.Fields { + /// + /// Provides operations to manage the fields property of the microsoft.graph.listItemVersion entity. + /// + public class FieldsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new FieldsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FieldsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/items/{listItem%2Did}/documentSetVersions/{documentSetVersion%2Did}/fields{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new FieldsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FieldsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/items/{listItem%2Did}/documentSetVersions/{documentSetVersion%2Did}/fields{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property fields for drives + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// A collection of the fields and values for this version of the list item. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, FieldValueSet.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property fields in drives + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(FieldValueSet body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(FieldValueSet body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, FieldValueSet.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property fields for drives + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new FieldsRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// A collection of the fields and values for this version of the list item. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new FieldsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property fields in drives + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(FieldValueSet body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(FieldValueSet body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new FieldsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FieldsRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new fieldsRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public FieldsRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// A collection of the fields and values for this version of the list item. + /// + public class FieldsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FieldsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FieldsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FieldsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new fieldsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FieldsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FieldsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new fieldsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public FieldsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs new file mode 100644 index 00000000000..cf399db4ef7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Drives.Item.List.Items.Item.LastModifiedByUser.MailboxSettings; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Drives.Item.List.Items.Item.LastModifiedByUser { + /// + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + /// + public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/items/{listItem%2Did}/lastModifiedByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/items/{listItem%2Did}/lastModifiedByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new LastModifiedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + public class LastModifiedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class LastModifiedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LastModifiedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LastModifiedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new lastModifiedByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LastModifiedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..c3cdba8070f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Drives.Item.List.Items.Item.LastModifiedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \drives\{drive-id}\list\items\{listItem-id}\lastModifiedByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/items/{listItem%2Did}/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/items/{listItem%2Did}/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/ListItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/ListItemItemRequestBuilder.cs index 1c50d9fbd9d..f4c0c109085 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/ListItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/ListItemItemRequestBuilder.cs @@ -1,9 +1,11 @@ using Microsoft.Graph.Drives.Item.List.Items.Item.Analytics; +using Microsoft.Graph.Drives.Item.List.Items.Item.CreatedByUser; using Microsoft.Graph.Drives.Item.List.Items.Item.DocumentSetVersions; using Microsoft.Graph.Drives.Item.List.Items.Item.DriveItem; using Microsoft.Graph.Drives.Item.List.Items.Item.Fields; using Microsoft.Graph.Drives.Item.List.Items.Item.GetActivitiesByInterval; using Microsoft.Graph.Drives.Item.List.Items.Item.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval; +using Microsoft.Graph.Drives.Item.List.Items.Item.LastModifiedByUser; using Microsoft.Graph.Drives.Item.List.Items.Item.Versions; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; @@ -24,6 +26,10 @@ public class ListItemItemRequestBuilder : BaseRequestBuilder { public AnalyticsRequestBuilder Analytics { get => new AnalyticsRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + public CreatedByUserRequestBuilder CreatedByUser { get => + new CreatedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the documentSetVersions property of the microsoft.graph.listItem entity. public DocumentSetVersionsRequestBuilder DocumentSetVersions { get => new DocumentSetVersionsRequestBuilder(PathParameters, RequestAdapter); @@ -40,6 +46,10 @@ public class ListItemItemRequestBuilder : BaseRequestBuilder { public GetActivitiesByIntervalRequestBuilder GetActivitiesByInterval { get => new GetActivitiesByIntervalRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + public LastModifiedByUserRequestBuilder LastModifiedByUser { get => + new LastModifiedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the versions property of the microsoft.graph.listItem entity. public VersionsRequestBuilder Versions { get => new VersionsRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs new file mode 100644 index 00000000000..4a5c593cf6a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Drives.Item.List.LastModifiedByUser.MailboxSettings; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Drives.Item.List.LastModifiedByUser { + /// + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + /// + public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/lastModifiedByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/lastModifiedByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new LastModifiedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + public class LastModifiedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class LastModifiedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LastModifiedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LastModifiedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new lastModifiedByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LastModifiedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..745c5aa4db5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Drives.Item.List.LastModifiedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \drives\{drive-id}\list\lastModifiedByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/ListRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/ListRequestBuilder.cs index 358e082eaed..665612c66b6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/ListRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/ListRequestBuilder.cs @@ -1,7 +1,9 @@ using Microsoft.Graph.Drives.Item.List.Columns; using Microsoft.Graph.Drives.Item.List.ContentTypes; +using Microsoft.Graph.Drives.Item.List.CreatedByUser; using Microsoft.Graph.Drives.Item.List.Drive; using Microsoft.Graph.Drives.Item.List.Items; +using Microsoft.Graph.Drives.Item.List.LastModifiedByUser; using Microsoft.Graph.Drives.Item.List.Operations; using Microsoft.Graph.Drives.Item.List.Subscriptions; using Microsoft.Graph.Models.ODataErrors; @@ -27,6 +29,10 @@ public class ListRequestBuilder : BaseRequestBuilder { public ContentTypesRequestBuilder ContentTypes { get => new ContentTypesRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + public CreatedByUserRequestBuilder CreatedByUser { get => + new CreatedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the drive property of the microsoft.graph.list entity. public DriveRequestBuilder Drive { get => new DriveRequestBuilder(PathParameters, RequestAdapter); @@ -35,6 +41,10 @@ public class ListRequestBuilder : BaseRequestBuilder { public ItemsRequestBuilder Items { get => new ItemsRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + public LastModifiedByUserRequestBuilder LastModifiedByUser { get => + new LastModifiedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the operations property of the microsoft.graph.list entity. public OperationsRequestBuilder Operations { get => new OperationsRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/CreatedByUser/CreatedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/CreatedByUser/CreatedByUserRequestBuilder.cs new file mode 100644 index 00000000000..479267b5030 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/CreatedByUser/CreatedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Groups.Item.Sites.Item.CreatedByUser.MailboxSettings; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Groups.Item.Sites.Item.CreatedByUser { + /// + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + /// + public class CreatedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/createdByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/createdByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new CreatedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who created the item. Read-only. + /// + public class CreatedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CreatedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CreatedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CreatedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new createdByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CreatedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..ad385ea66d1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Groups.Item.Sites.Item.CreatedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \groups\{group-id}\sites\{site-id}\createdByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/createdByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/createdByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs new file mode 100644 index 00000000000..9dce3f837d8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Groups.Item.Sites.Item.LastModifiedByUser.MailboxSettings; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Groups.Item.Sites.Item.LastModifiedByUser { + /// + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + /// + public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lastModifiedByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lastModifiedByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new LastModifiedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + public class LastModifiedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class LastModifiedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LastModifiedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LastModifiedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new lastModifiedByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LastModifiedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..0031c13e561 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Groups.Item.Sites.Item.LastModifiedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \groups\{group-id}\sites\{site-id}\lastModifiedByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/CreatedByUser/CreatedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/CreatedByUser/CreatedByUserRequestBuilder.cs new file mode 100644 index 00000000000..e1ccde7ae4f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/CreatedByUser/CreatedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.CreatedByUser.MailboxSettings; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Groups.Item.Sites.Item.Lists.Item.CreatedByUser { + /// + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + /// + public class CreatedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/createdByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/createdByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new CreatedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who created the item. Read-only. + /// + public class CreatedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CreatedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CreatedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CreatedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new createdByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CreatedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..452e1c69d20 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Groups.Item.Sites.Item.Lists.Item.CreatedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \groups\{group-id}\sites\{site-id}\lists\{list-id}\createdByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/createdByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/createdByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/CreatedByUser/CreatedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/CreatedByUser/CreatedByUserRequestBuilder.cs new file mode 100644 index 00000000000..0ec96937946 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/CreatedByUser/CreatedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Items.Item.CreatedByUser.MailboxSettings; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Groups.Item.Sites.Item.Lists.Item.Items.Item.CreatedByUser { + /// + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + /// + public class CreatedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/createdByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/createdByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new CreatedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who created the item. Read-only. + /// + public class CreatedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CreatedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CreatedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CreatedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new createdByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CreatedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..2424b7acd21 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Groups.Item.Sites.Item.Lists.Item.Items.Item.CreatedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \groups\{group-id}\sites\{site-id}\lists\{list-id}\items\{listItem-id}\createdByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/createdByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/createdByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/Item/DocumentSetVersionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/Item/DocumentSetVersionItemRequestBuilder.cs index 3107276ca71..dcc4342cadd 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/Item/DocumentSetVersionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/Item/DocumentSetVersionItemRequestBuilder.cs @@ -1,3 +1,4 @@ +using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Items.Item.DocumentSetVersions.Item.Fields; using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Items.Item.DocumentSetVersions.Item.Restore; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Items.Item.DocumentS /// Provides operations to manage the documentSetVersions property of the microsoft.graph.listItem entity. /// public class DocumentSetVersionItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the fields property of the microsoft.graph.listItemVersion entity. + public FieldsRequestBuilder Fields { get => + new FieldsRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to call the restore method. public RestoreRequestBuilder Restore { get => new RestoreRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/Item/Fields/FieldsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/Item/Fields/FieldsRequestBuilder.cs new file mode 100644 index 00000000000..2228ff7ecd4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/Item/Fields/FieldsRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Groups.Item.Sites.Item.Lists.Item.Items.Item.DocumentSetVersions.Item.Fields { + /// + /// Provides operations to manage the fields property of the microsoft.graph.listItemVersion entity. + /// + public class FieldsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new FieldsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FieldsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/documentSetVersions/{documentSetVersion%2Did}/fields{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new FieldsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FieldsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/documentSetVersions/{documentSetVersion%2Did}/fields{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property fields for groups + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// A collection of the fields and values for this version of the list item. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, FieldValueSet.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property fields in groups + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(FieldValueSet body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(FieldValueSet body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, FieldValueSet.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property fields for groups + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new FieldsRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// A collection of the fields and values for this version of the list item. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new FieldsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property fields in groups + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(FieldValueSet body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(FieldValueSet body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new FieldsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FieldsRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new fieldsRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public FieldsRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// A collection of the fields and values for this version of the list item. + /// + public class FieldsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FieldsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FieldsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FieldsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new fieldsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FieldsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FieldsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new fieldsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public FieldsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs new file mode 100644 index 00000000000..4c76845dbd2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Items.Item.LastModifiedByUser.MailboxSettings; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Groups.Item.Sites.Item.Lists.Item.Items.Item.LastModifiedByUser { + /// + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + /// + public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/lastModifiedByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/lastModifiedByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new LastModifiedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + public class LastModifiedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class LastModifiedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LastModifiedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LastModifiedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new lastModifiedByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LastModifiedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..973d06e09fb --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Groups.Item.Sites.Item.Lists.Item.Items.Item.LastModifiedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \groups\{group-id}\sites\{site-id}\lists\{list-id}\items\{listItem-id}\lastModifiedByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/ListItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/ListItemItemRequestBuilder.cs index 2d5c9a3a025..59edde7616b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/ListItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/ListItemItemRequestBuilder.cs @@ -1,9 +1,11 @@ using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Items.Item.Analytics; +using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Items.Item.CreatedByUser; using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Items.Item.DocumentSetVersions; using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Items.Item.DriveItem; using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Items.Item.Fields; using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Items.Item.GetActivitiesByInterval; using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Items.Item.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval; +using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Items.Item.LastModifiedByUser; using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Items.Item.Versions; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; @@ -24,6 +26,10 @@ public class ListItemItemRequestBuilder : BaseRequestBuilder { public AnalyticsRequestBuilder Analytics { get => new AnalyticsRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + public CreatedByUserRequestBuilder CreatedByUser { get => + new CreatedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the documentSetVersions property of the microsoft.graph.listItem entity. public DocumentSetVersionsRequestBuilder DocumentSetVersions { get => new DocumentSetVersionsRequestBuilder(PathParameters, RequestAdapter); @@ -40,6 +46,10 @@ public class ListItemItemRequestBuilder : BaseRequestBuilder { public GetActivitiesByIntervalRequestBuilder GetActivitiesByInterval { get => new GetActivitiesByIntervalRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + public LastModifiedByUserRequestBuilder LastModifiedByUser { get => + new LastModifiedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the versions property of the microsoft.graph.listItem entity. public VersionsRequestBuilder Versions { get => new VersionsRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs new file mode 100644 index 00000000000..62122b788f1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.LastModifiedByUser.MailboxSettings; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Groups.Item.Sites.Item.Lists.Item.LastModifiedByUser { + /// + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + /// + public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/lastModifiedByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/lastModifiedByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new LastModifiedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + public class LastModifiedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class LastModifiedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LastModifiedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LastModifiedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new lastModifiedByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LastModifiedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..2dfd266c568 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Groups.Item.Sites.Item.Lists.Item.LastModifiedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \groups\{group-id}\sites\{site-id}\lists\{list-id}\lastModifiedByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ListItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ListItemRequestBuilder.cs index 985c6bfa96f..0588f590d56 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ListItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ListItemRequestBuilder.cs @@ -1,7 +1,9 @@ using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Columns; using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.ContentTypes; +using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.CreatedByUser; using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Drive; using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Items; +using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.LastModifiedByUser; using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Operations; using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Subscriptions; using Microsoft.Graph.Models.ODataErrors; @@ -27,6 +29,10 @@ public class ListItemRequestBuilder : BaseRequestBuilder { public ContentTypesRequestBuilder ContentTypes { get => new ContentTypesRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + public CreatedByUserRequestBuilder CreatedByUser { get => + new CreatedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the drive property of the microsoft.graph.list entity. public DriveRequestBuilder Drive { get => new DriveRequestBuilder(PathParameters, RequestAdapter); @@ -35,6 +41,10 @@ public class ListItemRequestBuilder : BaseRequestBuilder { public ItemsRequestBuilder Items { get => new ItemsRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + public LastModifiedByUserRequestBuilder LastModifiedByUser { get => + new LastModifiedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the operations property of the microsoft.graph.list entity. public OperationsRequestBuilder Operations { get => new OperationsRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/SiteItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/SiteItemRequestBuilder.cs index 166d5fbe6fe..0327ec285cb 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/SiteItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/SiteItemRequestBuilder.cs @@ -1,6 +1,7 @@ using Microsoft.Graph.Groups.Item.Sites.Item.Analytics; using Microsoft.Graph.Groups.Item.Sites.Item.Columns; using Microsoft.Graph.Groups.Item.Sites.Item.ContentTypes; +using Microsoft.Graph.Groups.Item.Sites.Item.CreatedByUser; using Microsoft.Graph.Groups.Item.Sites.Item.Drive; using Microsoft.Graph.Groups.Item.Sites.Item.Drives; using Microsoft.Graph.Groups.Item.Sites.Item.ExternalColumns; @@ -9,6 +10,7 @@ using Microsoft.Graph.Groups.Item.Sites.Item.GetApplicableContentTypesForListWithListId; using Microsoft.Graph.Groups.Item.Sites.Item.GetByPathWithPath; using Microsoft.Graph.Groups.Item.Sites.Item.Items; +using Microsoft.Graph.Groups.Item.Sites.Item.LastModifiedByUser; using Microsoft.Graph.Groups.Item.Sites.Item.Lists; using Microsoft.Graph.Groups.Item.Sites.Item.Onenote; using Microsoft.Graph.Groups.Item.Sites.Item.Operations; @@ -43,6 +45,10 @@ public class SiteItemRequestBuilder : BaseRequestBuilder { public ContentTypesRequestBuilder ContentTypes { get => new ContentTypesRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + public CreatedByUserRequestBuilder CreatedByUser { get => + new CreatedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the drive property of the microsoft.graph.site entity. public DriveRequestBuilder Drive { get => new DriveRequestBuilder(PathParameters, RequestAdapter); @@ -63,6 +69,10 @@ public class SiteItemRequestBuilder : BaseRequestBuilder { public ItemsRequestBuilder Items { get => new ItemsRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + public LastModifiedByUserRequestBuilder LastModifiedByUser { get => + new LastModifiedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the lists property of the microsoft.graph.site entity. public ListsRequestBuilder Lists { get => new ListsRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs index ae6646a78a1..13c5de8432c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs @@ -1,4 +1,5 @@ using Microsoft.Graph.Groups.Item.Team.Channels.Item.SharedWithTeams.Item.AllowedMembers; +using Microsoft.Graph.Groups.Item.Team.Channels.Item.SharedWithTeams.Item.Team; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -18,6 +19,10 @@ public class SharedWithChannelTeamInfoItemRequestBuilder : BaseRequestBuilder { public AllowedMembersRequestBuilder AllowedMembers { get => new AllowedMembersRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the team property of the microsoft.graph.teamInfo entity. + public Microsoft.Graph.Groups.Item.Team.Channels.Item.SharedWithTeams.Item.Team.TeamRequestBuilder Team { get => + new Microsoft.Graph.Groups.Item.Team.Channels.Item.SharedWithTeams.Item.Team.TeamRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SharedWithChannelTeamInfoItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/SharedWithTeams/Item/Team/TeamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/SharedWithTeams/Item/Team/TeamRequestBuilder.cs new file mode 100644 index 00000000000..efe434548d7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/SharedWithTeams/Item/Team/TeamRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Groups.Item.Team.Channels.Item.SharedWithTeams.Item.Team { + /// + /// Provides operations to manage the team property of the microsoft.graph.teamInfo entity. + /// + public class TeamRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new TeamRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/team/channels/{channel%2Did}/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/team{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TeamRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/team/channels/{channel%2Did}/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/team{?%24select,%24expand}", rawUrl) { + } + /// + /// Get team from groups + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.Team.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get team from groups + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TeamRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get team from groups + /// + public class TeamRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TeamRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TeamRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TeamRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new teamRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TeamRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs index 7fb86513561..9ca4a356d95 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs @@ -1,4 +1,5 @@ using Microsoft.Graph.Groups.Item.Team.PrimaryChannel.SharedWithTeams.Item.AllowedMembers; +using Microsoft.Graph.Groups.Item.Team.PrimaryChannel.SharedWithTeams.Item.Team; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -18,6 +19,10 @@ public class SharedWithChannelTeamInfoItemRequestBuilder : BaseRequestBuilder { public AllowedMembersRequestBuilder AllowedMembers { get => new AllowedMembersRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the team property of the microsoft.graph.teamInfo entity. + public Microsoft.Graph.Groups.Item.Team.PrimaryChannel.SharedWithTeams.Item.Team.TeamRequestBuilder Team { get => + new Microsoft.Graph.Groups.Item.Team.PrimaryChannel.SharedWithTeams.Item.Team.TeamRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SharedWithChannelTeamInfoItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/SharedWithTeams/Item/Team/TeamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/SharedWithTeams/Item/Team/TeamRequestBuilder.cs new file mode 100644 index 00000000000..fd9da434e5c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/SharedWithTeams/Item/Team/TeamRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Groups.Item.Team.PrimaryChannel.SharedWithTeams.Item.Team { + /// + /// Provides operations to manage the team property of the microsoft.graph.teamInfo entity. + /// + public class TeamRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new TeamRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/team/primaryChannel/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/team{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TeamRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/team/primaryChannel/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/team{?%24select,%24expand}", rawUrl) { + } + /// + /// Get team from groups + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.Team.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get team from groups + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TeamRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get team from groups + /// + public class TeamRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TeamRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TeamRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TeamRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new teamRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TeamRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs index d3169ca296f..c834e1c57fd 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs @@ -1,4 +1,5 @@ using Microsoft.Graph.Me.JoinedTeams.Item.Channels.Item.SharedWithTeams.Item.AllowedMembers; +using Microsoft.Graph.Me.JoinedTeams.Item.Channels.Item.SharedWithTeams.Item.Team; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -18,6 +19,10 @@ public class SharedWithChannelTeamInfoItemRequestBuilder : BaseRequestBuilder { public AllowedMembersRequestBuilder AllowedMembers { get => new AllowedMembersRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the team property of the microsoft.graph.teamInfo entity. + public TeamRequestBuilder Team { get => + new TeamRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SharedWithChannelTeamInfoItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/SharedWithTeams/Item/Team/TeamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/SharedWithTeams/Item/Team/TeamRequestBuilder.cs new file mode 100644 index 00000000000..ba26168b304 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/SharedWithTeams/Item/Team/TeamRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Me.JoinedTeams.Item.Channels.Item.SharedWithTeams.Item.Team { + /// + /// Provides operations to manage the team property of the microsoft.graph.teamInfo entity. + /// + public class TeamRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new TeamRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/team{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TeamRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/team{?%24select,%24expand}", rawUrl) { + } + /// + /// Get team from me + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.Team.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get team from me + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TeamRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get team from me + /// + public class TeamRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TeamRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TeamRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TeamRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new teamRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TeamRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs index 2752849513a..beb700a5b5f 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs @@ -1,4 +1,5 @@ using Microsoft.Graph.Me.JoinedTeams.Item.PrimaryChannel.SharedWithTeams.Item.AllowedMembers; +using Microsoft.Graph.Me.JoinedTeams.Item.PrimaryChannel.SharedWithTeams.Item.Team; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -18,6 +19,10 @@ public class SharedWithChannelTeamInfoItemRequestBuilder : BaseRequestBuilder { public AllowedMembersRequestBuilder AllowedMembers { get => new AllowedMembersRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the team property of the microsoft.graph.teamInfo entity. + public TeamRequestBuilder Team { get => + new TeamRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SharedWithChannelTeamInfoItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/SharedWithTeams/Item/Team/TeamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/SharedWithTeams/Item/Team/TeamRequestBuilder.cs new file mode 100644 index 00000000000..6d0f58a7c4e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/SharedWithTeams/Item/Team/TeamRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Me.JoinedTeams.Item.PrimaryChannel.SharedWithTeams.Item.Team { + /// + /// Provides operations to manage the team property of the microsoft.graph.teamInfo entity. + /// + public class TeamRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new TeamRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/team{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TeamRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/team{?%24select,%24expand}", rawUrl) { + } + /// + /// Get team from me + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.Team.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get team from me + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TeamRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get team from me + /// + public class TeamRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TeamRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TeamRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TeamRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new teamRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TeamRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/Teamwork/AssociatedTeams/Item/AssociatedTeamInfoItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Teamwork/AssociatedTeams/Item/AssociatedTeamInfoItemRequestBuilder.cs index b9dff993a74..bfa923205ae 100644 --- a/src/Microsoft.Graph/Generated/Me/Teamwork/AssociatedTeams/Item/AssociatedTeamInfoItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Teamwork/AssociatedTeams/Item/AssociatedTeamInfoItemRequestBuilder.cs @@ -1,3 +1,4 @@ +using Microsoft.Graph.Me.Teamwork.AssociatedTeams.Item.Team; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,6 +14,10 @@ namespace Microsoft.Graph.Me.Teamwork.AssociatedTeams.Item { /// Provides operations to manage the associatedTeams property of the microsoft.graph.userTeamwork entity. /// public class AssociatedTeamInfoItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the team property of the microsoft.graph.teamInfo entity. + public TeamRequestBuilder Team { get => + new TeamRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new AssociatedTeamInfoItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Me/Teamwork/AssociatedTeams/Item/Team/TeamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Teamwork/AssociatedTeams/Item/Team/TeamRequestBuilder.cs new file mode 100644 index 00000000000..a2091f04067 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/Teamwork/AssociatedTeams/Item/Team/TeamRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Me.Teamwork.AssociatedTeams.Item.Team { + /// + /// Provides operations to manage the team property of the microsoft.graph.teamInfo entity. + /// + public class TeamRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new TeamRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/teamwork/associatedTeams/{associatedTeamInfo%2Did}/team{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TeamRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/teamwork/associatedTeams/{associatedTeamInfo%2Did}/team{?%24select,%24expand}", rawUrl) { + } + /// + /// Get team from me + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.Team.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get team from me + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TeamRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get team from me + /// + public class TeamRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TeamRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TeamRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TeamRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new teamRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TeamRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/Teamwork/InstalledApps/Item/TeamsApp/TeamsAppRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Teamwork/InstalledApps/Item/TeamsApp/TeamsAppRequestBuilder.cs new file mode 100644 index 00000000000..6e880396ceb --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/Teamwork/InstalledApps/Item/TeamsApp/TeamsAppRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Me.Teamwork.InstalledApps.Item.TeamsApp { + /// + /// Provides operations to manage the teamsApp property of the microsoft.graph.teamsAppInstallation entity. + /// + public class TeamsAppRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new TeamsAppRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamsAppRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/teamwork/installedApps/{userScopeTeamsAppInstallation%2Did}/teamsApp{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TeamsAppRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamsAppRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/teamwork/installedApps/{userScopeTeamsAppInstallation%2Did}/teamsApp{?%24select,%24expand}", rawUrl) { + } + /// + /// The app that is installed. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.TeamsApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The app that is installed. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TeamsAppRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The app that is installed. + /// + public class TeamsAppRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TeamsAppRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TeamsAppRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TeamsAppRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new teamsAppRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TeamsAppRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/Teamwork/InstalledApps/Item/TeamsAppDefinition/TeamsAppDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Teamwork/InstalledApps/Item/TeamsAppDefinition/TeamsAppDefinitionRequestBuilder.cs new file mode 100644 index 00000000000..aa12eb21f27 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/Teamwork/InstalledApps/Item/TeamsAppDefinition/TeamsAppDefinitionRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Me.Teamwork.InstalledApps.Item.TeamsAppDefinition { + /// + /// Provides operations to manage the teamsAppDefinition property of the microsoft.graph.teamsAppInstallation entity. + /// + public class TeamsAppDefinitionRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new TeamsAppDefinitionRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamsAppDefinitionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/teamwork/installedApps/{userScopeTeamsAppInstallation%2Did}/teamsAppDefinition{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TeamsAppDefinitionRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamsAppDefinitionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/teamwork/installedApps/{userScopeTeamsAppInstallation%2Did}/teamsAppDefinition{?%24select,%24expand}", rawUrl) { + } + /// + /// The details of this version of the app. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.TeamsAppDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The details of this version of the app. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TeamsAppDefinitionRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The details of this version of the app. + /// + public class TeamsAppDefinitionRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TeamsAppDefinitionRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TeamsAppDefinitionRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TeamsAppDefinitionRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new teamsAppDefinitionRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TeamsAppDefinitionRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/Teamwork/InstalledApps/Item/UserScopeTeamsAppInstallationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Teamwork/InstalledApps/Item/UserScopeTeamsAppInstallationItemRequestBuilder.cs index 48adad03fee..64cfe5c0fc7 100644 --- a/src/Microsoft.Graph/Generated/Me/Teamwork/InstalledApps/Item/UserScopeTeamsAppInstallationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Teamwork/InstalledApps/Item/UserScopeTeamsAppInstallationItemRequestBuilder.cs @@ -1,4 +1,6 @@ using Microsoft.Graph.Me.Teamwork.InstalledApps.Item.Chat; +using Microsoft.Graph.Me.Teamwork.InstalledApps.Item.TeamsApp; +using Microsoft.Graph.Me.Teamwork.InstalledApps.Item.TeamsAppDefinition; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -18,6 +20,14 @@ public class UserScopeTeamsAppInstallationItemRequestBuilder : BaseRequestBuilde public ChatRequestBuilder Chat { get => new ChatRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the teamsApp property of the microsoft.graph.teamsAppInstallation entity. + public TeamsAppRequestBuilder TeamsApp { get => + new TeamsAppRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the teamsAppDefinition property of the microsoft.graph.teamsAppInstallation entity. + public TeamsAppDefinitionRequestBuilder TeamsAppDefinition { get => + new TeamsAppDefinitionRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new UserScopeTeamsAppInstallationItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestorSettings.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestorSettings.cs index 828cc1f533f..3b3f1b8ea20 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestorSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestorSettings.cs @@ -11,39 +11,39 @@ public IDictionary AdditionalData { get { return BackingStore?.Get>("additionalData"); } set { BackingStore?.Set("additionalData", value); } } - /// If false, the requestor is not permitted to include a schedule in their request. + /// False indicates that the requestor is not permitted to include a schedule in their request. public bool? AllowCustomAssignmentSchedule { get { return BackingStore?.Get("allowCustomAssignmentSchedule"); } set { BackingStore?.Set("allowCustomAssignmentSchedule", value); } } /// Stores model information. public IBackingStore BackingStore { get; private set; } - /// If true, allows on-behalf-of requestors to create a request to add access for another principal. + /// True allows on-behalf-of requestors to create a request to add access for another principal. public bool? EnableOnBehalfRequestorsToAddAccess { get { return BackingStore?.Get("enableOnBehalfRequestorsToAddAccess"); } set { BackingStore?.Set("enableOnBehalfRequestorsToAddAccess", value); } } - /// If true, allows on-behalf-of requestors to create a request to remove access for another principal. + /// True allows on-behalf-of requestors to create a request to remove access for another principal. public bool? EnableOnBehalfRequestorsToRemoveAccess { get { return BackingStore?.Get("enableOnBehalfRequestorsToRemoveAccess"); } set { BackingStore?.Set("enableOnBehalfRequestorsToRemoveAccess", value); } } - /// If true, allows on-behalf-of requestors to create a request to update access for another principal. + /// True allows on-behalf-of requestors to create a request to update access for another principal. public bool? EnableOnBehalfRequestorsToUpdateAccess { get { return BackingStore?.Get("enableOnBehalfRequestorsToUpdateAccess"); } set { BackingStore?.Set("enableOnBehalfRequestorsToUpdateAccess", value); } } - /// If true, allows requestors to create a request to add access for themselves. + /// True allows requestors to create a request to add access for themselves. public bool? EnableTargetsToSelfAddAccess { get { return BackingStore?.Get("enableTargetsToSelfAddAccess"); } set { BackingStore?.Set("enableTargetsToSelfAddAccess", value); } } - /// If true, allows requestors to create a request to remove their access. + /// True allows requestors to create a request to remove their access. public bool? EnableTargetsToSelfRemoveAccess { get { return BackingStore?.Get("enableTargetsToSelfRemoveAccess"); } set { BackingStore?.Set("enableTargetsToSelfRemoveAccess", value); } } - /// If true, allows requestors to create a request to update their access. + /// True allows requestors to create a request to update their access. public bool? EnableTargetsToSelfUpdateAccess { get { return BackingStore?.Get("enableTargetsToSelfUpdateAccess"); } set { BackingStore?.Set("enableTargetsToSelfUpdateAccess", value); } diff --git a/src/Microsoft.Graph/Generated/Models/AdministrativeUnit.cs b/src/Microsoft.Graph/Generated/Models/AdministrativeUnit.cs index 758590f6e17..592da0e6001 100644 --- a/src/Microsoft.Graph/Generated/Models/AdministrativeUnit.cs +++ b/src/Microsoft.Graph/Generated/Models/AdministrativeUnit.cs @@ -90,7 +90,7 @@ public string Visibility { } #endif /// - /// Instantiates a new administrativeUnit and sets the default values. + /// Instantiates a new AdministrativeUnit and sets the default values. /// public AdministrativeUnit() : base() { OdataType = "#microsoft.graph.administrativeUnit"; diff --git a/src/Microsoft.Graph/Generated/Models/AppRoleAssignment.cs b/src/Microsoft.Graph/Generated/Models/AppRoleAssignment.cs index 0cfeab05c36..4c621aafb3a 100644 --- a/src/Microsoft.Graph/Generated/Models/AppRoleAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/AppRoleAssignment.cs @@ -68,7 +68,7 @@ public Guid? ResourceId { set { BackingStore?.Set("resourceId", value); } } /// - /// Instantiates a new appRoleAssignment and sets the default values. + /// Instantiates a new AppRoleAssignment and sets the default values. /// public AppRoleAssignment() : base() { OdataType = "#microsoft.graph.appRoleAssignment"; diff --git a/src/Microsoft.Graph/Generated/Models/AuditEvent.cs b/src/Microsoft.Graph/Generated/Models/AuditEvent.cs index 59e8abe9392..1a4d1882524 100644 --- a/src/Microsoft.Graph/Generated/Models/AuditEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/AuditEvent.cs @@ -4,6 +4,9 @@ using System.Linq; using System; namespace Microsoft.Graph.Models { + /// + /// A class containing the properties for Audit Event. + /// public class AuditEvent : Entity, IParsable { /// Friendly name of the activity. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Models/BookingBusiness.cs b/src/Microsoft.Graph/Generated/Models/BookingBusiness.cs index 66034726e92..a48a71a870c 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingBusiness.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingBusiness.cs @@ -4,9 +4,6 @@ using System.Linq; using System; namespace Microsoft.Graph.Models { - /// - /// Represents a Microsot Bookings Business. - /// public class BookingBusiness : Entity, IParsable { /// The street address of the business. The address property, together with phone and webSiteUrl, appear in the footer of a business scheduling page. The attribute type of physicalAddress is not supported in v1.0. Internally we map the addresses to the type others. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyConfigurationDefault.cs b/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyConfigurationDefault.cs index 709fc2e7466..9a517e3f366 100644 --- a/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyConfigurationDefault.cs +++ b/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyConfigurationDefault.cs @@ -5,6 +5,20 @@ using System; namespace Microsoft.Graph.Models { public class CrossTenantAccessPolicyConfigurationDefault : Entity, IParsable { + /// The automaticUserConsentSettings property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public InboundOutboundPolicyConfiguration? AutomaticUserConsentSettings { + get { return BackingStore?.Get("automaticUserConsentSettings"); } + set { BackingStore?.Set("automaticUserConsentSettings", value); } + } +#nullable restore +#else + public InboundOutboundPolicyConfiguration AutomaticUserConsentSettings { + get { return BackingStore?.Get("automaticUserConsentSettings"); } + set { BackingStore?.Set("automaticUserConsentSettings", value); } + } +#endif /// Defines your default configuration for users from other organizations accessing your resources via Azure AD B2B collaboration. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -93,6 +107,7 @@ public bool? IsServiceDefault { /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { + {"automaticUserConsentSettings", n => { AutomaticUserConsentSettings = n.GetObjectValue(InboundOutboundPolicyConfiguration.CreateFromDiscriminatorValue); } }, {"b2bCollaborationInbound", n => { B2bCollaborationInbound = n.GetObjectValue(CrossTenantAccessPolicyB2BSetting.CreateFromDiscriminatorValue); } }, {"b2bCollaborationOutbound", n => { B2bCollaborationOutbound = n.GetObjectValue(CrossTenantAccessPolicyB2BSetting.CreateFromDiscriminatorValue); } }, {"b2bDirectConnectInbound", n => { B2bDirectConnectInbound = n.GetObjectValue(CrossTenantAccessPolicyB2BSetting.CreateFromDiscriminatorValue); } }, @@ -108,6 +123,7 @@ public bool? IsServiceDefault { public new void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); + writer.WriteObjectValue("automaticUserConsentSettings", AutomaticUserConsentSettings); writer.WriteObjectValue("b2bCollaborationInbound", B2bCollaborationInbound); writer.WriteObjectValue("b2bCollaborationOutbound", B2bCollaborationOutbound); writer.WriteObjectValue("b2bDirectConnectInbound", B2bDirectConnectInbound); diff --git a/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyConfigurationPartner.cs b/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyConfigurationPartner.cs index 64a80285091..2681787fbe4 100644 --- a/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyConfigurationPartner.cs +++ b/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyConfigurationPartner.cs @@ -11,6 +11,20 @@ public IDictionary AdditionalData { get { return BackingStore?.Get>("additionalData"); } set { BackingStore?.Set("additionalData", value); } } + /// The automaticUserConsentSettings property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public InboundOutboundPolicyConfiguration? AutomaticUserConsentSettings { + get { return BackingStore?.Get("automaticUserConsentSettings"); } + set { BackingStore?.Set("automaticUserConsentSettings", value); } + } +#nullable restore +#else + public InboundOutboundPolicyConfiguration AutomaticUserConsentSettings { + get { return BackingStore?.Get("automaticUserConsentSettings"); } + set { BackingStore?.Set("automaticUserConsentSettings", value); } + } +#endif /// Defines your partner-specific configuration for users from other organizations accessing your resources via Azure AD B2B collaboration. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -69,6 +83,20 @@ public CrossTenantAccessPolicyB2BSetting B2bDirectConnectOutbound { #endif /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The identitySynchronization property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public CrossTenantIdentitySyncPolicyPartner? IdentitySynchronization { + get { return BackingStore?.Get("identitySynchronization"); } + set { BackingStore?.Set("identitySynchronization", value); } + } +#nullable restore +#else + public CrossTenantIdentitySyncPolicyPartner IdentitySynchronization { + get { return BackingStore?.Get("identitySynchronization"); } + set { BackingStore?.Set("identitySynchronization", value); } + } +#endif /// Determines the partner-specific configuration for trusting other Conditional Access claims from external Azure AD organizations. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -136,10 +164,12 @@ public static CrossTenantAccessPolicyConfigurationPartner CreateFromDiscriminato /// public IDictionary> GetFieldDeserializers() { return new Dictionary> { + {"automaticUserConsentSettings", n => { AutomaticUserConsentSettings = n.GetObjectValue(InboundOutboundPolicyConfiguration.CreateFromDiscriminatorValue); } }, {"b2bCollaborationInbound", n => { B2bCollaborationInbound = n.GetObjectValue(CrossTenantAccessPolicyB2BSetting.CreateFromDiscriminatorValue); } }, {"b2bCollaborationOutbound", n => { B2bCollaborationOutbound = n.GetObjectValue(CrossTenantAccessPolicyB2BSetting.CreateFromDiscriminatorValue); } }, {"b2bDirectConnectInbound", n => { B2bDirectConnectInbound = n.GetObjectValue(CrossTenantAccessPolicyB2BSetting.CreateFromDiscriminatorValue); } }, {"b2bDirectConnectOutbound", n => { B2bDirectConnectOutbound = n.GetObjectValue(CrossTenantAccessPolicyB2BSetting.CreateFromDiscriminatorValue); } }, + {"identitySynchronization", n => { IdentitySynchronization = n.GetObjectValue(CrossTenantIdentitySyncPolicyPartner.CreateFromDiscriminatorValue); } }, {"inboundTrust", n => { InboundTrust = n.GetObjectValue(CrossTenantAccessPolicyInboundTrust.CreateFromDiscriminatorValue); } }, {"isServiceProvider", n => { IsServiceProvider = n.GetBoolValue(); } }, {"@odata.type", n => { OdataType = n.GetStringValue(); } }, @@ -152,10 +182,12 @@ public IDictionary> GetFieldDeserializers() { /// Serialization writer to use to serialize this model public void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("automaticUserConsentSettings", AutomaticUserConsentSettings); writer.WriteObjectValue("b2bCollaborationInbound", B2bCollaborationInbound); writer.WriteObjectValue("b2bCollaborationOutbound", B2bCollaborationOutbound); writer.WriteObjectValue("b2bDirectConnectInbound", B2bDirectConnectInbound); writer.WriteObjectValue("b2bDirectConnectOutbound", B2bDirectConnectOutbound); + writer.WriteObjectValue("identitySynchronization", IdentitySynchronization); writer.WriteObjectValue("inboundTrust", InboundTrust); writer.WriteBoolValue("isServiceProvider", IsServiceProvider); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CrossTenantIdentitySyncPolicyPartner.cs b/src/Microsoft.Graph/Generated/Models/CrossTenantIdentitySyncPolicyPartner.cs new file mode 100644 index 00000000000..3e9b261411d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/CrossTenantIdentitySyncPolicyPartner.cs @@ -0,0 +1,111 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class CrossTenantIdentitySyncPolicyPartner : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The displayName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { + get { return BackingStore?.Get("displayName"); } + set { BackingStore?.Set("displayName", value); } + } +#nullable restore +#else + public string DisplayName { + get { return BackingStore?.Get("displayName"); } + set { BackingStore?.Set("displayName", value); } + } +#endif + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The tenantId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TenantId { + get { return BackingStore?.Get("tenantId"); } + set { BackingStore?.Set("tenantId", value); } + } +#nullable restore +#else + public string TenantId { + get { return BackingStore?.Get("tenantId"); } + set { BackingStore?.Set("tenantId", value); } + } +#endif + /// The userSyncInbound property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public CrossTenantUserSyncInbound? UserSyncInbound { + get { return BackingStore?.Get("userSyncInbound"); } + set { BackingStore?.Set("userSyncInbound", value); } + } +#nullable restore +#else + public CrossTenantUserSyncInbound UserSyncInbound { + get { return BackingStore?.Get("userSyncInbound"); } + set { BackingStore?.Set("userSyncInbound", value); } + } +#endif + /// + /// Instantiates a new crossTenantIdentitySyncPolicyPartner and sets the default values. + /// + public CrossTenantIdentitySyncPolicyPartner() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static CrossTenantIdentitySyncPolicyPartner CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CrossTenantIdentitySyncPolicyPartner(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"displayName", n => { DisplayName = n.GetStringValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"tenantId", n => { TenantId = n.GetStringValue(); } }, + {"userSyncInbound", n => { UserSyncInbound = n.GetObjectValue(CrossTenantUserSyncInbound.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("displayName", DisplayName); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteStringValue("tenantId", TenantId); + writer.WriteObjectValue("userSyncInbound", UserSyncInbound); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/CrossTenantUserSyncInbound.cs b/src/Microsoft.Graph/Generated/Models/CrossTenantUserSyncInbound.cs new file mode 100644 index 00000000000..60e5e76eb56 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/CrossTenantUserSyncInbound.cs @@ -0,0 +1,70 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class CrossTenantUserSyncInbound : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The isSyncAllowed property + public bool? IsSyncAllowed { + get { return BackingStore?.Get("isSyncAllowed"); } + set { BackingStore?.Set("isSyncAllowed", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// + /// Instantiates a new crossTenantUserSyncInbound and sets the default values. + /// + public CrossTenantUserSyncInbound() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static CrossTenantUserSyncInbound CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CrossTenantUserSyncInbound(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"isSyncAllowed", n => { IsSyncAllowed = n.GetBoolValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("isSyncAllowed", IsSyncAllowed); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/DeviceCategory.cs b/src/Microsoft.Graph/Generated/Models/DeviceCategory.cs index e6ea8517b9b..10808146015 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceCategory.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceCategory.cs @@ -4,6 +4,9 @@ using System.Linq; using System; namespace Microsoft.Graph.Models { + /// + /// Device categories provides a way to organize your devices. Using device categories, company administrators can define their own categories that make sense to their company. These categories can then be applied to a device in the Intune Azure console or selected by a user during device enrollment. You can filter reports and create dynamic Azure Active Directory device groups based on device categories. + /// public class DeviceCategory : Entity, IParsable { /// Optional description for the device category. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Models/DirectoryRole.cs b/src/Microsoft.Graph/Generated/Models/DirectoryRole.cs index 8415563c4c1..099262b77cf 100644 --- a/src/Microsoft.Graph/Generated/Models/DirectoryRole.cs +++ b/src/Microsoft.Graph/Generated/Models/DirectoryRole.cs @@ -76,7 +76,7 @@ public List ScopedMembers { } #endif /// - /// Instantiates a new directoryRole and sets the default values. + /// Instantiates a new DirectoryRole and sets the default values. /// public DirectoryRole() : base() { OdataType = "#microsoft.graph.directoryRole"; diff --git a/src/Microsoft.Graph/Generated/Models/Group.cs b/src/Microsoft.Graph/Generated/Models/Group.cs index 5c29a442927..ae2e36ebb6f 100644 --- a/src/Microsoft.Graph/Generated/Models/Group.cs +++ b/src/Microsoft.Graph/Generated/Models/Group.cs @@ -772,7 +772,7 @@ public string Visibility { } #endif /// - /// Instantiates a new group and sets the default values. + /// Instantiates a new Group and sets the default values. /// public Group() : base() { OdataType = "#microsoft.graph.group"; diff --git a/src/Microsoft.Graph/Generated/Models/GroupSettingTemplate.cs b/src/Microsoft.Graph/Generated/Models/GroupSettingTemplate.cs index 76c1fe05f4c..0a4eead5893 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupSettingTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupSettingTemplate.cs @@ -48,7 +48,7 @@ public List Values { } #endif /// - /// Instantiates a new groupSettingTemplate and sets the default values. + /// Instantiates a new GroupSettingTemplate and sets the default values. /// public GroupSettingTemplate() : base() { OdataType = "#microsoft.graph.groupSettingTemplate"; diff --git a/src/Microsoft.Graph/Generated/Models/IdleSessionSignOut.cs b/src/Microsoft.Graph/Generated/Models/IdleSessionSignOut.cs index cb2a29292ef..7666f268750 100644 --- a/src/Microsoft.Graph/Generated/Models/IdleSessionSignOut.cs +++ b/src/Microsoft.Graph/Generated/Models/IdleSessionSignOut.cs @@ -13,7 +13,7 @@ public IDictionary AdditionalData { } /// Stores model information. public IBackingStore BackingStore { get; private set; } - /// The isEnabled property + /// Indicates whether the idle session sign-out policy is enabled. public bool? IsEnabled { get { return BackingStore?.Get("isEnabled"); } set { BackingStore?.Set("isEnabled", value); } @@ -32,12 +32,12 @@ public string OdataType { set { BackingStore?.Set("@odata.type", value); } } #endif - /// The signOutAfterInSeconds property + /// Number of seconds of inactivity after which a user is signed out. public long? SignOutAfterInSeconds { get { return BackingStore?.Get("signOutAfterInSeconds"); } set { BackingStore?.Set("signOutAfterInSeconds", value); } } - /// The warnAfterInSeconds property + /// Number of seconds of inactivity after which a user is notified that they'll be signed out. public long? WarnAfterInSeconds { get { return BackingStore?.Get("warnAfterInSeconds"); } set { BackingStore?.Set("warnAfterInSeconds", value); } diff --git a/src/Microsoft.Graph/Generated/Models/InboundOutboundPolicyConfiguration.cs b/src/Microsoft.Graph/Generated/Models/InboundOutboundPolicyConfiguration.cs new file mode 100644 index 00000000000..c98ee63a3e8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/InboundOutboundPolicyConfiguration.cs @@ -0,0 +1,77 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class InboundOutboundPolicyConfiguration : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The inboundAllowed property + public bool? InboundAllowed { + get { return BackingStore?.Get("inboundAllowed"); } + set { BackingStore?.Set("inboundAllowed", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The outboundAllowed property + public bool? OutboundAllowed { + get { return BackingStore?.Get("outboundAllowed"); } + set { BackingStore?.Set("outboundAllowed", value); } + } + /// + /// Instantiates a new inboundOutboundPolicyConfiguration and sets the default values. + /// + public InboundOutboundPolicyConfiguration() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static InboundOutboundPolicyConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new InboundOutboundPolicyConfiguration(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"inboundAllowed", n => { InboundAllowed = n.GetBoolValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"outboundAllowed", n => { OutboundAllowed = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("inboundAllowed", InboundAllowed); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteBoolValue("outboundAllowed", OutboundAllowed); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/PrintDocumentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrintDocumentCollectionResponse.cs new file mode 100644 index 00000000000..35123ae2504 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/PrintDocumentCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class PrintDocumentCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static new PrintDocumentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PrintDocumentCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(PrintDocument.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/PrintDocumentUploadProperties.cs b/src/Microsoft.Graph/Generated/Models/PrintDocumentUploadProperties.cs new file mode 100644 index 00000000000..b8acc36b545 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/PrintDocumentUploadProperties.cs @@ -0,0 +1,102 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class PrintDocumentUploadProperties : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The document's content (MIME) type. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentType { + get { return BackingStore?.Get("contentType"); } + set { BackingStore?.Set("contentType", value); } + } +#nullable restore +#else + public string ContentType { + get { return BackingStore?.Get("contentType"); } + set { BackingStore?.Set("contentType", value); } + } +#endif + /// The document's name. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentName { + get { return BackingStore?.Get("documentName"); } + set { BackingStore?.Set("documentName", value); } + } +#nullable restore +#else + public string DocumentName { + get { return BackingStore?.Get("documentName"); } + set { BackingStore?.Set("documentName", value); } + } +#endif + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The document's size in bytes. + public long? Size { + get { return BackingStore?.Get("size"); } + set { BackingStore?.Set("size", value); } + } + /// + /// Instantiates a new printDocumentUploadProperties and sets the default values. + /// + public PrintDocumentUploadProperties() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static PrintDocumentUploadProperties CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PrintDocumentUploadProperties(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"contentType", n => { ContentType = n.GetStringValue(); } }, + {"documentName", n => { DocumentName = n.GetStringValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"size", n => { Size = n.GetLongValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("contentType", ContentType); + writer.WriteStringValue("documentName", DocumentName); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteLongValue("size", Size); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/PrintJobCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrintJobCollectionResponse.cs new file mode 100644 index 00000000000..c67b7f2ee97 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/PrintJobCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class PrintJobCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static new PrintJobCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PrintJobCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(PrintJob.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/RoleDefinition.cs b/src/Microsoft.Graph/Generated/Models/RoleDefinition.cs index b80be29c142..9f0b1934e16 100644 --- a/src/Microsoft.Graph/Generated/Models/RoleDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/RoleDefinition.cs @@ -4,9 +4,6 @@ using System.Linq; using System; namespace Microsoft.Graph.Models { - /// - /// The Role Definition resource. The role definition is the foundation of role based access in Intune. The role combines an Intune resource such as a Mobile App and associated role permissions such as Create or Read for the resource. There are two types of roles, built-in and custom. Built-in roles cannot be modified. Both built-in roles and custom roles must have assignments to be enforced. Create custom roles if you want to define a role that allows any of the available resources and role permissions to be combined into a single role. - /// public class RoleDefinition : Entity, IParsable { /// Description of the Role definition. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Models/Security/UnifiedGroupSource.cs b/src/Microsoft.Graph/Generated/Models/Security/UnifiedGroupSource.cs index 36b708fe1b4..87e5dee45c3 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/UnifiedGroupSource.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/UnifiedGroupSource.cs @@ -25,7 +25,7 @@ public SourceType? IncludedSources { set { BackingStore?.Set("includedSources", value); } } /// - /// Instantiates a new unifiedGroupSource and sets the default values. + /// Instantiates a new UnifiedGroupSource and sets the default values. /// public UnifiedGroupSource() : base() { OdataType = "#microsoft.graph.security.unifiedGroupSource"; diff --git a/src/Microsoft.Graph/Generated/Models/SharepointSettings.cs b/src/Microsoft.Graph/Generated/Models/SharepointSettings.cs index 27fc3af8572..eca0a11b238 100644 --- a/src/Microsoft.Graph/Generated/Models/SharepointSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/SharepointSettings.cs @@ -5,7 +5,7 @@ using System; namespace Microsoft.Graph.Models { public class SharepointSettings : Entity, IParsable { - /// The allowedDomainGuidsForSyncApp property + /// Collection of trusted domain GUIDs for the OneDrive sync app. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? AllowedDomainGuidsForSyncApp { @@ -19,7 +19,7 @@ public List AllowedDomainGuidsForSyncApp { set { BackingStore?.Set("allowedDomainGuidsForSyncApp", value); } } #endif - /// The availableManagedPathsForSiteCreation property + /// Collection of managed paths available for site creation. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? AvailableManagedPathsForSiteCreation { @@ -33,12 +33,12 @@ public List AvailableManagedPathsForSiteCreation { set { BackingStore?.Set("availableManagedPathsForSiteCreation", value); } } #endif - /// The deletedUserPersonalSiteRetentionPeriodInDays property + /// The number of days for preserving a deleted user's OneDrive. public int? DeletedUserPersonalSiteRetentionPeriodInDays { get { return BackingStore?.Get("deletedUserPersonalSiteRetentionPeriodInDays"); } set { BackingStore?.Set("deletedUserPersonalSiteRetentionPeriodInDays", value); } } - /// The excludedFileExtensionsForSyncApp property + /// Collection of file extensions not uploaded by the OneDrive sync app. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? ExcludedFileExtensionsForSyncApp { @@ -52,7 +52,7 @@ public List ExcludedFileExtensionsForSyncApp { set { BackingStore?.Set("excludedFileExtensionsForSyncApp", value); } } #endif - /// The idleSessionSignOut property + /// Specifies the idle session sign-out policies for the tenant. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public Microsoft.Graph.Models.IdleSessionSignOut? IdleSessionSignOut { @@ -66,92 +66,92 @@ public Microsoft.Graph.Models.IdleSessionSignOut IdleSessionSignOut { set { BackingStore?.Set("idleSessionSignOut", value); } } #endif - /// The imageTaggingOption property + /// Specifies the image tagging option for the tenant. Possible values are: disabled, basic, enhanced. public ImageTaggingChoice? ImageTaggingOption { get { return BackingStore?.Get("imageTaggingOption"); } set { BackingStore?.Set("imageTaggingOption", value); } } - /// The isCommentingOnSitePagesEnabled property + /// Indicates whether comments are allowed on modern site pages in SharePoint. public bool? IsCommentingOnSitePagesEnabled { get { return BackingStore?.Get("isCommentingOnSitePagesEnabled"); } set { BackingStore?.Set("isCommentingOnSitePagesEnabled", value); } } - /// The isFileActivityNotificationEnabled property + /// Indicates whether push notifications are enabled for OneDrive events. public bool? IsFileActivityNotificationEnabled { get { return BackingStore?.Get("isFileActivityNotificationEnabled"); } set { BackingStore?.Set("isFileActivityNotificationEnabled", value); } } - /// The isLegacyAuthProtocolsEnabled property + /// Indicates whether legacy authentication protocols are enabled for the tenant. public bool? IsLegacyAuthProtocolsEnabled { get { return BackingStore?.Get("isLegacyAuthProtocolsEnabled"); } set { BackingStore?.Set("isLegacyAuthProtocolsEnabled", value); } } - /// The isLoopEnabled property + /// Indicates whether if Fluid Framework is allowed on SharePoint sites. public bool? IsLoopEnabled { get { return BackingStore?.Get("isLoopEnabled"); } set { BackingStore?.Set("isLoopEnabled", value); } } - /// The isMacSyncAppEnabled property + /// Indicates whether files can be synced using the OneDrive sync app for Mac. public bool? IsMacSyncAppEnabled { get { return BackingStore?.Get("isMacSyncAppEnabled"); } set { BackingStore?.Set("isMacSyncAppEnabled", value); } } - /// The isRequireAcceptingUserToMatchInvitedUserEnabled property + /// Indicates whether guests must sign in using the same account to which sharing invitations are sent. public bool? IsRequireAcceptingUserToMatchInvitedUserEnabled { get { return BackingStore?.Get("isRequireAcceptingUserToMatchInvitedUserEnabled"); } set { BackingStore?.Set("isRequireAcceptingUserToMatchInvitedUserEnabled", value); } } - /// The isResharingByExternalUsersEnabled property + /// Indicates whether guests are allowed to reshare files, folders, and sites they don't own. public bool? IsResharingByExternalUsersEnabled { get { return BackingStore?.Get("isResharingByExternalUsersEnabled"); } set { BackingStore?.Set("isResharingByExternalUsersEnabled", value); } } - /// The isSharePointMobileNotificationEnabled property + /// Indicates whether mobile push notifications are enabled for SharePoint. public bool? IsSharePointMobileNotificationEnabled { get { return BackingStore?.Get("isSharePointMobileNotificationEnabled"); } set { BackingStore?.Set("isSharePointMobileNotificationEnabled", value); } } - /// The isSharePointNewsfeedEnabled property + /// Indicates whether the newsfeed is allowed on the modern site pages in SharePoint. public bool? IsSharePointNewsfeedEnabled { get { return BackingStore?.Get("isSharePointNewsfeedEnabled"); } set { BackingStore?.Set("isSharePointNewsfeedEnabled", value); } } - /// The isSiteCreationEnabled property + /// Indicates whether users are allowed to create sites. public bool? IsSiteCreationEnabled { get { return BackingStore?.Get("isSiteCreationEnabled"); } set { BackingStore?.Set("isSiteCreationEnabled", value); } } - /// The isSiteCreationUIEnabled property + /// Indicates whether the UI commands for creating sites are shown. public bool? IsSiteCreationUIEnabled { get { return BackingStore?.Get("isSiteCreationUIEnabled"); } set { BackingStore?.Set("isSiteCreationUIEnabled", value); } } - /// The isSitePagesCreationEnabled property + /// Indicates whether creating new modern pages is allowed on SharePoint sites. public bool? IsSitePagesCreationEnabled { get { return BackingStore?.Get("isSitePagesCreationEnabled"); } set { BackingStore?.Set("isSitePagesCreationEnabled", value); } } - /// The isSitesStorageLimitAutomatic property + /// Indicates whether site storage space is automatically managed or if specific storage limits are set per site. public bool? IsSitesStorageLimitAutomatic { get { return BackingStore?.Get("isSitesStorageLimitAutomatic"); } set { BackingStore?.Set("isSitesStorageLimitAutomatic", value); } } - /// The isSyncButtonHiddenOnPersonalSite property + /// Indicates whether the sync button in OneDrive is hidden. public bool? IsSyncButtonHiddenOnPersonalSite { get { return BackingStore?.Get("isSyncButtonHiddenOnPersonalSite"); } set { BackingStore?.Set("isSyncButtonHiddenOnPersonalSite", value); } } - /// The isUnmanagedSyncAppForTenantRestricted property + /// Indicates whether users are allowed to sync files only on PCs joined to specific domains. public bool? IsUnmanagedSyncAppForTenantRestricted { get { return BackingStore?.Get("isUnmanagedSyncAppForTenantRestricted"); } set { BackingStore?.Set("isUnmanagedSyncAppForTenantRestricted", value); } } - /// The personalSiteDefaultStorageLimitInMB property + /// The default OneDrive storage limit for all new and existing users who are assigned a qualifying license. Measured in megabytes (MB). public long? PersonalSiteDefaultStorageLimitInMB { get { return BackingStore?.Get("personalSiteDefaultStorageLimitInMB"); } set { BackingStore?.Set("personalSiteDefaultStorageLimitInMB", value); } } - /// The sharingAllowedDomainList property + /// Collection of email domains that are allowed for sharing outside the organization. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? SharingAllowedDomainList { @@ -165,7 +165,7 @@ public List SharingAllowedDomainList { set { BackingStore?.Set("sharingAllowedDomainList", value); } } #endif - /// The sharingBlockedDomainList property + /// Collection of email domains that are blocked for sharing outside the organization. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? SharingBlockedDomainList { @@ -179,17 +179,17 @@ public List SharingBlockedDomainList { set { BackingStore?.Set("sharingBlockedDomainList", value); } } #endif - /// The sharingCapability property + /// Sharing capability for the tenant. Possible values are: disabled, externalUserSharingOnly, externalUserAndGuestSharing, existingExternalUserSharingOnly. public SharingCapabilities? SharingCapability { get { return BackingStore?.Get("sharingCapability"); } set { BackingStore?.Set("sharingCapability", value); } } - /// The sharingDomainRestrictionMode property + /// Specifies the external sharing mode for domains. Possible values are: none, allowList, blockList. public Microsoft.Graph.Models.SharingDomainRestrictionMode? SharingDomainRestrictionMode { get { return BackingStore?.Get("sharingDomainRestrictionMode"); } set { BackingStore?.Set("sharingDomainRestrictionMode", value); } } - /// The siteCreationDefaultManagedPath property + /// The value of the team site managed path. This is the path under which new team sites will be created. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? SiteCreationDefaultManagedPath { @@ -203,12 +203,12 @@ public string SiteCreationDefaultManagedPath { set { BackingStore?.Set("siteCreationDefaultManagedPath", value); } } #endif - /// The siteCreationDefaultStorageLimitInMB property + /// The default storage quota for a new site upon creation. Measured in megabytes (MB). public int? SiteCreationDefaultStorageLimitInMB { get { return BackingStore?.Get("siteCreationDefaultStorageLimitInMB"); } set { BackingStore?.Set("siteCreationDefaultStorageLimitInMB", value); } } - /// The tenantDefaultTimezone property + /// The default timezone of a tenant for newly created sites. For a list of possible values, see SPRegionalSettings.TimeZones property. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? TenantDefaultTimezone { diff --git a/src/Microsoft.Graph/Generated/Models/SignInActivity.cs b/src/Microsoft.Graph/Generated/Models/SignInActivity.cs index c69df174659..239ab37ea39 100644 --- a/src/Microsoft.Graph/Generated/Models/SignInActivity.cs +++ b/src/Microsoft.Graph/Generated/Models/SignInActivity.cs @@ -13,7 +13,7 @@ public IDictionary AdditionalData { } /// Stores model information. public IBackingStore BackingStore { get; private set; } - /// The last non-interactive sign-in date for a specific user. You can use this field to calculate the last time a client signed in to the directory on behalf of a user. Because some users may use clients to access tenant resources rather than signing into your tenant directly, you can use the non-interactive sign-in date to along with lastSignInDateTime to identify inactive users. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is: '2014-01-01T00:00:00Z'. Azure AD maintains non-interactive sign-ins going back to May 2020. For more information about using the value of this property, see Manage inactive user accounts in Azure AD. + /// The last non-interactive sign-in date for a specific user. You can use this field to calculate the last time a client attempted to sign into the directory on behalf of a user. Because some users may use clients to access tenant resources rather than signing into your tenant directly, you can use the non-interactive sign-in date to along with lastSignInDateTime to identify inactive users. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is: '2014-01-01T00:00:00Z'. Azure AD maintains non-interactive sign-ins going back to May 2020. For more information about using the value of this property, see Manage inactive user accounts in Azure AD. public DateTimeOffset? LastNonInteractiveSignInDateTime { get { return BackingStore?.Get("lastNonInteractiveSignInDateTime"); } set { BackingStore?.Set("lastNonInteractiveSignInDateTime", value); } @@ -32,7 +32,7 @@ public string LastNonInteractiveSignInRequestId { set { BackingStore?.Set("lastNonInteractiveSignInRequestId", value); } } #endif - /// The last interactive sign-in date and time for a specific user. You can use this field to calculate the last time a user signed in to the directory with an interactive authentication method. This field can be used to build reports, such as inactive users. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is: '2014-01-01T00:00:00Z'. Azure AD maintains interactive sign-ins going back to April 2020. For more information about using the value of this property, see Manage inactive user accounts in Azure AD. + /// The last interactive sign-in date and time for a specific user. You can use this field to calculate the last time a user attempted to sign into the directory with an interactive authentication method. This field can be used to build reports, such as inactive users. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is: '2014-01-01T00:00:00Z'. Azure AD maintains interactive sign-ins going back to April 2020. For more information about using the value of this property, see Manage inactive user accounts in Azure AD. public DateTimeOffset? LastSignInDateTime { get { return BackingStore?.Get("lastSignInDateTime"); } set { BackingStore?.Set("lastSignInDateTime", value); } diff --git a/src/Microsoft.Graph/Generated/Models/Windows10MobileCompliancePolicy.cs b/src/Microsoft.Graph/Generated/Models/Windows10MobileCompliancePolicy.cs index 7dd217b9e9f..93ad9c00ea6 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10MobileCompliancePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10MobileCompliancePolicy.cs @@ -4,6 +4,9 @@ using System.Linq; using System; namespace Microsoft.Graph.Models { + /// + /// This class contains compliance settings for Windows 10 Mobile. + /// public class Windows10MobileCompliancePolicy : DeviceCompliancePolicy, IParsable { /// Require devices to be reported healthy by Windows Device Health Attestation - bit locker is enabled public bool? BitLockerEnabled { @@ -104,7 +107,7 @@ public bool? StorageRequireEncryption { set { BackingStore?.Set("storageRequireEncryption", value); } } /// - /// Instantiates a new Windows10MobileCompliancePolicy and sets the default values. + /// Instantiates a new windows10MobileCompliancePolicy and sets the default values. /// public Windows10MobileCompliancePolicy() : base() { OdataType = "#microsoft.graph.windows10MobileCompliancePolicy"; diff --git a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionAppLockerFileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionAppLockerFileCollectionResponse.cs new file mode 100644 index 00000000000..e7c11c00b19 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionAppLockerFileCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class WindowsInformationProtectionAppLockerFileCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static new WindowsInformationProtectionAppLockerFileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new WindowsInformationProtectionAppLockerFileCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(WindowsInformationProtectionAppLockerFile.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Organization/Item/CertificateBasedAuthConfiguration/CertificateBasedAuthConfigurationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/CertificateBasedAuthConfiguration/CertificateBasedAuthConfigurationRequestBuilder.cs index 1be71cdb628..5699f5981e4 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/CertificateBasedAuthConfiguration/CertificateBasedAuthConfigurationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/CertificateBasedAuthConfiguration/CertificateBasedAuthConfigurationRequestBuilder.cs @@ -59,6 +59,27 @@ public async Task GetAsync( return await RequestAdapter.SendAsync(requestInfo, CertificateBasedAuthConfigurationCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// + /// Create new navigation property to certificateBasedAuthConfiguration for organization + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Microsoft.Graph.Models.CertificateBasedAuthConfiguration body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Microsoft.Graph.Models.CertificateBasedAuthConfiguration body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.CertificateBasedAuthConfiguration.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// /// Navigation property to manage certificate-based authentication configuration. Only a single instance of certificateBasedAuthConfiguration can be created in the collection. /// /// Configuration for the request such as headers, query parameters, and middleware options. @@ -85,6 +106,34 @@ public RequestInformation ToGetRequestInformation(Action + /// Create new navigation property to certificateBasedAuthConfiguration for organization + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Microsoft.Graph.Models.CertificateBasedAuthConfiguration body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Microsoft.Graph.Models.CertificateBasedAuthConfiguration body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new CertificateBasedAuthConfigurationRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// /// Navigation property to manage certificate-based authentication configuration. Only a single instance of certificateBasedAuthConfiguration can be created in the collection. /// public class CertificateBasedAuthConfigurationRequestBuilderGetQueryParameters { @@ -166,5 +215,21 @@ public CertificateBasedAuthConfigurationRequestBuilderGetRequestConfiguration() Headers = new RequestHeaders(); } } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CertificateBasedAuthConfigurationRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new certificateBasedAuthConfigurationRequestBuilderPostRequestConfiguration and sets the default values. + /// + public CertificateBasedAuthConfigurationRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } } } diff --git a/src/Microsoft.Graph/Generated/Organization/Item/CertificateBasedAuthConfiguration/Item/CertificateBasedAuthConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/CertificateBasedAuthConfiguration/Item/CertificateBasedAuthConfigurationItemRequestBuilder.cs index 5bbd24f56e1..9336f2983a5 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/CertificateBasedAuthConfiguration/Item/CertificateBasedAuthConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/CertificateBasedAuthConfiguration/Item/CertificateBasedAuthConfigurationItemRequestBuilder.cs @@ -28,6 +28,25 @@ public CertificateBasedAuthConfigurationItemRequestBuilder(Dictionary + /// Delete navigation property certificateBasedAuthConfiguration for organization + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// /// Navigation property to manage certificate-based authentication configuration. Only a single instance of certificateBasedAuthConfiguration can be created in the collection. /// /// Cancellation token to use when cancelling requests @@ -47,6 +66,30 @@ public CertificateBasedAuthConfigurationItemRequestBuilder(string rawUrl, IReque return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.CertificateBasedAuthConfiguration.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// + /// Delete navigation property certificateBasedAuthConfiguration for organization + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new CertificateBasedAuthConfigurationItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// /// Navigation property to manage certificate-based authentication configuration. Only a single instance of certificateBasedAuthConfiguration can be created in the collection. /// /// Configuration for the request such as headers, query parameters, and middleware options. @@ -73,6 +116,22 @@ public RequestInformation ToGetRequestInformation(Action + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CertificateBasedAuthConfigurationItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new CertificateBasedAuthConfigurationItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public CertificateBasedAuthConfigurationItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// /// Navigation property to manage certificate-based authentication configuration. Only a single instance of certificateBasedAuthConfiguration can be created in the collection. /// public class CertificateBasedAuthConfigurationItemRequestBuilderGetQueryParameters { diff --git a/src/Microsoft.Graph/Generated/Policies/ActivityBasedTimeoutPolicies/Item/ActivityBasedTimeoutPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/ActivityBasedTimeoutPolicies/Item/ActivityBasedTimeoutPolicyItemRequestBuilder.cs index 970deb9bf54..f1986966807 100644 --- a/src/Microsoft.Graph/Generated/Policies/ActivityBasedTimeoutPolicies/Item/ActivityBasedTimeoutPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/ActivityBasedTimeoutPolicies/Item/ActivityBasedTimeoutPolicyItemRequestBuilder.cs @@ -1,5 +1,6 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; +using Microsoft.Graph.Policies.ActivityBasedTimeoutPolicies.Item.AppliesTo; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -13,6 +14,10 @@ namespace Microsoft.Graph.Policies.ActivityBasedTimeoutPolicies.Item { /// Provides operations to manage the activityBasedTimeoutPolicies property of the microsoft.graph.policyRoot entity. /// public class ActivityBasedTimeoutPolicyItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the appliesTo property of the microsoft.graph.stsPolicy entity. + public AppliesToRequestBuilder AppliesTo { get => + new AppliesToRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new ActivityBasedTimeoutPolicyItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Policies/ActivityBasedTimeoutPolicies/Item/AppliesTo/AppliesToRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/ActivityBasedTimeoutPolicies/Item/AppliesTo/AppliesToRequestBuilder.cs new file mode 100644 index 00000000000..d605a8d01d3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Policies/ActivityBasedTimeoutPolicies/Item/AppliesTo/AppliesToRequestBuilder.cs @@ -0,0 +1,170 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Policies.ActivityBasedTimeoutPolicies.Item.AppliesTo.Count; +using Microsoft.Graph.Policies.ActivityBasedTimeoutPolicies.Item.AppliesTo.Item; +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.Policies.ActivityBasedTimeoutPolicies.Item.AppliesTo { + /// + /// Provides operations to manage the appliesTo property of the microsoft.graph.stsPolicy entity. + /// + public class AppliesToRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the appliesTo property of the microsoft.graph.stsPolicy entity. + public DirectoryObjectItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("directoryObject%2Did", position); + return new DirectoryObjectItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new AppliesToRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AppliesToRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/activityBasedTimeoutPolicies/{activityBasedTimeoutPolicy%2Did}/appliesTo{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AppliesToRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AppliesToRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/activityBasedTimeoutPolicies/{activityBasedTimeoutPolicy%2Did}/appliesTo{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get appliesTo from policies + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObjectCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get appliesTo from policies + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new AppliesToRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get appliesTo from policies + /// + public class AppliesToRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AppliesToRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AppliesToRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AppliesToRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new appliesToRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AppliesToRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Policies/ActivityBasedTimeoutPolicies/Item/AppliesTo/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/ActivityBasedTimeoutPolicies/Item/AppliesTo/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..a49c098a72a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Policies/ActivityBasedTimeoutPolicies/Item/AppliesTo/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +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.Policies.ActivityBasedTimeoutPolicies.Item.AppliesTo.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/activityBasedTimeoutPolicies/{activityBasedTimeoutPolicy%2Did}/appliesTo/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/activityBasedTimeoutPolicies/{activityBasedTimeoutPolicy%2Did}/appliesTo/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Policies/ActivityBasedTimeoutPolicies/Item/AppliesTo/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/ActivityBasedTimeoutPolicies/Item/AppliesTo/Item/DirectoryObjectItemRequestBuilder.cs new file mode 100644 index 00000000000..057d98381e9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Policies/ActivityBasedTimeoutPolicies/Item/AppliesTo/Item/DirectoryObjectItemRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Policies.ActivityBasedTimeoutPolicies.Item.AppliesTo.Item { + /// + /// Provides operations to manage the appliesTo property of the microsoft.graph.stsPolicy entity. + /// + public class DirectoryObjectItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DirectoryObjectItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/activityBasedTimeoutPolicies/{activityBasedTimeoutPolicy%2Did}/appliesTo/{directoryObject%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DirectoryObjectItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/activityBasedTimeoutPolicies/{activityBasedTimeoutPolicy%2Did}/appliesTo/{directoryObject%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Get appliesTo from policies + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get appliesTo from policies + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DirectoryObjectItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get appliesTo from policies + /// + public class DirectoryObjectItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryObjectItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DirectoryObjectItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DirectoryObjectItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new DirectoryObjectItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DirectoryObjectItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Policies/ClaimsMappingPolicies/Item/AppliesTo/AppliesToRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/ClaimsMappingPolicies/Item/AppliesTo/AppliesToRequestBuilder.cs new file mode 100644 index 00000000000..1d2ca650195 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Policies/ClaimsMappingPolicies/Item/AppliesTo/AppliesToRequestBuilder.cs @@ -0,0 +1,170 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Policies.ClaimsMappingPolicies.Item.AppliesTo.Count; +using Microsoft.Graph.Policies.ClaimsMappingPolicies.Item.AppliesTo.Item; +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.Policies.ClaimsMappingPolicies.Item.AppliesTo { + /// + /// Provides operations to manage the appliesTo property of the microsoft.graph.stsPolicy entity. + /// + public class AppliesToRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the appliesTo property of the microsoft.graph.stsPolicy entity. + public DirectoryObjectItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("directoryObject%2Did", position); + return new DirectoryObjectItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new AppliesToRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AppliesToRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/claimsMappingPolicies/{claimsMappingPolicy%2Did}/appliesTo{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AppliesToRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AppliesToRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/claimsMappingPolicies/{claimsMappingPolicy%2Did}/appliesTo{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get appliesTo from policies + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObjectCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get appliesTo from policies + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new AppliesToRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get appliesTo from policies + /// + public class AppliesToRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AppliesToRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AppliesToRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AppliesToRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new appliesToRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AppliesToRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Policies/ClaimsMappingPolicies/Item/AppliesTo/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/ClaimsMappingPolicies/Item/AppliesTo/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..5f47ebddb90 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Policies/ClaimsMappingPolicies/Item/AppliesTo/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +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.Policies.ClaimsMappingPolicies.Item.AppliesTo.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/claimsMappingPolicies/{claimsMappingPolicy%2Did}/appliesTo/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/claimsMappingPolicies/{claimsMappingPolicy%2Did}/appliesTo/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Policies/ClaimsMappingPolicies/Item/AppliesTo/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/ClaimsMappingPolicies/Item/AppliesTo/Item/DirectoryObjectItemRequestBuilder.cs new file mode 100644 index 00000000000..4a2a19bda65 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Policies/ClaimsMappingPolicies/Item/AppliesTo/Item/DirectoryObjectItemRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Policies.ClaimsMappingPolicies.Item.AppliesTo.Item { + /// + /// Provides operations to manage the appliesTo property of the microsoft.graph.stsPolicy entity. + /// + public class DirectoryObjectItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DirectoryObjectItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/claimsMappingPolicies/{claimsMappingPolicy%2Did}/appliesTo/{directoryObject%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DirectoryObjectItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/claimsMappingPolicies/{claimsMappingPolicy%2Did}/appliesTo/{directoryObject%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Get appliesTo from policies + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get appliesTo from policies + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DirectoryObjectItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get appliesTo from policies + /// + public class DirectoryObjectItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryObjectItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DirectoryObjectItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DirectoryObjectItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new DirectoryObjectItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DirectoryObjectItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Policies/ClaimsMappingPolicies/Item/ClaimsMappingPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/ClaimsMappingPolicies/Item/ClaimsMappingPolicyItemRequestBuilder.cs index b0de754faea..a472ed6cd8f 100644 --- a/src/Microsoft.Graph/Generated/Policies/ClaimsMappingPolicies/Item/ClaimsMappingPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/ClaimsMappingPolicies/Item/ClaimsMappingPolicyItemRequestBuilder.cs @@ -1,5 +1,6 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; +using Microsoft.Graph.Policies.ClaimsMappingPolicies.Item.AppliesTo; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -13,6 +14,10 @@ namespace Microsoft.Graph.Policies.ClaimsMappingPolicies.Item { /// Provides operations to manage the claimsMappingPolicies property of the microsoft.graph.policyRoot entity. /// public class ClaimsMappingPolicyItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the appliesTo property of the microsoft.graph.stsPolicy entity. + public AppliesToRequestBuilder AppliesTo { get => + new AppliesToRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new ClaimsMappingPolicyItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/Item/CrossTenantAccessPolicyConfigurationPartnerTenantItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/Item/CrossTenantAccessPolicyConfigurationPartnerTenantItemRequestBuilder.cs index af0c1bb9445..06197b4cfd7 100644 --- a/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/Item/CrossTenantAccessPolicyConfigurationPartnerTenantItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/Item/CrossTenantAccessPolicyConfigurationPartnerTenantItemRequestBuilder.cs @@ -1,5 +1,6 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; +using Microsoft.Graph.Policies.CrossTenantAccessPolicy.Partners.Item.IdentitySynchronization; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -13,6 +14,10 @@ namespace Microsoft.Graph.Policies.CrossTenantAccessPolicy.Partners.Item { /// Provides operations to manage the partners property of the microsoft.graph.crossTenantAccessPolicy entity. /// public class CrossTenantAccessPolicyConfigurationPartnerTenantItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the identitySynchronization property of the microsoft.graph.crossTenantAccessPolicyConfigurationPartner entity. + public IdentitySynchronizationRequestBuilder IdentitySynchronization { get => + new IdentitySynchronizationRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new CrossTenantAccessPolicyConfigurationPartnerTenantItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/Item/IdentitySynchronization/IdentitySynchronizationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/Item/IdentitySynchronization/IdentitySynchronizationRequestBuilder.cs new file mode 100644 index 00000000000..a0d19c7d0bc --- /dev/null +++ b/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/Item/IdentitySynchronization/IdentitySynchronizationRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Policies.CrossTenantAccessPolicy.Partners.Item.IdentitySynchronization { + /// + /// Provides operations to manage the identitySynchronization property of the microsoft.graph.crossTenantAccessPolicyConfigurationPartner entity. + /// + public class IdentitySynchronizationRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new IdentitySynchronizationRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IdentitySynchronizationRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/crossTenantAccessPolicy/partners/{crossTenantAccessPolicyConfigurationPartner%2DtenantId}/identitySynchronization{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new IdentitySynchronizationRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IdentitySynchronizationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/crossTenantAccessPolicy/partners/{crossTenantAccessPolicyConfigurationPartner%2DtenantId}/identitySynchronization{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property identitySynchronization for policies + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get identitySynchronization from policies + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, CrossTenantIdentitySyncPolicyPartner.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property identitySynchronization in policies + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(CrossTenantIdentitySyncPolicyPartner body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(CrossTenantIdentitySyncPolicyPartner body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, CrossTenantIdentitySyncPolicyPartner.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property identitySynchronization for policies + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new IdentitySynchronizationRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get identitySynchronization from policies + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new IdentitySynchronizationRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property identitySynchronization in policies + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(CrossTenantIdentitySyncPolicyPartner body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(CrossTenantIdentitySyncPolicyPartner body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new IdentitySynchronizationRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class IdentitySynchronizationRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new identitySynchronizationRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public IdentitySynchronizationRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get identitySynchronization from policies + /// + public class IdentitySynchronizationRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class IdentitySynchronizationRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public IdentitySynchronizationRequestBuilderGetQueryParameters QueryParameters { get; set; } = new IdentitySynchronizationRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new identitySynchronizationRequestBuilderGetRequestConfiguration and sets the default values. + /// + public IdentitySynchronizationRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class IdentitySynchronizationRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new identitySynchronizationRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public IdentitySynchronizationRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Policies/HomeRealmDiscoveryPolicies/Item/AppliesTo/AppliesToRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/HomeRealmDiscoveryPolicies/Item/AppliesTo/AppliesToRequestBuilder.cs new file mode 100644 index 00000000000..b69077f4920 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Policies/HomeRealmDiscoveryPolicies/Item/AppliesTo/AppliesToRequestBuilder.cs @@ -0,0 +1,170 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Policies.HomeRealmDiscoveryPolicies.Item.AppliesTo.Count; +using Microsoft.Graph.Policies.HomeRealmDiscoveryPolicies.Item.AppliesTo.Item; +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.Policies.HomeRealmDiscoveryPolicies.Item.AppliesTo { + /// + /// Provides operations to manage the appliesTo property of the microsoft.graph.stsPolicy entity. + /// + public class AppliesToRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the appliesTo property of the microsoft.graph.stsPolicy entity. + public DirectoryObjectItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("directoryObject%2Did", position); + return new DirectoryObjectItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new AppliesToRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AppliesToRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/homeRealmDiscoveryPolicies/{homeRealmDiscoveryPolicy%2Did}/appliesTo{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AppliesToRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AppliesToRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/homeRealmDiscoveryPolicies/{homeRealmDiscoveryPolicy%2Did}/appliesTo{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get appliesTo from policies + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObjectCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get appliesTo from policies + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new AppliesToRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get appliesTo from policies + /// + public class AppliesToRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AppliesToRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AppliesToRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AppliesToRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new appliesToRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AppliesToRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Policies/HomeRealmDiscoveryPolicies/Item/AppliesTo/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/HomeRealmDiscoveryPolicies/Item/AppliesTo/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..fb832650025 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Policies/HomeRealmDiscoveryPolicies/Item/AppliesTo/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +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.Policies.HomeRealmDiscoveryPolicies.Item.AppliesTo.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/homeRealmDiscoveryPolicies/{homeRealmDiscoveryPolicy%2Did}/appliesTo/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/homeRealmDiscoveryPolicies/{homeRealmDiscoveryPolicy%2Did}/appliesTo/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Policies/HomeRealmDiscoveryPolicies/Item/AppliesTo/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/HomeRealmDiscoveryPolicies/Item/AppliesTo/Item/DirectoryObjectItemRequestBuilder.cs new file mode 100644 index 00000000000..953bcd7a188 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Policies/HomeRealmDiscoveryPolicies/Item/AppliesTo/Item/DirectoryObjectItemRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Policies.HomeRealmDiscoveryPolicies.Item.AppliesTo.Item { + /// + /// Provides operations to manage the appliesTo property of the microsoft.graph.stsPolicy entity. + /// + public class DirectoryObjectItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DirectoryObjectItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/homeRealmDiscoveryPolicies/{homeRealmDiscoveryPolicy%2Did}/appliesTo/{directoryObject%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DirectoryObjectItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/homeRealmDiscoveryPolicies/{homeRealmDiscoveryPolicy%2Did}/appliesTo/{directoryObject%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Get appliesTo from policies + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get appliesTo from policies + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DirectoryObjectItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get appliesTo from policies + /// + public class DirectoryObjectItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryObjectItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DirectoryObjectItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DirectoryObjectItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new DirectoryObjectItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DirectoryObjectItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Policies/HomeRealmDiscoveryPolicies/Item/HomeRealmDiscoveryPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/HomeRealmDiscoveryPolicies/Item/HomeRealmDiscoveryPolicyItemRequestBuilder.cs index fe354b4ab66..7c62bfb9647 100644 --- a/src/Microsoft.Graph/Generated/Policies/HomeRealmDiscoveryPolicies/Item/HomeRealmDiscoveryPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/HomeRealmDiscoveryPolicies/Item/HomeRealmDiscoveryPolicyItemRequestBuilder.cs @@ -1,5 +1,6 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; +using Microsoft.Graph.Policies.HomeRealmDiscoveryPolicies.Item.AppliesTo; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -13,6 +14,10 @@ namespace Microsoft.Graph.Policies.HomeRealmDiscoveryPolicies.Item { /// Provides operations to manage the homeRealmDiscoveryPolicies property of the microsoft.graph.policyRoot entity. /// public class HomeRealmDiscoveryPolicyItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the appliesTo property of the microsoft.graph.stsPolicy entity. + public AppliesToRequestBuilder AppliesTo { get => + new AppliesToRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new HomeRealmDiscoveryPolicyItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Policies/TokenIssuancePolicies/Item/AppliesTo/AppliesToRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/TokenIssuancePolicies/Item/AppliesTo/AppliesToRequestBuilder.cs new file mode 100644 index 00000000000..7fbcdd205c5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Policies/TokenIssuancePolicies/Item/AppliesTo/AppliesToRequestBuilder.cs @@ -0,0 +1,170 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Policies.TokenIssuancePolicies.Item.AppliesTo.Count; +using Microsoft.Graph.Policies.TokenIssuancePolicies.Item.AppliesTo.Item; +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.Policies.TokenIssuancePolicies.Item.AppliesTo { + /// + /// Provides operations to manage the appliesTo property of the microsoft.graph.stsPolicy entity. + /// + public class AppliesToRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the appliesTo property of the microsoft.graph.stsPolicy entity. + public DirectoryObjectItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("directoryObject%2Did", position); + return new DirectoryObjectItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new AppliesToRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AppliesToRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/tokenIssuancePolicies/{tokenIssuancePolicy%2Did}/appliesTo{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AppliesToRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AppliesToRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/tokenIssuancePolicies/{tokenIssuancePolicy%2Did}/appliesTo{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get appliesTo from policies + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObjectCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get appliesTo from policies + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new AppliesToRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get appliesTo from policies + /// + public class AppliesToRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AppliesToRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AppliesToRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AppliesToRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new appliesToRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AppliesToRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Policies/TokenIssuancePolicies/Item/AppliesTo/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/TokenIssuancePolicies/Item/AppliesTo/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..c636c59e8f1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Policies/TokenIssuancePolicies/Item/AppliesTo/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +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.Policies.TokenIssuancePolicies.Item.AppliesTo.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/tokenIssuancePolicies/{tokenIssuancePolicy%2Did}/appliesTo/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/tokenIssuancePolicies/{tokenIssuancePolicy%2Did}/appliesTo/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Policies/TokenIssuancePolicies/Item/AppliesTo/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/TokenIssuancePolicies/Item/AppliesTo/Item/DirectoryObjectItemRequestBuilder.cs new file mode 100644 index 00000000000..d2937f547b4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Policies/TokenIssuancePolicies/Item/AppliesTo/Item/DirectoryObjectItemRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Policies.TokenIssuancePolicies.Item.AppliesTo.Item { + /// + /// Provides operations to manage the appliesTo property of the microsoft.graph.stsPolicy entity. + /// + public class DirectoryObjectItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DirectoryObjectItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/tokenIssuancePolicies/{tokenIssuancePolicy%2Did}/appliesTo/{directoryObject%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DirectoryObjectItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/tokenIssuancePolicies/{tokenIssuancePolicy%2Did}/appliesTo/{directoryObject%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Get appliesTo from policies + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get appliesTo from policies + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DirectoryObjectItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get appliesTo from policies + /// + public class DirectoryObjectItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryObjectItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DirectoryObjectItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DirectoryObjectItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new DirectoryObjectItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DirectoryObjectItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Policies/TokenIssuancePolicies/Item/TokenIssuancePolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/TokenIssuancePolicies/Item/TokenIssuancePolicyItemRequestBuilder.cs index a7ee53ceed5..8ade0f579ad 100644 --- a/src/Microsoft.Graph/Generated/Policies/TokenIssuancePolicies/Item/TokenIssuancePolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/TokenIssuancePolicies/Item/TokenIssuancePolicyItemRequestBuilder.cs @@ -1,5 +1,6 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; +using Microsoft.Graph.Policies.TokenIssuancePolicies.Item.AppliesTo; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -13,6 +14,10 @@ namespace Microsoft.Graph.Policies.TokenIssuancePolicies.Item { /// Provides operations to manage the tokenIssuancePolicies property of the microsoft.graph.policyRoot entity. /// public class TokenIssuancePolicyItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the appliesTo property of the microsoft.graph.stsPolicy entity. + public AppliesToRequestBuilder AppliesTo { get => + new AppliesToRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new TokenIssuancePolicyItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Policies/TokenLifetimePolicies/Item/AppliesTo/AppliesToRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/TokenLifetimePolicies/Item/AppliesTo/AppliesToRequestBuilder.cs new file mode 100644 index 00000000000..63b174c42c4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Policies/TokenLifetimePolicies/Item/AppliesTo/AppliesToRequestBuilder.cs @@ -0,0 +1,170 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Policies.TokenLifetimePolicies.Item.AppliesTo.Count; +using Microsoft.Graph.Policies.TokenLifetimePolicies.Item.AppliesTo.Item; +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.Policies.TokenLifetimePolicies.Item.AppliesTo { + /// + /// Provides operations to manage the appliesTo property of the microsoft.graph.stsPolicy entity. + /// + public class AppliesToRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the appliesTo property of the microsoft.graph.stsPolicy entity. + public DirectoryObjectItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("directoryObject%2Did", position); + return new DirectoryObjectItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new AppliesToRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AppliesToRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/tokenLifetimePolicies/{tokenLifetimePolicy%2Did}/appliesTo{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AppliesToRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AppliesToRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/tokenLifetimePolicies/{tokenLifetimePolicy%2Did}/appliesTo{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get appliesTo from policies + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObjectCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get appliesTo from policies + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new AppliesToRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get appliesTo from policies + /// + public class AppliesToRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AppliesToRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AppliesToRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AppliesToRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new appliesToRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AppliesToRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Policies/TokenLifetimePolicies/Item/AppliesTo/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/TokenLifetimePolicies/Item/AppliesTo/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..3f889750ce2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Policies/TokenLifetimePolicies/Item/AppliesTo/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +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.Policies.TokenLifetimePolicies.Item.AppliesTo.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/tokenLifetimePolicies/{tokenLifetimePolicy%2Did}/appliesTo/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/tokenLifetimePolicies/{tokenLifetimePolicy%2Did}/appliesTo/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Policies/TokenLifetimePolicies/Item/AppliesTo/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/TokenLifetimePolicies/Item/AppliesTo/Item/DirectoryObjectItemRequestBuilder.cs new file mode 100644 index 00000000000..de2d4186458 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Policies/TokenLifetimePolicies/Item/AppliesTo/Item/DirectoryObjectItemRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Policies.TokenLifetimePolicies.Item.AppliesTo.Item { + /// + /// Provides operations to manage the appliesTo property of the microsoft.graph.stsPolicy entity. + /// + public class DirectoryObjectItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DirectoryObjectItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/tokenLifetimePolicies/{tokenLifetimePolicy%2Did}/appliesTo/{directoryObject%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DirectoryObjectItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/policies/tokenLifetimePolicies/{tokenLifetimePolicy%2Did}/appliesTo/{directoryObject%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Get appliesTo from policies + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get appliesTo from policies + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DirectoryObjectItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get appliesTo from policies + /// + public class DirectoryObjectItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryObjectItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DirectoryObjectItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DirectoryObjectItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new DirectoryObjectItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DirectoryObjectItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Policies/TokenLifetimePolicies/Item/TokenLifetimePolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/TokenLifetimePolicies/Item/TokenLifetimePolicyItemRequestBuilder.cs index 9539f5c87c5..90991aced10 100644 --- a/src/Microsoft.Graph/Generated/Policies/TokenLifetimePolicies/Item/TokenLifetimePolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/TokenLifetimePolicies/Item/TokenLifetimePolicyItemRequestBuilder.cs @@ -1,5 +1,6 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; +using Microsoft.Graph.Policies.TokenLifetimePolicies.Item.AppliesTo; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -13,6 +14,10 @@ namespace Microsoft.Graph.Policies.TokenLifetimePolicies.Item { /// Provides operations to manage the tokenLifetimePolicies property of the microsoft.graph.policyRoot entity. /// public class TokenLifetimePolicyItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the appliesTo property of the microsoft.graph.stsPolicy entity. + public AppliesToRequestBuilder AppliesTo { get => + new AppliesToRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new TokenLifetimePolicyItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Operations/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Count/CountRequestBuilder.cs similarity index 89% rename from src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Operations/Count/CountRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Count/CountRequestBuilder.cs index 7455d8dedef..dd0b37ec92e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Operations/Count/CountRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Count/CountRequestBuilder.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Drives.Item.Items.Item.Workbook.Operations.Count { +namespace Microsoft.Graph.Print.Printers.Item.Jobs.Count { /// /// Provides operations to count the resources in the collection. /// @@ -17,14 +17,14 @@ public class CountRequestBuilder : BaseRequestBuilder { /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/operations/$count{?%24search}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/$count{?%24search,%24filter}", pathParameters) { } /// /// Instantiates a new CountRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/operations/$count{?%24search}", rawUrl) { + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/$count{?%24search,%24filter}", rawUrl) { } /// /// Get the number of the resource @@ -75,6 +75,16 @@ public RequestInformation ToGetRequestInformation(Action public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 /// Search items by search phrases #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Abort/AbortPostRequestBody.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Abort/AbortPostRequestBody.cs new file mode 100644 index 00000000000..ac2499dc8c7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Abort/AbortPostRequestBody.cs @@ -0,0 +1,63 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Print.Printers.Item.Jobs.Item.Abort { + public class AbortPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Reason { + get { return BackingStore?.Get("reason"); } + set { BackingStore?.Set("reason", value); } + } +#nullable restore +#else + public string Reason { + get { return BackingStore?.Get("reason"); } + set { BackingStore?.Set("reason", value); } + } +#endif + /// + /// Instantiates a new abortPostRequestBody and sets the default values. + /// + public AbortPostRequestBody() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static AbortPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AbortPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"reason", n => { Reason = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("reason", Reason); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Abort/AbortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Abort/AbortRequestBuilder.cs new file mode 100644 index 00000000000..07f86820492 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Abort/AbortRequestBuilder.cs @@ -0,0 +1,94 @@ +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.Print.Printers.Item.Jobs.Item.Abort { + /// + /// Provides operations to call the abort method. + /// + public class AbortRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new AbortRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AbortRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/abort", pathParameters) { + } + /// + /// Instantiates a new AbortRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AbortRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/abort", rawUrl) { + } + /// + /// Invoke action abort + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(AbortPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(AbortPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Invoke action abort + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(AbortPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(AbortPostRequestBody body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new AbortRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AbortRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new abortRequestBuilderPostRequestConfiguration and sets the default values. + /// + public AbortRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/SecurityClose/SecurityCloseRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Cancel/CancelRequestBuilder.cs similarity index 63% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/SecurityClose/SecurityCloseRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Cancel/CancelRequestBuilder.cs index 27fb7d7d2a8..e457ff6d1a3 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/SecurityClose/SecurityCloseRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Cancel/CancelRequestBuilder.cs @@ -7,36 +7,36 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.SecurityClose { +namespace Microsoft.Graph.Print.Printers.Item.Jobs.Item.Cancel { /// - /// Provides operations to call the close method. + /// Provides operations to call the cancel method. /// - public class SecurityCloseRequestBuilder : BaseRequestBuilder { + public class CancelRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new SecurityCloseRequestBuilder and sets the default values. + /// Instantiates a new CancelRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public SecurityCloseRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/security.close", pathParameters) { + public CancelRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/cancel", pathParameters) { } /// - /// Instantiates a new SecurityCloseRequestBuilder and sets the default values. + /// Instantiates a new CancelRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public SecurityCloseRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/security.close", rawUrl) { + public CancelRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/cancel", rawUrl) { } /// - /// Invoke action close + /// Invoke action cancel /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif var requestInfo = ToPostRequestInformation(requestConfiguration); var errorMapping = new Dictionary> { @@ -46,15 +46,15 @@ public async Task PostAsync(Action - /// Invoke action close + /// Invoke action cancel /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { #endif var requestInfo = new RequestInformation { HttpMethod = Method.POST, @@ -62,7 +62,7 @@ public RequestInformation ToPostRequestInformation(Action /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class SecurityCloseRequestBuilderPostRequestConfiguration { + public class CancelRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new securityCloseRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new cancelRequestBuilderPostRequestConfiguration and sets the default values. /// - public SecurityCloseRequestBuilderPostRequestConfiguration() { + public CancelRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..b0abc2cdca9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +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.Print.Printers.Item.Jobs.Item.Documents.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/documents/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/documents/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/DocumentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/DocumentsRequestBuilder.cs new file mode 100644 index 00000000000..4a038b328b4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/DocumentsRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Print.Printers.Item.Jobs.Item.Documents.Count; +using Microsoft.Graph.Print.Printers.Item.Jobs.Item.Documents.Item; +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.Print.Printers.Item.Jobs.Item.Documents { + /// + /// Provides operations to manage the documents property of the microsoft.graph.printJob entity. + /// + public class DocumentsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the documents property of the microsoft.graph.printJob entity. + public PrintDocumentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("printDocument%2Did", position); + return new PrintDocumentItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new DocumentsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DocumentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/documents{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DocumentsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DocumentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/documents{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get documents from print + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintDocumentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to documents for print + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(PrintDocument body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(PrintDocument body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get documents from print + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DocumentsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to documents for print + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(PrintDocument body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(PrintDocument body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new DocumentsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get documents from print + /// + public class DocumentsRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DocumentsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DocumentsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DocumentsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new documentsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DocumentsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DocumentsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new documentsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public DocumentsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionPostRequestBody.cs new file mode 100644 index 00000000000..f441061a568 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionPostRequestBody.cs @@ -0,0 +1,64 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Print.Printers.Item.Jobs.Item.Documents.Item.CreateUploadSession { + public class CreateUploadSessionPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The properties property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public PrintDocumentUploadProperties? Properties { + get { return BackingStore?.Get("properties"); } + set { BackingStore?.Set("properties", value); } + } +#nullable restore +#else + public PrintDocumentUploadProperties Properties { + get { return BackingStore?.Get("properties"); } + set { BackingStore?.Set("properties", value); } + } +#endif + /// + /// Instantiates a new createUploadSessionPostRequestBody and sets the default values. + /// + public CreateUploadSessionPostRequestBody() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static CreateUploadSessionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CreateUploadSessionPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"properties", n => { Properties = n.GetObjectValue(PrintDocumentUploadProperties.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("properties", Properties); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionRequestBuilder.cs new file mode 100644 index 00000000000..921f601aa4c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionRequestBuilder.cs @@ -0,0 +1,96 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Print.Printers.Item.Jobs.Item.Documents.Item.CreateUploadSession { + /// + /// Provides operations to call the createUploadSession method. + /// + public class CreateUploadSessionRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CreateUploadSessionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/documents/{printDocument%2Did}/createUploadSession", pathParameters) { + } + /// + /// Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CreateUploadSessionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/documents/{printDocument%2Did}/createUploadSession", rawUrl) { + } + /// + /// Invoke action createUploadSession + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(CreateUploadSessionPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(CreateUploadSessionPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UploadSession.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke action createUploadSession + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(CreateUploadSessionPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(CreateUploadSessionPostRequestBody body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new CreateUploadSessionRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CreateUploadSessionRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new createUploadSessionRequestBuilderPostRequestConfiguration and sets the default values. + /// + public CreateUploadSessionRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/PrintDocumentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/PrintDocumentItemRequestBuilder.cs new file mode 100644 index 00000000000..a7f07fd1390 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/PrintDocumentItemRequestBuilder.cs @@ -0,0 +1,253 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Print.Printers.Item.Jobs.Item.Documents.Item.CreateUploadSession; +using Microsoft.Graph.Print.Printers.Item.Jobs.Item.Documents.Item.Value; +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.Print.Printers.Item.Jobs.Item.Documents.Item { + /// + /// Provides operations to manage the documents property of the microsoft.graph.printJob entity. + /// + public class PrintDocumentItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the media for the print entity. + public ContentRequestBuilder Content { get => + new ContentRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the createUploadSession method. + public CreateUploadSessionRequestBuilder CreateUploadSession { get => + new CreateUploadSessionRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new PrintDocumentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PrintDocumentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/documents/{printDocument%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PrintDocumentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PrintDocumentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/documents/{printDocument%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property documents for print + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get documents from print + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property documents in print + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(PrintDocument body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(PrintDocument body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property documents for print + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new PrintDocumentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get documents from print + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new PrintDocumentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property documents in print + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(PrintDocument body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(PrintDocument body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new PrintDocumentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrintDocumentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PrintDocumentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public PrintDocumentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get documents from print + /// + public class PrintDocumentItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrintDocumentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PrintDocumentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PrintDocumentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new PrintDocumentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PrintDocumentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrintDocumentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PrintDocumentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public PrintDocumentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/Value/ContentRequestBuilder.cs new file mode 100644 index 00000000000..0878daf0823 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/Value/ContentRequestBuilder.cs @@ -0,0 +1,153 @@ +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.Print.Printers.Item.Jobs.Item.Documents.Item.Value { + /// + /// Provides operations to manage the media for the print entity. + /// + public class ContentRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new ContentRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContentRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/documents/{printDocument%2Did}/$value", pathParameters) { + } + /// + /// Instantiates a new ContentRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/documents/{printDocument%2Did}/$value", rawUrl) { + } + /// + /// Get media content for the navigation property documents from print + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Update media content for the navigation property documents in print + /// + /// Binary request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Stream body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(Stream body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get media content for the navigation property documents from print + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new ContentRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update media content for the navigation property documents in print + /// + /// Binary request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Stream body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Stream body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PUT, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.SetStreamContent(body); + if (requestConfiguration != null) { + var requestConfig = new ContentRequestBuilderPutRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContentRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new ContentRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ContentRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContentRequestBuilderPutRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new ContentRequestBuilderPutRequestConfiguration and sets the default values. + /// + public ContentRequestBuilderPutRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/PrintJobItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/PrintJobItemRequestBuilder.cs new file mode 100644 index 00000000000..22f0c84ca1c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/PrintJobItemRequestBuilder.cs @@ -0,0 +1,273 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Print.Printers.Item.Jobs.Item.Abort; +using Microsoft.Graph.Print.Printers.Item.Jobs.Item.Cancel; +using Microsoft.Graph.Print.Printers.Item.Jobs.Item.Documents; +using Microsoft.Graph.Print.Printers.Item.Jobs.Item.Redirect; +using Microsoft.Graph.Print.Printers.Item.Jobs.Item.Start; +using Microsoft.Graph.Print.Printers.Item.Jobs.Item.Tasks; +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.Print.Printers.Item.Jobs.Item { + /// + /// Provides operations to manage the jobs property of the microsoft.graph.printerBase entity. + /// + public class PrintJobItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the abort method. + public AbortRequestBuilder Abort { get => + new AbortRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the cancel method. + public CancelRequestBuilder Cancel { get => + new CancelRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the documents property of the microsoft.graph.printJob entity. + public DocumentsRequestBuilder Documents { get => + new DocumentsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the redirect method. + public RedirectRequestBuilder Redirect { get => + new RedirectRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the start method. + public StartRequestBuilder Start { get => + new StartRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the tasks property of the microsoft.graph.printJob entity. + public TasksRequestBuilder Tasks { get => + new TasksRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new PrintJobItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PrintJobItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PrintJobItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PrintJobItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property jobs for print + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// The list of jobs that are queued for printing by the printer/printerShare. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintJob.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property jobs in print + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(PrintJob body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(PrintJob body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintJob.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property jobs for print + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new PrintJobItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of jobs that are queued for printing by the printer/printerShare. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new PrintJobItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property jobs in print + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(PrintJob body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(PrintJob body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new PrintJobItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrintJobItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PrintJobItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public PrintJobItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The list of jobs that are queued for printing by the printer/printerShare. + /// + public class PrintJobItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrintJobItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PrintJobItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PrintJobItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new PrintJobItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PrintJobItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrintJobItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PrintJobItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public PrintJobItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Redirect/RedirectPostRequestBody.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Redirect/RedirectPostRequestBody.cs new file mode 100644 index 00000000000..0412706bd8f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Redirect/RedirectPostRequestBody.cs @@ -0,0 +1,80 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Print.Printers.Item.Jobs.Item.Redirect { + public class RedirectPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The configuration property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public PrintJobConfiguration? Configuration { + get { return BackingStore?.Get("configuration"); } + set { BackingStore?.Set("configuration", value); } + } +#nullable restore +#else + public PrintJobConfiguration Configuration { + get { return BackingStore?.Get("configuration"); } + set { BackingStore?.Set("configuration", value); } + } +#endif + /// The destinationPrinterId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DestinationPrinterId { + get { return BackingStore?.Get("destinationPrinterId"); } + set { BackingStore?.Set("destinationPrinterId", value); } + } +#nullable restore +#else + public string DestinationPrinterId { + get { return BackingStore?.Get("destinationPrinterId"); } + set { BackingStore?.Set("destinationPrinterId", value); } + } +#endif + /// + /// Instantiates a new redirectPostRequestBody and sets the default values. + /// + public RedirectPostRequestBody() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static RedirectPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RedirectPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"configuration", n => { Configuration = n.GetObjectValue(PrintJobConfiguration.CreateFromDiscriminatorValue); } }, + {"destinationPrinterId", n => { DestinationPrinterId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("configuration", Configuration); + writer.WriteStringValue("destinationPrinterId", DestinationPrinterId); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Redirect/RedirectRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Redirect/RedirectRequestBuilder.cs new file mode 100644 index 00000000000..ffcd002d814 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Redirect/RedirectRequestBuilder.cs @@ -0,0 +1,96 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Print.Printers.Item.Jobs.Item.Redirect { + /// + /// Provides operations to call the redirect method. + /// + public class RedirectRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RedirectRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RedirectRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/redirect", pathParameters) { + } + /// + /// Instantiates a new RedirectRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RedirectRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/redirect", rawUrl) { + } + /// + /// Invoke action redirect + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(RedirectPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(RedirectPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintJob.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke action redirect + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(RedirectPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(RedirectPostRequestBody body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new RedirectRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RedirectRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new redirectRequestBuilderPostRequestConfiguration and sets the default values. + /// + public RedirectRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Start/StartRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Start/StartRequestBuilder.cs new file mode 100644 index 00000000000..7e18b13f150 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Start/StartRequestBuilder.cs @@ -0,0 +1,91 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Print.Printers.Item.Jobs.Item.Start { + /// + /// Provides operations to call the start method. + /// + public class StartRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new StartRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StartRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/start", pathParameters) { + } + /// + /// Instantiates a new StartRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public StartRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/start", rawUrl) { + } + /// + /// Invoke action start + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintJobStatus.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke action start + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new StartRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class StartRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new startRequestBuilderPostRequestConfiguration and sets the default values. + /// + public StartRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Tasks/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Tasks/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..360d19370c7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Tasks/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +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.Print.Printers.Item.Jobs.Item.Tasks.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/tasks/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/tasks/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Tasks/Item/Definition/DefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Tasks/Item/Definition/DefinitionRequestBuilder.cs new file mode 100644 index 00000000000..72d23a2cf8e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Tasks/Item/Definition/DefinitionRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Print.Printers.Item.Jobs.Item.Tasks.Item.Definition { + /// + /// Provides operations to manage the definition property of the microsoft.graph.printTask entity. + /// + public class DefinitionRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new DefinitionRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DefinitionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/tasks/{printTask%2Did}/definition{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DefinitionRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DefinitionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/tasks/{printTask%2Did}/definition{?%24select,%24expand}", rawUrl) { + } + /// + /// The printTaskDefinition that was used to create this task. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintTaskDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The printTaskDefinition that was used to create this task. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DefinitionRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The printTaskDefinition that was used to create this task. Read-only. + /// + public class DefinitionRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DefinitionRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DefinitionRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DefinitionRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new definitionRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DefinitionRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Tasks/Item/PrintTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Tasks/Item/PrintTaskItemRequestBuilder.cs new file mode 100644 index 00000000000..f5f02c2edc0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Tasks/Item/PrintTaskItemRequestBuilder.cs @@ -0,0 +1,253 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Print.Printers.Item.Jobs.Item.Tasks.Item.Definition; +using Microsoft.Graph.Print.Printers.Item.Jobs.Item.Tasks.Item.Trigger; +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.Print.Printers.Item.Jobs.Item.Tasks.Item { + /// + /// Provides operations to manage the tasks property of the microsoft.graph.printJob entity. + /// + public class PrintTaskItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the definition property of the microsoft.graph.printTask entity. + public DefinitionRequestBuilder Definition { get => + new DefinitionRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the trigger property of the microsoft.graph.printTask entity. + public TriggerRequestBuilder Trigger { get => + new TriggerRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new PrintTaskItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PrintTaskItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/tasks/{printTask%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PrintTaskItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PrintTaskItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/tasks/{printTask%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property tasks for print + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// A list of printTasks that were triggered by this print job. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintTask.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property tasks in print + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(PrintTask body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(PrintTask body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintTask.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property tasks for print + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new PrintTaskItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// A list of printTasks that were triggered by this print job. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new PrintTaskItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property tasks in print + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(PrintTask body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(PrintTask body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new PrintTaskItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrintTaskItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PrintTaskItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public PrintTaskItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// A list of printTasks that were triggered by this print job. + /// + public class PrintTaskItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrintTaskItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PrintTaskItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PrintTaskItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new PrintTaskItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PrintTaskItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrintTaskItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PrintTaskItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public PrintTaskItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Tasks/Item/Trigger/TriggerRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Tasks/Item/Trigger/TriggerRequestBuilder.cs new file mode 100644 index 00000000000..b9c2f3256a6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Tasks/Item/Trigger/TriggerRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Print.Printers.Item.Jobs.Item.Tasks.Item.Trigger { + /// + /// Provides operations to manage the trigger property of the microsoft.graph.printTask entity. + /// + public class TriggerRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new TriggerRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TriggerRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/tasks/{printTask%2Did}/trigger{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TriggerRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TriggerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/tasks/{printTask%2Did}/trigger{?%24select,%24expand}", rawUrl) { + } + /// + /// The printTaskTrigger that triggered this task's execution. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintTaskTrigger.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The printTaskTrigger that triggered this task's execution. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TriggerRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The printTaskTrigger that triggered this task's execution. Read-only. + /// + public class TriggerRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TriggerRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TriggerRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TriggerRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new triggerRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TriggerRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Tasks/TasksRequestBuilder.cs new file mode 100644 index 00000000000..1149c4ccb4a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Tasks/TasksRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Print.Printers.Item.Jobs.Item.Tasks.Count; +using Microsoft.Graph.Print.Printers.Item.Jobs.Item.Tasks.Item; +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.Print.Printers.Item.Jobs.Item.Tasks { + /// + /// Provides operations to manage the tasks property of the microsoft.graph.printJob entity. + /// + public class TasksRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the tasks property of the microsoft.graph.printJob entity. + public PrintTaskItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("printTask%2Did", position); + return new PrintTaskItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new TasksRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TasksRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/tasks{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TasksRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs/{printJob%2Did}/tasks{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// A list of printTasks that were triggered by this print job. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintTaskCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to tasks for print + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(PrintTask body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(PrintTask body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintTask.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// A list of printTasks that were triggered by this print job. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TasksRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to tasks for print + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(PrintTask body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(PrintTask body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new TasksRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// A list of printTasks that were triggered by this print job. + /// + public class TasksRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TasksRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TasksRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TasksRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new tasksRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TasksRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TasksRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new tasksRequestBuilderPostRequestConfiguration and sets the default values. + /// + public TasksRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/JobsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/JobsRequestBuilder.cs new file mode 100644 index 00000000000..84173ee4059 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/JobsRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Print.Printers.Item.Jobs.Count; +using Microsoft.Graph.Print.Printers.Item.Jobs.Item; +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.Print.Printers.Item.Jobs { + /// + /// Provides operations to manage the jobs property of the microsoft.graph.printerBase entity. + /// + public class JobsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the jobs property of the microsoft.graph.printerBase entity. + public PrintJobItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("printJob%2Did", position); + return new PrintJobItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new JobsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public JobsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new JobsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public JobsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/jobs{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of jobs that are queued for printing by the printer/printerShare. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintJobCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to jobs for print + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(PrintJob body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(PrintJob body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintJob.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The list of jobs that are queued for printing by the printer/printerShare. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new JobsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to jobs for print + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(PrintJob body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(PrintJob body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new JobsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of jobs that are queued for printing by the printer/printerShare. + /// + public class JobsRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class JobsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public JobsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new JobsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new jobsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public JobsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class JobsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new jobsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public JobsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/PrinterItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/PrinterItemRequestBuilder.cs index 232af29b9b9..e93b9922e2c 100644 --- a/src/Microsoft.Graph/Generated/Print/Printers/Item/PrinterItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/PrinterItemRequestBuilder.cs @@ -1,6 +1,7 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Print.Printers.Item.Connectors; +using Microsoft.Graph.Print.Printers.Item.Jobs; using Microsoft.Graph.Print.Printers.Item.RestoreFactoryDefaults; using Microsoft.Graph.Print.Printers.Item.Shares; using Microsoft.Graph.Print.Printers.Item.TaskTriggers; @@ -21,6 +22,10 @@ public class PrinterItemRequestBuilder : BaseRequestBuilder { public ConnectorsRequestBuilder Connectors { get => new ConnectorsRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the jobs property of the microsoft.graph.printerBase entity. + public JobsRequestBuilder Jobs { get => + new JobsRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to call the restoreFactoryDefaults method. public RestoreFactoryDefaultsRequestBuilder RestoreFactoryDefaults { get => new RestoreFactoryDefaultsRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..78098bb8897 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +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.Print.Shares.Item.Jobs.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Abort/AbortPostRequestBody.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Abort/AbortPostRequestBody.cs new file mode 100644 index 00000000000..a601a19736a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Abort/AbortPostRequestBody.cs @@ -0,0 +1,63 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Print.Shares.Item.Jobs.Item.Abort { + public class AbortPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Reason { + get { return BackingStore?.Get("reason"); } + set { BackingStore?.Set("reason", value); } + } +#nullable restore +#else + public string Reason { + get { return BackingStore?.Get("reason"); } + set { BackingStore?.Set("reason", value); } + } +#endif + /// + /// Instantiates a new abortPostRequestBody and sets the default values. + /// + public AbortPostRequestBody() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static AbortPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AbortPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"reason", n => { Reason = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("reason", Reason); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Abort/AbortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Abort/AbortRequestBuilder.cs new file mode 100644 index 00000000000..5b27911e1c8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Abort/AbortRequestBuilder.cs @@ -0,0 +1,94 @@ +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.Print.Shares.Item.Jobs.Item.Abort { + /// + /// Provides operations to call the abort method. + /// + public class AbortRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new AbortRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AbortRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/abort", pathParameters) { + } + /// + /// Instantiates a new AbortRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AbortRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/abort", rawUrl) { + } + /// + /// Invoke action abort + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(AbortPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(AbortPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Invoke action abort + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(AbortPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(AbortPostRequestBody body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new AbortRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AbortRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new abortRequestBuilderPostRequestConfiguration and sets the default values. + /// + public AbortRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/SecurityReopen/SecurityReopenRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Cancel/CancelRequestBuilder.cs similarity index 63% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/SecurityReopen/SecurityReopenRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Cancel/CancelRequestBuilder.cs index f51b5d87198..f0ed762090a 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/SecurityReopen/SecurityReopenRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Cancel/CancelRequestBuilder.cs @@ -7,36 +7,36 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.SecurityReopen { +namespace Microsoft.Graph.Print.Shares.Item.Jobs.Item.Cancel { /// - /// Provides operations to call the reopen method. + /// Provides operations to call the cancel method. /// - public class SecurityReopenRequestBuilder : BaseRequestBuilder { + public class CancelRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new SecurityReopenRequestBuilder and sets the default values. + /// Instantiates a new CancelRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public SecurityReopenRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/security.reopen", pathParameters) { + public CancelRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/cancel", pathParameters) { } /// - /// Instantiates a new SecurityReopenRequestBuilder and sets the default values. + /// Instantiates a new CancelRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public SecurityReopenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/security.reopen", rawUrl) { + public CancelRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/cancel", rawUrl) { } /// - /// Invoke action reopen + /// Invoke action cancel /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif var requestInfo = ToPostRequestInformation(requestConfiguration); var errorMapping = new Dictionary> { @@ -46,15 +46,15 @@ public async Task PostAsync(Action - /// Invoke action reopen + /// Invoke action cancel /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { #endif var requestInfo = new RequestInformation { HttpMethod = Method.POST, @@ -62,7 +62,7 @@ public RequestInformation ToPostRequestInformation(Action /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class SecurityReopenRequestBuilderPostRequestConfiguration { + public class CancelRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new securityReopenRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new cancelRequestBuilderPostRequestConfiguration and sets the default values. /// - public SecurityReopenRequestBuilderPostRequestConfiguration() { + public CancelRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..c3c3bcb4e39 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +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.Print.Shares.Item.Jobs.Item.Documents.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/documents/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/documents/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/DocumentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/DocumentsRequestBuilder.cs new file mode 100644 index 00000000000..899eb40ca67 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/DocumentsRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Print.Shares.Item.Jobs.Item.Documents.Count; +using Microsoft.Graph.Print.Shares.Item.Jobs.Item.Documents.Item; +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.Print.Shares.Item.Jobs.Item.Documents { + /// + /// Provides operations to manage the documents property of the microsoft.graph.printJob entity. + /// + public class DocumentsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the documents property of the microsoft.graph.printJob entity. + public PrintDocumentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("printDocument%2Did", position); + return new PrintDocumentItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new DocumentsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DocumentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/documents{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DocumentsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DocumentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/documents{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get documents from print + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintDocumentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to documents for print + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(PrintDocument body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(PrintDocument body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get documents from print + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DocumentsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to documents for print + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(PrintDocument body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(PrintDocument body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new DocumentsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get documents from print + /// + public class DocumentsRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DocumentsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DocumentsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DocumentsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new documentsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DocumentsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DocumentsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new documentsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public DocumentsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionPostRequestBody.cs new file mode 100644 index 00000000000..e6c5d808f55 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionPostRequestBody.cs @@ -0,0 +1,64 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Print.Shares.Item.Jobs.Item.Documents.Item.CreateUploadSession { + public class CreateUploadSessionPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The properties property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public PrintDocumentUploadProperties? Properties { + get { return BackingStore?.Get("properties"); } + set { BackingStore?.Set("properties", value); } + } +#nullable restore +#else + public PrintDocumentUploadProperties Properties { + get { return BackingStore?.Get("properties"); } + set { BackingStore?.Set("properties", value); } + } +#endif + /// + /// Instantiates a new createUploadSessionPostRequestBody and sets the default values. + /// + public CreateUploadSessionPostRequestBody() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static CreateUploadSessionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CreateUploadSessionPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"properties", n => { Properties = n.GetObjectValue(PrintDocumentUploadProperties.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("properties", Properties); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionRequestBuilder.cs new file mode 100644 index 00000000000..dc1a536e570 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionRequestBuilder.cs @@ -0,0 +1,96 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Print.Shares.Item.Jobs.Item.Documents.Item.CreateUploadSession { + /// + /// Provides operations to call the createUploadSession method. + /// + public class CreateUploadSessionRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CreateUploadSessionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/documents/{printDocument%2Did}/createUploadSession", pathParameters) { + } + /// + /// Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CreateUploadSessionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/documents/{printDocument%2Did}/createUploadSession", rawUrl) { + } + /// + /// Invoke action createUploadSession + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(CreateUploadSessionPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(CreateUploadSessionPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UploadSession.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke action createUploadSession + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(CreateUploadSessionPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(CreateUploadSessionPostRequestBody body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new CreateUploadSessionRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CreateUploadSessionRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new createUploadSessionRequestBuilderPostRequestConfiguration and sets the default values. + /// + public CreateUploadSessionRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/PrintDocumentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/PrintDocumentItemRequestBuilder.cs new file mode 100644 index 00000000000..6f9210ce261 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/PrintDocumentItemRequestBuilder.cs @@ -0,0 +1,253 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Print.Shares.Item.Jobs.Item.Documents.Item.CreateUploadSession; +using Microsoft.Graph.Print.Shares.Item.Jobs.Item.Documents.Item.Value; +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.Print.Shares.Item.Jobs.Item.Documents.Item { + /// + /// Provides operations to manage the documents property of the microsoft.graph.printJob entity. + /// + public class PrintDocumentItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the media for the print entity. + public ContentRequestBuilder Content { get => + new ContentRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the createUploadSession method. + public CreateUploadSessionRequestBuilder CreateUploadSession { get => + new CreateUploadSessionRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new PrintDocumentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PrintDocumentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/documents/{printDocument%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PrintDocumentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PrintDocumentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/documents/{printDocument%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property documents for print + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get documents from print + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property documents in print + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(PrintDocument body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(PrintDocument body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property documents for print + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new PrintDocumentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get documents from print + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new PrintDocumentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property documents in print + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(PrintDocument body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(PrintDocument body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new PrintDocumentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrintDocumentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PrintDocumentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public PrintDocumentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get documents from print + /// + public class PrintDocumentItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrintDocumentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PrintDocumentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PrintDocumentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new PrintDocumentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PrintDocumentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrintDocumentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PrintDocumentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public PrintDocumentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/Value/ContentRequestBuilder.cs new file mode 100644 index 00000000000..77705c9e51b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/Value/ContentRequestBuilder.cs @@ -0,0 +1,153 @@ +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.Print.Shares.Item.Jobs.Item.Documents.Item.Value { + /// + /// Provides operations to manage the media for the print entity. + /// + public class ContentRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new ContentRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContentRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/documents/{printDocument%2Did}/$value", pathParameters) { + } + /// + /// Instantiates a new ContentRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/documents/{printDocument%2Did}/$value", rawUrl) { + } + /// + /// Get media content for the navigation property documents from print + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Update media content for the navigation property documents in print + /// + /// Binary request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Stream body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(Stream body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get media content for the navigation property documents from print + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new ContentRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update media content for the navigation property documents in print + /// + /// Binary request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Stream body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Stream body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PUT, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.SetStreamContent(body); + if (requestConfiguration != null) { + var requestConfig = new ContentRequestBuilderPutRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContentRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new ContentRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ContentRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContentRequestBuilderPutRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new ContentRequestBuilderPutRequestConfiguration and sets the default values. + /// + public ContentRequestBuilderPutRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/PrintJobItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/PrintJobItemRequestBuilder.cs new file mode 100644 index 00000000000..eb01980cc13 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/PrintJobItemRequestBuilder.cs @@ -0,0 +1,273 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Print.Shares.Item.Jobs.Item.Abort; +using Microsoft.Graph.Print.Shares.Item.Jobs.Item.Cancel; +using Microsoft.Graph.Print.Shares.Item.Jobs.Item.Documents; +using Microsoft.Graph.Print.Shares.Item.Jobs.Item.Redirect; +using Microsoft.Graph.Print.Shares.Item.Jobs.Item.Start; +using Microsoft.Graph.Print.Shares.Item.Jobs.Item.Tasks; +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.Print.Shares.Item.Jobs.Item { + /// + /// Provides operations to manage the jobs property of the microsoft.graph.printerBase entity. + /// + public class PrintJobItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the abort method. + public AbortRequestBuilder Abort { get => + new AbortRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the cancel method. + public CancelRequestBuilder Cancel { get => + new CancelRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the documents property of the microsoft.graph.printJob entity. + public DocumentsRequestBuilder Documents { get => + new DocumentsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the redirect method. + public RedirectRequestBuilder Redirect { get => + new RedirectRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the start method. + public StartRequestBuilder Start { get => + new StartRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the tasks property of the microsoft.graph.printJob entity. + public TasksRequestBuilder Tasks { get => + new TasksRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new PrintJobItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PrintJobItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PrintJobItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PrintJobItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property jobs for print + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// The list of jobs that are queued for printing by the printer/printerShare. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintJob.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property jobs in print + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(PrintJob body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(PrintJob body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintJob.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property jobs for print + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new PrintJobItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of jobs that are queued for printing by the printer/printerShare. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new PrintJobItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property jobs in print + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(PrintJob body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(PrintJob body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new PrintJobItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrintJobItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PrintJobItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public PrintJobItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The list of jobs that are queued for printing by the printer/printerShare. + /// + public class PrintJobItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrintJobItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PrintJobItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PrintJobItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new PrintJobItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PrintJobItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrintJobItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PrintJobItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public PrintJobItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Redirect/RedirectPostRequestBody.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Redirect/RedirectPostRequestBody.cs new file mode 100644 index 00000000000..fdf11b8dc55 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Redirect/RedirectPostRequestBody.cs @@ -0,0 +1,80 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Print.Shares.Item.Jobs.Item.Redirect { + public class RedirectPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The configuration property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public PrintJobConfiguration? Configuration { + get { return BackingStore?.Get("configuration"); } + set { BackingStore?.Set("configuration", value); } + } +#nullable restore +#else + public PrintJobConfiguration Configuration { + get { return BackingStore?.Get("configuration"); } + set { BackingStore?.Set("configuration", value); } + } +#endif + /// The destinationPrinterId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DestinationPrinterId { + get { return BackingStore?.Get("destinationPrinterId"); } + set { BackingStore?.Set("destinationPrinterId", value); } + } +#nullable restore +#else + public string DestinationPrinterId { + get { return BackingStore?.Get("destinationPrinterId"); } + set { BackingStore?.Set("destinationPrinterId", value); } + } +#endif + /// + /// Instantiates a new redirectPostRequestBody and sets the default values. + /// + public RedirectPostRequestBody() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static RedirectPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RedirectPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"configuration", n => { Configuration = n.GetObjectValue(PrintJobConfiguration.CreateFromDiscriminatorValue); } }, + {"destinationPrinterId", n => { DestinationPrinterId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("configuration", Configuration); + writer.WriteStringValue("destinationPrinterId", DestinationPrinterId); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Redirect/RedirectRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Redirect/RedirectRequestBuilder.cs new file mode 100644 index 00000000000..a026080f3da --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Redirect/RedirectRequestBuilder.cs @@ -0,0 +1,96 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Print.Shares.Item.Jobs.Item.Redirect { + /// + /// Provides operations to call the redirect method. + /// + public class RedirectRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RedirectRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RedirectRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/redirect", pathParameters) { + } + /// + /// Instantiates a new RedirectRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RedirectRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/redirect", rawUrl) { + } + /// + /// Invoke action redirect + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(RedirectPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(RedirectPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintJob.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke action redirect + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(RedirectPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(RedirectPostRequestBody body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new RedirectRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RedirectRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new redirectRequestBuilderPostRequestConfiguration and sets the default values. + /// + public RedirectRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Start/StartRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Start/StartRequestBuilder.cs new file mode 100644 index 00000000000..cce7f00872a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Start/StartRequestBuilder.cs @@ -0,0 +1,91 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Print.Shares.Item.Jobs.Item.Start { + /// + /// Provides operations to call the start method. + /// + public class StartRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new StartRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StartRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/start", pathParameters) { + } + /// + /// Instantiates a new StartRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public StartRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/start", rawUrl) { + } + /// + /// Invoke action start + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintJobStatus.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke action start + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new StartRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class StartRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new startRequestBuilderPostRequestConfiguration and sets the default values. + /// + public StartRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Tasks/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Tasks/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..2e3423ec5c2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Tasks/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +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.Print.Shares.Item.Jobs.Item.Tasks.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/tasks/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/tasks/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Tasks/Item/Definition/DefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Tasks/Item/Definition/DefinitionRequestBuilder.cs new file mode 100644 index 00000000000..8339863d01d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Tasks/Item/Definition/DefinitionRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Print.Shares.Item.Jobs.Item.Tasks.Item.Definition { + /// + /// Provides operations to manage the definition property of the microsoft.graph.printTask entity. + /// + public class DefinitionRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new DefinitionRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DefinitionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/tasks/{printTask%2Did}/definition{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DefinitionRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DefinitionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/tasks/{printTask%2Did}/definition{?%24select,%24expand}", rawUrl) { + } + /// + /// The printTaskDefinition that was used to create this task. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintTaskDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The printTaskDefinition that was used to create this task. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DefinitionRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The printTaskDefinition that was used to create this task. Read-only. + /// + public class DefinitionRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DefinitionRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DefinitionRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DefinitionRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new definitionRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DefinitionRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Tasks/Item/PrintTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Tasks/Item/PrintTaskItemRequestBuilder.cs new file mode 100644 index 00000000000..af848a5b0d3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Tasks/Item/PrintTaskItemRequestBuilder.cs @@ -0,0 +1,253 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Print.Shares.Item.Jobs.Item.Tasks.Item.Definition; +using Microsoft.Graph.Print.Shares.Item.Jobs.Item.Tasks.Item.Trigger; +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.Print.Shares.Item.Jobs.Item.Tasks.Item { + /// + /// Provides operations to manage the tasks property of the microsoft.graph.printJob entity. + /// + public class PrintTaskItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the definition property of the microsoft.graph.printTask entity. + public DefinitionRequestBuilder Definition { get => + new DefinitionRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the trigger property of the microsoft.graph.printTask entity. + public TriggerRequestBuilder Trigger { get => + new TriggerRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new PrintTaskItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PrintTaskItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/tasks/{printTask%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PrintTaskItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PrintTaskItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/tasks/{printTask%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property tasks for print + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// A list of printTasks that were triggered by this print job. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintTask.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property tasks in print + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(PrintTask body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(PrintTask body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintTask.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property tasks for print + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new PrintTaskItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// A list of printTasks that were triggered by this print job. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new PrintTaskItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property tasks in print + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(PrintTask body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(PrintTask body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new PrintTaskItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrintTaskItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PrintTaskItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public PrintTaskItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// A list of printTasks that were triggered by this print job. + /// + public class PrintTaskItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrintTaskItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PrintTaskItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PrintTaskItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new PrintTaskItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PrintTaskItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrintTaskItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PrintTaskItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public PrintTaskItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Tasks/Item/Trigger/TriggerRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Tasks/Item/Trigger/TriggerRequestBuilder.cs new file mode 100644 index 00000000000..97b21df332e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Tasks/Item/Trigger/TriggerRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Print.Shares.Item.Jobs.Item.Tasks.Item.Trigger { + /// + /// Provides operations to manage the trigger property of the microsoft.graph.printTask entity. + /// + public class TriggerRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new TriggerRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TriggerRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/tasks/{printTask%2Did}/trigger{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TriggerRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TriggerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/tasks/{printTask%2Did}/trigger{?%24select,%24expand}", rawUrl) { + } + /// + /// The printTaskTrigger that triggered this task's execution. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintTaskTrigger.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The printTaskTrigger that triggered this task's execution. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TriggerRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The printTaskTrigger that triggered this task's execution. Read-only. + /// + public class TriggerRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TriggerRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TriggerRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TriggerRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new triggerRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TriggerRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Tasks/TasksRequestBuilder.cs new file mode 100644 index 00000000000..cb4f7d0bd87 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Tasks/TasksRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Print.Shares.Item.Jobs.Item.Tasks.Count; +using Microsoft.Graph.Print.Shares.Item.Jobs.Item.Tasks.Item; +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.Print.Shares.Item.Jobs.Item.Tasks { + /// + /// Provides operations to manage the tasks property of the microsoft.graph.printJob entity. + /// + public class TasksRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the tasks property of the microsoft.graph.printJob entity. + public PrintTaskItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("printTask%2Did", position); + return new PrintTaskItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new TasksRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TasksRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/tasks{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TasksRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs/{printJob%2Did}/tasks{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// A list of printTasks that were triggered by this print job. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintTaskCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to tasks for print + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(PrintTask body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(PrintTask body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintTask.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// A list of printTasks that were triggered by this print job. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TasksRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to tasks for print + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(PrintTask body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(PrintTask body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new TasksRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// A list of printTasks that were triggered by this print job. + /// + public class TasksRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TasksRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TasksRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TasksRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new tasksRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TasksRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TasksRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new tasksRequestBuilderPostRequestConfiguration and sets the default values. + /// + public TasksRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/JobsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/JobsRequestBuilder.cs new file mode 100644 index 00000000000..07f760da8bb --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/JobsRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Print.Shares.Item.Jobs.Count; +using Microsoft.Graph.Print.Shares.Item.Jobs.Item; +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.Print.Shares.Item.Jobs { + /// + /// Provides operations to manage the jobs property of the microsoft.graph.printerBase entity. + /// + public class JobsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the jobs property of the microsoft.graph.printerBase entity. + public PrintJobItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("printJob%2Did", position); + return new PrintJobItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new JobsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public JobsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new JobsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public JobsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/jobs{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of jobs that are queued for printing by the printer/printerShare. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintJobCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to jobs for print + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(PrintJob body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(PrintJob body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PrintJob.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The list of jobs that are queued for printing by the printer/printerShare. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new JobsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to jobs for print + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(PrintJob body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(PrintJob body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new JobsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of jobs that are queued for printing by the printer/printerShare. + /// + public class JobsRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class JobsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public JobsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new JobsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new jobsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public JobsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class JobsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new jobsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public JobsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/PrinterShareItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/PrinterShareItemRequestBuilder.cs index 93ee1af8eab..5a526e83c33 100644 --- a/src/Microsoft.Graph/Generated/Print/Shares/Item/PrinterShareItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/PrinterShareItemRequestBuilder.cs @@ -2,6 +2,7 @@ using Microsoft.Graph.Models; using Microsoft.Graph.Print.Shares.Item.AllowedGroups; using Microsoft.Graph.Print.Shares.Item.AllowedUsers; +using Microsoft.Graph.Print.Shares.Item.Jobs; using Microsoft.Graph.Print.Shares.Item.Printer; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; @@ -24,6 +25,10 @@ public class PrinterShareItemRequestBuilder : BaseRequestBuilder { public AllowedUsersRequestBuilder AllowedUsers { get => new AllowedUsersRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the jobs property of the microsoft.graph.printerBase entity. + public JobsRequestBuilder Jobs { get => + new JobsRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the printer property of the microsoft.graph.printerShare entity. public PrinterRequestBuilder Printer { get => new PrinterRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentScheduleInstances/Item/AppScope/AppScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentScheduleInstances/Item/AppScope/AppScopeRequestBuilder.cs new file mode 100644 index 00000000000..b70ffa0fedb --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentScheduleInstances/Item/AppScope/AppScopeRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.DirectoryNamespace.RoleAssignmentScheduleInstances.Item.AppScope { + /// + /// Provides operations to manage the appScope property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + /// + public class AppScopeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new AppScopeRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AppScopeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleAssignmentScheduleInstances/{unifiedRoleAssignmentScheduleInstance%2Did}/appScope{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AppScopeRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AppScopeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleAssignmentScheduleInstances/{unifiedRoleAssignmentScheduleInstance%2Did}/appScope{?%24select,%24expand}", rawUrl) { + } + /// + /// Read-only property with details of the app-specific scope when the assignment or role eligibility is scoped to an app. Nullable. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.AppScope.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Read-only property with details of the app-specific scope when the assignment or role eligibility is scoped to an app. Nullable. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new AppScopeRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read-only property with details of the app-specific scope when the assignment or role eligibility is scoped to an app. Nullable. + /// + public class AppScopeRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AppScopeRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AppScopeRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AppScopeRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new appScopeRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AppScopeRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentScheduleInstances/Item/DirectoryScope/DirectoryScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentScheduleInstances/Item/DirectoryScope/DirectoryScopeRequestBuilder.cs new file mode 100644 index 00000000000..468591f9e04 --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentScheduleInstances/Item/DirectoryScope/DirectoryScopeRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.DirectoryNamespace.RoleAssignmentScheduleInstances.Item.DirectoryScope { + /// + /// Provides operations to manage the directoryScope property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + /// + public class DirectoryScopeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new DirectoryScopeRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DirectoryScopeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleAssignmentScheduleInstances/{unifiedRoleAssignmentScheduleInstance%2Did}/directoryScope{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DirectoryScopeRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DirectoryScopeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleAssignmentScheduleInstances/{unifiedRoleAssignmentScheduleInstance%2Did}/directoryScope{?%24select,%24expand}", rawUrl) { + } + /// + /// The directory object that is the scope of the assignment or role eligibility. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The directory object that is the scope of the assignment or role eligibility. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DirectoryScopeRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The directory object that is the scope of the assignment or role eligibility. Read-only. + /// + public class DirectoryScopeRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryScopeRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DirectoryScopeRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DirectoryScopeRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new directoryScopeRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DirectoryScopeRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentScheduleInstances/Item/Principal/PrincipalRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentScheduleInstances/Item/Principal/PrincipalRequestBuilder.cs new file mode 100644 index 00000000000..f24a80d23f0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentScheduleInstances/Item/Principal/PrincipalRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.DirectoryNamespace.RoleAssignmentScheduleInstances.Item.Principal { + /// + /// Provides operations to manage the principal property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + /// + public class PrincipalRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new PrincipalRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PrincipalRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleAssignmentScheduleInstances/{unifiedRoleAssignmentScheduleInstance%2Did}/principal{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PrincipalRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PrincipalRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleAssignmentScheduleInstances/{unifiedRoleAssignmentScheduleInstance%2Did}/principal{?%24select,%24expand}", rawUrl) { + } + /// + /// The principal that's getting a role assignment or role eligibility through the request. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The principal that's getting a role assignment or role eligibility through the request. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new PrincipalRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The principal that's getting a role assignment or role eligibility through the request. + /// + public class PrincipalRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrincipalRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PrincipalRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PrincipalRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new principalRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PrincipalRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentScheduleInstances/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentScheduleInstances/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs new file mode 100644 index 00000000000..87de8a81310 --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentScheduleInstances/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.DirectoryNamespace.RoleAssignmentScheduleInstances.Item.RoleDefinition { + /// + /// Provides operations to manage the roleDefinition property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + /// + public class RoleDefinitionRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RoleDefinitionRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RoleDefinitionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleAssignmentScheduleInstances/{unifiedRoleAssignmentScheduleInstance%2Did}/roleDefinition{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new RoleDefinitionRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RoleDefinitionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleAssignmentScheduleInstances/{unifiedRoleAssignmentScheduleInstance%2Did}/roleDefinition{?%24select,%24expand}", rawUrl) { + } + /// + /// Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UnifiedRoleDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new RoleDefinitionRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property. + /// + public class RoleDefinitionRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RoleDefinitionRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public RoleDefinitionRequestBuilderGetQueryParameters QueryParameters { get; set; } = new RoleDefinitionRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new roleDefinitionRequestBuilderGetRequestConfiguration and sets the default values. + /// + public RoleDefinitionRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentScheduleInstances/Item/UnifiedRoleAssignmentScheduleInstanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentScheduleInstances/Item/UnifiedRoleAssignmentScheduleInstanceItemRequestBuilder.cs index ceb48bc0bb4..211b75fa14e 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentScheduleInstances/Item/UnifiedRoleAssignmentScheduleInstanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentScheduleInstances/Item/UnifiedRoleAssignmentScheduleInstanceItemRequestBuilder.cs @@ -1,6 +1,10 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.RoleManagement.DirectoryNamespace.RoleAssignmentScheduleInstances.Item.ActivatedUsing; +using Microsoft.Graph.RoleManagement.DirectoryNamespace.RoleAssignmentScheduleInstances.Item.AppScope; +using Microsoft.Graph.RoleManagement.DirectoryNamespace.RoleAssignmentScheduleInstances.Item.DirectoryScope; +using Microsoft.Graph.RoleManagement.DirectoryNamespace.RoleAssignmentScheduleInstances.Item.Principal; +using Microsoft.Graph.RoleManagement.DirectoryNamespace.RoleAssignmentScheduleInstances.Item.RoleDefinition; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -18,6 +22,22 @@ public class UnifiedRoleAssignmentScheduleInstanceItemRequestBuilder : BaseReque public ActivatedUsingRequestBuilder ActivatedUsing { get => new ActivatedUsingRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the appScope property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + public AppScopeRequestBuilder AppScope { get => + new AppScopeRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the directoryScope property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + public DirectoryScopeRequestBuilder DirectoryScope { get => + new DirectoryScopeRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the principal property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + public PrincipalRequestBuilder Principal { get => + new PrincipalRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the roleDefinition property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + public RoleDefinitionRequestBuilder RoleDefinition { get => + new RoleDefinitionRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new UnifiedRoleAssignmentScheduleInstanceItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentSchedules/Item/AppScope/AppScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentSchedules/Item/AppScope/AppScopeRequestBuilder.cs new file mode 100644 index 00000000000..491dff7b418 --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentSchedules/Item/AppScope/AppScopeRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.DirectoryNamespace.RoleAssignmentSchedules.Item.AppScope { + /// + /// Provides operations to manage the appScope property of the microsoft.graph.unifiedRoleScheduleBase entity. + /// + public class AppScopeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new AppScopeRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AppScopeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleAssignmentSchedules/{unifiedRoleAssignmentSchedule%2Did}/appScope{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AppScopeRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AppScopeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleAssignmentSchedules/{unifiedRoleAssignmentSchedule%2Did}/appScope{?%24select,%24expand}", rawUrl) { + } + /// + /// Read-only property with details of the app-specific scope when the role eligibility or assignment is scoped to an app. Nullable. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.AppScope.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Read-only property with details of the app-specific scope when the role eligibility or assignment is scoped to an app. Nullable. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new AppScopeRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read-only property with details of the app-specific scope when the role eligibility or assignment is scoped to an app. Nullable. + /// + public class AppScopeRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AppScopeRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AppScopeRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AppScopeRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new appScopeRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AppScopeRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentSchedules/Item/DirectoryScope/DirectoryScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentSchedules/Item/DirectoryScope/DirectoryScopeRequestBuilder.cs new file mode 100644 index 00000000000..4816c2a2355 --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentSchedules/Item/DirectoryScope/DirectoryScopeRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.DirectoryNamespace.RoleAssignmentSchedules.Item.DirectoryScope { + /// + /// Provides operations to manage the directoryScope property of the microsoft.graph.unifiedRoleScheduleBase entity. + /// + public class DirectoryScopeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new DirectoryScopeRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DirectoryScopeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleAssignmentSchedules/{unifiedRoleAssignmentSchedule%2Did}/directoryScope{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DirectoryScopeRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DirectoryScopeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleAssignmentSchedules/{unifiedRoleAssignmentSchedule%2Did}/directoryScope{?%24select,%24expand}", rawUrl) { + } + /// + /// The directory object that is the scope of the role eligibility or assignment. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The directory object that is the scope of the role eligibility or assignment. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DirectoryScopeRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The directory object that is the scope of the role eligibility or assignment. Read-only. + /// + public class DirectoryScopeRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryScopeRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DirectoryScopeRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DirectoryScopeRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new directoryScopeRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DirectoryScopeRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentSchedules/Item/Principal/PrincipalRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentSchedules/Item/Principal/PrincipalRequestBuilder.cs new file mode 100644 index 00000000000..c44dda76484 --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentSchedules/Item/Principal/PrincipalRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.DirectoryNamespace.RoleAssignmentSchedules.Item.Principal { + /// + /// Provides operations to manage the principal property of the microsoft.graph.unifiedRoleScheduleBase entity. + /// + public class PrincipalRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new PrincipalRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PrincipalRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleAssignmentSchedules/{unifiedRoleAssignmentSchedule%2Did}/principal{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PrincipalRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PrincipalRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleAssignmentSchedules/{unifiedRoleAssignmentSchedule%2Did}/principal{?%24select,%24expand}", rawUrl) { + } + /// + /// The principal that's getting a role assignment or that's eligible for a role through the request. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The principal that's getting a role assignment or that's eligible for a role through the request. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new PrincipalRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The principal that's getting a role assignment or that's eligible for a role through the request. + /// + public class PrincipalRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrincipalRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PrincipalRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PrincipalRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new principalRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PrincipalRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentSchedules/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentSchedules/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs new file mode 100644 index 00000000000..b0766427bb0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentSchedules/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.DirectoryNamespace.RoleAssignmentSchedules.Item.RoleDefinition { + /// + /// Provides operations to manage the roleDefinition property of the microsoft.graph.unifiedRoleScheduleBase entity. + /// + public class RoleDefinitionRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RoleDefinitionRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RoleDefinitionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleAssignmentSchedules/{unifiedRoleAssignmentSchedule%2Did}/roleDefinition{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new RoleDefinitionRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RoleDefinitionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleAssignmentSchedules/{unifiedRoleAssignmentSchedule%2Did}/roleDefinition{?%24select,%24expand}", rawUrl) { + } + /// + /// Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UnifiedRoleDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new RoleDefinitionRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property. + /// + public class RoleDefinitionRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RoleDefinitionRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public RoleDefinitionRequestBuilderGetQueryParameters QueryParameters { get; set; } = new RoleDefinitionRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new roleDefinitionRequestBuilderGetRequestConfiguration and sets the default values. + /// + public RoleDefinitionRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentSchedules/Item/UnifiedRoleAssignmentScheduleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentSchedules/Item/UnifiedRoleAssignmentScheduleItemRequestBuilder.cs index 55cb28dd1c1..30ff0d3a04f 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentSchedules/Item/UnifiedRoleAssignmentScheduleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentSchedules/Item/UnifiedRoleAssignmentScheduleItemRequestBuilder.cs @@ -1,6 +1,10 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.RoleManagement.DirectoryNamespace.RoleAssignmentSchedules.Item.ActivatedUsing; +using Microsoft.Graph.RoleManagement.DirectoryNamespace.RoleAssignmentSchedules.Item.AppScope; +using Microsoft.Graph.RoleManagement.DirectoryNamespace.RoleAssignmentSchedules.Item.DirectoryScope; +using Microsoft.Graph.RoleManagement.DirectoryNamespace.RoleAssignmentSchedules.Item.Principal; +using Microsoft.Graph.RoleManagement.DirectoryNamespace.RoleAssignmentSchedules.Item.RoleDefinition; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -18,6 +22,22 @@ public class UnifiedRoleAssignmentScheduleItemRequestBuilder : BaseRequestBuilde public ActivatedUsingRequestBuilder ActivatedUsing { get => new ActivatedUsingRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the appScope property of the microsoft.graph.unifiedRoleScheduleBase entity. + public AppScopeRequestBuilder AppScope { get => + new AppScopeRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the directoryScope property of the microsoft.graph.unifiedRoleScheduleBase entity. + public DirectoryScopeRequestBuilder DirectoryScope { get => + new DirectoryScopeRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the principal property of the microsoft.graph.unifiedRoleScheduleBase entity. + public PrincipalRequestBuilder Principal { get => + new PrincipalRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the roleDefinition property of the microsoft.graph.unifiedRoleScheduleBase entity. + public RoleDefinitionRequestBuilder RoleDefinition { get => + new RoleDefinitionRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new UnifiedRoleAssignmentScheduleItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilityScheduleInstances/Item/AppScope/AppScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilityScheduleInstances/Item/AppScope/AppScopeRequestBuilder.cs new file mode 100644 index 00000000000..a32a0225a43 --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilityScheduleInstances/Item/AppScope/AppScopeRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.DirectoryNamespace.RoleEligibilityScheduleInstances.Item.AppScope { + /// + /// Provides operations to manage the appScope property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + /// + public class AppScopeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new AppScopeRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AppScopeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleEligibilityScheduleInstances/{unifiedRoleEligibilityScheduleInstance%2Did}/appScope{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AppScopeRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AppScopeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleEligibilityScheduleInstances/{unifiedRoleEligibilityScheduleInstance%2Did}/appScope{?%24select,%24expand}", rawUrl) { + } + /// + /// Read-only property with details of the app-specific scope when the assignment or role eligibility is scoped to an app. Nullable. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.AppScope.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Read-only property with details of the app-specific scope when the assignment or role eligibility is scoped to an app. Nullable. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new AppScopeRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read-only property with details of the app-specific scope when the assignment or role eligibility is scoped to an app. Nullable. + /// + public class AppScopeRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AppScopeRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AppScopeRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AppScopeRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new appScopeRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AppScopeRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilityScheduleInstances/Item/DirectoryScope/DirectoryScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilityScheduleInstances/Item/DirectoryScope/DirectoryScopeRequestBuilder.cs new file mode 100644 index 00000000000..4b342c2f6d4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilityScheduleInstances/Item/DirectoryScope/DirectoryScopeRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.DirectoryNamespace.RoleEligibilityScheduleInstances.Item.DirectoryScope { + /// + /// Provides operations to manage the directoryScope property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + /// + public class DirectoryScopeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new DirectoryScopeRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DirectoryScopeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleEligibilityScheduleInstances/{unifiedRoleEligibilityScheduleInstance%2Did}/directoryScope{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DirectoryScopeRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DirectoryScopeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleEligibilityScheduleInstances/{unifiedRoleEligibilityScheduleInstance%2Did}/directoryScope{?%24select,%24expand}", rawUrl) { + } + /// + /// The directory object that is the scope of the assignment or role eligibility. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The directory object that is the scope of the assignment or role eligibility. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DirectoryScopeRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The directory object that is the scope of the assignment or role eligibility. Read-only. + /// + public class DirectoryScopeRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryScopeRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DirectoryScopeRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DirectoryScopeRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new directoryScopeRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DirectoryScopeRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilityScheduleInstances/Item/Principal/PrincipalRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilityScheduleInstances/Item/Principal/PrincipalRequestBuilder.cs new file mode 100644 index 00000000000..698507fa29f --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilityScheduleInstances/Item/Principal/PrincipalRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.DirectoryNamespace.RoleEligibilityScheduleInstances.Item.Principal { + /// + /// Provides operations to manage the principal property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + /// + public class PrincipalRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new PrincipalRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PrincipalRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleEligibilityScheduleInstances/{unifiedRoleEligibilityScheduleInstance%2Did}/principal{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PrincipalRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PrincipalRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleEligibilityScheduleInstances/{unifiedRoleEligibilityScheduleInstance%2Did}/principal{?%24select,%24expand}", rawUrl) { + } + /// + /// The principal that's getting a role assignment or role eligibility through the request. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The principal that's getting a role assignment or role eligibility through the request. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new PrincipalRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The principal that's getting a role assignment or role eligibility through the request. + /// + public class PrincipalRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrincipalRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PrincipalRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PrincipalRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new principalRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PrincipalRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilityScheduleInstances/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilityScheduleInstances/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs new file mode 100644 index 00000000000..fbc4b799756 --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilityScheduleInstances/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.DirectoryNamespace.RoleEligibilityScheduleInstances.Item.RoleDefinition { + /// + /// Provides operations to manage the roleDefinition property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + /// + public class RoleDefinitionRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RoleDefinitionRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RoleDefinitionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleEligibilityScheduleInstances/{unifiedRoleEligibilityScheduleInstance%2Did}/roleDefinition{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new RoleDefinitionRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RoleDefinitionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleEligibilityScheduleInstances/{unifiedRoleEligibilityScheduleInstance%2Did}/roleDefinition{?%24select,%24expand}", rawUrl) { + } + /// + /// Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UnifiedRoleDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new RoleDefinitionRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property. + /// + public class RoleDefinitionRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RoleDefinitionRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public RoleDefinitionRequestBuilderGetQueryParameters QueryParameters { get; set; } = new RoleDefinitionRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new roleDefinitionRequestBuilderGetRequestConfiguration and sets the default values. + /// + public RoleDefinitionRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilityScheduleInstances/Item/UnifiedRoleEligibilityScheduleInstanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilityScheduleInstances/Item/UnifiedRoleEligibilityScheduleInstanceItemRequestBuilder.cs index 7209c2d755d..017067d0062 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilityScheduleInstances/Item/UnifiedRoleEligibilityScheduleInstanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilityScheduleInstances/Item/UnifiedRoleEligibilityScheduleInstanceItemRequestBuilder.cs @@ -1,5 +1,9 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; +using Microsoft.Graph.RoleManagement.DirectoryNamespace.RoleEligibilityScheduleInstances.Item.AppScope; +using Microsoft.Graph.RoleManagement.DirectoryNamespace.RoleEligibilityScheduleInstances.Item.DirectoryScope; +using Microsoft.Graph.RoleManagement.DirectoryNamespace.RoleEligibilityScheduleInstances.Item.Principal; +using Microsoft.Graph.RoleManagement.DirectoryNamespace.RoleEligibilityScheduleInstances.Item.RoleDefinition; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -13,6 +17,22 @@ namespace Microsoft.Graph.RoleManagement.DirectoryNamespace.RoleEligibilitySched /// Provides operations to manage the roleEligibilityScheduleInstances property of the microsoft.graph.rbacApplication entity. /// public class UnifiedRoleEligibilityScheduleInstanceItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the appScope property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + public AppScopeRequestBuilder AppScope { get => + new AppScopeRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the directoryScope property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + public DirectoryScopeRequestBuilder DirectoryScope { get => + new DirectoryScopeRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the principal property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + public PrincipalRequestBuilder Principal { get => + new PrincipalRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the roleDefinition property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + public RoleDefinitionRequestBuilder RoleDefinition { get => + new RoleDefinitionRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new UnifiedRoleEligibilityScheduleInstanceItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilitySchedules/Item/AppScope/AppScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilitySchedules/Item/AppScope/AppScopeRequestBuilder.cs new file mode 100644 index 00000000000..85a3f0bbb93 --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilitySchedules/Item/AppScope/AppScopeRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.DirectoryNamespace.RoleEligibilitySchedules.Item.AppScope { + /// + /// Provides operations to manage the appScope property of the microsoft.graph.unifiedRoleScheduleBase entity. + /// + public class AppScopeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new AppScopeRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AppScopeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleEligibilitySchedules/{unifiedRoleEligibilitySchedule%2Did}/appScope{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AppScopeRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AppScopeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleEligibilitySchedules/{unifiedRoleEligibilitySchedule%2Did}/appScope{?%24select,%24expand}", rawUrl) { + } + /// + /// Read-only property with details of the app-specific scope when the role eligibility or assignment is scoped to an app. Nullable. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.AppScope.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Read-only property with details of the app-specific scope when the role eligibility or assignment is scoped to an app. Nullable. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new AppScopeRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read-only property with details of the app-specific scope when the role eligibility or assignment is scoped to an app. Nullable. + /// + public class AppScopeRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AppScopeRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AppScopeRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AppScopeRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new appScopeRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AppScopeRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilitySchedules/Item/DirectoryScope/DirectoryScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilitySchedules/Item/DirectoryScope/DirectoryScopeRequestBuilder.cs new file mode 100644 index 00000000000..cb642aec01b --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilitySchedules/Item/DirectoryScope/DirectoryScopeRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.DirectoryNamespace.RoleEligibilitySchedules.Item.DirectoryScope { + /// + /// Provides operations to manage the directoryScope property of the microsoft.graph.unifiedRoleScheduleBase entity. + /// + public class DirectoryScopeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new DirectoryScopeRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DirectoryScopeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleEligibilitySchedules/{unifiedRoleEligibilitySchedule%2Did}/directoryScope{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DirectoryScopeRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DirectoryScopeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleEligibilitySchedules/{unifiedRoleEligibilitySchedule%2Did}/directoryScope{?%24select,%24expand}", rawUrl) { + } + /// + /// The directory object that is the scope of the role eligibility or assignment. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The directory object that is the scope of the role eligibility or assignment. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DirectoryScopeRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The directory object that is the scope of the role eligibility or assignment. Read-only. + /// + public class DirectoryScopeRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryScopeRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DirectoryScopeRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DirectoryScopeRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new directoryScopeRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DirectoryScopeRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilitySchedules/Item/Principal/PrincipalRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilitySchedules/Item/Principal/PrincipalRequestBuilder.cs new file mode 100644 index 00000000000..f316ada8a9a --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilitySchedules/Item/Principal/PrincipalRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.DirectoryNamespace.RoleEligibilitySchedules.Item.Principal { + /// + /// Provides operations to manage the principal property of the microsoft.graph.unifiedRoleScheduleBase entity. + /// + public class PrincipalRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new PrincipalRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PrincipalRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleEligibilitySchedules/{unifiedRoleEligibilitySchedule%2Did}/principal{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PrincipalRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PrincipalRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleEligibilitySchedules/{unifiedRoleEligibilitySchedule%2Did}/principal{?%24select,%24expand}", rawUrl) { + } + /// + /// The principal that's getting a role assignment or that's eligible for a role through the request. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The principal that's getting a role assignment or that's eligible for a role through the request. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new PrincipalRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The principal that's getting a role assignment or that's eligible for a role through the request. + /// + public class PrincipalRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrincipalRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PrincipalRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PrincipalRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new principalRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PrincipalRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilitySchedules/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilitySchedules/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs new file mode 100644 index 00000000000..a5f12bb6278 --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilitySchedules/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.DirectoryNamespace.RoleEligibilitySchedules.Item.RoleDefinition { + /// + /// Provides operations to manage the roleDefinition property of the microsoft.graph.unifiedRoleScheduleBase entity. + /// + public class RoleDefinitionRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RoleDefinitionRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RoleDefinitionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleEligibilitySchedules/{unifiedRoleEligibilitySchedule%2Did}/roleDefinition{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new RoleDefinitionRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RoleDefinitionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/directory/roleEligibilitySchedules/{unifiedRoleEligibilitySchedule%2Did}/roleDefinition{?%24select,%24expand}", rawUrl) { + } + /// + /// Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UnifiedRoleDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new RoleDefinitionRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property. + /// + public class RoleDefinitionRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RoleDefinitionRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public RoleDefinitionRequestBuilderGetQueryParameters QueryParameters { get; set; } = new RoleDefinitionRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new roleDefinitionRequestBuilderGetRequestConfiguration and sets the default values. + /// + public RoleDefinitionRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilitySchedules/Item/UnifiedRoleEligibilityScheduleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilitySchedules/Item/UnifiedRoleEligibilityScheduleItemRequestBuilder.cs index 469724b2c95..40f7df51a08 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilitySchedules/Item/UnifiedRoleEligibilityScheduleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleEligibilitySchedules/Item/UnifiedRoleEligibilityScheduleItemRequestBuilder.cs @@ -1,5 +1,9 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; +using Microsoft.Graph.RoleManagement.DirectoryNamespace.RoleEligibilitySchedules.Item.AppScope; +using Microsoft.Graph.RoleManagement.DirectoryNamespace.RoleEligibilitySchedules.Item.DirectoryScope; +using Microsoft.Graph.RoleManagement.DirectoryNamespace.RoleEligibilitySchedules.Item.Principal; +using Microsoft.Graph.RoleManagement.DirectoryNamespace.RoleEligibilitySchedules.Item.RoleDefinition; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -13,6 +17,22 @@ namespace Microsoft.Graph.RoleManagement.DirectoryNamespace.RoleEligibilitySched /// Provides operations to manage the roleEligibilitySchedules property of the microsoft.graph.rbacApplication entity. /// public class UnifiedRoleEligibilityScheduleItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the appScope property of the microsoft.graph.unifiedRoleScheduleBase entity. + public AppScopeRequestBuilder AppScope { get => + new AppScopeRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the directoryScope property of the microsoft.graph.unifiedRoleScheduleBase entity. + public DirectoryScopeRequestBuilder DirectoryScope { get => + new DirectoryScopeRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the principal property of the microsoft.graph.unifiedRoleScheduleBase entity. + public PrincipalRequestBuilder Principal { get => + new PrincipalRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the roleDefinition property of the microsoft.graph.unifiedRoleScheduleBase entity. + public RoleDefinitionRequestBuilder RoleDefinition { get => + new RoleDefinitionRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new UnifiedRoleEligibilityScheduleItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentScheduleInstances/Item/AppScope/AppScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentScheduleInstances/Item/AppScope/AppScopeRequestBuilder.cs new file mode 100644 index 00000000000..334df5ef5ca --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentScheduleInstances/Item/AppScope/AppScopeRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.EntitlementManagement.RoleAssignmentScheduleInstances.Item.AppScope { + /// + /// Provides operations to manage the appScope property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + /// + public class AppScopeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new AppScopeRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AppScopeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleAssignmentScheduleInstances/{unifiedRoleAssignmentScheduleInstance%2Did}/appScope{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AppScopeRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AppScopeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleAssignmentScheduleInstances/{unifiedRoleAssignmentScheduleInstance%2Did}/appScope{?%24select,%24expand}", rawUrl) { + } + /// + /// Read-only property with details of the app-specific scope when the assignment or role eligibility is scoped to an app. Nullable. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.AppScope.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Read-only property with details of the app-specific scope when the assignment or role eligibility is scoped to an app. Nullable. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new AppScopeRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read-only property with details of the app-specific scope when the assignment or role eligibility is scoped to an app. Nullable. + /// + public class AppScopeRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AppScopeRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AppScopeRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AppScopeRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new appScopeRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AppScopeRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentScheduleInstances/Item/DirectoryScope/DirectoryScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentScheduleInstances/Item/DirectoryScope/DirectoryScopeRequestBuilder.cs new file mode 100644 index 00000000000..be295bbcf8c --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentScheduleInstances/Item/DirectoryScope/DirectoryScopeRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.EntitlementManagement.RoleAssignmentScheduleInstances.Item.DirectoryScope { + /// + /// Provides operations to manage the directoryScope property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + /// + public class DirectoryScopeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new DirectoryScopeRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DirectoryScopeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleAssignmentScheduleInstances/{unifiedRoleAssignmentScheduleInstance%2Did}/directoryScope{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DirectoryScopeRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DirectoryScopeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleAssignmentScheduleInstances/{unifiedRoleAssignmentScheduleInstance%2Did}/directoryScope{?%24select,%24expand}", rawUrl) { + } + /// + /// The directory object that is the scope of the assignment or role eligibility. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The directory object that is the scope of the assignment or role eligibility. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DirectoryScopeRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The directory object that is the scope of the assignment or role eligibility. Read-only. + /// + public class DirectoryScopeRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryScopeRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DirectoryScopeRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DirectoryScopeRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new directoryScopeRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DirectoryScopeRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentScheduleInstances/Item/Principal/PrincipalRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentScheduleInstances/Item/Principal/PrincipalRequestBuilder.cs new file mode 100644 index 00000000000..02f92b157b4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentScheduleInstances/Item/Principal/PrincipalRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.EntitlementManagement.RoleAssignmentScheduleInstances.Item.Principal { + /// + /// Provides operations to manage the principal property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + /// + public class PrincipalRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new PrincipalRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PrincipalRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleAssignmentScheduleInstances/{unifiedRoleAssignmentScheduleInstance%2Did}/principal{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PrincipalRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PrincipalRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleAssignmentScheduleInstances/{unifiedRoleAssignmentScheduleInstance%2Did}/principal{?%24select,%24expand}", rawUrl) { + } + /// + /// The principal that's getting a role assignment or role eligibility through the request. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The principal that's getting a role assignment or role eligibility through the request. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new PrincipalRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The principal that's getting a role assignment or role eligibility through the request. + /// + public class PrincipalRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrincipalRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PrincipalRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PrincipalRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new principalRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PrincipalRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentScheduleInstances/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentScheduleInstances/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs new file mode 100644 index 00000000000..b93005a19ed --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentScheduleInstances/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.EntitlementManagement.RoleAssignmentScheduleInstances.Item.RoleDefinition { + /// + /// Provides operations to manage the roleDefinition property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + /// + public class RoleDefinitionRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RoleDefinitionRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RoleDefinitionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleAssignmentScheduleInstances/{unifiedRoleAssignmentScheduleInstance%2Did}/roleDefinition{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new RoleDefinitionRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RoleDefinitionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleAssignmentScheduleInstances/{unifiedRoleAssignmentScheduleInstance%2Did}/roleDefinition{?%24select,%24expand}", rawUrl) { + } + /// + /// Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UnifiedRoleDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new RoleDefinitionRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property. + /// + public class RoleDefinitionRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RoleDefinitionRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public RoleDefinitionRequestBuilderGetQueryParameters QueryParameters { get; set; } = new RoleDefinitionRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new roleDefinitionRequestBuilderGetRequestConfiguration and sets the default values. + /// + public RoleDefinitionRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentScheduleInstances/Item/UnifiedRoleAssignmentScheduleInstanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentScheduleInstances/Item/UnifiedRoleAssignmentScheduleInstanceItemRequestBuilder.cs index cb28f505c04..0df03d712d8 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentScheduleInstances/Item/UnifiedRoleAssignmentScheduleInstanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentScheduleInstances/Item/UnifiedRoleAssignmentScheduleInstanceItemRequestBuilder.cs @@ -1,6 +1,10 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.RoleManagement.EntitlementManagement.RoleAssignmentScheduleInstances.Item.ActivatedUsing; +using Microsoft.Graph.RoleManagement.EntitlementManagement.RoleAssignmentScheduleInstances.Item.AppScope; +using Microsoft.Graph.RoleManagement.EntitlementManagement.RoleAssignmentScheduleInstances.Item.DirectoryScope; +using Microsoft.Graph.RoleManagement.EntitlementManagement.RoleAssignmentScheduleInstances.Item.Principal; +using Microsoft.Graph.RoleManagement.EntitlementManagement.RoleAssignmentScheduleInstances.Item.RoleDefinition; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -18,6 +22,22 @@ public class UnifiedRoleAssignmentScheduleInstanceItemRequestBuilder : BaseReque public ActivatedUsingRequestBuilder ActivatedUsing { get => new ActivatedUsingRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the appScope property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + public AppScopeRequestBuilder AppScope { get => + new AppScopeRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the directoryScope property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + public DirectoryScopeRequestBuilder DirectoryScope { get => + new DirectoryScopeRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the principal property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + public PrincipalRequestBuilder Principal { get => + new PrincipalRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the roleDefinition property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + public RoleDefinitionRequestBuilder RoleDefinition { get => + new RoleDefinitionRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new UnifiedRoleAssignmentScheduleInstanceItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentSchedules/Item/AppScope/AppScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentSchedules/Item/AppScope/AppScopeRequestBuilder.cs new file mode 100644 index 00000000000..f1080113ae6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentSchedules/Item/AppScope/AppScopeRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.EntitlementManagement.RoleAssignmentSchedules.Item.AppScope { + /// + /// Provides operations to manage the appScope property of the microsoft.graph.unifiedRoleScheduleBase entity. + /// + public class AppScopeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new AppScopeRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AppScopeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleAssignmentSchedules/{unifiedRoleAssignmentSchedule%2Did}/appScope{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AppScopeRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AppScopeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleAssignmentSchedules/{unifiedRoleAssignmentSchedule%2Did}/appScope{?%24select,%24expand}", rawUrl) { + } + /// + /// Read-only property with details of the app-specific scope when the role eligibility or assignment is scoped to an app. Nullable. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.AppScope.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Read-only property with details of the app-specific scope when the role eligibility or assignment is scoped to an app. Nullable. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new AppScopeRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read-only property with details of the app-specific scope when the role eligibility or assignment is scoped to an app. Nullable. + /// + public class AppScopeRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AppScopeRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AppScopeRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AppScopeRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new appScopeRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AppScopeRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentSchedules/Item/DirectoryScope/DirectoryScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentSchedules/Item/DirectoryScope/DirectoryScopeRequestBuilder.cs new file mode 100644 index 00000000000..dc2bf083d14 --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentSchedules/Item/DirectoryScope/DirectoryScopeRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.EntitlementManagement.RoleAssignmentSchedules.Item.DirectoryScope { + /// + /// Provides operations to manage the directoryScope property of the microsoft.graph.unifiedRoleScheduleBase entity. + /// + public class DirectoryScopeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new DirectoryScopeRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DirectoryScopeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleAssignmentSchedules/{unifiedRoleAssignmentSchedule%2Did}/directoryScope{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DirectoryScopeRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DirectoryScopeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleAssignmentSchedules/{unifiedRoleAssignmentSchedule%2Did}/directoryScope{?%24select,%24expand}", rawUrl) { + } + /// + /// The directory object that is the scope of the role eligibility or assignment. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The directory object that is the scope of the role eligibility or assignment. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DirectoryScopeRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The directory object that is the scope of the role eligibility or assignment. Read-only. + /// + public class DirectoryScopeRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryScopeRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DirectoryScopeRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DirectoryScopeRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new directoryScopeRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DirectoryScopeRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentSchedules/Item/Principal/PrincipalRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentSchedules/Item/Principal/PrincipalRequestBuilder.cs new file mode 100644 index 00000000000..fde6e2d3ee1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentSchedules/Item/Principal/PrincipalRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.EntitlementManagement.RoleAssignmentSchedules.Item.Principal { + /// + /// Provides operations to manage the principal property of the microsoft.graph.unifiedRoleScheduleBase entity. + /// + public class PrincipalRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new PrincipalRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PrincipalRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleAssignmentSchedules/{unifiedRoleAssignmentSchedule%2Did}/principal{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PrincipalRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PrincipalRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleAssignmentSchedules/{unifiedRoleAssignmentSchedule%2Did}/principal{?%24select,%24expand}", rawUrl) { + } + /// + /// The principal that's getting a role assignment or that's eligible for a role through the request. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The principal that's getting a role assignment or that's eligible for a role through the request. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new PrincipalRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The principal that's getting a role assignment or that's eligible for a role through the request. + /// + public class PrincipalRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrincipalRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PrincipalRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PrincipalRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new principalRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PrincipalRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentSchedules/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentSchedules/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs new file mode 100644 index 00000000000..3cce72c9a44 --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentSchedules/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.EntitlementManagement.RoleAssignmentSchedules.Item.RoleDefinition { + /// + /// Provides operations to manage the roleDefinition property of the microsoft.graph.unifiedRoleScheduleBase entity. + /// + public class RoleDefinitionRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RoleDefinitionRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RoleDefinitionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleAssignmentSchedules/{unifiedRoleAssignmentSchedule%2Did}/roleDefinition{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new RoleDefinitionRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RoleDefinitionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleAssignmentSchedules/{unifiedRoleAssignmentSchedule%2Did}/roleDefinition{?%24select,%24expand}", rawUrl) { + } + /// + /// Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UnifiedRoleDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new RoleDefinitionRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property. + /// + public class RoleDefinitionRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RoleDefinitionRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public RoleDefinitionRequestBuilderGetQueryParameters QueryParameters { get; set; } = new RoleDefinitionRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new roleDefinitionRequestBuilderGetRequestConfiguration and sets the default values. + /// + public RoleDefinitionRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentSchedules/Item/UnifiedRoleAssignmentScheduleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentSchedules/Item/UnifiedRoleAssignmentScheduleItemRequestBuilder.cs index 1f85aa2f553..1b9d142dd7a 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentSchedules/Item/UnifiedRoleAssignmentScheduleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleAssignmentSchedules/Item/UnifiedRoleAssignmentScheduleItemRequestBuilder.cs @@ -1,6 +1,10 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.RoleManagement.EntitlementManagement.RoleAssignmentSchedules.Item.ActivatedUsing; +using Microsoft.Graph.RoleManagement.EntitlementManagement.RoleAssignmentSchedules.Item.AppScope; +using Microsoft.Graph.RoleManagement.EntitlementManagement.RoleAssignmentSchedules.Item.DirectoryScope; +using Microsoft.Graph.RoleManagement.EntitlementManagement.RoleAssignmentSchedules.Item.Principal; +using Microsoft.Graph.RoleManagement.EntitlementManagement.RoleAssignmentSchedules.Item.RoleDefinition; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -18,6 +22,22 @@ public class UnifiedRoleAssignmentScheduleItemRequestBuilder : BaseRequestBuilde public ActivatedUsingRequestBuilder ActivatedUsing { get => new ActivatedUsingRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the appScope property of the microsoft.graph.unifiedRoleScheduleBase entity. + public AppScopeRequestBuilder AppScope { get => + new AppScopeRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the directoryScope property of the microsoft.graph.unifiedRoleScheduleBase entity. + public DirectoryScopeRequestBuilder DirectoryScope { get => + new DirectoryScopeRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the principal property of the microsoft.graph.unifiedRoleScheduleBase entity. + public PrincipalRequestBuilder Principal { get => + new PrincipalRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the roleDefinition property of the microsoft.graph.unifiedRoleScheduleBase entity. + public RoleDefinitionRequestBuilder RoleDefinition { get => + new RoleDefinitionRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new UnifiedRoleAssignmentScheduleItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilityScheduleInstances/Item/AppScope/AppScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilityScheduleInstances/Item/AppScope/AppScopeRequestBuilder.cs new file mode 100644 index 00000000000..ea783654852 --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilityScheduleInstances/Item/AppScope/AppScopeRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.EntitlementManagement.RoleEligibilityScheduleInstances.Item.AppScope { + /// + /// Provides operations to manage the appScope property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + /// + public class AppScopeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new AppScopeRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AppScopeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleEligibilityScheduleInstances/{unifiedRoleEligibilityScheduleInstance%2Did}/appScope{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AppScopeRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AppScopeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleEligibilityScheduleInstances/{unifiedRoleEligibilityScheduleInstance%2Did}/appScope{?%24select,%24expand}", rawUrl) { + } + /// + /// Read-only property with details of the app-specific scope when the assignment or role eligibility is scoped to an app. Nullable. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.AppScope.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Read-only property with details of the app-specific scope when the assignment or role eligibility is scoped to an app. Nullable. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new AppScopeRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read-only property with details of the app-specific scope when the assignment or role eligibility is scoped to an app. Nullable. + /// + public class AppScopeRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AppScopeRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AppScopeRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AppScopeRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new appScopeRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AppScopeRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilityScheduleInstances/Item/DirectoryScope/DirectoryScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilityScheduleInstances/Item/DirectoryScope/DirectoryScopeRequestBuilder.cs new file mode 100644 index 00000000000..440ac13fd34 --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilityScheduleInstances/Item/DirectoryScope/DirectoryScopeRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.EntitlementManagement.RoleEligibilityScheduleInstances.Item.DirectoryScope { + /// + /// Provides operations to manage the directoryScope property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + /// + public class DirectoryScopeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new DirectoryScopeRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DirectoryScopeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleEligibilityScheduleInstances/{unifiedRoleEligibilityScheduleInstance%2Did}/directoryScope{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DirectoryScopeRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DirectoryScopeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleEligibilityScheduleInstances/{unifiedRoleEligibilityScheduleInstance%2Did}/directoryScope{?%24select,%24expand}", rawUrl) { + } + /// + /// The directory object that is the scope of the assignment or role eligibility. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The directory object that is the scope of the assignment or role eligibility. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DirectoryScopeRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The directory object that is the scope of the assignment or role eligibility. Read-only. + /// + public class DirectoryScopeRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryScopeRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DirectoryScopeRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DirectoryScopeRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new directoryScopeRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DirectoryScopeRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilityScheduleInstances/Item/Principal/PrincipalRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilityScheduleInstances/Item/Principal/PrincipalRequestBuilder.cs new file mode 100644 index 00000000000..048d967996f --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilityScheduleInstances/Item/Principal/PrincipalRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.EntitlementManagement.RoleEligibilityScheduleInstances.Item.Principal { + /// + /// Provides operations to manage the principal property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + /// + public class PrincipalRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new PrincipalRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PrincipalRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleEligibilityScheduleInstances/{unifiedRoleEligibilityScheduleInstance%2Did}/principal{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PrincipalRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PrincipalRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleEligibilityScheduleInstances/{unifiedRoleEligibilityScheduleInstance%2Did}/principal{?%24select,%24expand}", rawUrl) { + } + /// + /// The principal that's getting a role assignment or role eligibility through the request. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The principal that's getting a role assignment or role eligibility through the request. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new PrincipalRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The principal that's getting a role assignment or role eligibility through the request. + /// + public class PrincipalRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrincipalRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PrincipalRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PrincipalRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new principalRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PrincipalRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilityScheduleInstances/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilityScheduleInstances/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs new file mode 100644 index 00000000000..5c8d5d4c478 --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilityScheduleInstances/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.EntitlementManagement.RoleEligibilityScheduleInstances.Item.RoleDefinition { + /// + /// Provides operations to manage the roleDefinition property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + /// + public class RoleDefinitionRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RoleDefinitionRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RoleDefinitionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleEligibilityScheduleInstances/{unifiedRoleEligibilityScheduleInstance%2Did}/roleDefinition{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new RoleDefinitionRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RoleDefinitionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleEligibilityScheduleInstances/{unifiedRoleEligibilityScheduleInstance%2Did}/roleDefinition{?%24select,%24expand}", rawUrl) { + } + /// + /// Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UnifiedRoleDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new RoleDefinitionRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property. + /// + public class RoleDefinitionRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RoleDefinitionRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public RoleDefinitionRequestBuilderGetQueryParameters QueryParameters { get; set; } = new RoleDefinitionRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new roleDefinitionRequestBuilderGetRequestConfiguration and sets the default values. + /// + public RoleDefinitionRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilityScheduleInstances/Item/UnifiedRoleEligibilityScheduleInstanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilityScheduleInstances/Item/UnifiedRoleEligibilityScheduleInstanceItemRequestBuilder.cs index 89675558e7b..11015c1b9c2 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilityScheduleInstances/Item/UnifiedRoleEligibilityScheduleInstanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilityScheduleInstances/Item/UnifiedRoleEligibilityScheduleInstanceItemRequestBuilder.cs @@ -1,5 +1,9 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; +using Microsoft.Graph.RoleManagement.EntitlementManagement.RoleEligibilityScheduleInstances.Item.AppScope; +using Microsoft.Graph.RoleManagement.EntitlementManagement.RoleEligibilityScheduleInstances.Item.DirectoryScope; +using Microsoft.Graph.RoleManagement.EntitlementManagement.RoleEligibilityScheduleInstances.Item.Principal; +using Microsoft.Graph.RoleManagement.EntitlementManagement.RoleEligibilityScheduleInstances.Item.RoleDefinition; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -13,6 +17,22 @@ namespace Microsoft.Graph.RoleManagement.EntitlementManagement.RoleEligibilitySc /// Provides operations to manage the roleEligibilityScheduleInstances property of the microsoft.graph.rbacApplication entity. /// public class UnifiedRoleEligibilityScheduleInstanceItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the appScope property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + public AppScopeRequestBuilder AppScope { get => + new AppScopeRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the directoryScope property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + public DirectoryScopeRequestBuilder DirectoryScope { get => + new DirectoryScopeRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the principal property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + public PrincipalRequestBuilder Principal { get => + new PrincipalRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the roleDefinition property of the microsoft.graph.unifiedRoleScheduleInstanceBase entity. + public RoleDefinitionRequestBuilder RoleDefinition { get => + new RoleDefinitionRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new UnifiedRoleEligibilityScheduleInstanceItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilitySchedules/Item/AppScope/AppScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilitySchedules/Item/AppScope/AppScopeRequestBuilder.cs new file mode 100644 index 00000000000..16cf34b4ddd --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilitySchedules/Item/AppScope/AppScopeRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.EntitlementManagement.RoleEligibilitySchedules.Item.AppScope { + /// + /// Provides operations to manage the appScope property of the microsoft.graph.unifiedRoleScheduleBase entity. + /// + public class AppScopeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new AppScopeRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AppScopeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleEligibilitySchedules/{unifiedRoleEligibilitySchedule%2Did}/appScope{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AppScopeRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AppScopeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleEligibilitySchedules/{unifiedRoleEligibilitySchedule%2Did}/appScope{?%24select,%24expand}", rawUrl) { + } + /// + /// Read-only property with details of the app-specific scope when the role eligibility or assignment is scoped to an app. Nullable. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.AppScope.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Read-only property with details of the app-specific scope when the role eligibility or assignment is scoped to an app. Nullable. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new AppScopeRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read-only property with details of the app-specific scope when the role eligibility or assignment is scoped to an app. Nullable. + /// + public class AppScopeRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AppScopeRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AppScopeRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AppScopeRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new appScopeRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AppScopeRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilitySchedules/Item/DirectoryScope/DirectoryScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilitySchedules/Item/DirectoryScope/DirectoryScopeRequestBuilder.cs new file mode 100644 index 00000000000..7505d314c1b --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilitySchedules/Item/DirectoryScope/DirectoryScopeRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.EntitlementManagement.RoleEligibilitySchedules.Item.DirectoryScope { + /// + /// Provides operations to manage the directoryScope property of the microsoft.graph.unifiedRoleScheduleBase entity. + /// + public class DirectoryScopeRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new DirectoryScopeRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DirectoryScopeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleEligibilitySchedules/{unifiedRoleEligibilitySchedule%2Did}/directoryScope{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DirectoryScopeRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DirectoryScopeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleEligibilitySchedules/{unifiedRoleEligibilitySchedule%2Did}/directoryScope{?%24select,%24expand}", rawUrl) { + } + /// + /// The directory object that is the scope of the role eligibility or assignment. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The directory object that is the scope of the role eligibility or assignment. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DirectoryScopeRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The directory object that is the scope of the role eligibility or assignment. Read-only. + /// + public class DirectoryScopeRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryScopeRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DirectoryScopeRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DirectoryScopeRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new directoryScopeRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DirectoryScopeRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilitySchedules/Item/Principal/PrincipalRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilitySchedules/Item/Principal/PrincipalRequestBuilder.cs new file mode 100644 index 00000000000..0446228f1f7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilitySchedules/Item/Principal/PrincipalRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.EntitlementManagement.RoleEligibilitySchedules.Item.Principal { + /// + /// Provides operations to manage the principal property of the microsoft.graph.unifiedRoleScheduleBase entity. + /// + public class PrincipalRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new PrincipalRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PrincipalRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleEligibilitySchedules/{unifiedRoleEligibilitySchedule%2Did}/principal{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PrincipalRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PrincipalRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleEligibilitySchedules/{unifiedRoleEligibilitySchedule%2Did}/principal{?%24select,%24expand}", rawUrl) { + } + /// + /// The principal that's getting a role assignment or that's eligible for a role through the request. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The principal that's getting a role assignment or that's eligible for a role through the request. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new PrincipalRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The principal that's getting a role assignment or that's eligible for a role through the request. + /// + public class PrincipalRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrincipalRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PrincipalRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PrincipalRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new principalRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PrincipalRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilitySchedules/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilitySchedules/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs new file mode 100644 index 00000000000..60125668c3a --- /dev/null +++ b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilitySchedules/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.RoleManagement.EntitlementManagement.RoleEligibilitySchedules.Item.RoleDefinition { + /// + /// Provides operations to manage the roleDefinition property of the microsoft.graph.unifiedRoleScheduleBase entity. + /// + public class RoleDefinitionRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RoleDefinitionRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RoleDefinitionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleEligibilitySchedules/{unifiedRoleEligibilitySchedule%2Did}/roleDefinition{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new RoleDefinitionRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RoleDefinitionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/roleManagement/entitlementManagement/roleEligibilitySchedules/{unifiedRoleEligibilitySchedule%2Did}/roleDefinition{?%24select,%24expand}", rawUrl) { + } + /// + /// Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UnifiedRoleDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new RoleDefinitionRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property. + /// + public class RoleDefinitionRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RoleDefinitionRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public RoleDefinitionRequestBuilderGetQueryParameters QueryParameters { get; set; } = new RoleDefinitionRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new roleDefinitionRequestBuilderGetRequestConfiguration and sets the default values. + /// + public RoleDefinitionRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilitySchedules/Item/UnifiedRoleEligibilityScheduleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilitySchedules/Item/UnifiedRoleEligibilityScheduleItemRequestBuilder.cs index b82a4913ec1..00df9c281e3 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilitySchedules/Item/UnifiedRoleEligibilityScheduleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/EntitlementManagement/RoleEligibilitySchedules/Item/UnifiedRoleEligibilityScheduleItemRequestBuilder.cs @@ -1,5 +1,9 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; +using Microsoft.Graph.RoleManagement.EntitlementManagement.RoleEligibilitySchedules.Item.AppScope; +using Microsoft.Graph.RoleManagement.EntitlementManagement.RoleEligibilitySchedules.Item.DirectoryScope; +using Microsoft.Graph.RoleManagement.EntitlementManagement.RoleEligibilitySchedules.Item.Principal; +using Microsoft.Graph.RoleManagement.EntitlementManagement.RoleEligibilitySchedules.Item.RoleDefinition; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -13,6 +17,22 @@ namespace Microsoft.Graph.RoleManagement.EntitlementManagement.RoleEligibilitySc /// Provides operations to manage the roleEligibilitySchedules property of the microsoft.graph.rbacApplication entity. /// public class UnifiedRoleEligibilityScheduleItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the appScope property of the microsoft.graph.unifiedRoleScheduleBase entity. + public AppScopeRequestBuilder AppScope { get => + new AppScopeRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the directoryScope property of the microsoft.graph.unifiedRoleScheduleBase entity. + public DirectoryScopeRequestBuilder DirectoryScope { get => + new DirectoryScopeRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the principal property of the microsoft.graph.unifiedRoleScheduleBase entity. + public PrincipalRequestBuilder Principal { get => + new PrincipalRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the roleDefinition property of the microsoft.graph.unifiedRoleScheduleBase entity. + public RoleDefinitionRequestBuilder RoleDefinition { get => + new RoleDefinitionRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new UnifiedRoleEligibilityScheduleItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/CustodiansRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/CustodiansRequestBuilder.cs index b1c15e26ab6..bc39ed15da5 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/CustodiansRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/CustodiansRequestBuilder.cs @@ -2,8 +2,8 @@ using Microsoft.Graph.Models.Security; using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Count; using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item; -using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.SecurityApplyHold; -using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.SecurityRemoveHold; +using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.MicrosoftGraphSecurityApplyHold; +using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.MicrosoftGraphSecurityRemoveHold; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -22,12 +22,12 @@ public class CustodiansRequestBuilder : BaseRequestBuilder { new CountRequestBuilder(PathParameters, RequestAdapter); } /// Provides operations to call the applyHold method. - public SecurityApplyHoldRequestBuilder SecurityApplyHold { get => - new SecurityApplyHoldRequestBuilder(PathParameters, RequestAdapter); + public MicrosoftGraphSecurityApplyHoldRequestBuilder MicrosoftGraphSecurityApplyHold { get => + new MicrosoftGraphSecurityApplyHoldRequestBuilder(PathParameters, RequestAdapter); } /// Provides operations to call the removeHold method. - public SecurityRemoveHoldRequestBuilder SecurityRemoveHold { get => - new SecurityRemoveHoldRequestBuilder(PathParameters, RequestAdapter); + public MicrosoftGraphSecurityRemoveHoldRequestBuilder MicrosoftGraphSecurityRemoveHold { get => + new MicrosoftGraphSecurityRemoveHoldRequestBuilder(PathParameters, RequestAdapter); } /// Provides operations to manage the custodians property of the microsoft.graph.security.ediscoveryCase entity. public EdiscoveryCustodianItemRequestBuilder this[string position] { get { diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/EdiscoveryCustodianItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/EdiscoveryCustodianItemRequestBuilder.cs index df7cb38ae4b..36ecfda55c5 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/EdiscoveryCustodianItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/EdiscoveryCustodianItemRequestBuilder.cs @@ -1,11 +1,11 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models.Security; using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.LastIndexOperation; -using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.SecurityActivate; -using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.SecurityApplyHold; -using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.SecurityRelease; -using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.SecurityRemoveHold; -using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.SecurityUpdateIndex; +using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.MicrosoftGraphSecurityActivate; +using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.MicrosoftGraphSecurityApplyHold; +using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.MicrosoftGraphSecurityRelease; +using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.MicrosoftGraphSecurityRemoveHold; +using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.MicrosoftGraphSecurityUpdateIndex; using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.SiteSources; using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.UnifiedGroupSources; using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.UserSources; @@ -27,24 +27,24 @@ public class EdiscoveryCustodianItemRequestBuilder : BaseRequestBuilder { new LastIndexOperationRequestBuilder(PathParameters, RequestAdapter); } /// Provides operations to call the activate method. - public SecurityActivateRequestBuilder SecurityActivate { get => - new SecurityActivateRequestBuilder(PathParameters, RequestAdapter); + public MicrosoftGraphSecurityActivateRequestBuilder MicrosoftGraphSecurityActivate { get => + new MicrosoftGraphSecurityActivateRequestBuilder(PathParameters, RequestAdapter); } /// Provides operations to call the applyHold method. - public SecurityApplyHoldRequestBuilder SecurityApplyHold { get => - new SecurityApplyHoldRequestBuilder(PathParameters, RequestAdapter); + public MicrosoftGraphSecurityApplyHoldRequestBuilder MicrosoftGraphSecurityApplyHold { get => + new MicrosoftGraphSecurityApplyHoldRequestBuilder(PathParameters, RequestAdapter); } /// Provides operations to call the release method. - public SecurityReleaseRequestBuilder SecurityRelease { get => - new SecurityReleaseRequestBuilder(PathParameters, RequestAdapter); + public MicrosoftGraphSecurityReleaseRequestBuilder MicrosoftGraphSecurityRelease { get => + new MicrosoftGraphSecurityReleaseRequestBuilder(PathParameters, RequestAdapter); } /// Provides operations to call the removeHold method. - public SecurityRemoveHoldRequestBuilder SecurityRemoveHold { get => - new SecurityRemoveHoldRequestBuilder(PathParameters, RequestAdapter); + public MicrosoftGraphSecurityRemoveHoldRequestBuilder MicrosoftGraphSecurityRemoveHold { get => + new MicrosoftGraphSecurityRemoveHoldRequestBuilder(PathParameters, RequestAdapter); } /// Provides operations to call the updateIndex method. - public SecurityUpdateIndexRequestBuilder SecurityUpdateIndex { get => - new SecurityUpdateIndexRequestBuilder(PathParameters, RequestAdapter); + public MicrosoftGraphSecurityUpdateIndexRequestBuilder MicrosoftGraphSecurityUpdateIndex { get => + new MicrosoftGraphSecurityUpdateIndexRequestBuilder(PathParameters, RequestAdapter); } /// Provides operations to manage the siteSources property of the microsoft.graph.security.ediscoveryCustodian entity. public SiteSourcesRequestBuilder SiteSources { get => diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/SecurityActivate/SecurityActivateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/MicrosoftGraphSecurityActivate/MicrosoftGraphSecurityActivateRequestBuilder.cs similarity index 62% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/SecurityActivate/SecurityActivateRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/MicrosoftGraphSecurityActivate/MicrosoftGraphSecurityActivateRequestBuilder.cs index 3a99a034fde..b3f4298af3b 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/SecurityActivate/SecurityActivateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/MicrosoftGraphSecurityActivate/MicrosoftGraphSecurityActivateRequestBuilder.cs @@ -7,24 +7,24 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.SecurityActivate { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.MicrosoftGraphSecurityActivate { /// /// Provides operations to call the activate method. /// - public class SecurityActivateRequestBuilder : BaseRequestBuilder { + public class MicrosoftGraphSecurityActivateRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new SecurityActivateRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityActivateRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public SecurityActivateRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/security.activate", pathParameters) { + public MicrosoftGraphSecurityActivateRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/microsoft.graph.security.activate", pathParameters) { } /// - /// Instantiates a new SecurityActivateRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityActivateRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public SecurityActivateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/security.activate", rawUrl) { + public MicrosoftGraphSecurityActivateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/microsoft.graph.security.activate", rawUrl) { } /// /// Invoke action activate @@ -33,10 +33,10 @@ public SecurityActivateRequestBuilder(string rawUrl, IRequestAdapter requestAdap /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif var requestInfo = ToPostRequestInformation(requestConfiguration); var errorMapping = new Dictionary> { @@ -51,10 +51,10 @@ public async Task PostAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { #endif var requestInfo = new RequestInformation { HttpMethod = Method.POST, @@ -62,7 +62,7 @@ public RequestInformation ToPostRequestInformation(Action /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class SecurityActivateRequestBuilderPostRequestConfiguration { + public class MicrosoftGraphSecurityActivateRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new securityActivateRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new microsoftGraphSecurityActivateRequestBuilderPostRequestConfiguration and sets the default values. /// - public SecurityActivateRequestBuilderPostRequestConfiguration() { + public MicrosoftGraphSecurityActivateRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/SecurityApplyHold/SecurityApplyHoldRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/MicrosoftGraphSecurityApplyHold/MicrosoftGraphSecurityApplyHoldRequestBuilder.cs similarity index 62% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/SecurityApplyHold/SecurityApplyHoldRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/MicrosoftGraphSecurityApplyHold/MicrosoftGraphSecurityApplyHoldRequestBuilder.cs index 31e18cb2b30..6f18888800a 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/SecurityApplyHold/SecurityApplyHoldRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/MicrosoftGraphSecurityApplyHold/MicrosoftGraphSecurityApplyHoldRequestBuilder.cs @@ -7,24 +7,24 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.SecurityApplyHold { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.MicrosoftGraphSecurityApplyHold { /// /// Provides operations to call the applyHold method. /// - public class SecurityApplyHoldRequestBuilder : BaseRequestBuilder { + public class MicrosoftGraphSecurityApplyHoldRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new SecurityApplyHoldRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityApplyHoldRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public SecurityApplyHoldRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/security.applyHold", pathParameters) { + public MicrosoftGraphSecurityApplyHoldRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/microsoft.graph.security.applyHold", pathParameters) { } /// - /// Instantiates a new SecurityApplyHoldRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityApplyHoldRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public SecurityApplyHoldRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/security.applyHold", rawUrl) { + public MicrosoftGraphSecurityApplyHoldRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/microsoft.graph.security.applyHold", rawUrl) { } /// /// Invoke action applyHold @@ -33,10 +33,10 @@ public SecurityApplyHoldRequestBuilder(string rawUrl, IRequestAdapter requestAda /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif var requestInfo = ToPostRequestInformation(requestConfiguration); var errorMapping = new Dictionary> { @@ -51,10 +51,10 @@ public async Task PostAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { #endif var requestInfo = new RequestInformation { HttpMethod = Method.POST, @@ -62,7 +62,7 @@ public RequestInformation ToPostRequestInformation(Action /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class SecurityApplyHoldRequestBuilderPostRequestConfiguration { + public class MicrosoftGraphSecurityApplyHoldRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new securityApplyHoldRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new microsoftGraphSecurityApplyHoldRequestBuilderPostRequestConfiguration and sets the default values. /// - public SecurityApplyHoldRequestBuilderPostRequestConfiguration() { + public MicrosoftGraphSecurityApplyHoldRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/SecurityRelease/SecurityReleaseRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/MicrosoftGraphSecurityRelease/MicrosoftGraphSecurityReleaseRequestBuilder.cs similarity index 62% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/SecurityRelease/SecurityReleaseRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/MicrosoftGraphSecurityRelease/MicrosoftGraphSecurityReleaseRequestBuilder.cs index 6f454490744..d00b2cc49d5 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/SecurityRelease/SecurityReleaseRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/MicrosoftGraphSecurityRelease/MicrosoftGraphSecurityReleaseRequestBuilder.cs @@ -7,24 +7,24 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.SecurityRelease { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.MicrosoftGraphSecurityRelease { /// /// Provides operations to call the release method. /// - public class SecurityReleaseRequestBuilder : BaseRequestBuilder { + public class MicrosoftGraphSecurityReleaseRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new SecurityReleaseRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityReleaseRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public SecurityReleaseRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/security.release", pathParameters) { + public MicrosoftGraphSecurityReleaseRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/microsoft.graph.security.release", pathParameters) { } /// - /// Instantiates a new SecurityReleaseRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityReleaseRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public SecurityReleaseRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/security.release", rawUrl) { + public MicrosoftGraphSecurityReleaseRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/microsoft.graph.security.release", rawUrl) { } /// /// Invoke action release @@ -33,10 +33,10 @@ public SecurityReleaseRequestBuilder(string rawUrl, IRequestAdapter requestAdapt /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif var requestInfo = ToPostRequestInformation(requestConfiguration); var errorMapping = new Dictionary> { @@ -51,10 +51,10 @@ public async Task PostAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { #endif var requestInfo = new RequestInformation { HttpMethod = Method.POST, @@ -62,7 +62,7 @@ public RequestInformation ToPostRequestInformation(Action /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class SecurityReleaseRequestBuilderPostRequestConfiguration { + public class MicrosoftGraphSecurityReleaseRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new securityReleaseRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new microsoftGraphSecurityReleaseRequestBuilderPostRequestConfiguration and sets the default values. /// - public SecurityReleaseRequestBuilderPostRequestConfiguration() { + public MicrosoftGraphSecurityReleaseRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/SecurityRemoveHold/SecurityRemoveHoldRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/MicrosoftGraphSecurityRemoveHold/MicrosoftGraphSecurityRemoveHoldRequestBuilder.cs similarity index 62% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/SecurityRemoveHold/SecurityRemoveHoldRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/MicrosoftGraphSecurityRemoveHold/MicrosoftGraphSecurityRemoveHoldRequestBuilder.cs index 600fe8ca703..44ec43ffeb9 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/SecurityRemoveHold/SecurityRemoveHoldRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/MicrosoftGraphSecurityRemoveHold/MicrosoftGraphSecurityRemoveHoldRequestBuilder.cs @@ -7,24 +7,24 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.SecurityRemoveHold { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.MicrosoftGraphSecurityRemoveHold { /// /// Provides operations to call the removeHold method. /// - public class SecurityRemoveHoldRequestBuilder : BaseRequestBuilder { + public class MicrosoftGraphSecurityRemoveHoldRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new SecurityRemoveHoldRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityRemoveHoldRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public SecurityRemoveHoldRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/security.removeHold", pathParameters) { + public MicrosoftGraphSecurityRemoveHoldRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/microsoft.graph.security.removeHold", pathParameters) { } /// - /// Instantiates a new SecurityRemoveHoldRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityRemoveHoldRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public SecurityRemoveHoldRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/security.removeHold", rawUrl) { + public MicrosoftGraphSecurityRemoveHoldRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/microsoft.graph.security.removeHold", rawUrl) { } /// /// Invoke action removeHold @@ -33,10 +33,10 @@ public SecurityRemoveHoldRequestBuilder(string rawUrl, IRequestAdapter requestAd /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif var requestInfo = ToPostRequestInformation(requestConfiguration); var errorMapping = new Dictionary> { @@ -51,10 +51,10 @@ public async Task PostAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { #endif var requestInfo = new RequestInformation { HttpMethod = Method.POST, @@ -62,7 +62,7 @@ public RequestInformation ToPostRequestInformation(Action /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class SecurityRemoveHoldRequestBuilderPostRequestConfiguration { + public class MicrosoftGraphSecurityRemoveHoldRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new securityRemoveHoldRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new microsoftGraphSecurityRemoveHoldRequestBuilderPostRequestConfiguration and sets the default values. /// - public SecurityRemoveHoldRequestBuilderPostRequestConfiguration() { + public MicrosoftGraphSecurityRemoveHoldRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/SecurityUpdateIndex/SecurityUpdateIndexRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/MicrosoftGraphSecurityUpdateIndex/MicrosoftGraphSecurityUpdateIndexRequestBuilder.cs similarity index 61% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/SecurityUpdateIndex/SecurityUpdateIndexRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/MicrosoftGraphSecurityUpdateIndex/MicrosoftGraphSecurityUpdateIndexRequestBuilder.cs index 5292b09ad3d..42e39c5d376 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/SecurityUpdateIndex/SecurityUpdateIndexRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/MicrosoftGraphSecurityUpdateIndex/MicrosoftGraphSecurityUpdateIndexRequestBuilder.cs @@ -7,24 +7,24 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.SecurityUpdateIndex { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.MicrosoftGraphSecurityUpdateIndex { /// /// Provides operations to call the updateIndex method. /// - public class SecurityUpdateIndexRequestBuilder : BaseRequestBuilder { + public class MicrosoftGraphSecurityUpdateIndexRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new SecurityUpdateIndexRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityUpdateIndexRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public SecurityUpdateIndexRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/security.updateIndex", pathParameters) { + public MicrosoftGraphSecurityUpdateIndexRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/microsoft.graph.security.updateIndex", pathParameters) { } /// - /// Instantiates a new SecurityUpdateIndexRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityUpdateIndexRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public SecurityUpdateIndexRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/security.updateIndex", rawUrl) { + public MicrosoftGraphSecurityUpdateIndexRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/microsoft.graph.security.updateIndex", rawUrl) { } /// /// Invoke action updateIndex @@ -33,10 +33,10 @@ public SecurityUpdateIndexRequestBuilder(string rawUrl, IRequestAdapter requestA /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif var requestInfo = ToPostRequestInformation(requestConfiguration); var errorMapping = new Dictionary> { @@ -51,10 +51,10 @@ public async Task PostAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { #endif var requestInfo = new RequestInformation { HttpMethod = Method.POST, @@ -62,7 +62,7 @@ public RequestInformation ToPostRequestInformation(Action /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class SecurityUpdateIndexRequestBuilderPostRequestConfiguration { + public class MicrosoftGraphSecurityUpdateIndexRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new securityUpdateIndexRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new microsoftGraphSecurityUpdateIndexRequestBuilderPostRequestConfiguration and sets the default values. /// - public SecurityUpdateIndexRequestBuilderPostRequestConfiguration() { + public MicrosoftGraphSecurityUpdateIndexRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/SecurityApplyHold/ApplyHoldPostRequestBody.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/MicrosoftGraphSecurityApplyHold/ApplyHoldPostRequestBody.cs similarity index 98% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/SecurityApplyHold/ApplyHoldPostRequestBody.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/MicrosoftGraphSecurityApplyHold/ApplyHoldPostRequestBody.cs index b1beeff9791..2f3fd8d3484 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/SecurityApplyHold/ApplyHoldPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/MicrosoftGraphSecurityApplyHold/ApplyHoldPostRequestBody.cs @@ -4,7 +4,7 @@ using System.IO; using System.Linq; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.SecurityApplyHold { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.MicrosoftGraphSecurityApplyHold { public class ApplyHoldPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/SecurityApplyHold/SecurityApplyHoldRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/MicrosoftGraphSecurityApplyHold/MicrosoftGraphSecurityApplyHoldRequestBuilder.cs similarity index 66% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/SecurityApplyHold/SecurityApplyHoldRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/MicrosoftGraphSecurityApplyHold/MicrosoftGraphSecurityApplyHoldRequestBuilder.cs index daadb8c8409..42af0ee4fe6 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/SecurityApplyHold/SecurityApplyHoldRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/MicrosoftGraphSecurityApplyHold/MicrosoftGraphSecurityApplyHoldRequestBuilder.cs @@ -7,24 +7,24 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.SecurityApplyHold { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.MicrosoftGraphSecurityApplyHold { /// /// Provides operations to call the applyHold method. /// - public class SecurityApplyHoldRequestBuilder : BaseRequestBuilder { + public class MicrosoftGraphSecurityApplyHoldRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new SecurityApplyHoldRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityApplyHoldRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public SecurityApplyHoldRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/security.applyHold", pathParameters) { + public MicrosoftGraphSecurityApplyHoldRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/microsoft.graph.security.applyHold", pathParameters) { } /// - /// Instantiates a new SecurityApplyHoldRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityApplyHoldRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public SecurityApplyHoldRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/security.applyHold", rawUrl) { + public MicrosoftGraphSecurityApplyHoldRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/microsoft.graph.security.applyHold", rawUrl) { } /// /// Invoke action applyHold @@ -34,10 +34,10 @@ public SecurityApplyHoldRequestBuilder(string rawUrl, IRequestAdapter requestAda /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task PostAsync(ApplyHoldPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(ApplyHoldPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(ApplyHoldPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(ApplyHoldPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); @@ -54,10 +54,10 @@ public async Task PostAsync(ApplyHoldPostRequestBody body, ActionConfiguration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(ApplyHoldPostRequestBody body, Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(ApplyHoldPostRequestBody body, Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(ApplyHoldPostRequestBody body, Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(ApplyHoldPostRequestBody body, Action requestConfiguration = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation { @@ -67,7 +67,7 @@ public RequestInformation ToPostRequestInformation(ApplyHoldPostRequestBody body }; requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); if (requestConfiguration != null) { - var requestConfig = new SecurityApplyHoldRequestBuilderPostRequestConfiguration(); + var requestConfig = new MicrosoftGraphSecurityApplyHoldRequestBuilderPostRequestConfiguration(); requestConfiguration.Invoke(requestConfig); requestInfo.AddRequestOptions(requestConfig.Options); requestInfo.AddHeaders(requestConfig.Headers); @@ -77,15 +77,15 @@ public RequestInformation ToPostRequestInformation(ApplyHoldPostRequestBody body /// /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class SecurityApplyHoldRequestBuilderPostRequestConfiguration { + public class MicrosoftGraphSecurityApplyHoldRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new securityApplyHoldRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new microsoftGraphSecurityApplyHoldRequestBuilderPostRequestConfiguration and sets the default values. /// - public SecurityApplyHoldRequestBuilderPostRequestConfiguration() { + public MicrosoftGraphSecurityApplyHoldRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/SecurityRemoveHold/SecurityRemoveHoldRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/MicrosoftGraphSecurityRemoveHold/MicrosoftGraphSecurityRemoveHoldRequestBuilder.cs similarity index 65% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/SecurityRemoveHold/SecurityRemoveHoldRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/MicrosoftGraphSecurityRemoveHold/MicrosoftGraphSecurityRemoveHoldRequestBuilder.cs index 6922ed6b774..82f5646b2a6 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/SecurityRemoveHold/SecurityRemoveHoldRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/MicrosoftGraphSecurityRemoveHold/MicrosoftGraphSecurityRemoveHoldRequestBuilder.cs @@ -7,24 +7,24 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.SecurityRemoveHold { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.MicrosoftGraphSecurityRemoveHold { /// /// Provides operations to call the removeHold method. /// - public class SecurityRemoveHoldRequestBuilder : BaseRequestBuilder { + public class MicrosoftGraphSecurityRemoveHoldRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new SecurityRemoveHoldRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityRemoveHoldRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public SecurityRemoveHoldRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/security.removeHold", pathParameters) { + public MicrosoftGraphSecurityRemoveHoldRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/microsoft.graph.security.removeHold", pathParameters) { } /// - /// Instantiates a new SecurityRemoveHoldRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityRemoveHoldRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public SecurityRemoveHoldRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/security.removeHold", rawUrl) { + public MicrosoftGraphSecurityRemoveHoldRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/microsoft.graph.security.removeHold", rawUrl) { } /// /// Invoke action removeHold @@ -34,10 +34,10 @@ public SecurityRemoveHoldRequestBuilder(string rawUrl, IRequestAdapter requestAd /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task PostAsync(RemoveHoldPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(RemoveHoldPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(RemoveHoldPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(RemoveHoldPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); @@ -54,10 +54,10 @@ public async Task PostAsync(RemoveHoldPostRequestBody body, ActionConfiguration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(RemoveHoldPostRequestBody body, Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(RemoveHoldPostRequestBody body, Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(RemoveHoldPostRequestBody body, Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(RemoveHoldPostRequestBody body, Action requestConfiguration = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation { @@ -67,7 +67,7 @@ public RequestInformation ToPostRequestInformation(RemoveHoldPostRequestBody bod }; requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); if (requestConfiguration != null) { - var requestConfig = new SecurityRemoveHoldRequestBuilderPostRequestConfiguration(); + var requestConfig = new MicrosoftGraphSecurityRemoveHoldRequestBuilderPostRequestConfiguration(); requestConfiguration.Invoke(requestConfig); requestInfo.AddRequestOptions(requestConfig.Options); requestInfo.AddHeaders(requestConfig.Headers); @@ -77,15 +77,15 @@ public RequestInformation ToPostRequestInformation(RemoveHoldPostRequestBody bod /// /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class SecurityRemoveHoldRequestBuilderPostRequestConfiguration { + public class MicrosoftGraphSecurityRemoveHoldRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new securityRemoveHoldRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new microsoftGraphSecurityRemoveHoldRequestBuilderPostRequestConfiguration and sets the default values. /// - public SecurityRemoveHoldRequestBuilderPostRequestConfiguration() { + public MicrosoftGraphSecurityRemoveHoldRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/SecurityRemoveHold/RemoveHoldPostRequestBody.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/MicrosoftGraphSecurityRemoveHold/RemoveHoldPostRequestBody.cs similarity index 98% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/SecurityRemoveHold/RemoveHoldPostRequestBody.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/MicrosoftGraphSecurityRemoveHold/RemoveHoldPostRequestBody.cs index 69b5ea4f2ce..13f62788a8f 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/SecurityRemoveHold/RemoveHoldPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/MicrosoftGraphSecurityRemoveHold/RemoveHoldPostRequestBody.cs @@ -4,7 +4,7 @@ using System.IO; using System.Linq; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.SecurityRemoveHold { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.MicrosoftGraphSecurityRemoveHold { public class RemoveHoldPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/EdiscoveryCaseItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/EdiscoveryCaseItemRequestBuilder.cs index c5ced55cc3e..9ab92bdfb0b 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/EdiscoveryCaseItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/EdiscoveryCaseItemRequestBuilder.cs @@ -1,12 +1,12 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models.Security; using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians; +using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.MicrosoftGraphSecurityClose; +using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.MicrosoftGraphSecurityReopen; using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources; using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Operations; using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.ReviewSets; using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Searches; -using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.SecurityClose; -using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.SecurityReopen; using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Settings; using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Tags; using Microsoft.Kiota.Abstractions.Serialization; @@ -26,6 +26,14 @@ public class EdiscoveryCaseItemRequestBuilder : BaseRequestBuilder { public CustodiansRequestBuilder Custodians { get => new CustodiansRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to call the close method. + public MicrosoftGraphSecurityCloseRequestBuilder MicrosoftGraphSecurityClose { get => + new MicrosoftGraphSecurityCloseRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the reopen method. + public MicrosoftGraphSecurityReopenRequestBuilder MicrosoftGraphSecurityReopen { get => + new MicrosoftGraphSecurityReopenRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the noncustodialDataSources property of the microsoft.graph.security.ediscoveryCase entity. public NoncustodialDataSourcesRequestBuilder NoncustodialDataSources { get => new NoncustodialDataSourcesRequestBuilder(PathParameters, RequestAdapter); @@ -42,14 +50,6 @@ public class EdiscoveryCaseItemRequestBuilder : BaseRequestBuilder { public SearchesRequestBuilder Searches { get => new SearchesRequestBuilder(PathParameters, RequestAdapter); } - /// Provides operations to call the close method. - public SecurityCloseRequestBuilder SecurityClose { get => - new SecurityCloseRequestBuilder(PathParameters, RequestAdapter); - } - /// Provides operations to call the reopen method. - public SecurityReopenRequestBuilder SecurityReopen { get => - new SecurityReopenRequestBuilder(PathParameters, RequestAdapter); - } /// Provides operations to manage the settings property of the microsoft.graph.security.ediscoveryCase entity. public SettingsRequestBuilder Settings { get => new SettingsRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/MicrosoftGraphSecurityClose/MicrosoftGraphSecurityCloseRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/MicrosoftGraphSecurityClose/MicrosoftGraphSecurityCloseRequestBuilder.cs new file mode 100644 index 00000000000..58ce5ad0f42 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/MicrosoftGraphSecurityClose/MicrosoftGraphSecurityCloseRequestBuilder.cs @@ -0,0 +1,89 @@ +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.Security.Cases.EdiscoveryCases.Item.MicrosoftGraphSecurityClose { + /// + /// Provides operations to call the close method. + /// + public class MicrosoftGraphSecurityCloseRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MicrosoftGraphSecurityCloseRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MicrosoftGraphSecurityCloseRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/microsoft.graph.security.close", pathParameters) { + } + /// + /// Instantiates a new MicrosoftGraphSecurityCloseRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MicrosoftGraphSecurityCloseRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/microsoft.graph.security.close", rawUrl) { + } + /// + /// Invoke action close + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Invoke action close + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new MicrosoftGraphSecurityCloseRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MicrosoftGraphSecurityCloseRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new microsoftGraphSecurityCloseRequestBuilderPostRequestConfiguration and sets the default values. + /// + public MicrosoftGraphSecurityCloseRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/MicrosoftGraphSecurityReopen/MicrosoftGraphSecurityReopenRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/MicrosoftGraphSecurityReopen/MicrosoftGraphSecurityReopenRequestBuilder.cs new file mode 100644 index 00000000000..86cfc3d603b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/MicrosoftGraphSecurityReopen/MicrosoftGraphSecurityReopenRequestBuilder.cs @@ -0,0 +1,89 @@ +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.Security.Cases.EdiscoveryCases.Item.MicrosoftGraphSecurityReopen { + /// + /// Provides operations to call the reopen method. + /// + public class MicrosoftGraphSecurityReopenRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MicrosoftGraphSecurityReopenRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MicrosoftGraphSecurityReopenRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/microsoft.graph.security.reopen", pathParameters) { + } + /// + /// Instantiates a new MicrosoftGraphSecurityReopenRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MicrosoftGraphSecurityReopenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/microsoft.graph.security.reopen", rawUrl) { + } + /// + /// Invoke action reopen + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Invoke action reopen + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new MicrosoftGraphSecurityReopenRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MicrosoftGraphSecurityReopenRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new microsoftGraphSecurityReopenRequestBuilderPostRequestConfiguration and sets the default values. + /// + public MicrosoftGraphSecurityReopenRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/EdiscoveryNoncustodialDataSourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/EdiscoveryNoncustodialDataSourceItemRequestBuilder.cs index 400483db03b..d8ba0a1236e 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/EdiscoveryNoncustodialDataSourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/EdiscoveryNoncustodialDataSourceItemRequestBuilder.cs @@ -2,10 +2,10 @@ using Microsoft.Graph.Models.Security; using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.Item.DataSource; using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.Item.LastIndexOperation; -using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.Item.SecurityApplyHold; -using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.Item.SecurityRelease; -using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.Item.SecurityRemoveHold; -using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.Item.SecurityUpdateIndex; +using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.Item.MicrosoftGraphSecurityApplyHold; +using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.Item.MicrosoftGraphSecurityRelease; +using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.Item.MicrosoftGraphSecurityRemoveHold; +using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.Item.MicrosoftGraphSecurityUpdateIndex; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -28,20 +28,20 @@ public class EdiscoveryNoncustodialDataSourceItemRequestBuilder : BaseRequestBui new LastIndexOperationRequestBuilder(PathParameters, RequestAdapter); } /// Provides operations to call the applyHold method. - public SecurityApplyHoldRequestBuilder SecurityApplyHold { get => - new SecurityApplyHoldRequestBuilder(PathParameters, RequestAdapter); + public MicrosoftGraphSecurityApplyHoldRequestBuilder MicrosoftGraphSecurityApplyHold { get => + new MicrosoftGraphSecurityApplyHoldRequestBuilder(PathParameters, RequestAdapter); } /// Provides operations to call the release method. - public SecurityReleaseRequestBuilder SecurityRelease { get => - new SecurityReleaseRequestBuilder(PathParameters, RequestAdapter); + public MicrosoftGraphSecurityReleaseRequestBuilder MicrosoftGraphSecurityRelease { get => + new MicrosoftGraphSecurityReleaseRequestBuilder(PathParameters, RequestAdapter); } /// Provides operations to call the removeHold method. - public SecurityRemoveHoldRequestBuilder SecurityRemoveHold { get => - new SecurityRemoveHoldRequestBuilder(PathParameters, RequestAdapter); + public MicrosoftGraphSecurityRemoveHoldRequestBuilder MicrosoftGraphSecurityRemoveHold { get => + new MicrosoftGraphSecurityRemoveHoldRequestBuilder(PathParameters, RequestAdapter); } /// Provides operations to call the updateIndex method. - public SecurityUpdateIndexRequestBuilder SecurityUpdateIndex { get => - new SecurityUpdateIndexRequestBuilder(PathParameters, RequestAdapter); + public MicrosoftGraphSecurityUpdateIndexRequestBuilder MicrosoftGraphSecurityUpdateIndex { get => + new MicrosoftGraphSecurityUpdateIndexRequestBuilder(PathParameters, RequestAdapter); } /// /// Instantiates a new EdiscoveryNoncustodialDataSourceItemRequestBuilder and sets the default values. diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/SecurityApplyHold/SecurityApplyHoldRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/MicrosoftGraphSecurityApplyHold/MicrosoftGraphSecurityApplyHoldRequestBuilder.cs similarity index 61% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/SecurityApplyHold/SecurityApplyHoldRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/MicrosoftGraphSecurityApplyHold/MicrosoftGraphSecurityApplyHoldRequestBuilder.cs index ef73ef8002b..fef9fe5a800 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/SecurityApplyHold/SecurityApplyHoldRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/MicrosoftGraphSecurityApplyHold/MicrosoftGraphSecurityApplyHoldRequestBuilder.cs @@ -7,24 +7,24 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.Item.SecurityApplyHold { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.Item.MicrosoftGraphSecurityApplyHold { /// /// Provides operations to call the applyHold method. /// - public class SecurityApplyHoldRequestBuilder : BaseRequestBuilder { + public class MicrosoftGraphSecurityApplyHoldRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new SecurityApplyHoldRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityApplyHoldRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public SecurityApplyHoldRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/noncustodialDataSources/{ediscoveryNoncustodialDataSource%2Did}/security.applyHold", pathParameters) { + public MicrosoftGraphSecurityApplyHoldRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/noncustodialDataSources/{ediscoveryNoncustodialDataSource%2Did}/microsoft.graph.security.applyHold", pathParameters) { } /// - /// Instantiates a new SecurityApplyHoldRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityApplyHoldRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public SecurityApplyHoldRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/noncustodialDataSources/{ediscoveryNoncustodialDataSource%2Did}/security.applyHold", rawUrl) { + public MicrosoftGraphSecurityApplyHoldRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/noncustodialDataSources/{ediscoveryNoncustodialDataSource%2Did}/microsoft.graph.security.applyHold", rawUrl) { } /// /// Invoke action applyHold @@ -33,10 +33,10 @@ public SecurityApplyHoldRequestBuilder(string rawUrl, IRequestAdapter requestAda /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif var requestInfo = ToPostRequestInformation(requestConfiguration); var errorMapping = new Dictionary> { @@ -51,10 +51,10 @@ public async Task PostAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { #endif var requestInfo = new RequestInformation { HttpMethod = Method.POST, @@ -62,7 +62,7 @@ public RequestInformation ToPostRequestInformation(Action /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class SecurityApplyHoldRequestBuilderPostRequestConfiguration { + public class MicrosoftGraphSecurityApplyHoldRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new securityApplyHoldRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new microsoftGraphSecurityApplyHoldRequestBuilderPostRequestConfiguration and sets the default values. /// - public SecurityApplyHoldRequestBuilderPostRequestConfiguration() { + public MicrosoftGraphSecurityApplyHoldRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/SecurityRelease/SecurityReleaseRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/MicrosoftGraphSecurityRelease/MicrosoftGraphSecurityReleaseRequestBuilder.cs similarity index 61% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/SecurityRelease/SecurityReleaseRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/MicrosoftGraphSecurityRelease/MicrosoftGraphSecurityReleaseRequestBuilder.cs index 3a44424f3ab..e1fa84f5c62 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/SecurityRelease/SecurityReleaseRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/MicrosoftGraphSecurityRelease/MicrosoftGraphSecurityReleaseRequestBuilder.cs @@ -7,24 +7,24 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.Item.SecurityRelease { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.Item.MicrosoftGraphSecurityRelease { /// /// Provides operations to call the release method. /// - public class SecurityReleaseRequestBuilder : BaseRequestBuilder { + public class MicrosoftGraphSecurityReleaseRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new SecurityReleaseRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityReleaseRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public SecurityReleaseRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/noncustodialDataSources/{ediscoveryNoncustodialDataSource%2Did}/security.release", pathParameters) { + public MicrosoftGraphSecurityReleaseRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/noncustodialDataSources/{ediscoveryNoncustodialDataSource%2Did}/microsoft.graph.security.release", pathParameters) { } /// - /// Instantiates a new SecurityReleaseRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityReleaseRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public SecurityReleaseRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/noncustodialDataSources/{ediscoveryNoncustodialDataSource%2Did}/security.release", rawUrl) { + public MicrosoftGraphSecurityReleaseRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/noncustodialDataSources/{ediscoveryNoncustodialDataSource%2Did}/microsoft.graph.security.release", rawUrl) { } /// /// Invoke action release @@ -33,10 +33,10 @@ public SecurityReleaseRequestBuilder(string rawUrl, IRequestAdapter requestAdapt /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif var requestInfo = ToPostRequestInformation(requestConfiguration); var errorMapping = new Dictionary> { @@ -51,10 +51,10 @@ public async Task PostAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { #endif var requestInfo = new RequestInformation { HttpMethod = Method.POST, @@ -62,7 +62,7 @@ public RequestInformation ToPostRequestInformation(Action /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class SecurityReleaseRequestBuilderPostRequestConfiguration { + public class MicrosoftGraphSecurityReleaseRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new securityReleaseRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new microsoftGraphSecurityReleaseRequestBuilderPostRequestConfiguration and sets the default values. /// - public SecurityReleaseRequestBuilderPostRequestConfiguration() { + public MicrosoftGraphSecurityReleaseRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/SecurityRemoveHold/SecurityRemoveHoldRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/MicrosoftGraphSecurityRemoveHold/MicrosoftGraphSecurityRemoveHoldRequestBuilder.cs similarity index 61% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/SecurityRemoveHold/SecurityRemoveHoldRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/MicrosoftGraphSecurityRemoveHold/MicrosoftGraphSecurityRemoveHoldRequestBuilder.cs index 697ec8e1558..872b5de72f2 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/SecurityRemoveHold/SecurityRemoveHoldRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/MicrosoftGraphSecurityRemoveHold/MicrosoftGraphSecurityRemoveHoldRequestBuilder.cs @@ -7,24 +7,24 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.Item.SecurityRemoveHold { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.Item.MicrosoftGraphSecurityRemoveHold { /// /// Provides operations to call the removeHold method. /// - public class SecurityRemoveHoldRequestBuilder : BaseRequestBuilder { + public class MicrosoftGraphSecurityRemoveHoldRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new SecurityRemoveHoldRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityRemoveHoldRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public SecurityRemoveHoldRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/noncustodialDataSources/{ediscoveryNoncustodialDataSource%2Did}/security.removeHold", pathParameters) { + public MicrosoftGraphSecurityRemoveHoldRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/noncustodialDataSources/{ediscoveryNoncustodialDataSource%2Did}/microsoft.graph.security.removeHold", pathParameters) { } /// - /// Instantiates a new SecurityRemoveHoldRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityRemoveHoldRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public SecurityRemoveHoldRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/noncustodialDataSources/{ediscoveryNoncustodialDataSource%2Did}/security.removeHold", rawUrl) { + public MicrosoftGraphSecurityRemoveHoldRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/noncustodialDataSources/{ediscoveryNoncustodialDataSource%2Did}/microsoft.graph.security.removeHold", rawUrl) { } /// /// Invoke action removeHold @@ -33,10 +33,10 @@ public SecurityRemoveHoldRequestBuilder(string rawUrl, IRequestAdapter requestAd /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif var requestInfo = ToPostRequestInformation(requestConfiguration); var errorMapping = new Dictionary> { @@ -51,10 +51,10 @@ public async Task PostAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { #endif var requestInfo = new RequestInformation { HttpMethod = Method.POST, @@ -62,7 +62,7 @@ public RequestInformation ToPostRequestInformation(Action /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class SecurityRemoveHoldRequestBuilderPostRequestConfiguration { + public class MicrosoftGraphSecurityRemoveHoldRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new securityRemoveHoldRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new microsoftGraphSecurityRemoveHoldRequestBuilderPostRequestConfiguration and sets the default values. /// - public SecurityRemoveHoldRequestBuilderPostRequestConfiguration() { + public MicrosoftGraphSecurityRemoveHoldRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/SecurityUpdateIndex/SecurityUpdateIndexRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/MicrosoftGraphSecurityUpdateIndex/MicrosoftGraphSecurityUpdateIndexRequestBuilder.cs similarity index 61% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/SecurityUpdateIndex/SecurityUpdateIndexRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/MicrosoftGraphSecurityUpdateIndex/MicrosoftGraphSecurityUpdateIndexRequestBuilder.cs index 5d3c6e8c651..ddceff65d40 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/SecurityUpdateIndex/SecurityUpdateIndexRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/Item/MicrosoftGraphSecurityUpdateIndex/MicrosoftGraphSecurityUpdateIndexRequestBuilder.cs @@ -7,24 +7,24 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.Item.SecurityUpdateIndex { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.Item.MicrosoftGraphSecurityUpdateIndex { /// /// Provides operations to call the updateIndex method. /// - public class SecurityUpdateIndexRequestBuilder : BaseRequestBuilder { + public class MicrosoftGraphSecurityUpdateIndexRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new SecurityUpdateIndexRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityUpdateIndexRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public SecurityUpdateIndexRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/noncustodialDataSources/{ediscoveryNoncustodialDataSource%2Did}/security.updateIndex", pathParameters) { + public MicrosoftGraphSecurityUpdateIndexRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/noncustodialDataSources/{ediscoveryNoncustodialDataSource%2Did}/microsoft.graph.security.updateIndex", pathParameters) { } /// - /// Instantiates a new SecurityUpdateIndexRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityUpdateIndexRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public SecurityUpdateIndexRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/noncustodialDataSources/{ediscoveryNoncustodialDataSource%2Did}/security.updateIndex", rawUrl) { + public MicrosoftGraphSecurityUpdateIndexRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/noncustodialDataSources/{ediscoveryNoncustodialDataSource%2Did}/microsoft.graph.security.updateIndex", rawUrl) { } /// /// Invoke action updateIndex @@ -33,10 +33,10 @@ public SecurityUpdateIndexRequestBuilder(string rawUrl, IRequestAdapter requestA /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif var requestInfo = ToPostRequestInformation(requestConfiguration); var errorMapping = new Dictionary> { @@ -51,10 +51,10 @@ public async Task PostAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { #endif var requestInfo = new RequestInformation { HttpMethod = Method.POST, @@ -62,7 +62,7 @@ public RequestInformation ToPostRequestInformation(Action /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class SecurityUpdateIndexRequestBuilderPostRequestConfiguration { + public class MicrosoftGraphSecurityUpdateIndexRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new securityUpdateIndexRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new microsoftGraphSecurityUpdateIndexRequestBuilderPostRequestConfiguration and sets the default values. /// - public SecurityUpdateIndexRequestBuilderPostRequestConfiguration() { + public MicrosoftGraphSecurityUpdateIndexRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/SecurityApplyHold/ApplyHoldPostRequestBody.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/MicrosoftGraphSecurityApplyHold/ApplyHoldPostRequestBody.cs similarity index 98% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/SecurityApplyHold/ApplyHoldPostRequestBody.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/MicrosoftGraphSecurityApplyHold/ApplyHoldPostRequestBody.cs index 69f25cabdf6..180a4c4e816 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/SecurityApplyHold/ApplyHoldPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/MicrosoftGraphSecurityApplyHold/ApplyHoldPostRequestBody.cs @@ -4,7 +4,7 @@ using System.IO; using System.Linq; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.SecurityApplyHold { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.MicrosoftGraphSecurityApplyHold { public class ApplyHoldPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/SecurityApplyHold/SecurityApplyHoldRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/MicrosoftGraphSecurityApplyHold/MicrosoftGraphSecurityApplyHoldRequestBuilder.cs similarity index 65% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/SecurityApplyHold/SecurityApplyHoldRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/MicrosoftGraphSecurityApplyHold/MicrosoftGraphSecurityApplyHoldRequestBuilder.cs index 8e717895ece..4983fe46e2a 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/SecurityApplyHold/SecurityApplyHoldRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/MicrosoftGraphSecurityApplyHold/MicrosoftGraphSecurityApplyHoldRequestBuilder.cs @@ -7,24 +7,24 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.SecurityApplyHold { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.MicrosoftGraphSecurityApplyHold { /// /// Provides operations to call the applyHold method. /// - public class SecurityApplyHoldRequestBuilder : BaseRequestBuilder { + public class MicrosoftGraphSecurityApplyHoldRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new SecurityApplyHoldRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityApplyHoldRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public SecurityApplyHoldRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/noncustodialDataSources/security.applyHold", pathParameters) { + public MicrosoftGraphSecurityApplyHoldRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/noncustodialDataSources/microsoft.graph.security.applyHold", pathParameters) { } /// - /// Instantiates a new SecurityApplyHoldRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityApplyHoldRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public SecurityApplyHoldRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/noncustodialDataSources/security.applyHold", rawUrl) { + public MicrosoftGraphSecurityApplyHoldRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/noncustodialDataSources/microsoft.graph.security.applyHold", rawUrl) { } /// /// Invoke action applyHold @@ -34,10 +34,10 @@ public SecurityApplyHoldRequestBuilder(string rawUrl, IRequestAdapter requestAda /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task PostAsync(ApplyHoldPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(ApplyHoldPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(ApplyHoldPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(ApplyHoldPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); @@ -54,10 +54,10 @@ public async Task PostAsync(ApplyHoldPostRequestBody body, ActionConfiguration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(ApplyHoldPostRequestBody body, Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(ApplyHoldPostRequestBody body, Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(ApplyHoldPostRequestBody body, Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(ApplyHoldPostRequestBody body, Action requestConfiguration = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation { @@ -67,7 +67,7 @@ public RequestInformation ToPostRequestInformation(ApplyHoldPostRequestBody body }; requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); if (requestConfiguration != null) { - var requestConfig = new SecurityApplyHoldRequestBuilderPostRequestConfiguration(); + var requestConfig = new MicrosoftGraphSecurityApplyHoldRequestBuilderPostRequestConfiguration(); requestConfiguration.Invoke(requestConfig); requestInfo.AddRequestOptions(requestConfig.Options); requestInfo.AddHeaders(requestConfig.Headers); @@ -77,15 +77,15 @@ public RequestInformation ToPostRequestInformation(ApplyHoldPostRequestBody body /// /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class SecurityApplyHoldRequestBuilderPostRequestConfiguration { + public class MicrosoftGraphSecurityApplyHoldRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new securityApplyHoldRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new microsoftGraphSecurityApplyHoldRequestBuilderPostRequestConfiguration and sets the default values. /// - public SecurityApplyHoldRequestBuilderPostRequestConfiguration() { + public MicrosoftGraphSecurityApplyHoldRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/SecurityRemoveHold/SecurityRemoveHoldRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/MicrosoftGraphSecurityRemoveHold/MicrosoftGraphSecurityRemoveHoldRequestBuilder.cs similarity index 65% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/SecurityRemoveHold/SecurityRemoveHoldRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/MicrosoftGraphSecurityRemoveHold/MicrosoftGraphSecurityRemoveHoldRequestBuilder.cs index 2a1be4a82d8..ebf091912fa 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/SecurityRemoveHold/SecurityRemoveHoldRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/MicrosoftGraphSecurityRemoveHold/MicrosoftGraphSecurityRemoveHoldRequestBuilder.cs @@ -7,24 +7,24 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.SecurityRemoveHold { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.MicrosoftGraphSecurityRemoveHold { /// /// Provides operations to call the removeHold method. /// - public class SecurityRemoveHoldRequestBuilder : BaseRequestBuilder { + public class MicrosoftGraphSecurityRemoveHoldRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new SecurityRemoveHoldRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityRemoveHoldRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public SecurityRemoveHoldRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/noncustodialDataSources/security.removeHold", pathParameters) { + public MicrosoftGraphSecurityRemoveHoldRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/noncustodialDataSources/microsoft.graph.security.removeHold", pathParameters) { } /// - /// Instantiates a new SecurityRemoveHoldRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityRemoveHoldRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public SecurityRemoveHoldRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/noncustodialDataSources/security.removeHold", rawUrl) { + public MicrosoftGraphSecurityRemoveHoldRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/noncustodialDataSources/microsoft.graph.security.removeHold", rawUrl) { } /// /// Invoke action removeHold @@ -34,10 +34,10 @@ public SecurityRemoveHoldRequestBuilder(string rawUrl, IRequestAdapter requestAd /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task PostAsync(RemoveHoldPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(RemoveHoldPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(RemoveHoldPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(RemoveHoldPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); @@ -54,10 +54,10 @@ public async Task PostAsync(RemoveHoldPostRequestBody body, ActionConfiguration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(RemoveHoldPostRequestBody body, Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(RemoveHoldPostRequestBody body, Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(RemoveHoldPostRequestBody body, Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(RemoveHoldPostRequestBody body, Action requestConfiguration = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation { @@ -67,7 +67,7 @@ public RequestInformation ToPostRequestInformation(RemoveHoldPostRequestBody bod }; requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); if (requestConfiguration != null) { - var requestConfig = new SecurityRemoveHoldRequestBuilderPostRequestConfiguration(); + var requestConfig = new MicrosoftGraphSecurityRemoveHoldRequestBuilderPostRequestConfiguration(); requestConfiguration.Invoke(requestConfig); requestInfo.AddRequestOptions(requestConfig.Options); requestInfo.AddHeaders(requestConfig.Headers); @@ -77,15 +77,15 @@ public RequestInformation ToPostRequestInformation(RemoveHoldPostRequestBody bod /// /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class SecurityRemoveHoldRequestBuilderPostRequestConfiguration { + public class MicrosoftGraphSecurityRemoveHoldRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new securityRemoveHoldRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new microsoftGraphSecurityRemoveHoldRequestBuilderPostRequestConfiguration and sets the default values. /// - public SecurityRemoveHoldRequestBuilderPostRequestConfiguration() { + public MicrosoftGraphSecurityRemoveHoldRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/SecurityRemoveHold/RemoveHoldPostRequestBody.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/MicrosoftGraphSecurityRemoveHold/RemoveHoldPostRequestBody.cs similarity index 98% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/SecurityRemoveHold/RemoveHoldPostRequestBody.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/MicrosoftGraphSecurityRemoveHold/RemoveHoldPostRequestBody.cs index 318f2e0b437..c47a7c2d730 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/SecurityRemoveHold/RemoveHoldPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/MicrosoftGraphSecurityRemoveHold/RemoveHoldPostRequestBody.cs @@ -4,7 +4,7 @@ using System.IO; using System.Linq; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.SecurityRemoveHold { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.MicrosoftGraphSecurityRemoveHold { public class RemoveHoldPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/NoncustodialDataSourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/NoncustodialDataSourcesRequestBuilder.cs index b250d10ec9c..60c91f44080 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/NoncustodialDataSourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/NoncustodialDataSources/NoncustodialDataSourcesRequestBuilder.cs @@ -2,8 +2,8 @@ using Microsoft.Graph.Models.Security; using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.Count; using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.Item; -using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.SecurityApplyHold; -using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.SecurityRemoveHold; +using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.MicrosoftGraphSecurityApplyHold; +using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.NoncustodialDataSources.MicrosoftGraphSecurityRemoveHold; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -22,12 +22,12 @@ public class NoncustodialDataSourcesRequestBuilder : BaseRequestBuilder { new CountRequestBuilder(PathParameters, RequestAdapter); } /// Provides operations to call the applyHold method. - public SecurityApplyHoldRequestBuilder SecurityApplyHold { get => - new SecurityApplyHoldRequestBuilder(PathParameters, RequestAdapter); + public MicrosoftGraphSecurityApplyHoldRequestBuilder MicrosoftGraphSecurityApplyHold { get => + new MicrosoftGraphSecurityApplyHoldRequestBuilder(PathParameters, RequestAdapter); } /// Provides operations to call the removeHold method. - public SecurityRemoveHoldRequestBuilder SecurityRemoveHold { get => - new SecurityRemoveHoldRequestBuilder(PathParameters, RequestAdapter); + public MicrosoftGraphSecurityRemoveHoldRequestBuilder MicrosoftGraphSecurityRemoveHold { get => + new MicrosoftGraphSecurityRemoveHoldRequestBuilder(PathParameters, RequestAdapter); } /// Provides operations to manage the noncustodialDataSources property of the microsoft.graph.security.ediscoveryCase entity. public EdiscoveryNoncustodialDataSourceItemRequestBuilder this[string position] { get { diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/EdiscoveryReviewSetItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/EdiscoveryReviewSetItemRequestBuilder.cs index 252ceaa89bf..b7b1e129b40 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/EdiscoveryReviewSetItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/EdiscoveryReviewSetItemRequestBuilder.cs @@ -1,7 +1,7 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.ReviewSets.Item.MicrosoftGraphSecurityAddToReviewSet; using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.ReviewSets.Item.Queries; -using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.ReviewSets.Item.SecurityAddToReviewSet; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -15,14 +15,14 @@ namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.ReviewSets.Item { /// Provides operations to manage the reviewSets property of the microsoft.graph.security.ediscoveryCase entity. /// public class EdiscoveryReviewSetItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the addToReviewSet method. + public MicrosoftGraphSecurityAddToReviewSetRequestBuilder MicrosoftGraphSecurityAddToReviewSet { get => + new MicrosoftGraphSecurityAddToReviewSetRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the queries property of the microsoft.graph.security.ediscoveryReviewSet entity. public QueriesRequestBuilder Queries { get => new QueriesRequestBuilder(PathParameters, RequestAdapter); } - /// Provides operations to call the addToReviewSet method. - public SecurityAddToReviewSetRequestBuilder SecurityAddToReviewSet { get => - new SecurityAddToReviewSetRequestBuilder(PathParameters, RequestAdapter); - } /// /// Instantiates a new EdiscoveryReviewSetItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/SecurityAddToReviewSet/AddToReviewSetPostRequestBody.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/MicrosoftGraphSecurityAddToReviewSet/AddToReviewSetPostRequestBody.cs similarity index 98% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/SecurityAddToReviewSet/AddToReviewSetPostRequestBody.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/MicrosoftGraphSecurityAddToReviewSet/AddToReviewSetPostRequestBody.cs index 3eb86589410..d56f2a63304 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/SecurityAddToReviewSet/AddToReviewSetPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/MicrosoftGraphSecurityAddToReviewSet/AddToReviewSetPostRequestBody.cs @@ -5,7 +5,7 @@ using System.IO; using System.Linq; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.ReviewSets.Item.SecurityAddToReviewSet { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.ReviewSets.Item.MicrosoftGraphSecurityAddToReviewSet { public class AddToReviewSetPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/SecurityAddToReviewSet/SecurityAddToReviewSetRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/MicrosoftGraphSecurityAddToReviewSet/MicrosoftGraphSecurityAddToReviewSetRequestBuilder.cs similarity index 64% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/SecurityAddToReviewSet/SecurityAddToReviewSetRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/MicrosoftGraphSecurityAddToReviewSet/MicrosoftGraphSecurityAddToReviewSetRequestBuilder.cs index 9bf8c75d966..c74dbf370d1 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/SecurityAddToReviewSet/SecurityAddToReviewSetRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/MicrosoftGraphSecurityAddToReviewSet/MicrosoftGraphSecurityAddToReviewSetRequestBuilder.cs @@ -7,24 +7,24 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.ReviewSets.Item.SecurityAddToReviewSet { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.ReviewSets.Item.MicrosoftGraphSecurityAddToReviewSet { /// /// Provides operations to call the addToReviewSet method. /// - public class SecurityAddToReviewSetRequestBuilder : BaseRequestBuilder { + public class MicrosoftGraphSecurityAddToReviewSetRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new SecurityAddToReviewSetRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityAddToReviewSetRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public SecurityAddToReviewSetRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/reviewSets/{ediscoveryReviewSet%2Did}/security.addToReviewSet", pathParameters) { + public MicrosoftGraphSecurityAddToReviewSetRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/reviewSets/{ediscoveryReviewSet%2Did}/microsoft.graph.security.addToReviewSet", pathParameters) { } /// - /// Instantiates a new SecurityAddToReviewSetRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityAddToReviewSetRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public SecurityAddToReviewSetRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/reviewSets/{ediscoveryReviewSet%2Did}/security.addToReviewSet", rawUrl) { + public MicrosoftGraphSecurityAddToReviewSetRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/reviewSets/{ediscoveryReviewSet%2Did}/microsoft.graph.security.addToReviewSet", rawUrl) { } /// /// Invoke action addToReviewSet @@ -34,10 +34,10 @@ public SecurityAddToReviewSetRequestBuilder(string rawUrl, IRequestAdapter reque /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task PostAsync(AddToReviewSetPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(AddToReviewSetPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(AddToReviewSetPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(AddToReviewSetPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); @@ -54,10 +54,10 @@ public async Task PostAsync(AddToReviewSetPostRequestBody body, ActionConfiguration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(AddToReviewSetPostRequestBody body, Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(AddToReviewSetPostRequestBody body, Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(AddToReviewSetPostRequestBody body, Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(AddToReviewSetPostRequestBody body, Action requestConfiguration = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation { @@ -67,7 +67,7 @@ public RequestInformation ToPostRequestInformation(AddToReviewSetPostRequestBody }; requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); if (requestConfiguration != null) { - var requestConfig = new SecurityAddToReviewSetRequestBuilderPostRequestConfiguration(); + var requestConfig = new MicrosoftGraphSecurityAddToReviewSetRequestBuilderPostRequestConfiguration(); requestConfiguration.Invoke(requestConfig); requestInfo.AddRequestOptions(requestConfig.Options); requestInfo.AddHeaders(requestConfig.Headers); @@ -77,15 +77,15 @@ public RequestInformation ToPostRequestInformation(AddToReviewSetPostRequestBody /// /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class SecurityAddToReviewSetRequestBuilderPostRequestConfiguration { + public class MicrosoftGraphSecurityAddToReviewSetRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new securityAddToReviewSetRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new microsoftGraphSecurityAddToReviewSetRequestBuilderPostRequestConfiguration and sets the default values. /// - public SecurityAddToReviewSetRequestBuilderPostRequestConfiguration() { + public MicrosoftGraphSecurityAddToReviewSetRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/Queries/Item/EdiscoveryReviewSetQueryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/Queries/Item/EdiscoveryReviewSetQueryItemRequestBuilder.cs index 019cd987fc5..c5f3b7e0bb6 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/Queries/Item/EdiscoveryReviewSetQueryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/Queries/Item/EdiscoveryReviewSetQueryItemRequestBuilder.cs @@ -1,6 +1,6 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models.Security; -using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.ReviewSets.Item.Queries.Item.SecurityApplyTags; +using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.ReviewSets.Item.Queries.Item.MicrosoftGraphSecurityApplyTags; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -15,8 +15,8 @@ namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.ReviewSets.Item.Qu /// public class EdiscoveryReviewSetQueryItemRequestBuilder : BaseRequestBuilder { /// Provides operations to call the applyTags method. - public SecurityApplyTagsRequestBuilder SecurityApplyTags { get => - new SecurityApplyTagsRequestBuilder(PathParameters, RequestAdapter); + public MicrosoftGraphSecurityApplyTagsRequestBuilder MicrosoftGraphSecurityApplyTags { get => + new MicrosoftGraphSecurityApplyTagsRequestBuilder(PathParameters, RequestAdapter); } /// /// Instantiates a new EdiscoveryReviewSetQueryItemRequestBuilder and sets the default values. diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/Queries/Item/SecurityApplyTags/ApplyTagsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/Queries/Item/MicrosoftGraphSecurityApplyTags/ApplyTagsPostRequestBody.cs similarity index 98% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/Queries/Item/SecurityApplyTags/ApplyTagsPostRequestBody.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/Queries/Item/MicrosoftGraphSecurityApplyTags/ApplyTagsPostRequestBody.cs index d2821520522..af7b2c9d712 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/Queries/Item/SecurityApplyTags/ApplyTagsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/Queries/Item/MicrosoftGraphSecurityApplyTags/ApplyTagsPostRequestBody.cs @@ -5,7 +5,7 @@ using System.IO; using System.Linq; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.ReviewSets.Item.Queries.Item.SecurityApplyTags { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.ReviewSets.Item.Queries.Item.MicrosoftGraphSecurityApplyTags { public class ApplyTagsPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/Queries/Item/SecurityApplyTags/SecurityApplyTagsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/Queries/Item/MicrosoftGraphSecurityApplyTags/MicrosoftGraphSecurityApplyTagsRequestBuilder.cs similarity index 64% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/Queries/Item/SecurityApplyTags/SecurityApplyTagsRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/Queries/Item/MicrosoftGraphSecurityApplyTags/MicrosoftGraphSecurityApplyTagsRequestBuilder.cs index 392a4737f08..6267967eafa 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/Queries/Item/SecurityApplyTags/SecurityApplyTagsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/ReviewSets/Item/Queries/Item/MicrosoftGraphSecurityApplyTags/MicrosoftGraphSecurityApplyTagsRequestBuilder.cs @@ -7,24 +7,24 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.ReviewSets.Item.Queries.Item.SecurityApplyTags { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.ReviewSets.Item.Queries.Item.MicrosoftGraphSecurityApplyTags { /// /// Provides operations to call the applyTags method. /// - public class SecurityApplyTagsRequestBuilder : BaseRequestBuilder { + public class MicrosoftGraphSecurityApplyTagsRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new SecurityApplyTagsRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityApplyTagsRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public SecurityApplyTagsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/reviewSets/{ediscoveryReviewSet%2Did}/queries/{ediscoveryReviewSetQuery%2Did}/security.applyTags", pathParameters) { + public MicrosoftGraphSecurityApplyTagsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/reviewSets/{ediscoveryReviewSet%2Did}/queries/{ediscoveryReviewSetQuery%2Did}/microsoft.graph.security.applyTags", pathParameters) { } /// - /// Instantiates a new SecurityApplyTagsRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityApplyTagsRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public SecurityApplyTagsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/reviewSets/{ediscoveryReviewSet%2Did}/queries/{ediscoveryReviewSetQuery%2Did}/security.applyTags", rawUrl) { + public MicrosoftGraphSecurityApplyTagsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/reviewSets/{ediscoveryReviewSet%2Did}/queries/{ediscoveryReviewSetQuery%2Did}/microsoft.graph.security.applyTags", rawUrl) { } /// /// Invoke action applyTags @@ -34,10 +34,10 @@ public SecurityApplyTagsRequestBuilder(string rawUrl, IRequestAdapter requestAda /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task PostAsync(ApplyTagsPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(ApplyTagsPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(ApplyTagsPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(ApplyTagsPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); @@ -54,10 +54,10 @@ public async Task PostAsync(ApplyTagsPostRequestBody body, ActionConfiguration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(ApplyTagsPostRequestBody body, Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(ApplyTagsPostRequestBody body, Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(ApplyTagsPostRequestBody body, Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(ApplyTagsPostRequestBody body, Action requestConfiguration = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation { @@ -67,7 +67,7 @@ public RequestInformation ToPostRequestInformation(ApplyTagsPostRequestBody body }; requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); if (requestConfiguration != null) { - var requestConfig = new SecurityApplyTagsRequestBuilderPostRequestConfiguration(); + var requestConfig = new MicrosoftGraphSecurityApplyTagsRequestBuilderPostRequestConfiguration(); requestConfiguration.Invoke(requestConfig); requestInfo.AddRequestOptions(requestConfig.Options); requestInfo.AddHeaders(requestConfig.Headers); @@ -77,15 +77,15 @@ public RequestInformation ToPostRequestInformation(ApplyTagsPostRequestBody body /// /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class SecurityApplyTagsRequestBuilderPostRequestConfiguration { + public class MicrosoftGraphSecurityApplyTagsRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new securityApplyTagsRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new microsoftGraphSecurityApplyTagsRequestBuilderPostRequestConfiguration and sets the default values. /// - public SecurityApplyTagsRequestBuilderPostRequestConfiguration() { + public MicrosoftGraphSecurityApplyTagsRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Searches/Item/EdiscoverySearchItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Searches/Item/EdiscoverySearchItemRequestBuilder.cs index bdbe40f84b0..8915dd2c352 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Searches/Item/EdiscoverySearchItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Searches/Item/EdiscoverySearchItemRequestBuilder.cs @@ -4,9 +4,9 @@ using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Searches.Item.AdditionalSources; using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Searches.Item.CustodianSources; using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Searches.Item.LastEstimateStatisticsOperation; +using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Searches.Item.MicrosoftGraphSecurityEstimateStatistics; +using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Searches.Item.MicrosoftGraphSecurityPurgeData; using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Searches.Item.NoncustodialSources; -using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Searches.Item.SecurityEstimateStatistics; -using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Searches.Item.SecurityPurgeData; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -36,17 +36,17 @@ public class EdiscoverySearchItemRequestBuilder : BaseRequestBuilder { public LastEstimateStatisticsOperationRequestBuilder LastEstimateStatisticsOperation { get => new LastEstimateStatisticsOperationRequestBuilder(PathParameters, RequestAdapter); } - /// Provides operations to manage the noncustodialSources property of the microsoft.graph.security.ediscoverySearch entity. - public NoncustodialSourcesRequestBuilder NoncustodialSources { get => - new NoncustodialSourcesRequestBuilder(PathParameters, RequestAdapter); - } /// Provides operations to call the estimateStatistics method. - public SecurityEstimateStatisticsRequestBuilder SecurityEstimateStatistics { get => - new SecurityEstimateStatisticsRequestBuilder(PathParameters, RequestAdapter); + public MicrosoftGraphSecurityEstimateStatisticsRequestBuilder MicrosoftGraphSecurityEstimateStatistics { get => + new MicrosoftGraphSecurityEstimateStatisticsRequestBuilder(PathParameters, RequestAdapter); } /// Provides operations to call the purgeData method. - public SecurityPurgeDataRequestBuilder SecurityPurgeData { get => - new SecurityPurgeDataRequestBuilder(PathParameters, RequestAdapter); + public MicrosoftGraphSecurityPurgeDataRequestBuilder MicrosoftGraphSecurityPurgeData { get => + new MicrosoftGraphSecurityPurgeDataRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the noncustodialSources property of the microsoft.graph.security.ediscoverySearch entity. + public NoncustodialSourcesRequestBuilder NoncustodialSources { get => + new NoncustodialSourcesRequestBuilder(PathParameters, RequestAdapter); } /// /// Instantiates a new EdiscoverySearchItemRequestBuilder and sets the default values. diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Searches/Item/SecurityEstimateStatistics/SecurityEstimateStatisticsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Searches/Item/MicrosoftGraphSecurityEstimateStatistics/MicrosoftGraphSecurityEstimateStatisticsRequestBuilder.cs similarity index 60% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Searches/Item/SecurityEstimateStatistics/SecurityEstimateStatisticsRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Searches/Item/MicrosoftGraphSecurityEstimateStatistics/MicrosoftGraphSecurityEstimateStatisticsRequestBuilder.cs index 511919102ac..26d7f936c53 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Searches/Item/SecurityEstimateStatistics/SecurityEstimateStatisticsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Searches/Item/MicrosoftGraphSecurityEstimateStatistics/MicrosoftGraphSecurityEstimateStatisticsRequestBuilder.cs @@ -7,24 +7,24 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Searches.Item.SecurityEstimateStatistics { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Searches.Item.MicrosoftGraphSecurityEstimateStatistics { /// /// Provides operations to call the estimateStatistics method. /// - public class SecurityEstimateStatisticsRequestBuilder : BaseRequestBuilder { + public class MicrosoftGraphSecurityEstimateStatisticsRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new SecurityEstimateStatisticsRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityEstimateStatisticsRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public SecurityEstimateStatisticsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/searches/{ediscoverySearch%2Did}/security.estimateStatistics", pathParameters) { + public MicrosoftGraphSecurityEstimateStatisticsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/searches/{ediscoverySearch%2Did}/microsoft.graph.security.estimateStatistics", pathParameters) { } /// - /// Instantiates a new SecurityEstimateStatisticsRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityEstimateStatisticsRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public SecurityEstimateStatisticsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/searches/{ediscoverySearch%2Did}/security.estimateStatistics", rawUrl) { + public MicrosoftGraphSecurityEstimateStatisticsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/searches/{ediscoverySearch%2Did}/microsoft.graph.security.estimateStatistics", rawUrl) { } /// /// Invoke action estimateStatistics @@ -33,10 +33,10 @@ public SecurityEstimateStatisticsRequestBuilder(string rawUrl, IRequestAdapter r /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif var requestInfo = ToPostRequestInformation(requestConfiguration); var errorMapping = new Dictionary> { @@ -51,10 +51,10 @@ public async Task PostAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { #endif var requestInfo = new RequestInformation { HttpMethod = Method.POST, @@ -62,7 +62,7 @@ public RequestInformation ToPostRequestInformation(Action /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class SecurityEstimateStatisticsRequestBuilderPostRequestConfiguration { + public class MicrosoftGraphSecurityEstimateStatisticsRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new securityEstimateStatisticsRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new microsoftGraphSecurityEstimateStatisticsRequestBuilderPostRequestConfiguration and sets the default values. /// - public SecurityEstimateStatisticsRequestBuilderPostRequestConfiguration() { + public MicrosoftGraphSecurityEstimateStatisticsRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Searches/Item/SecurityPurgeData/SecurityPurgeDataRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Searches/Item/MicrosoftGraphSecurityPurgeData/MicrosoftGraphSecurityPurgeDataRequestBuilder.cs similarity index 65% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Searches/Item/SecurityPurgeData/SecurityPurgeDataRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Searches/Item/MicrosoftGraphSecurityPurgeData/MicrosoftGraphSecurityPurgeDataRequestBuilder.cs index a21ca809be8..bd5ecf461ea 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Searches/Item/SecurityPurgeData/SecurityPurgeDataRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Searches/Item/MicrosoftGraphSecurityPurgeData/MicrosoftGraphSecurityPurgeDataRequestBuilder.cs @@ -7,24 +7,24 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Searches.Item.SecurityPurgeData { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Searches.Item.MicrosoftGraphSecurityPurgeData { /// /// Provides operations to call the purgeData method. /// - public class SecurityPurgeDataRequestBuilder : BaseRequestBuilder { + public class MicrosoftGraphSecurityPurgeDataRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new SecurityPurgeDataRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityPurgeDataRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public SecurityPurgeDataRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/searches/{ediscoverySearch%2Did}/security.purgeData", pathParameters) { + public MicrosoftGraphSecurityPurgeDataRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/searches/{ediscoverySearch%2Did}/microsoft.graph.security.purgeData", pathParameters) { } /// - /// Instantiates a new SecurityPurgeDataRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityPurgeDataRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public SecurityPurgeDataRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/searches/{ediscoverySearch%2Did}/security.purgeData", rawUrl) { + public MicrosoftGraphSecurityPurgeDataRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/searches/{ediscoverySearch%2Did}/microsoft.graph.security.purgeData", rawUrl) { } /// /// Invoke action purgeData @@ -34,10 +34,10 @@ public SecurityPurgeDataRequestBuilder(string rawUrl, IRequestAdapter requestAda /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task PostAsync(PurgeDataPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(PurgeDataPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(PurgeDataPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(PurgeDataPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); @@ -54,10 +54,10 @@ public async Task PostAsync(PurgeDataPostRequestBody body, ActionConfiguration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(PurgeDataPostRequestBody body, Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(PurgeDataPostRequestBody body, Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(PurgeDataPostRequestBody body, Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(PurgeDataPostRequestBody body, Action requestConfiguration = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation { @@ -67,7 +67,7 @@ public RequestInformation ToPostRequestInformation(PurgeDataPostRequestBody body }; requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); if (requestConfiguration != null) { - var requestConfig = new SecurityPurgeDataRequestBuilderPostRequestConfiguration(); + var requestConfig = new MicrosoftGraphSecurityPurgeDataRequestBuilderPostRequestConfiguration(); requestConfiguration.Invoke(requestConfig); requestInfo.AddRequestOptions(requestConfig.Options); requestInfo.AddHeaders(requestConfig.Headers); @@ -77,15 +77,15 @@ public RequestInformation ToPostRequestInformation(PurgeDataPostRequestBody body /// /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class SecurityPurgeDataRequestBuilderPostRequestConfiguration { + public class MicrosoftGraphSecurityPurgeDataRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new securityPurgeDataRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new microsoftGraphSecurityPurgeDataRequestBuilderPostRequestConfiguration and sets the default values. /// - public SecurityPurgeDataRequestBuilderPostRequestConfiguration() { + public MicrosoftGraphSecurityPurgeDataRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Searches/Item/SecurityPurgeData/PurgeDataPostRequestBody.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Searches/Item/MicrosoftGraphSecurityPurgeData/PurgeDataPostRequestBody.cs similarity index 98% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Searches/Item/SecurityPurgeData/PurgeDataPostRequestBody.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Searches/Item/MicrosoftGraphSecurityPurgeData/PurgeDataPostRequestBody.cs index 6ee72e1ac18..5650ef08413 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Searches/Item/SecurityPurgeData/PurgeDataPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Searches/Item/MicrosoftGraphSecurityPurgeData/PurgeDataPostRequestBody.cs @@ -5,7 +5,7 @@ using System.IO; using System.Linq; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Searches.Item.SecurityPurgeData { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Searches.Item.MicrosoftGraphSecurityPurgeData { public class PurgeDataPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Settings/SecurityResetToDefault/SecurityResetToDefaultRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Settings/MicrosoftGraphSecurityResetToDefault/MicrosoftGraphSecurityResetToDefaultRequestBuilder.cs similarity index 62% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Settings/SecurityResetToDefault/SecurityResetToDefaultRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Settings/MicrosoftGraphSecurityResetToDefault/MicrosoftGraphSecurityResetToDefaultRequestBuilder.cs index 663f04e20f5..a179b88dd5a 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Settings/SecurityResetToDefault/SecurityResetToDefaultRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Settings/MicrosoftGraphSecurityResetToDefault/MicrosoftGraphSecurityResetToDefaultRequestBuilder.cs @@ -7,24 +7,24 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Settings.SecurityResetToDefault { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Settings.MicrosoftGraphSecurityResetToDefault { /// /// Provides operations to call the resetToDefault method. /// - public class SecurityResetToDefaultRequestBuilder : BaseRequestBuilder { + public class MicrosoftGraphSecurityResetToDefaultRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new SecurityResetToDefaultRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityResetToDefaultRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public SecurityResetToDefaultRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/settings/security.resetToDefault", pathParameters) { + public MicrosoftGraphSecurityResetToDefaultRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/settings/microsoft.graph.security.resetToDefault", pathParameters) { } /// - /// Instantiates a new SecurityResetToDefaultRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityResetToDefaultRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public SecurityResetToDefaultRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/settings/security.resetToDefault", rawUrl) { + public MicrosoftGraphSecurityResetToDefaultRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/settings/microsoft.graph.security.resetToDefault", rawUrl) { } /// /// Invoke action resetToDefault @@ -33,10 +33,10 @@ public SecurityResetToDefaultRequestBuilder(string rawUrl, IRequestAdapter reque /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif var requestInfo = ToPostRequestInformation(requestConfiguration); var errorMapping = new Dictionary> { @@ -51,10 +51,10 @@ public async Task PostAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { #endif var requestInfo = new RequestInformation { HttpMethod = Method.POST, @@ -62,7 +62,7 @@ public RequestInformation ToPostRequestInformation(Action /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class SecurityResetToDefaultRequestBuilderPostRequestConfiguration { + public class MicrosoftGraphSecurityResetToDefaultRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new securityResetToDefaultRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new microsoftGraphSecurityResetToDefaultRequestBuilderPostRequestConfiguration and sets the default values. /// - public SecurityResetToDefaultRequestBuilderPostRequestConfiguration() { + public MicrosoftGraphSecurityResetToDefaultRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Settings/SettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Settings/SettingsRequestBuilder.cs index 043546ed0b7..e0f1f015291 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Settings/SettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Settings/SettingsRequestBuilder.cs @@ -1,6 +1,6 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models.Security; -using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Settings.SecurityResetToDefault; +using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Settings.MicrosoftGraphSecurityResetToDefault; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -15,8 +15,8 @@ namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Settings { /// public class SettingsRequestBuilder : BaseRequestBuilder { /// Provides operations to call the resetToDefault method. - public SecurityResetToDefaultRequestBuilder SecurityResetToDefault { get => - new SecurityResetToDefaultRequestBuilder(PathParameters, RequestAdapter); + public MicrosoftGraphSecurityResetToDefaultRequestBuilder MicrosoftGraphSecurityResetToDefault { get => + new MicrosoftGraphSecurityResetToDefaultRequestBuilder(PathParameters, RequestAdapter); } /// /// Instantiates a new SettingsRequestBuilder and sets the default values. diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Tags/SecurityAsHierarchy/AsHierarchyResponse.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Tags/MicrosoftGraphSecurityAsHierarchy/AsHierarchyResponse.cs similarity index 98% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Tags/SecurityAsHierarchy/AsHierarchyResponse.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Tags/MicrosoftGraphSecurityAsHierarchy/AsHierarchyResponse.cs index 55cbd93329c..9a16b96986c 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Tags/SecurityAsHierarchy/AsHierarchyResponse.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Tags/MicrosoftGraphSecurityAsHierarchy/AsHierarchyResponse.cs @@ -5,7 +5,7 @@ using System.IO; using System.Linq; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Tags.SecurityAsHierarchy { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Tags.MicrosoftGraphSecurityAsHierarchy { public class AsHierarchyResponse : BaseCollectionPaginationCountResponse, IParsable { /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Tags/SecurityAsHierarchy/SecurityAsHierarchyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Tags/MicrosoftGraphSecurityAsHierarchy/MicrosoftGraphSecurityAsHierarchyRequestBuilder.cs similarity index 70% rename from src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Tags/SecurityAsHierarchy/SecurityAsHierarchyRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Tags/MicrosoftGraphSecurityAsHierarchy/MicrosoftGraphSecurityAsHierarchyRequestBuilder.cs index 1d54317852f..8d9dccc4226 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Tags/SecurityAsHierarchy/SecurityAsHierarchyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Tags/MicrosoftGraphSecurityAsHierarchy/MicrosoftGraphSecurityAsHierarchyRequestBuilder.cs @@ -7,24 +7,24 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Tags.SecurityAsHierarchy { +namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Tags.MicrosoftGraphSecurityAsHierarchy { /// /// Provides operations to call the asHierarchy method. /// - public class SecurityAsHierarchyRequestBuilder : BaseRequestBuilder { + public class MicrosoftGraphSecurityAsHierarchyRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new SecurityAsHierarchyRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityAsHierarchyRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public SecurityAsHierarchyRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/tags/security.asHierarchy(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", pathParameters) { + public MicrosoftGraphSecurityAsHierarchyRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/tags/microsoft.graph.security.asHierarchy(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", pathParameters) { } /// - /// Instantiates a new SecurityAsHierarchyRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityAsHierarchyRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public SecurityAsHierarchyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/tags/security.asHierarchy(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", rawUrl) { + public MicrosoftGraphSecurityAsHierarchyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/tags/microsoft.graph.security.asHierarchy(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", rawUrl) { } /// /// Invoke function asHierarchy @@ -33,10 +33,10 @@ public SecurityAsHierarchyRequestBuilder(string rawUrl, IRequestAdapter requestA /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif var requestInfo = ToGetRequestInformation(requestConfiguration); var errorMapping = new Dictionary> { @@ -51,10 +51,10 @@ public async Task GetAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { #endif var requestInfo = new RequestInformation { HttpMethod = Method.GET, @@ -63,7 +63,7 @@ public RequestInformation ToGetRequestInformation(Action /// Invoke function asHierarchy /// - public class SecurityAsHierarchyRequestBuilderGetQueryParameters { + public class MicrosoftGraphSecurityAsHierarchyRequestBuilderGetQueryParameters { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -128,17 +128,17 @@ public class SecurityAsHierarchyRequestBuilderGetQueryParameters { /// /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class SecurityAsHierarchyRequestBuilderGetRequestConfiguration { + public class MicrosoftGraphSecurityAsHierarchyRequestBuilderGetRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// Request query parameters - public SecurityAsHierarchyRequestBuilderGetQueryParameters QueryParameters { get; set; } = new SecurityAsHierarchyRequestBuilderGetQueryParameters(); + public MicrosoftGraphSecurityAsHierarchyRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MicrosoftGraphSecurityAsHierarchyRequestBuilderGetQueryParameters(); /// - /// Instantiates a new securityAsHierarchyRequestBuilderGetRequestConfiguration and sets the default values. + /// Instantiates a new microsoftGraphSecurityAsHierarchyRequestBuilderGetRequestConfiguration and sets the default values. /// - public SecurityAsHierarchyRequestBuilderGetRequestConfiguration() { + public MicrosoftGraphSecurityAsHierarchyRequestBuilderGetRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Tags/TagsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Tags/TagsRequestBuilder.cs index 5c04ce60ae2..291ef6cfc0a 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Tags/TagsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Tags/TagsRequestBuilder.cs @@ -2,7 +2,7 @@ using Microsoft.Graph.Models.Security; using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Tags.Count; using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Tags.Item; -using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Tags.SecurityAsHierarchy; +using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Tags.MicrosoftGraphSecurityAsHierarchy; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -21,8 +21,8 @@ public class TagsRequestBuilder : BaseRequestBuilder { new CountRequestBuilder(PathParameters, RequestAdapter); } /// Provides operations to call the asHierarchy method. - public SecurityAsHierarchyRequestBuilder SecurityAsHierarchy { get => - new SecurityAsHierarchyRequestBuilder(PathParameters, RequestAdapter); + public MicrosoftGraphSecurityAsHierarchyRequestBuilder MicrosoftGraphSecurityAsHierarchy { get => + new MicrosoftGraphSecurityAsHierarchyRequestBuilder(PathParameters, RequestAdapter); } /// Provides operations to manage the tags property of the microsoft.graph.security.ediscoveryCase entity. public EdiscoveryReviewTagItemRequestBuilder this[string position] { get { diff --git a/src/Microsoft.Graph/Generated/Security/SecurityRunHuntingQuery/SecurityRunHuntingQueryRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/MicrosoftGraphSecurityRunHuntingQuery/MicrosoftGraphSecurityRunHuntingQueryRequestBuilder.cs similarity index 65% rename from src/Microsoft.Graph/Generated/Security/SecurityRunHuntingQuery/SecurityRunHuntingQueryRequestBuilder.cs rename to src/Microsoft.Graph/Generated/Security/MicrosoftGraphSecurityRunHuntingQuery/MicrosoftGraphSecurityRunHuntingQueryRequestBuilder.cs index 1c20254cb95..51a96eb6af6 100644 --- a/src/Microsoft.Graph/Generated/Security/SecurityRunHuntingQuery/SecurityRunHuntingQueryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/MicrosoftGraphSecurityRunHuntingQuery/MicrosoftGraphSecurityRunHuntingQueryRequestBuilder.cs @@ -8,24 +8,24 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.Security.SecurityRunHuntingQuery { +namespace Microsoft.Graph.Security.MicrosoftGraphSecurityRunHuntingQuery { /// /// Provides operations to call the runHuntingQuery method. /// - public class SecurityRunHuntingQueryRequestBuilder : BaseRequestBuilder { + public class MicrosoftGraphSecurityRunHuntingQueryRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new SecurityRunHuntingQueryRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityRunHuntingQueryRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public SecurityRunHuntingQueryRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/security.runHuntingQuery", pathParameters) { + public MicrosoftGraphSecurityRunHuntingQueryRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/microsoft.graph.security.runHuntingQuery", pathParameters) { } /// - /// Instantiates a new SecurityRunHuntingQueryRequestBuilder and sets the default values. + /// Instantiates a new MicrosoftGraphSecurityRunHuntingQueryRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public SecurityRunHuntingQueryRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/security.runHuntingQuery", rawUrl) { + public MicrosoftGraphSecurityRunHuntingQueryRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/microsoft.graph.security.runHuntingQuery", rawUrl) { } /// /// Invoke action runHuntingQuery @@ -35,10 +35,10 @@ public SecurityRunHuntingQueryRequestBuilder(string rawUrl, IRequestAdapter requ /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task PostAsync(RunHuntingQueryPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(RunHuntingQueryPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(RunHuntingQueryPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(RunHuntingQueryPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); @@ -55,10 +55,10 @@ public async Task PostAsync(RunHuntingQueryPostRequestBody /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(RunHuntingQueryPostRequestBody body, Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(RunHuntingQueryPostRequestBody body, Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(RunHuntingQueryPostRequestBody body, Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(RunHuntingQueryPostRequestBody body, Action requestConfiguration = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation { @@ -69,7 +69,7 @@ public RequestInformation ToPostRequestInformation(RunHuntingQueryPostRequestBod requestInfo.Headers.Add("Accept", "application/json"); requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); if (requestConfiguration != null) { - var requestConfig = new SecurityRunHuntingQueryRequestBuilderPostRequestConfiguration(); + var requestConfig = new MicrosoftGraphSecurityRunHuntingQueryRequestBuilderPostRequestConfiguration(); requestConfiguration.Invoke(requestConfig); requestInfo.AddRequestOptions(requestConfig.Options); requestInfo.AddHeaders(requestConfig.Headers); @@ -79,15 +79,15 @@ public RequestInformation ToPostRequestInformation(RunHuntingQueryPostRequestBod /// /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class SecurityRunHuntingQueryRequestBuilderPostRequestConfiguration { + public class MicrosoftGraphSecurityRunHuntingQueryRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new securityRunHuntingQueryRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new microsoftGraphSecurityRunHuntingQueryRequestBuilderPostRequestConfiguration and sets the default values. /// - public SecurityRunHuntingQueryRequestBuilderPostRequestConfiguration() { + public MicrosoftGraphSecurityRunHuntingQueryRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/Security/SecurityRunHuntingQuery/RunHuntingQueryPostRequestBody.cs b/src/Microsoft.Graph/Generated/Security/MicrosoftGraphSecurityRunHuntingQuery/RunHuntingQueryPostRequestBody.cs similarity index 97% rename from src/Microsoft.Graph/Generated/Security/SecurityRunHuntingQuery/RunHuntingQueryPostRequestBody.cs rename to src/Microsoft.Graph/Generated/Security/MicrosoftGraphSecurityRunHuntingQuery/RunHuntingQueryPostRequestBody.cs index 906c214487d..49f4f2c9513 100644 --- a/src/Microsoft.Graph/Generated/Security/SecurityRunHuntingQuery/RunHuntingQueryPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Security/MicrosoftGraphSecurityRunHuntingQuery/RunHuntingQueryPostRequestBody.cs @@ -4,7 +4,7 @@ using System.IO; using System.Linq; using System; -namespace Microsoft.Graph.Security.SecurityRunHuntingQuery { +namespace Microsoft.Graph.Security.MicrosoftGraphSecurityRunHuntingQuery { public class RunHuntingQueryPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { diff --git a/src/Microsoft.Graph/Generated/Security/SecurityRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/SecurityRequestBuilder.cs index 98671827c17..2494f53be75 100644 --- a/src/Microsoft.Graph/Generated/Security/SecurityRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/SecurityRequestBuilder.cs @@ -5,9 +5,9 @@ using Microsoft.Graph.Security.AttackSimulation; using Microsoft.Graph.Security.Cases; using Microsoft.Graph.Security.Incidents; +using Microsoft.Graph.Security.MicrosoftGraphSecurityRunHuntingQuery; using Microsoft.Graph.Security.SecureScoreControlProfiles; using Microsoft.Graph.Security.SecureScores; -using Microsoft.Graph.Security.SecurityRunHuntingQuery; using Microsoft.Graph.Security.TriggerTypes; using Microsoft.Graph.Security.Triggers; using Microsoft.Kiota.Abstractions.Serialization; @@ -43,6 +43,10 @@ public class SecurityRequestBuilder : BaseRequestBuilder { public IncidentsRequestBuilder Incidents { get => new IncidentsRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to call the runHuntingQuery method. + public MicrosoftGraphSecurityRunHuntingQueryRequestBuilder MicrosoftGraphSecurityRunHuntingQuery { get => + new MicrosoftGraphSecurityRunHuntingQueryRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the secureScoreControlProfiles property of the microsoft.graph.security entity. public SecureScoreControlProfilesRequestBuilder SecureScoreControlProfiles { get => new SecureScoreControlProfilesRequestBuilder(PathParameters, RequestAdapter); @@ -51,10 +55,6 @@ public class SecurityRequestBuilder : BaseRequestBuilder { public SecureScoresRequestBuilder SecureScores { get => new SecureScoresRequestBuilder(PathParameters, RequestAdapter); } - /// Provides operations to call the runHuntingQuery method. - public SecurityRunHuntingQueryRequestBuilder SecurityRunHuntingQuery { get => - new SecurityRunHuntingQueryRequestBuilder(PathParameters, RequestAdapter); - } /// Provides operations to manage the triggers property of the microsoft.graph.security entity. public TriggersRequestBuilder Triggers { get => new TriggersRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Shares/Item/CreatedByUser/CreatedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/CreatedByUser/CreatedByUserRequestBuilder.cs new file mode 100644 index 00000000000..9f0e190e814 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/CreatedByUser/CreatedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Shares.Item.CreatedByUser.MailboxSettings; +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.Shares.Item.CreatedByUser { + /// + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + /// + public class CreatedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/createdByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/createdByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new CreatedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who created the item. Read-only. + /// + public class CreatedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CreatedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CreatedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CreatedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new createdByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CreatedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Shares/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..1a01e102644 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Shares.Item.CreatedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \shares\{sharedDriveItem-id}\createdByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/createdByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/createdByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Shares/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs new file mode 100644 index 00000000000..cf339697cc8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Shares.Item.LastModifiedByUser.MailboxSettings; +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.Shares.Item.LastModifiedByUser { + /// + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + /// + public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/lastModifiedByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/lastModifiedByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new LastModifiedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + public class LastModifiedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class LastModifiedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LastModifiedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LastModifiedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new lastModifiedByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LastModifiedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Shares/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..a6264bde3bd --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Shares.Item.LastModifiedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \shares\{sharedDriveItem-id}\lastModifiedByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Shares/Item/List/CreatedByUser/CreatedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/List/CreatedByUser/CreatedByUserRequestBuilder.cs new file mode 100644 index 00000000000..68daa7e2ef6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/List/CreatedByUser/CreatedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Shares.Item.List.CreatedByUser.MailboxSettings; +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.Shares.Item.List.CreatedByUser { + /// + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + /// + public class CreatedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/createdByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/createdByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new CreatedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who created the item. Read-only. + /// + public class CreatedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CreatedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CreatedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CreatedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new createdByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CreatedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Shares/Item/List/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/List/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..67f876ae2b7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/List/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Shares.Item.List.CreatedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \shares\{sharedDriveItem-id}\list\createdByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/createdByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/createdByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/CreatedByUser/CreatedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/CreatedByUser/CreatedByUserRequestBuilder.cs new file mode 100644 index 00000000000..18cd214c90d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/CreatedByUser/CreatedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Shares.Item.List.Items.Item.CreatedByUser.MailboxSettings; +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.Shares.Item.List.Items.Item.CreatedByUser { + /// + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + /// + public class CreatedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/createdByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/createdByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new CreatedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who created the item. Read-only. + /// + public class CreatedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CreatedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CreatedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CreatedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new createdByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CreatedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..4872b2b816a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Shares.Item.List.Items.Item.CreatedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \shares\{sharedDriveItem-id}\list\items\{listItem-id}\createdByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/createdByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/createdByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/DocumentSetVersions/Item/DocumentSetVersionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/DocumentSetVersions/Item/DocumentSetVersionItemRequestBuilder.cs index d52838be8c1..9cea0e090ac 100644 --- a/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/DocumentSetVersions/Item/DocumentSetVersionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/DocumentSetVersions/Item/DocumentSetVersionItemRequestBuilder.cs @@ -1,5 +1,6 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; +using Microsoft.Graph.Shares.Item.List.Items.Item.DocumentSetVersions.Item.Fields; using Microsoft.Graph.Shares.Item.List.Items.Item.DocumentSetVersions.Item.Restore; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Shares.Item.List.Items.Item.DocumentSetVersions.Item { /// Provides operations to manage the documentSetVersions property of the microsoft.graph.listItem entity. /// public class DocumentSetVersionItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the fields property of the microsoft.graph.listItemVersion entity. + public FieldsRequestBuilder Fields { get => + new FieldsRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to call the restore method. public RestoreRequestBuilder Restore { get => new RestoreRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/DocumentSetVersions/Item/Fields/FieldsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/DocumentSetVersions/Item/Fields/FieldsRequestBuilder.cs new file mode 100644 index 00000000000..b4c054a1d68 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/DocumentSetVersions/Item/Fields/FieldsRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Shares.Item.List.Items.Item.DocumentSetVersions.Item.Fields { + /// + /// Provides operations to manage the fields property of the microsoft.graph.listItemVersion entity. + /// + public class FieldsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new FieldsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FieldsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/documentSetVersions/{documentSetVersion%2Did}/fields{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new FieldsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FieldsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/documentSetVersions/{documentSetVersion%2Did}/fields{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property fields for shares + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// A collection of the fields and values for this version of the list item. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, FieldValueSet.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property fields in shares + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(FieldValueSet body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(FieldValueSet body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, FieldValueSet.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property fields for shares + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new FieldsRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// A collection of the fields and values for this version of the list item. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new FieldsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property fields in shares + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(FieldValueSet body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(FieldValueSet body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new FieldsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FieldsRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new fieldsRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public FieldsRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// A collection of the fields and values for this version of the list item. + /// + public class FieldsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FieldsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FieldsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FieldsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new fieldsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FieldsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FieldsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new fieldsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public FieldsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs new file mode 100644 index 00000000000..abb7d23a74d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Shares.Item.List.Items.Item.LastModifiedByUser.MailboxSettings; +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.Shares.Item.List.Items.Item.LastModifiedByUser { + /// + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + /// + public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/lastModifiedByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/lastModifiedByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new LastModifiedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + public class LastModifiedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class LastModifiedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LastModifiedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LastModifiedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new lastModifiedByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LastModifiedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..8cd5c279f0a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Shares.Item.List.Items.Item.LastModifiedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \shares\{sharedDriveItem-id}\list\items\{listItem-id}\lastModifiedByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/ListItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/ListItemItemRequestBuilder.cs index f7a6897c76e..4f515111784 100644 --- a/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/ListItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/ListItemItemRequestBuilder.cs @@ -1,11 +1,13 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Shares.Item.List.Items.Item.Analytics; +using Microsoft.Graph.Shares.Item.List.Items.Item.CreatedByUser; using Microsoft.Graph.Shares.Item.List.Items.Item.DocumentSetVersions; using Microsoft.Graph.Shares.Item.List.Items.Item.DriveItem; using Microsoft.Graph.Shares.Item.List.Items.Item.Fields; using Microsoft.Graph.Shares.Item.List.Items.Item.GetActivitiesByInterval; using Microsoft.Graph.Shares.Item.List.Items.Item.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval; +using Microsoft.Graph.Shares.Item.List.Items.Item.LastModifiedByUser; using Microsoft.Graph.Shares.Item.List.Items.Item.Versions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; @@ -24,6 +26,10 @@ public class ListItemItemRequestBuilder : BaseRequestBuilder { public AnalyticsRequestBuilder Analytics { get => new AnalyticsRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + public CreatedByUserRequestBuilder CreatedByUser { get => + new CreatedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the documentSetVersions property of the microsoft.graph.listItem entity. public DocumentSetVersionsRequestBuilder DocumentSetVersions { get => new DocumentSetVersionsRequestBuilder(PathParameters, RequestAdapter); @@ -40,6 +46,10 @@ public class ListItemItemRequestBuilder : BaseRequestBuilder { public GetActivitiesByIntervalRequestBuilder GetActivitiesByInterval { get => new GetActivitiesByIntervalRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + public LastModifiedByUserRequestBuilder LastModifiedByUser { get => + new LastModifiedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the versions property of the microsoft.graph.listItem entity. public VersionsRequestBuilder Versions { get => new VersionsRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Shares/Item/List/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/List/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs new file mode 100644 index 00000000000..aa026bbca9b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/List/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Shares.Item.List.LastModifiedByUser.MailboxSettings; +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.Shares.Item.List.LastModifiedByUser { + /// + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + /// + public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/lastModifiedByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/lastModifiedByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new LastModifiedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + public class LastModifiedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class LastModifiedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LastModifiedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LastModifiedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new lastModifiedByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LastModifiedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Shares/Item/List/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/List/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..32f4664de36 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/List/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Shares.Item.List.LastModifiedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \shares\{sharedDriveItem-id}\list\lastModifiedByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Shares/Item/List/ListRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/List/ListRequestBuilder.cs index 8ecfbfe328c..9a22b6cebec 100644 --- a/src/Microsoft.Graph/Generated/Shares/Item/List/ListRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Shares/Item/List/ListRequestBuilder.cs @@ -2,8 +2,10 @@ using Microsoft.Graph.Models; using Microsoft.Graph.Shares.Item.List.Columns; using Microsoft.Graph.Shares.Item.List.ContentTypes; +using Microsoft.Graph.Shares.Item.List.CreatedByUser; using Microsoft.Graph.Shares.Item.List.Drive; using Microsoft.Graph.Shares.Item.List.Items; +using Microsoft.Graph.Shares.Item.List.LastModifiedByUser; using Microsoft.Graph.Shares.Item.List.Operations; using Microsoft.Graph.Shares.Item.List.Subscriptions; using Microsoft.Kiota.Abstractions.Serialization; @@ -27,6 +29,10 @@ public class ListRequestBuilder : BaseRequestBuilder { public ContentTypesRequestBuilder ContentTypes { get => new ContentTypesRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + public CreatedByUserRequestBuilder CreatedByUser { get => + new CreatedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the drive property of the microsoft.graph.list entity. public DriveRequestBuilder Drive { get => new DriveRequestBuilder(PathParameters, RequestAdapter); @@ -35,6 +41,10 @@ public class ListRequestBuilder : BaseRequestBuilder { public ItemsRequestBuilder Items { get => new ItemsRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + public LastModifiedByUserRequestBuilder LastModifiedByUser { get => + new LastModifiedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the operations property of the microsoft.graph.list entity. public OperationsRequestBuilder Operations { get => new OperationsRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Shares/Item/SharedDriveItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/SharedDriveItemItemRequestBuilder.cs index eb6fc427cb9..97b25235999 100644 --- a/src/Microsoft.Graph/Generated/Shares/Item/SharedDriveItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Shares/Item/SharedDriveItemItemRequestBuilder.cs @@ -1,7 +1,9 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; +using Microsoft.Graph.Shares.Item.CreatedByUser; using Microsoft.Graph.Shares.Item.DriveItem; using Microsoft.Graph.Shares.Item.Items; +using Microsoft.Graph.Shares.Item.LastModifiedByUser; using Microsoft.Graph.Shares.Item.List; using Microsoft.Graph.Shares.Item.ListItem; using Microsoft.Graph.Shares.Item.Permission; @@ -20,6 +22,10 @@ namespace Microsoft.Graph.Shares.Item { /// Provides operations to manage the collection of sharedDriveItem entities. /// public class SharedDriveItemItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + public CreatedByUserRequestBuilder CreatedByUser { get => + new CreatedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the driveItem property of the microsoft.graph.sharedDriveItem entity. public DriveItemRequestBuilder DriveItem { get => new DriveItemRequestBuilder(PathParameters, RequestAdapter); @@ -28,6 +34,10 @@ public class SharedDriveItemItemRequestBuilder : BaseRequestBuilder { public ItemsRequestBuilder Items { get => new ItemsRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + public LastModifiedByUserRequestBuilder LastModifiedByUser { get => + new LastModifiedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the list property of the microsoft.graph.sharedDriveItem entity. public ListRequestBuilder List { get => new ListRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Sites/Item/CreatedByUser/CreatedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/CreatedByUser/CreatedByUserRequestBuilder.cs new file mode 100644 index 00000000000..da06d7e3479 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/CreatedByUser/CreatedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Sites.Item.CreatedByUser.MailboxSettings; +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.Sites.Item.CreatedByUser { + /// + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + /// + public class CreatedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/createdByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/createdByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new CreatedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who created the item. Read-only. + /// + public class CreatedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CreatedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CreatedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CreatedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new createdByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CreatedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Sites/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..275a071dac0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Sites.Item.CreatedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \sites\{site-id}\createdByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/createdByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/createdByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Sites/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs new file mode 100644 index 00000000000..dfd627caa0f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Sites.Item.LastModifiedByUser.MailboxSettings; +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.Sites.Item.LastModifiedByUser { + /// + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + /// + public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lastModifiedByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lastModifiedByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new LastModifiedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + public class LastModifiedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class LastModifiedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LastModifiedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LastModifiedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new lastModifiedByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LastModifiedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Sites/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..aafac512af5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Sites.Item.LastModifiedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \sites\{site-id}\lastModifiedByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/CreatedByUser/CreatedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/CreatedByUser/CreatedByUserRequestBuilder.cs new file mode 100644 index 00000000000..c84ca5845c6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/CreatedByUser/CreatedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Sites.Item.Lists.Item.CreatedByUser.MailboxSettings; +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.Sites.Item.Lists.Item.CreatedByUser { + /// + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + /// + public class CreatedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/createdByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/createdByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new CreatedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who created the item. Read-only. + /// + public class CreatedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CreatedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CreatedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CreatedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new createdByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CreatedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..fbbd78cf981 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Sites.Item.Lists.Item.CreatedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \sites\{site-id}\lists\{list-id}\createdByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/createdByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/createdByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/CreatedByUser/CreatedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/CreatedByUser/CreatedByUserRequestBuilder.cs new file mode 100644 index 00000000000..6026b4d54b4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/CreatedByUser/CreatedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Sites.Item.Lists.Item.Items.Item.CreatedByUser.MailboxSettings; +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.Sites.Item.Lists.Item.Items.Item.CreatedByUser { + /// + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + /// + public class CreatedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/createdByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CreatedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/createdByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who created the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new CreatedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who created the item. Read-only. + /// + public class CreatedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CreatedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CreatedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CreatedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new createdByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CreatedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..b4ad2b3a711 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Sites.Item.Lists.Item.Items.Item.CreatedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \sites\{site-id}\lists\{list-id}\items\{listItem-id}\createdByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/createdByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/createdByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/Item/DocumentSetVersionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/Item/DocumentSetVersionItemRequestBuilder.cs index 61a0ede582b..41aec20bbdf 100644 --- a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/Item/DocumentSetVersionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/Item/DocumentSetVersionItemRequestBuilder.cs @@ -1,5 +1,6 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; +using Microsoft.Graph.Sites.Item.Lists.Item.Items.Item.DocumentSetVersions.Item.Fields; using Microsoft.Graph.Sites.Item.Lists.Item.Items.Item.DocumentSetVersions.Item.Restore; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Sites.Item.Lists.Item.Items.Item.DocumentSetVersions.I /// Provides operations to manage the documentSetVersions property of the microsoft.graph.listItem entity. /// public class DocumentSetVersionItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the fields property of the microsoft.graph.listItemVersion entity. + public FieldsRequestBuilder Fields { get => + new FieldsRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to call the restore method. public RestoreRequestBuilder Restore { get => new RestoreRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/Item/Fields/FieldsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/Item/Fields/FieldsRequestBuilder.cs new file mode 100644 index 00000000000..d9027a12534 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/Item/Fields/FieldsRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Sites.Item.Lists.Item.Items.Item.DocumentSetVersions.Item.Fields { + /// + /// Provides operations to manage the fields property of the microsoft.graph.listItemVersion entity. + /// + public class FieldsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new FieldsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FieldsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/documentSetVersions/{documentSetVersion%2Did}/fields{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new FieldsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FieldsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/documentSetVersions/{documentSetVersion%2Did}/fields{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property fields for sites + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// A collection of the fields and values for this version of the list item. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, FieldValueSet.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property fields in sites + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(FieldValueSet body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(FieldValueSet body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, FieldValueSet.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property fields for sites + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new FieldsRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// A collection of the fields and values for this version of the list item. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new FieldsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property fields in sites + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(FieldValueSet body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(FieldValueSet body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new FieldsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FieldsRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new fieldsRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public FieldsRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// A collection of the fields and values for this version of the list item. + /// + public class FieldsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FieldsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FieldsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FieldsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new fieldsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FieldsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FieldsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new fieldsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public FieldsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs new file mode 100644 index 00000000000..d32629575b4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Sites.Item.Lists.Item.Items.Item.LastModifiedByUser.MailboxSettings; +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.Sites.Item.Lists.Item.Items.Item.LastModifiedByUser { + /// + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + /// + public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/lastModifiedByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/lastModifiedByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new LastModifiedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + public class LastModifiedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class LastModifiedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LastModifiedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LastModifiedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new lastModifiedByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LastModifiedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..5fb0378bb89 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Sites.Item.Lists.Item.Items.Item.LastModifiedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \sites\{site-id}\lists\{list-id}\items\{listItem-id}\lastModifiedByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/ListItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/ListItemItemRequestBuilder.cs index 29c8394dd20..ec48da9a0df 100644 --- a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/ListItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/ListItemItemRequestBuilder.cs @@ -1,11 +1,13 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Sites.Item.Lists.Item.Items.Item.Analytics; +using Microsoft.Graph.Sites.Item.Lists.Item.Items.Item.CreatedByUser; using Microsoft.Graph.Sites.Item.Lists.Item.Items.Item.DocumentSetVersions; using Microsoft.Graph.Sites.Item.Lists.Item.Items.Item.DriveItem; using Microsoft.Graph.Sites.Item.Lists.Item.Items.Item.Fields; using Microsoft.Graph.Sites.Item.Lists.Item.Items.Item.GetActivitiesByInterval; using Microsoft.Graph.Sites.Item.Lists.Item.Items.Item.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval; +using Microsoft.Graph.Sites.Item.Lists.Item.Items.Item.LastModifiedByUser; using Microsoft.Graph.Sites.Item.Lists.Item.Items.Item.Versions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; @@ -24,6 +26,10 @@ public class ListItemItemRequestBuilder : BaseRequestBuilder { public AnalyticsRequestBuilder Analytics { get => new AnalyticsRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + public CreatedByUserRequestBuilder CreatedByUser { get => + new CreatedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the documentSetVersions property of the microsoft.graph.listItem entity. public DocumentSetVersionsRequestBuilder DocumentSetVersions { get => new DocumentSetVersionsRequestBuilder(PathParameters, RequestAdapter); @@ -40,6 +46,10 @@ public class ListItemItemRequestBuilder : BaseRequestBuilder { public GetActivitiesByIntervalRequestBuilder GetActivitiesByInterval { get => new GetActivitiesByIntervalRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + public LastModifiedByUserRequestBuilder LastModifiedByUser { get => + new LastModifiedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the versions property of the microsoft.graph.listItem entity. public VersionsRequestBuilder Versions { get => new VersionsRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs new file mode 100644 index 00000000000..fa9d8af7290 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs @@ -0,0 +1,124 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Sites.Item.Lists.Item.LastModifiedByUser.MailboxSettings; +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.Sites.Item.Lists.Item.LastModifiedByUser { + /// + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + /// + public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { + /// The mailboxSettings property + public MailboxSettingsRequestBuilder MailboxSettings { get => + new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/lastModifiedByUser{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LastModifiedByUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/lastModifiedByUser{?%24select,%24expand}", rawUrl) { + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new LastModifiedByUserRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Identity of the user who last modified the item. Read-only. + /// + public class LastModifiedByUserRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class LastModifiedByUserRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LastModifiedByUserRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LastModifiedByUserRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new lastModifiedByUserRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LastModifiedByUserRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs new file mode 100644 index 00000000000..79c425b7930 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -0,0 +1,184 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Sites.Item.Lists.Item.LastModifiedByUser.MailboxSettings { + /// + /// Builds and executes requests for operations under \sites\{site-id}\lists\{list-id}\lastModifiedByUser\mailboxSettings + /// + public class MailboxSettingsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/lastModifiedByUser/mailboxSettings{?%24select,%24expand}", rawUrl) { + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update property mailboxSettings value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.MailboxSettings body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new MailboxSettingsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// + public class MailboxSettingsRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MailboxSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MailboxSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mailboxSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MailboxSettingsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mailboxSettingsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MailboxSettingsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/ListItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/ListItemRequestBuilder.cs index c5d98f31a29..af9048680a8 100644 --- a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/ListItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/ListItemRequestBuilder.cs @@ -2,8 +2,10 @@ using Microsoft.Graph.Models; using Microsoft.Graph.Sites.Item.Lists.Item.Columns; using Microsoft.Graph.Sites.Item.Lists.Item.ContentTypes; +using Microsoft.Graph.Sites.Item.Lists.Item.CreatedByUser; using Microsoft.Graph.Sites.Item.Lists.Item.Drive; using Microsoft.Graph.Sites.Item.Lists.Item.Items; +using Microsoft.Graph.Sites.Item.Lists.Item.LastModifiedByUser; using Microsoft.Graph.Sites.Item.Lists.Item.Operations; using Microsoft.Graph.Sites.Item.Lists.Item.Subscriptions; using Microsoft.Kiota.Abstractions.Serialization; @@ -27,6 +29,10 @@ public class ListItemRequestBuilder : BaseRequestBuilder { public ContentTypesRequestBuilder ContentTypes { get => new ContentTypesRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + public CreatedByUserRequestBuilder CreatedByUser { get => + new CreatedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the drive property of the microsoft.graph.list entity. public DriveRequestBuilder Drive { get => new DriveRequestBuilder(PathParameters, RequestAdapter); @@ -35,6 +41,10 @@ public class ListItemRequestBuilder : BaseRequestBuilder { public ItemsRequestBuilder Items { get => new ItemsRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + public LastModifiedByUserRequestBuilder LastModifiedByUser { get => + new LastModifiedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the operations property of the microsoft.graph.list entity. public OperationsRequestBuilder Operations { get => new OperationsRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Sites/Item/SiteItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/SiteItemRequestBuilder.cs index 2684c2317e8..2e7a2febc69 100644 --- a/src/Microsoft.Graph/Generated/Sites/Item/SiteItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Sites/Item/SiteItemRequestBuilder.cs @@ -3,6 +3,7 @@ using Microsoft.Graph.Sites.Item.Analytics; using Microsoft.Graph.Sites.Item.Columns; using Microsoft.Graph.Sites.Item.ContentTypes; +using Microsoft.Graph.Sites.Item.CreatedByUser; using Microsoft.Graph.Sites.Item.Drive; using Microsoft.Graph.Sites.Item.Drives; using Microsoft.Graph.Sites.Item.ExternalColumns; @@ -11,6 +12,7 @@ using Microsoft.Graph.Sites.Item.GetApplicableContentTypesForListWithListId; using Microsoft.Graph.Sites.Item.GetByPathWithPath; using Microsoft.Graph.Sites.Item.Items; +using Microsoft.Graph.Sites.Item.LastModifiedByUser; using Microsoft.Graph.Sites.Item.Lists; using Microsoft.Graph.Sites.Item.Onenote; using Microsoft.Graph.Sites.Item.Operations; @@ -43,6 +45,10 @@ public class SiteItemRequestBuilder : BaseRequestBuilder { public ContentTypesRequestBuilder ContentTypes { get => new ContentTypesRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + public CreatedByUserRequestBuilder CreatedByUser { get => + new CreatedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the drive property of the microsoft.graph.site entity. public DriveRequestBuilder Drive { get => new DriveRequestBuilder(PathParameters, RequestAdapter); @@ -63,6 +69,10 @@ public class SiteItemRequestBuilder : BaseRequestBuilder { public ItemsRequestBuilder Items { get => new ItemsRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + public LastModifiedByUserRequestBuilder LastModifiedByUser { get => + new LastModifiedByUserRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the lists property of the microsoft.graph.site entity. public ListsRequestBuilder Lists { get => new ListsRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Sites/SitesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/SitesRequestBuilder.cs index f6de50c7a06..a6726ae20a5 100644 --- a/src/Microsoft.Graph/Generated/Sites/SitesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Sites/SitesRequestBuilder.cs @@ -50,8 +50,8 @@ public SitesRequestBuilder(Dictionary pathParameters, IRequestAd public SitesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// Search across a SharePoint tenant for [sites][] that match keywords provided. The only property that works for sorting is **createdDateTime**. The search filter is a free text search that uses multiple properties when retrieving the search results. - /// Find more info here + /// List all available sites][] in an organization. Specific filter criteria and query options are also supported and described below: In addition, you can use a **[$search][]** query against the `/sites` collection to find sites matching given keywords. For more guidance about building applications that use site discovery for scanning purposes, see [Best practices for discovering files and detecting changes at scale. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -70,7 +70,7 @@ public async Task GetAsync(Action(requestInfo, SiteCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Search across a SharePoint tenant for [sites][] that match keywords provided. The only property that works for sorting is **createdDateTime**. The search filter is a free text search that uses multiple properties when retrieving the search results. + /// List all available sites][] in an organization. Specific filter criteria and query options are also supported and described below: In addition, you can use a **[$search][]** query against the `/sites` collection to find sites matching given keywords. For more guidance about building applications that use site discovery for scanning purposes, see [Best practices for discovering files and detecting changes at scale. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -96,7 +96,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Search across a SharePoint tenant for [sites][] that match keywords provided. The only property that works for sorting is **createdDateTime**. The search filter is a free text search that uses multiple properties when retrieving the search results. + /// List all available sites][] in an organization. Specific filter criteria and query options are also supported and described below: In addition, you can use a **[$search][]** query against the `/sites` collection to find sites matching given keywords. For more guidance about building applications that use site discovery for scanning purposes, see [Best practices for discovering files and detecting changes at scale. /// public class SitesRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs index 8033e5e6a1b..f5bfb72bcf8 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs @@ -1,6 +1,7 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Teams.Item.Channels.Item.SharedWithTeams.Item.AllowedMembers; +using Microsoft.Graph.Teams.Item.Channels.Item.SharedWithTeams.Item.Team; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -18,6 +19,10 @@ public class SharedWithChannelTeamInfoItemRequestBuilder : BaseRequestBuilder { public AllowedMembersRequestBuilder AllowedMembers { get => new AllowedMembersRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the team property of the microsoft.graph.teamInfo entity. + public TeamRequestBuilder Team { get => + new TeamRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SharedWithChannelTeamInfoItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/SharedWithTeams/Item/Team/TeamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/SharedWithTeams/Item/Team/TeamRequestBuilder.cs new file mode 100644 index 00000000000..7067dbf7723 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/SharedWithTeams/Item/Team/TeamRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Teams.Item.Channels.Item.SharedWithTeams.Item.Team { + /// + /// Provides operations to manage the team property of the microsoft.graph.teamInfo entity. + /// + public class TeamRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new TeamRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team%2Did}/channels/{channel%2Did}/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/team{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TeamRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team%2Did}/channels/{channel%2Did}/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/team{?%24select,%24expand}", rawUrl) { + } + /// + /// Get team from teams + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.Team.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get team from teams + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TeamRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get team from teams + /// + public class TeamRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TeamRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TeamRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TeamRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new teamRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TeamRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs index 63fb507d5ec..51f50e01efc 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs @@ -1,6 +1,7 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Teams.Item.PrimaryChannel.SharedWithTeams.Item.AllowedMembers; +using Microsoft.Graph.Teams.Item.PrimaryChannel.SharedWithTeams.Item.Team; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -18,6 +19,10 @@ public class SharedWithChannelTeamInfoItemRequestBuilder : BaseRequestBuilder { public AllowedMembersRequestBuilder AllowedMembers { get => new AllowedMembersRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the team property of the microsoft.graph.teamInfo entity. + public TeamRequestBuilder Team { get => + new TeamRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SharedWithChannelTeamInfoItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/SharedWithTeams/Item/Team/TeamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/SharedWithTeams/Item/Team/TeamRequestBuilder.cs new file mode 100644 index 00000000000..7747439c0fd --- /dev/null +++ b/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/SharedWithTeams/Item/Team/TeamRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Teams.Item.PrimaryChannel.SharedWithTeams.Item.Team { + /// + /// Provides operations to manage the team property of the microsoft.graph.teamInfo entity. + /// + public class TeamRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new TeamRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team%2Did}/primaryChannel/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/team{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TeamRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team%2Did}/primaryChannel/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/team{?%24select,%24expand}", rawUrl) { + } + /// + /// Get team from teams + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.Team.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get team from teams + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TeamRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get team from teams + /// + public class TeamRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TeamRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TeamRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TeamRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new teamRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TeamRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs index 99b422573d7..dc4a946ea21 100644 --- a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs @@ -1,6 +1,7 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Teamwork.DeletedTeams.Item.Channels.Item.SharedWithTeams.Item.AllowedMembers; +using Microsoft.Graph.Teamwork.DeletedTeams.Item.Channels.Item.SharedWithTeams.Item.Team; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -18,6 +19,10 @@ public class SharedWithChannelTeamInfoItemRequestBuilder : BaseRequestBuilder { public AllowedMembersRequestBuilder AllowedMembers { get => new AllowedMembersRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the team property of the microsoft.graph.teamInfo entity. + public TeamRequestBuilder Team { get => + new TeamRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SharedWithChannelTeamInfoItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/SharedWithTeams/Item/Team/TeamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/SharedWithTeams/Item/Team/TeamRequestBuilder.cs new file mode 100644 index 00000000000..5a7a9f07c24 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/SharedWithTeams/Item/Team/TeamRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Teamwork.DeletedTeams.Item.Channels.Item.SharedWithTeams.Item.Team { + /// + /// Provides operations to manage the team property of the microsoft.graph.teamInfo entity. + /// + public class TeamRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new TeamRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teamwork/deletedTeams/{deletedTeam%2Did}/channels/{channel%2Did}/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/team{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TeamRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teamwork/deletedTeams/{deletedTeam%2Did}/channels/{channel%2Did}/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/team{?%24select,%24expand}", rawUrl) { + } + /// + /// Get team from teamwork + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.Team.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get team from teamwork + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TeamRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get team from teamwork + /// + public class TeamRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TeamRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TeamRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TeamRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new teamRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TeamRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs index b61c9ae0e96..4b3b8eef96c 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs @@ -1,6 +1,7 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Users.Item.JoinedTeams.Item.Channels.Item.SharedWithTeams.Item.AllowedMembers; +using Microsoft.Graph.Users.Item.JoinedTeams.Item.Channels.Item.SharedWithTeams.Item.Team; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -18,6 +19,10 @@ public class SharedWithChannelTeamInfoItemRequestBuilder : BaseRequestBuilder { public AllowedMembersRequestBuilder AllowedMembers { get => new AllowedMembersRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the team property of the microsoft.graph.teamInfo entity. + public TeamRequestBuilder Team { get => + new TeamRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SharedWithChannelTeamInfoItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/SharedWithTeams/Item/Team/TeamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/SharedWithTeams/Item/Team/TeamRequestBuilder.cs new file mode 100644 index 00000000000..3c86ea1be2f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/SharedWithTeams/Item/Team/TeamRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Users.Item.JoinedTeams.Item.Channels.Item.SharedWithTeams.Item.Team { + /// + /// Provides operations to manage the team property of the microsoft.graph.teamInfo entity. + /// + public class TeamRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new TeamRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/channels/{channel%2Did}/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/team{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TeamRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/channels/{channel%2Did}/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/team{?%24select,%24expand}", rawUrl) { + } + /// + /// Get team from users + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.Team.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get team from users + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TeamRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get team from users + /// + public class TeamRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TeamRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TeamRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TeamRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new teamRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TeamRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs index 15f8ec72310..d064cd8300b 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs @@ -1,6 +1,7 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Users.Item.JoinedTeams.Item.PrimaryChannel.SharedWithTeams.Item.AllowedMembers; +using Microsoft.Graph.Users.Item.JoinedTeams.Item.PrimaryChannel.SharedWithTeams.Item.Team; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -18,6 +19,10 @@ public class SharedWithChannelTeamInfoItemRequestBuilder : BaseRequestBuilder { public AllowedMembersRequestBuilder AllowedMembers { get => new AllowedMembersRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the team property of the microsoft.graph.teamInfo entity. + public TeamRequestBuilder Team { get => + new TeamRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SharedWithChannelTeamInfoItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/SharedWithTeams/Item/Team/TeamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/SharedWithTeams/Item/Team/TeamRequestBuilder.cs new file mode 100644 index 00000000000..fe4233602fc --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/SharedWithTeams/Item/Team/TeamRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Users.Item.JoinedTeams.Item.PrimaryChannel.SharedWithTeams.Item.Team { + /// + /// Provides operations to manage the team property of the microsoft.graph.teamInfo entity. + /// + public class TeamRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new TeamRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/primaryChannel/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/team{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TeamRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/primaryChannel/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/team{?%24select,%24expand}", rawUrl) { + } + /// + /// Get team from users + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.Team.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get team from users + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TeamRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get team from users + /// + public class TeamRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TeamRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TeamRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TeamRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new teamRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TeamRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/Teamwork/AssociatedTeams/Item/AssociatedTeamInfoItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Teamwork/AssociatedTeams/Item/AssociatedTeamInfoItemRequestBuilder.cs index 1eb3d7528a1..371139d8b21 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Teamwork/AssociatedTeams/Item/AssociatedTeamInfoItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Teamwork/AssociatedTeams/Item/AssociatedTeamInfoItemRequestBuilder.cs @@ -1,5 +1,6 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; +using Microsoft.Graph.Users.Item.Teamwork.AssociatedTeams.Item.Team; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -13,6 +14,10 @@ namespace Microsoft.Graph.Users.Item.Teamwork.AssociatedTeams.Item { /// Provides operations to manage the associatedTeams property of the microsoft.graph.userTeamwork entity. /// public class AssociatedTeamInfoItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the team property of the microsoft.graph.teamInfo entity. + public TeamRequestBuilder Team { get => + new TeamRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new AssociatedTeamInfoItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Users/Item/Teamwork/AssociatedTeams/Item/Team/TeamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Teamwork/AssociatedTeams/Item/Team/TeamRequestBuilder.cs new file mode 100644 index 00000000000..1339362ed30 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/Teamwork/AssociatedTeams/Item/Team/TeamRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Users.Item.Teamwork.AssociatedTeams.Item.Team { + /// + /// Provides operations to manage the team property of the microsoft.graph.teamInfo entity. + /// + public class TeamRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new TeamRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/teamwork/associatedTeams/{associatedTeamInfo%2Did}/team{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TeamRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/teamwork/associatedTeams/{associatedTeamInfo%2Did}/team{?%24select,%24expand}", rawUrl) { + } + /// + /// Get team from users + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.Team.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get team from users + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TeamRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get team from users + /// + public class TeamRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TeamRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TeamRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TeamRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new teamRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TeamRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/Teamwork/InstalledApps/Item/TeamsApp/TeamsAppRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Teamwork/InstalledApps/Item/TeamsApp/TeamsAppRequestBuilder.cs new file mode 100644 index 00000000000..6bfc2a1e9fd --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/Teamwork/InstalledApps/Item/TeamsApp/TeamsAppRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Users.Item.Teamwork.InstalledApps.Item.TeamsApp { + /// + /// Provides operations to manage the teamsApp property of the microsoft.graph.teamsAppInstallation entity. + /// + public class TeamsAppRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new TeamsAppRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamsAppRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/teamwork/installedApps/{userScopeTeamsAppInstallation%2Did}/teamsApp{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TeamsAppRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamsAppRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/teamwork/installedApps/{userScopeTeamsAppInstallation%2Did}/teamsApp{?%24select,%24expand}", rawUrl) { + } + /// + /// The app that is installed. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.TeamsApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The app that is installed. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TeamsAppRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The app that is installed. + /// + public class TeamsAppRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TeamsAppRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TeamsAppRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TeamsAppRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new teamsAppRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TeamsAppRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/Teamwork/InstalledApps/Item/TeamsAppDefinition/TeamsAppDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Teamwork/InstalledApps/Item/TeamsAppDefinition/TeamsAppDefinitionRequestBuilder.cs new file mode 100644 index 00000000000..905b110c14c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/Teamwork/InstalledApps/Item/TeamsAppDefinition/TeamsAppDefinitionRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +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.Users.Item.Teamwork.InstalledApps.Item.TeamsAppDefinition { + /// + /// Provides operations to manage the teamsAppDefinition property of the microsoft.graph.teamsAppInstallation entity. + /// + public class TeamsAppDefinitionRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new TeamsAppDefinitionRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamsAppDefinitionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/teamwork/installedApps/{userScopeTeamsAppInstallation%2Did}/teamsAppDefinition{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TeamsAppDefinitionRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamsAppDefinitionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/teamwork/installedApps/{userScopeTeamsAppInstallation%2Did}/teamsAppDefinition{?%24select,%24expand}", rawUrl) { + } + /// + /// The details of this version of the app. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.TeamsAppDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The details of this version of the app. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TeamsAppDefinitionRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The details of this version of the app. + /// + public class TeamsAppDefinitionRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TeamsAppDefinitionRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TeamsAppDefinitionRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TeamsAppDefinitionRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new teamsAppDefinitionRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TeamsAppDefinitionRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/Teamwork/InstalledApps/Item/UserScopeTeamsAppInstallationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Teamwork/InstalledApps/Item/UserScopeTeamsAppInstallationItemRequestBuilder.cs index ae4e47c1b14..cdd83d9050f 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Teamwork/InstalledApps/Item/UserScopeTeamsAppInstallationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Teamwork/InstalledApps/Item/UserScopeTeamsAppInstallationItemRequestBuilder.cs @@ -1,6 +1,8 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Users.Item.Teamwork.InstalledApps.Item.Chat; +using Microsoft.Graph.Users.Item.Teamwork.InstalledApps.Item.TeamsApp; +using Microsoft.Graph.Users.Item.Teamwork.InstalledApps.Item.TeamsAppDefinition; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -18,6 +20,14 @@ public class UserScopeTeamsAppInstallationItemRequestBuilder : BaseRequestBuilde public ChatRequestBuilder Chat { get => new ChatRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the teamsApp property of the microsoft.graph.teamsAppInstallation entity. + public TeamsAppRequestBuilder TeamsApp { get => + new TeamsAppRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the teamsAppDefinition property of the microsoft.graph.teamsAppInstallation entity. + public TeamsAppDefinitionRequestBuilder TeamsAppDefinition { get => + new TeamsAppDefinitionRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new UserScopeTeamsAppInstallationItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/kiota-lock.json b/src/Microsoft.Graph/Generated/kiota-lock.json index fc6aae5bb95..5e26df3a709 100644 --- a/src/Microsoft.Graph/Generated/kiota-lock.json +++ b/src/Microsoft.Graph/Generated/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "38704DFB319A85F3672831B2E1495F5A5B98174BD0C695D99CFF2925BD566D570729F3BA26D959263D23C96E3308E026C31ABDA46867B151A897D677B5C81324", + "descriptionHash": "5ED588A68C76F523E6910C2D634DC55FF1718FBFA9AFFCF09938F06938B96B2CD7203187CA871CEC344A73E40ACE12452860AE182D40BD374BAEDEC01603C71D", "descriptionLocation": "/mnt/vss/_work/1/s/msgraph-metadata/clean_v10_openapi/openapi.yaml", "lockFileVersion": "1.0.0", "kiotaVersion": "1.1.3", diff --git a/src/Microsoft.Graph/Microsoft.Graph.csproj b/src/Microsoft.Graph/Microsoft.Graph.csproj index 88537b90f88..3bf4a6c6111 100644 --- a/src/Microsoft.Graph/Microsoft.Graph.csproj +++ b/src/Microsoft.Graph/Microsoft.Graph.csproj @@ -21,7 +21,7 @@ false 35MSSharedLib1024.snk true - 5.8.0 + 5.9.0