diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Answer/AnswerPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Answer/AnswerPostRequestBody.cs index 5d6b7062c56..53c10183508 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Answer/AnswerPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Answer/AnswerPostRequestBody.cs @@ -97,8 +97,8 @@ public static AnswerPostRequestBody CreateFromDiscriminatorValue(IParseNode pars public IDictionary> GetFieldDeserializers() { return new Dictionary> { {"acceptedModalities", n => { AcceptedModalities = n.GetCollectionOfEnumValues()?.ToList(); } }, - {"callbackUri", n => { CallbackUri = n.GetStringValue(); } }, {"callOptions", n => { CallOptions = n.GetObjectValue(IncomingCallOptions.CreateFromDiscriminatorValue); } }, + {"callbackUri", n => { CallbackUri = n.GetStringValue(); } }, {"mediaConfig", n => { MediaConfig = n.GetObjectValue(Microsoft.Graph.Models.MediaConfig.CreateFromDiscriminatorValue); } }, {"participantCapacity", n => { ParticipantCapacity = n.GetIntValue(); } }, }; diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Transfer/TransferPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Transfer/TransferPostRequestBody.cs index c853210da7e..645b45fd24b 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Transfer/TransferPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Transfer/TransferPostRequestBody.cs @@ -63,8 +63,8 @@ public static TransferPostRequestBody CreateFromDiscriminatorValue(IParseNode pa /// public IDictionary> GetFieldDeserializers() { return new Dictionary> { - {"transferee", n => { Transferee = n.GetObjectValue(ParticipantInfo.CreateFromDiscriminatorValue); } }, {"transferTarget", n => { TransferTarget = n.GetObjectValue(InvitationParticipantInfo.CreateFromDiscriminatorValue); } }, + {"transferee", n => { Transferee = n.GetObjectValue(ParticipantInfo.CreateFromDiscriminatorValue); } }, }; } /// diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/OrgContactItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contacts/Item/OrgContactItemRequestBuilder.cs index be5b23bf84e..4af1243b7af 100644 --- a/src/Microsoft.Graph/Generated/Contacts/Item/OrgContactItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Contacts/Item/OrgContactItemRequestBuilder.cs @@ -8,6 +8,7 @@ using Microsoft.Graph.Contacts.Item.MemberOf; using Microsoft.Graph.Contacts.Item.Restore; using Microsoft.Graph.Contacts.Item.RetryServiceProvisioning; +using Microsoft.Graph.Contacts.Item.ServiceProvisioningErrors; using Microsoft.Graph.Contacts.Item.TransitiveMemberOf; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; @@ -60,6 +61,10 @@ public class OrgContactItemRequestBuilder : BaseRequestBuilder { public RetryServiceProvisioningRequestBuilder RetryServiceProvisioning { get => new RetryServiceProvisioningRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the transitiveMemberOf property of the microsoft.graph.orgContact entity. public TransitiveMemberOfRequestBuilder TransitiveMemberOf { get => new TransitiveMemberOfRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contacts/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..5f084e0c213 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Contacts/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Contacts.Item.ServiceProvisioningErrors.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}/contacts/{orgContact%2Did}/serviceProvisioningErrors/$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}/contacts/{orgContact%2Did}/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Contacts/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contacts/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..6e06305e0b7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Contacts/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Contacts.Item.ServiceProvisioningErrors.Count; +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.Contacts.Item.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \contacts\{orgContact-id}\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/contacts/{orgContact%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/contacts/{orgContact%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementRequestBuilder.cs index 78c7958c0be..c147795d468 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementRequestBuilder.cs @@ -105,7 +105,7 @@ public DeviceAppManagementRequestBuilder(string rawUrl, IRequestAdapter requestA } /// /// Read properties and relationships of the deviceAppManagement object. - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -125,7 +125,7 @@ public DeviceAppManagementRequestBuilder(string rawUrl, IRequestAdapter requestA } /// /// Update the properties of a deviceAppManagement object. - /// Find more info here + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/Item/TargetApps/TargetAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/Item/TargetApps/TargetAppsRequestBuilder.cs index 382a7baa543..440eab3f560 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/Item/TargetApps/TargetAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/Item/TargetApps/TargetAppsRequestBuilder.cs @@ -29,7 +29,7 @@ public TargetAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : } /// /// Not yet documented - /// Find more info here + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/ManagedAppPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/ManagedAppPoliciesRequestBuilder.cs index bf436291872..4742b984774 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/ManagedAppPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/ManagedAppPoliciesRequestBuilder.cs @@ -42,8 +42,8 @@ public ManagedAppPoliciesRequestBuilder(Dictionary pathParameter public ManagedAppPoliciesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/managedAppPolicies{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// List properties and relationships of the managedAppPolicy objects. - /// Find more info here + /// List properties and relationships of the managedAppProtection objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -83,7 +83,7 @@ public async Task PostAsync(ManagedAppPolicy body, Action(requestInfo, ManagedAppPolicy.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List properties and relationships of the managedAppPolicy objects. + /// List properties and relationships of the managedAppProtection objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -144,7 +144,7 @@ public ManagedAppPoliciesRequestBuilder WithUrl(string rawUrl) { return new ManagedAppPoliciesRequestBuilder(rawUrl, RequestAdapter); } /// - /// List properties and relationships of the managedAppPolicy objects. + /// List properties and relationships of the managedAppProtection objects. /// public class ManagedAppPoliciesRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/AppliedPolicies/Item/TargetApps/TargetAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/AppliedPolicies/Item/TargetApps/TargetAppsRequestBuilder.cs index 64f64119c47..039f74a38ad 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/AppliedPolicies/Item/TargetApps/TargetAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/AppliedPolicies/Item/TargetApps/TargetAppsRequestBuilder.cs @@ -29,7 +29,7 @@ public TargetAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : } /// /// Not yet documented - /// Find more info here + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/IntendedPolicies/Item/TargetApps/TargetAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/IntendedPolicies/Item/TargetApps/TargetAppsRequestBuilder.cs index aaee1ee340d..4bcbfe09066 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/IntendedPolicies/Item/TargetApps/TargetAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/IntendedPolicies/Item/TargetApps/TargetAppsRequestBuilder.cs @@ -29,7 +29,7 @@ public TargetAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : } /// /// Not yet documented - /// Find more info here + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppStatuses/ManagedAppStatusesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppStatuses/ManagedAppStatusesRequestBuilder.cs index 8763324b0f4..665512d1edc 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppStatuses/ManagedAppStatusesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppStatuses/ManagedAppStatusesRequestBuilder.cs @@ -42,8 +42,8 @@ public ManagedAppStatusesRequestBuilder(Dictionary pathParameter public ManagedAppStatusesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/managedAppStatuses{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// List properties and relationships of the managedAppStatusRaw objects. - /// Find more info here + /// List properties and relationships of the managedAppStatus objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -83,7 +83,7 @@ public async Task PostAsync(ManagedAppStatus body, Action(requestInfo, ManagedAppStatus.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List properties and relationships of the managedAppStatusRaw objects. + /// List properties and relationships of the managedAppStatus objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -144,7 +144,7 @@ public ManagedAppStatusesRequestBuilder WithUrl(string rawUrl) { return new ManagedAppStatusesRequestBuilder(rawUrl, RequestAdapter); } /// - /// List properties and relationships of the managedAppStatusRaw objects. + /// List properties and relationships of the managedAppStatus objects. /// public class ManagedAppStatusesRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/Assignments/AssignmentsRequestBuilder.cs index d24fa21f218..de3da95abad 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/Assignments/AssignmentsRequestBuilder.cs @@ -62,8 +62,8 @@ public async Task GetAsync(Action(requestInfo, ManagedEBookAssignmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Create a new managedEBookAssignment object. - /// Find more info here + /// Create a new iosVppEBookAssignment object. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -110,7 +110,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new managedEBookAssignment object. + /// Create a new iosVppEBookAssignment object. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/Assignments/Item/ManagedEBookAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/Assignments/Item/ManagedEBookAssignmentItemRequestBuilder.cs index d7217c0c342..81e0f03b3ea 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/Assignments/Item/ManagedEBookAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/Assignments/Item/ManagedEBookAssignmentItemRequestBuilder.cs @@ -29,8 +29,8 @@ public ManagedEBookAssignmentItemRequestBuilder(Dictionary pathP public ManagedEBookAssignmentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/assignments/{managedEBookAssignment%2Did}{?%24select,%24expand}", rawUrl) { } /// - /// Deletes a iosVppEBookAssignment. - /// Find more info here + /// Deletes a managedEBookAssignment. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -69,8 +69,8 @@ public async Task GetAsync(Action(requestInfo, ManagedEBookAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the properties of a iosVppEBookAssignment object. - /// Find more info here + /// Update the properties of a managedEBookAssignment object. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -91,7 +91,7 @@ public async Task PatchAsync(ManagedEBookAssignment body return await RequestAdapter.SendAsync(requestInfo, ManagedEBookAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Deletes a iosVppEBookAssignment. + /// Deletes a managedEBookAssignment. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -141,7 +141,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the properties of a iosVppEBookAssignment object. + /// Update the properties of a managedEBookAssignment object. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/ManagedEBookItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/ManagedEBookItemRequestBuilder.cs index dac146eee7a..10d319c3eba 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/ManagedEBookItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/ManagedEBookItemRequestBuilder.cs @@ -74,8 +74,8 @@ public async Task DeleteAsync(Action - /// Read properties and relationships of the iosVppEBook object. - /// Find more info here + /// Read properties and relationships of the managedEBook object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -140,7 +140,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Read properties and relationships of the iosVppEBook object. + /// Read properties and relationships of the managedEBook object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -217,7 +217,7 @@ public ManagedEBookItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Read properties and relationships of the iosVppEBook object. + /// Read properties and relationships of the managedEBook object. /// public class ManagedEBookItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/MobileAppConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/MobileAppConfigurationsRequestBuilder.cs index c6c0d4dcd4a..40331c23c96 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/MobileAppConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/MobileAppConfigurationsRequestBuilder.cs @@ -42,8 +42,8 @@ public MobileAppConfigurationsRequestBuilder(Dictionary pathPara public MobileAppConfigurationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// List properties and relationships of the iosMobileAppConfiguration objects. - /// Find more info here + /// List properties and relationships of the managedDeviceMobileAppConfiguration objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -84,7 +84,7 @@ public async Task PostAsync(ManagedDeviceMo return await RequestAdapter.SendAsync(requestInfo, ManagedDeviceMobileAppConfiguration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List properties and relationships of the iosMobileAppConfiguration objects. + /// List properties and relationships of the managedDeviceMobileAppConfiguration objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -145,7 +145,7 @@ public MobileAppConfigurationsRequestBuilder WithUrl(string rawUrl) { return new MobileAppConfigurationsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List properties and relationships of the iosMobileAppConfiguration objects. + /// List properties and relationships of the managedDeviceMobileAppConfiguration objects. /// public class MobileAppConfigurationsRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Assignments/AssignmentsRequestBuilder.cs new file mode 100644 index 00000000000..15f6a91bb34 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Assignments/AssignmentsRequestBuilder.cs @@ -0,0 +1,246 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp.Assignments.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp.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.MobileApps.Item.GraphAndroidLobApp.Assignments { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp 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.mobileApp entity. + /// The unique identifier of mobileAppAssignment + public MobileAppAssignmentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppAssignment%2Did", position); + return new MobileAppAssignmentItemRequestBuilder(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/mobileApps/{mobileApp%2Did}/graph.androidLobApp/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/mobileApps/{mobileApp%2Did}/graph.androidLobApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create a new mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + /// Configuration 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 a new mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppAssignment 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public AssignmentsRequestBuilder WithUrl(string rawUrl) { + return new AssignmentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + 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/MobileApps/Item/GraphAndroidLobApp/Assignments/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Assignments/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..12fe7c515d2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Assignments/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphAndroidLobApp.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/mobileApps/{mobileApp%2Did}/graph.androidLobApp/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/mobileApps/{mobileApp%2Did}/graph.androidLobApp/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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphAndroidLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs new file mode 100644 index 00000000000..cf5681964a8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -0,0 +1,254 @@ +// +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.MobileApps.Item.GraphAndroidLobApp.Assignments.Item { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppAssignmentItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Deletes a mobileAppAssignment. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the properties of a mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a mobileAppAssignment. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppAssignmentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppAssignmentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + public class MobileAppAssignmentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppAssignmentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppAssignmentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Categories/CategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Categories/CategoriesRequestBuilder.cs new file mode 100644 index 00000000000..668798300b2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Categories/CategoriesRequestBuilder.cs @@ -0,0 +1,179 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp.Categories.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp.Categories.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.MobileApps.Item.GraphAndroidLobApp.Categories { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class CategoriesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// The unique identifier of mobileAppCategory + public MobileAppCategoryItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppCategory%2Did", position); + return new MobileAppCategoryItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategoryCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 CategoriesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CategoriesRequestBuilder WithUrl(string rawUrl) { + return new CategoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class CategoriesRequestBuilderGetQueryParameters { + /// 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 CategoriesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CategoriesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CategoriesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new categoriesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CategoriesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Categories/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Categories/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..c4e06ec8c12 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Categories/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphAndroidLobApp.Categories.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/mobileApps/{mobileApp%2Did}/graph.androidLobApp/categories/$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/mobileApps/{mobileApp%2Did}/graph.androidLobApp/categories/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphAndroidLobApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs new file mode 100644 index 00000000000..8950a140559 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.MobileApps.Item.GraphAndroidLobApp.Categories.Item { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppCategoryItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppCategoryItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppCategoryItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class MobileAppCategoryItemRequestBuilderGetQueryParameters { + /// 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppCategoryItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppCategoryItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppCategoryItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/ContentVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/ContentVersionsRequestBuilder.cs new file mode 100644 index 00000000000..04e2ba20db3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/ContentVersionsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp.ContentVersions.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp.ContentVersions.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.MobileApps.Item.GraphAndroidLobApp.ContentVersions { + /// + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + /// + public class ContentVersionsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + /// The unique identifier of mobileAppContent + public MobileAppContentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppContent%2Did", position); + return new MobileAppContentItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ContentVersionsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContentVersionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ContentVersionsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContentVersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of content versions for this 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, MobileAppContentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to contentVersions 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(MobileAppContent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppContent 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of content versions for this 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 ContentVersionsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to contentVersions 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(MobileAppContent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppContent 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 ContentVersionsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ContentVersionsRequestBuilder WithUrl(string rawUrl) { + return new ContentVersionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of content versions for this app. + /// + public class ContentVersionsRequestBuilderGetQueryParameters { + /// 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 ContentVersionsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ContentVersionsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ContentVersionsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new contentVersionsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ContentVersionsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContentVersionsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new contentVersionsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ContentVersionsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..027aef5562c --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphAndroidLobApp.ContentVersions.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/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/$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/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs new file mode 100644 index 00000000000..c4db8d574f1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp.ContentVersions.Item.ContainedApps.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp.ContentVersions.Item.ContainedApps.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.MobileApps.Item.GraphAndroidLobApp.ContentVersions.Item.ContainedApps { + /// + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// + public class ContainedAppsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// The unique identifier of mobileContainedApp + public MobileContainedAppItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileContainedApp%2Did", position); + return new MobileContainedAppItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ContainedAppsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContainedAppsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ContainedAppsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileContainedAppCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to containedApps 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(MobileContainedApp body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileContainedApp 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Configuration 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 ContainedAppsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to containedApps 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(MobileContainedApp body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileContainedApp 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 ContainedAppsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ContainedAppsRequestBuilder WithUrl(string rawUrl) { + return new ContainedAppsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + public class ContainedAppsRequestBuilderGetQueryParameters { + /// 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 ContainedAppsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ContainedAppsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ContainedAppsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new containedAppsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ContainedAppsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContainedAppsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new containedAppsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ContainedAppsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..5691af4a389 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphAndroidLobApp.ContentVersions.Item.ContainedApps.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/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$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/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs new file mode 100644 index 00000000000..f0798959a32 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -0,0 +1,251 @@ +// +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.MobileApps.Item.GraphAndroidLobApp.ContentVersions.Item.ContainedApps.Item { + /// + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// + public class MobileContainedAppItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileContainedAppItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileContainedAppItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property containedApps 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).ConfigureAwait(false); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property containedApps 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(MobileContainedApp body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileContainedApp 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property containedApps 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 MobileContainedAppItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Configuration 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property containedApps 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(MobileContainedApp body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileContainedApp 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 MobileContainedAppItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileContainedAppItemRequestBuilder WithUrl(string rawUrl) { + return new MobileContainedAppItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileContainedAppItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + public class MobileContainedAppItemRequestBuilderGetQueryParameters { + /// 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileContainedAppItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileContainedAppItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileContainedAppItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..6fc57132a0b --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphAndroidLobApp.ContentVersions.Item.Files.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/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files/$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/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs new file mode 100644 index 00000000000..e988aef7d32 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp.ContentVersions.Item.Files.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp.ContentVersions.Item.Files.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.MobileApps.Item.GraphAndroidLobApp.ContentVersions.Item.Files { + /// + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// + public class FilesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// The unique identifier of mobileAppContentFile + public MobileAppContentFileItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppContentFile%2Did", position); + return new MobileAppContentFileItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new FilesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FilesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new FilesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of files for this app content version. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppContentFileCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to files 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(MobileAppContentFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppContentFile 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of files for this app content version. + /// + /// Configuration 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 FilesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to files 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(MobileAppContentFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppContentFile 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 FilesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public FilesRequestBuilder WithUrl(string rawUrl) { + return new FilesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of files for this app content version. + /// + public class FilesRequestBuilderGetQueryParameters { + /// 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 FilesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FilesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FilesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new filesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FilesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FilesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new filesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public FilesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs new file mode 100644 index 00000000000..a5e07d556b5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs @@ -0,0 +1,65 @@ +// +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.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp.ContentVersions.Item.Files.Item.Commit { + public class CommitPostRequestBody : 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 fileEncryptionInfo property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.FileEncryptionInfo? FileEncryptionInfo { + get { return BackingStore?.Get("fileEncryptionInfo"); } + set { BackingStore?.Set("fileEncryptionInfo", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.FileEncryptionInfo FileEncryptionInfo { + get { return BackingStore?.Get("fileEncryptionInfo"); } + set { BackingStore?.Set("fileEncryptionInfo", value); } + } +#endif + /// + /// Instantiates a new commitPostRequestBody and sets the default values. + /// + public CommitPostRequestBody() { + 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 CommitPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CommitPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"fileEncryptionInfo", n => { FileEncryptionInfo = n.GetObjectValue(Microsoft.Graph.Models.FileEncryptionInfo.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("fileEncryptionInfo", FileEncryptionInfo); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs similarity index 57% rename from src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs rename to src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs index faaa215856f..0f832280252 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs @@ -8,37 +8,37 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.DirectoryNamespace.DeletedItems.Item.CheckMemberObjects { +namespace Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp.ContentVersions.Item.Files.Item.Commit { /// - /// Provides operations to call the checkMemberObjects method. + /// Provides operations to call the commit method. /// - public class CheckMemberObjectsRequestBuilder : BaseRequestBuilder { + public class CommitRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new CheckMemberObjectsRequestBuilder and sets the default values. + /// Instantiates a new CommitRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public CheckMemberObjectsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/checkMemberObjects", pathParameters) { + public CommitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", pathParameters) { } /// - /// Instantiates a new CheckMemberObjectsRequestBuilder and sets the default values. + /// Instantiates a new CommitRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/checkMemberObjects", rawUrl) { + public CommitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", rawUrl) { } /// - /// Invoke action checkMemberObjects + /// Commits a file of a given app. /// /// 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(CheckMemberObjectsPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(CommitPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(CheckMemberObjectsPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(CommitPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); @@ -46,19 +46,19 @@ public async Task PostAsync(CheckMemberObjectsPostRe {"4XX", ODataError.CreateFromDiscriminatorValue}, {"5XX", ODataError.CreateFromDiscriminatorValue}, }; - return await RequestAdapter.SendAsync(requestInfo, CheckMemberObjectsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Invoke action checkMemberObjects + /// Commits a file of a given app. /// /// 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(CheckMemberObjectsPostRequestBody body, Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(CommitPostRequestBody body, Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(CheckMemberObjectsPostRequestBody body, Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(CommitPostRequestBody body, Action requestConfiguration = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation { @@ -66,10 +66,9 @@ public RequestInformation ToPostRequestInformation(CheckMemberObjectsPostRequest UrlTemplate = UrlTemplate, PathParameters = PathParameters, }; - requestInfo.Headers.Add("Accept", "application/json"); requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); if (requestConfiguration != null) { - var requestConfig = new CheckMemberObjectsRequestBuilderPostRequestConfiguration(); + var requestConfig = new CommitRequestBuilderPostRequestConfiguration(); requestConfiguration.Invoke(requestConfig); requestInfo.AddRequestOptions(requestConfig.Options); requestInfo.AddHeaders(requestConfig.Headers); @@ -80,21 +79,21 @@ public RequestInformation ToPostRequestInformation(CheckMemberObjectsPostRequest /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// /// The raw URL to use for the request builder. - public CheckMemberObjectsRequestBuilder WithUrl(string rawUrl) { - return new CheckMemberObjectsRequestBuilder(rawUrl, RequestAdapter); + public CommitRequestBuilder WithUrl(string rawUrl) { + return new CommitRequestBuilder(rawUrl, RequestAdapter); } /// /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class CheckMemberObjectsRequestBuilderPostRequestConfiguration { + public class CommitRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new checkMemberObjectsRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new commitRequestBuilderPostRequestConfiguration and sets the default values. /// - public CheckMemberObjectsRequestBuilderPostRequestConfiguration() { + public CommitRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs new file mode 100644 index 00000000000..276fdae8930 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs @@ -0,0 +1,261 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp.ContentVersions.Item.Files.Item.Commit; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp.ContentVersions.Item.Files.Item.RenewUpload; +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.MobileApps.Item.GraphAndroidLobApp.ContentVersions.Item.Files.Item { + /// + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// + public class MobileAppContentFileItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the commit method. + public CommitRequestBuilder Commit { get => + new CommitRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the renewUpload method. + public RenewUploadRequestBuilder RenewUpload { get => + new RenewUploadRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppContentFileItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppContentFileItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property files 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).ConfigureAwait(false); + } + /// + /// The list of files for this app content version. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property files 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(MobileAppContentFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppContentFile 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property files 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 MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of files for this app content version. + /// + /// Configuration 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property files 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(MobileAppContentFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppContentFile 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 MobileAppContentFileItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppContentFileItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppContentFileItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The list of files for this app content version. + /// + public class MobileAppContentFileItemRequestBuilderGetQueryParameters { + /// 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppContentFileItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppContentFileItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentFileItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs new file mode 100644 index 00000000000..25d6384c59f --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs @@ -0,0 +1,97 @@ +// +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.MobileApps.Item.GraphAndroidLobApp.ContentVersions.Item.Files.Item.RenewUpload { + /// + /// Provides operations to call the renewUpload method. + /// + public class RenewUploadRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RenewUploadRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RenewUploadRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", pathParameters) { + } + /// + /// Instantiates a new RenewUploadRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RenewUploadRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", rawUrl) { + } + /// + /// Renews the SAS URI for an application file upload. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Renews the SAS URI for an application file upload. + /// + /// Configuration 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 RenewUploadRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public RenewUploadRequestBuilder WithUrl(string rawUrl) { + return new RenewUploadRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RenewUploadRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new renewUploadRequestBuilderPostRequestConfiguration and sets the default values. + /// + public RenewUploadRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs new file mode 100644 index 00000000000..c68e8276c93 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs @@ -0,0 +1,261 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp.ContentVersions.Item.ContainedApps; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp.ContentVersions.Item.Files; +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.MobileApps.Item.GraphAndroidLobApp.ContentVersions.Item { + /// + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + /// + public class MobileAppContentItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + public ContainedAppsRequestBuilder ContainedApps { get => + new ContainedAppsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + public FilesRequestBuilder Files { get => + new FilesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppContentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppContentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property contentVersions 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).ConfigureAwait(false); + } + /// + /// The list of content versions for this 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property contentVersions 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(MobileAppContent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppContent 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property contentVersions 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 MobileAppContentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of content versions for this 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 MobileAppContentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property contentVersions 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(MobileAppContent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppContent 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 MobileAppContentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppContentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppContentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The list of content versions for this app. + /// + public class MobileAppContentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppContentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppContentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppContentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppContentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/GraphAndroidLobAppRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/GraphAndroidLobAppRequestBuilder.cs index a68bed64b26..315128c8192 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/GraphAndroidLobAppRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/GraphAndroidLobAppRequestBuilder.cs @@ -1,4 +1,7 @@ // +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp.Assignments; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp.Categories; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp.ContentVersions; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +17,18 @@ namespace Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp /// Casts the previous resource to androidLobApp. /// public class GraphAndroidLobAppRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + public AssignmentsRequestBuilder Assignments { get => + new AssignmentsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + public CategoriesRequestBuilder Categories { get => + new CategoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + public ContentVersionsRequestBuilder ContentVersions { get => + new ContentVersionsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GraphAndroidLobAppRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Assignments/AssignmentsRequestBuilder.cs new file mode 100644 index 00000000000..c77bab8d5f4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Assignments/AssignmentsRequestBuilder.cs @@ -0,0 +1,246 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidStoreApp.Assignments.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidStoreApp.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.MobileApps.Item.GraphAndroidStoreApp.Assignments { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp 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.mobileApp entity. + /// The unique identifier of mobileAppAssignment + public MobileAppAssignmentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppAssignment%2Did", position); + return new MobileAppAssignmentItemRequestBuilder(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/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/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/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create a new mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + /// Configuration 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 a new mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppAssignment 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public AssignmentsRequestBuilder WithUrl(string rawUrl) { + return new AssignmentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + 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/MobileApps/Item/GraphAndroidStoreApp/Assignments/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Assignments/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..cd0fa9d5b11 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Assignments/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphAndroidStoreApp.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/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/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/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphAndroidStoreApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs new file mode 100644 index 00000000000..fd1b49eb507 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -0,0 +1,254 @@ +// +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.MobileApps.Item.GraphAndroidStoreApp.Assignments.Item { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppAssignmentItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Deletes a mobileAppAssignment. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the properties of a mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a mobileAppAssignment. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppAssignmentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppAssignmentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + public class MobileAppAssignmentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppAssignmentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppAssignmentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Categories/CategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Categories/CategoriesRequestBuilder.cs new file mode 100644 index 00000000000..9835e8f37a9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Categories/CategoriesRequestBuilder.cs @@ -0,0 +1,179 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidStoreApp.Categories.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidStoreApp.Categories.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.MobileApps.Item.GraphAndroidStoreApp.Categories { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class CategoriesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// The unique identifier of mobileAppCategory + public MobileAppCategoryItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppCategory%2Did", position); + return new MobileAppCategoryItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategoryCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 CategoriesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CategoriesRequestBuilder WithUrl(string rawUrl) { + return new CategoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class CategoriesRequestBuilderGetQueryParameters { + /// 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 CategoriesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CategoriesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CategoriesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new categoriesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CategoriesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Categories/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Categories/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..25edbbd2f7e --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Categories/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphAndroidStoreApp.Categories.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/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/categories/$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/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/categories/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphAndroidStoreApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs new file mode 100644 index 00000000000..6cdb2eb7db0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.MobileApps.Item.GraphAndroidStoreApp.Categories.Item { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppCategoryItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppCategoryItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppCategoryItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class MobileAppCategoryItemRequestBuilderGetQueryParameters { + /// 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppCategoryItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppCategoryItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppCategoryItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/GraphAndroidStoreAppRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/GraphAndroidStoreAppRequestBuilder.cs index a3a82643a69..f02d43d87e1 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/GraphAndroidStoreAppRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/GraphAndroidStoreAppRequestBuilder.cs @@ -1,4 +1,6 @@ // +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidStoreApp.Assignments; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidStoreApp.Categories; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +16,14 @@ namespace Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphAndroidStoreA /// Casts the previous resource to androidStoreApp. /// public class GraphAndroidStoreAppRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + public AssignmentsRequestBuilder Assignments { get => + new AssignmentsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + public CategoriesRequestBuilder Categories { get => + new CategoriesRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GraphAndroidStoreAppRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Assignments/AssignmentsRequestBuilder.cs new file mode 100644 index 00000000000..3bd1d8fbe57 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Assignments/AssignmentsRequestBuilder.cs @@ -0,0 +1,246 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosLobApp.Assignments.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosLobApp.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.MobileApps.Item.GraphIosLobApp.Assignments { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp 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.mobileApp entity. + /// The unique identifier of mobileAppAssignment + public MobileAppAssignmentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppAssignment%2Did", position); + return new MobileAppAssignmentItemRequestBuilder(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/mobileApps/{mobileApp%2Did}/graph.iosLobApp/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/mobileApps/{mobileApp%2Did}/graph.iosLobApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create a new mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + /// Configuration 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 a new mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppAssignment 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public AssignmentsRequestBuilder WithUrl(string rawUrl) { + return new AssignmentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + 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/MobileApps/Item/GraphIosLobApp/Assignments/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Assignments/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..eab48c58f1b --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Assignments/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphIosLobApp.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/mobileApps/{mobileApp%2Did}/graph.iosLobApp/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/mobileApps/{mobileApp%2Did}/graph.iosLobApp/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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphIosLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs new file mode 100644 index 00000000000..41088652d5e --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -0,0 +1,254 @@ +// +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.MobileApps.Item.GraphIosLobApp.Assignments.Item { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppAssignmentItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Deletes a mobileAppAssignment. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the properties of a mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a mobileAppAssignment. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppAssignmentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppAssignmentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + public class MobileAppAssignmentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppAssignmentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppAssignmentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Categories/CategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Categories/CategoriesRequestBuilder.cs new file mode 100644 index 00000000000..0b49f7dfbac --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Categories/CategoriesRequestBuilder.cs @@ -0,0 +1,179 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosLobApp.Categories.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosLobApp.Categories.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.MobileApps.Item.GraphIosLobApp.Categories { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class CategoriesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// The unique identifier of mobileAppCategory + public MobileAppCategoryItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppCategory%2Did", position); + return new MobileAppCategoryItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategoryCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 CategoriesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CategoriesRequestBuilder WithUrl(string rawUrl) { + return new CategoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class CategoriesRequestBuilderGetQueryParameters { + /// 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 CategoriesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CategoriesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CategoriesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new categoriesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CategoriesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Categories/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Categories/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..2607f64ae9a --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Categories/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphIosLobApp.Categories.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/mobileApps/{mobileApp%2Did}/graph.iosLobApp/categories/$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/mobileApps/{mobileApp%2Did}/graph.iosLobApp/categories/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphIosLobApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs new file mode 100644 index 00000000000..164a1b12557 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.MobileApps.Item.GraphIosLobApp.Categories.Item { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppCategoryItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppCategoryItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppCategoryItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class MobileAppCategoryItemRequestBuilderGetQueryParameters { + /// 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppCategoryItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppCategoryItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppCategoryItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/ContentVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/ContentVersionsRequestBuilder.cs new file mode 100644 index 00000000000..c683224b198 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/ContentVersionsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosLobApp.ContentVersions.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosLobApp.ContentVersions.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.MobileApps.Item.GraphIosLobApp.ContentVersions { + /// + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + /// + public class ContentVersionsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + /// The unique identifier of mobileAppContent + public MobileAppContentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppContent%2Did", position); + return new MobileAppContentItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ContentVersionsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContentVersionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ContentVersionsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContentVersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of content versions for this 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, MobileAppContentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to contentVersions 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(MobileAppContent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppContent 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of content versions for this 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 ContentVersionsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to contentVersions 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(MobileAppContent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppContent 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 ContentVersionsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ContentVersionsRequestBuilder WithUrl(string rawUrl) { + return new ContentVersionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of content versions for this app. + /// + public class ContentVersionsRequestBuilderGetQueryParameters { + /// 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 ContentVersionsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ContentVersionsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ContentVersionsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new contentVersionsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ContentVersionsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContentVersionsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new contentVersionsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ContentVersionsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..13750206feb --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphIosLobApp.ContentVersions.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/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/$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/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs new file mode 100644 index 00000000000..efeb0a65865 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosLobApp.ContentVersions.Item.ContainedApps.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosLobApp.ContentVersions.Item.ContainedApps.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.MobileApps.Item.GraphIosLobApp.ContentVersions.Item.ContainedApps { + /// + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// + public class ContainedAppsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// The unique identifier of mobileContainedApp + public MobileContainedAppItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileContainedApp%2Did", position); + return new MobileContainedAppItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ContainedAppsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContainedAppsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ContainedAppsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileContainedAppCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to containedApps 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(MobileContainedApp body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileContainedApp 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Configuration 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 ContainedAppsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to containedApps 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(MobileContainedApp body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileContainedApp 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 ContainedAppsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ContainedAppsRequestBuilder WithUrl(string rawUrl) { + return new ContainedAppsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + public class ContainedAppsRequestBuilderGetQueryParameters { + /// 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 ContainedAppsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ContainedAppsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ContainedAppsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new containedAppsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ContainedAppsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContainedAppsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new containedAppsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ContainedAppsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..47bb7dee97c --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphIosLobApp.ContentVersions.Item.ContainedApps.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/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$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/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs new file mode 100644 index 00000000000..1c456cae259 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -0,0 +1,251 @@ +// +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.MobileApps.Item.GraphIosLobApp.ContentVersions.Item.ContainedApps.Item { + /// + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// + public class MobileContainedAppItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileContainedAppItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileContainedAppItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property containedApps 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).ConfigureAwait(false); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property containedApps 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(MobileContainedApp body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileContainedApp 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property containedApps 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 MobileContainedAppItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Configuration 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property containedApps 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(MobileContainedApp body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileContainedApp 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 MobileContainedAppItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileContainedAppItemRequestBuilder WithUrl(string rawUrl) { + return new MobileContainedAppItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileContainedAppItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + public class MobileContainedAppItemRequestBuilderGetQueryParameters { + /// 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileContainedAppItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileContainedAppItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileContainedAppItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..daf825158b3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphIosLobApp.ContentVersions.Item.Files.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/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files/$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/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs new file mode 100644 index 00000000000..cdbd691be2d --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosLobApp.ContentVersions.Item.Files.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosLobApp.ContentVersions.Item.Files.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.MobileApps.Item.GraphIosLobApp.ContentVersions.Item.Files { + /// + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// + public class FilesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// The unique identifier of mobileAppContentFile + public MobileAppContentFileItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppContentFile%2Did", position); + return new MobileAppContentFileItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new FilesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FilesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new FilesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of files for this app content version. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppContentFileCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to files 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(MobileAppContentFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppContentFile 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of files for this app content version. + /// + /// Configuration 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 FilesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to files 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(MobileAppContentFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppContentFile 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 FilesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public FilesRequestBuilder WithUrl(string rawUrl) { + return new FilesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of files for this app content version. + /// + public class FilesRequestBuilderGetQueryParameters { + /// 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 FilesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FilesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FilesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new filesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FilesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FilesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new filesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public FilesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs similarity index 59% rename from src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs rename to src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs index 1bc87f75b65..3f7ef2711c6 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs @@ -1,12 +1,13 @@ // +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.DirectoryNamespace.DeletedItems.Item.CheckMemberObjects { - public class CheckMemberObjectsPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { +namespace Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosLobApp.ContentVersions.Item.Files.Item.Commit { + public class CommitPostRequestBody : 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"); } @@ -14,24 +15,24 @@ public IDictionary AdditionalData { } /// Stores model information. public IBackingStore BackingStore { get; private set; } - /// The ids property + /// The fileEncryptionInfo property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Ids { - get { return BackingStore?.Get?>("ids"); } - set { BackingStore?.Set("ids", value); } + public Microsoft.Graph.Models.FileEncryptionInfo? FileEncryptionInfo { + get { return BackingStore?.Get("fileEncryptionInfo"); } + set { BackingStore?.Set("fileEncryptionInfo", value); } } #nullable restore #else - public List Ids { - get { return BackingStore?.Get>("ids"); } - set { BackingStore?.Set("ids", value); } + public Microsoft.Graph.Models.FileEncryptionInfo FileEncryptionInfo { + get { return BackingStore?.Get("fileEncryptionInfo"); } + set { BackingStore?.Set("fileEncryptionInfo", value); } } #endif /// - /// Instantiates a new checkMemberObjectsPostRequestBody and sets the default values. + /// Instantiates a new commitPostRequestBody and sets the default values. /// - public CheckMemberObjectsPostRequestBody() { + public CommitPostRequestBody() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); AdditionalData = new Dictionary(); } @@ -39,16 +40,16 @@ public CheckMemberObjectsPostRequestBody() { /// 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 CheckMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + public static CommitPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new CheckMemberObjectsPostRequestBody(); + return new CommitPostRequestBody(); } /// /// The deserialization information for the current model /// public IDictionary> GetFieldDeserializers() { return new Dictionary> { - {"ids", n => { Ids = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"fileEncryptionInfo", n => { FileEncryptionInfo = n.GetObjectValue(Microsoft.Graph.Models.FileEncryptionInfo.CreateFromDiscriminatorValue); } }, }; } /// @@ -57,7 +58,7 @@ public IDictionary> GetFieldDeserializers() { /// Serialization writer to use to serialize this model public void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteCollectionOfPrimitiveValues("ids", Ids); + writer.WriteObjectValue("fileEncryptionInfo", FileEncryptionInfo); writer.WriteAdditionalData(AdditionalData); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs similarity index 56% rename from src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsRequestBuilder.cs rename to src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs index a96528fd3f7..b5977949498 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs @@ -8,38 +8,37 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.DirectoryNamespace.DeletedItems.GetByIds { +namespace Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosLobApp.ContentVersions.Item.Files.Item.Commit { /// - /// Provides operations to call the getByIds method. + /// Provides operations to call the commit method. /// - public class GetByIdsRequestBuilder : BaseRequestBuilder { + public class CommitRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new GetByIdsRequestBuilder and sets the default values. + /// Instantiates a new CommitRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public GetByIdsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directory/deletedItems/getByIds", pathParameters) { + public CommitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", pathParameters) { } /// - /// Instantiates a new GetByIdsRequestBuilder and sets the default values. + /// Instantiates a new CommitRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directory/deletedItems/getByIds", rawUrl) { + public CommitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", rawUrl) { } /// - /// Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: - /// Find more info here + /// Commits a file of a given app. /// /// 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(GetByIdsPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(CommitPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(GetByIdsPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(CommitPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); @@ -47,19 +46,19 @@ public async Task PostAsync(GetByIdsPostRequestBody body, Acti {"4XX", ODataError.CreateFromDiscriminatorValue}, {"5XX", ODataError.CreateFromDiscriminatorValue}, }; - return await RequestAdapter.SendAsync(requestInfo, GetByIdsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: + /// Commits a file of a given app. /// /// 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(GetByIdsPostRequestBody body, Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(CommitPostRequestBody body, Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(GetByIdsPostRequestBody body, Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(CommitPostRequestBody body, Action requestConfiguration = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation { @@ -67,10 +66,9 @@ public RequestInformation ToPostRequestInformation(GetByIdsPostRequestBody body, UrlTemplate = UrlTemplate, PathParameters = PathParameters, }; - requestInfo.Headers.Add("Accept", "application/json"); requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); if (requestConfiguration != null) { - var requestConfig = new GetByIdsRequestBuilderPostRequestConfiguration(); + var requestConfig = new CommitRequestBuilderPostRequestConfiguration(); requestConfiguration.Invoke(requestConfig); requestInfo.AddRequestOptions(requestConfig.Options); requestInfo.AddHeaders(requestConfig.Headers); @@ -81,21 +79,21 @@ public RequestInformation ToPostRequestInformation(GetByIdsPostRequestBody body, /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// /// The raw URL to use for the request builder. - public GetByIdsRequestBuilder WithUrl(string rawUrl) { - return new GetByIdsRequestBuilder(rawUrl, RequestAdapter); + public CommitRequestBuilder WithUrl(string rawUrl) { + return new CommitRequestBuilder(rawUrl, RequestAdapter); } /// /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class GetByIdsRequestBuilderPostRequestConfiguration { + public class CommitRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new getByIdsRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new commitRequestBuilderPostRequestConfiguration and sets the default values. /// - public GetByIdsRequestBuilderPostRequestConfiguration() { + public CommitRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs new file mode 100644 index 00000000000..bbb97884635 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs @@ -0,0 +1,261 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosLobApp.ContentVersions.Item.Files.Item.Commit; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosLobApp.ContentVersions.Item.Files.Item.RenewUpload; +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.MobileApps.Item.GraphIosLobApp.ContentVersions.Item.Files.Item { + /// + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// + public class MobileAppContentFileItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the commit method. + public CommitRequestBuilder Commit { get => + new CommitRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the renewUpload method. + public RenewUploadRequestBuilder RenewUpload { get => + new RenewUploadRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppContentFileItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppContentFileItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property files 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).ConfigureAwait(false); + } + /// + /// The list of files for this app content version. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property files 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(MobileAppContentFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppContentFile 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property files 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 MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of files for this app content version. + /// + /// Configuration 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property files 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(MobileAppContentFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppContentFile 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 MobileAppContentFileItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppContentFileItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppContentFileItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The list of files for this app content version. + /// + public class MobileAppContentFileItemRequestBuilderGetQueryParameters { + /// 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppContentFileItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppContentFileItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentFileItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs new file mode 100644 index 00000000000..33315d44f16 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs @@ -0,0 +1,97 @@ +// +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.MobileApps.Item.GraphIosLobApp.ContentVersions.Item.Files.Item.RenewUpload { + /// + /// Provides operations to call the renewUpload method. + /// + public class RenewUploadRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RenewUploadRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RenewUploadRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", pathParameters) { + } + /// + /// Instantiates a new RenewUploadRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RenewUploadRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", rawUrl) { + } + /// + /// Renews the SAS URI for an application file upload. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Renews the SAS URI for an application file upload. + /// + /// Configuration 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 RenewUploadRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public RenewUploadRequestBuilder WithUrl(string rawUrl) { + return new RenewUploadRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RenewUploadRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new renewUploadRequestBuilderPostRequestConfiguration and sets the default values. + /// + public RenewUploadRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs new file mode 100644 index 00000000000..c4e2354f5ee --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs @@ -0,0 +1,261 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosLobApp.ContentVersions.Item.ContainedApps; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosLobApp.ContentVersions.Item.Files; +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.MobileApps.Item.GraphIosLobApp.ContentVersions.Item { + /// + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + /// + public class MobileAppContentItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + public ContainedAppsRequestBuilder ContainedApps { get => + new ContainedAppsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + public FilesRequestBuilder Files { get => + new FilesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppContentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppContentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property contentVersions 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).ConfigureAwait(false); + } + /// + /// The list of content versions for this 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property contentVersions 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(MobileAppContent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppContent 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property contentVersions 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 MobileAppContentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of content versions for this 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 MobileAppContentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property contentVersions 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(MobileAppContent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppContent 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 MobileAppContentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppContentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppContentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The list of content versions for this app. + /// + public class MobileAppContentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppContentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppContentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppContentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppContentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/GraphIosLobAppRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/GraphIosLobAppRequestBuilder.cs index 5240ce95c82..9f4e2884944 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/GraphIosLobAppRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/GraphIosLobAppRequestBuilder.cs @@ -1,4 +1,7 @@ // +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosLobApp.Assignments; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosLobApp.Categories; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosLobApp.ContentVersions; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +17,18 @@ namespace Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosLobApp { /// Casts the previous resource to iosLobApp. /// public class GraphIosLobAppRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + public AssignmentsRequestBuilder Assignments { get => + new AssignmentsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + public CategoriesRequestBuilder Categories { get => + new CategoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + public ContentVersionsRequestBuilder ContentVersions { get => + new ContentVersionsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GraphIosLobAppRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Assignments/AssignmentsRequestBuilder.cs new file mode 100644 index 00000000000..64593539119 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Assignments/AssignmentsRequestBuilder.cs @@ -0,0 +1,246 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosStoreApp.Assignments.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosStoreApp.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.MobileApps.Item.GraphIosStoreApp.Assignments { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp 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.mobileApp entity. + /// The unique identifier of mobileAppAssignment + public MobileAppAssignmentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppAssignment%2Did", position); + return new MobileAppAssignmentItemRequestBuilder(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/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/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/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create a new mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + /// Configuration 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 a new mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppAssignment 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public AssignmentsRequestBuilder WithUrl(string rawUrl) { + return new AssignmentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + 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/MobileApps/Item/GraphIosStoreApp/Assignments/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Assignments/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..3a429431af8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Assignments/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphIosStoreApp.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/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/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/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphIosStoreApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs new file mode 100644 index 00000000000..e9c97f8f974 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -0,0 +1,254 @@ +// +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.MobileApps.Item.GraphIosStoreApp.Assignments.Item { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppAssignmentItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Deletes a mobileAppAssignment. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the properties of a mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a mobileAppAssignment. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppAssignmentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppAssignmentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + public class MobileAppAssignmentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppAssignmentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppAssignmentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Categories/CategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Categories/CategoriesRequestBuilder.cs new file mode 100644 index 00000000000..cf8a6e2a31c --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Categories/CategoriesRequestBuilder.cs @@ -0,0 +1,179 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosStoreApp.Categories.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosStoreApp.Categories.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.MobileApps.Item.GraphIosStoreApp.Categories { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class CategoriesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// The unique identifier of mobileAppCategory + public MobileAppCategoryItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppCategory%2Did", position); + return new MobileAppCategoryItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategoryCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 CategoriesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CategoriesRequestBuilder WithUrl(string rawUrl) { + return new CategoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class CategoriesRequestBuilderGetQueryParameters { + /// 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 CategoriesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CategoriesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CategoriesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new categoriesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CategoriesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Categories/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Categories/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..3660c806cc1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Categories/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphIosStoreApp.Categories.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/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/categories/$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/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/categories/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphIosStoreApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs new file mode 100644 index 00000000000..49f742d0c23 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.MobileApps.Item.GraphIosStoreApp.Categories.Item { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppCategoryItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppCategoryItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppCategoryItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class MobileAppCategoryItemRequestBuilderGetQueryParameters { + /// 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppCategoryItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppCategoryItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppCategoryItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/GraphIosStoreAppRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/GraphIosStoreAppRequestBuilder.cs index f0daf00e37d..8987f9eeb68 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/GraphIosStoreAppRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/GraphIosStoreAppRequestBuilder.cs @@ -1,4 +1,6 @@ // +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosStoreApp.Assignments; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosStoreApp.Categories; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +16,14 @@ namespace Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosStoreApp { /// Casts the previous resource to iosStoreApp. /// public class GraphIosStoreAppRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + public AssignmentsRequestBuilder Assignments { get => + new AssignmentsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + public CategoriesRequestBuilder Categories { get => + new CategoriesRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GraphIosStoreAppRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Assignments/AssignmentsRequestBuilder.cs new file mode 100644 index 00000000000..17883b07651 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Assignments/AssignmentsRequestBuilder.cs @@ -0,0 +1,246 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosVppApp.Assignments.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosVppApp.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.MobileApps.Item.GraphIosVppApp.Assignments { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp 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.mobileApp entity. + /// The unique identifier of mobileAppAssignment + public MobileAppAssignmentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppAssignment%2Did", position); + return new MobileAppAssignmentItemRequestBuilder(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/mobileApps/{mobileApp%2Did}/graph.iosVppApp/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/mobileApps/{mobileApp%2Did}/graph.iosVppApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create a new mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + /// Configuration 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 a new mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppAssignment 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public AssignmentsRequestBuilder WithUrl(string rawUrl) { + return new AssignmentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + 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/MobileApps/Item/GraphIosVppApp/Assignments/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Assignments/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..438bc8bd5b9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Assignments/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphIosVppApp.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/mobileApps/{mobileApp%2Did}/graph.iosVppApp/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/mobileApps/{mobileApp%2Did}/graph.iosVppApp/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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphIosVppApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs new file mode 100644 index 00000000000..af9fc4d3e20 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -0,0 +1,254 @@ +// +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.MobileApps.Item.GraphIosVppApp.Assignments.Item { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppAssignmentItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Deletes a mobileAppAssignment. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the properties of a mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a mobileAppAssignment. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppAssignmentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppAssignmentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + public class MobileAppAssignmentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppAssignmentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppAssignmentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Categories/CategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Categories/CategoriesRequestBuilder.cs new file mode 100644 index 00000000000..d4fb643df53 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Categories/CategoriesRequestBuilder.cs @@ -0,0 +1,179 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosVppApp.Categories.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosVppApp.Categories.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.MobileApps.Item.GraphIosVppApp.Categories { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class CategoriesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// The unique identifier of mobileAppCategory + public MobileAppCategoryItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppCategory%2Did", position); + return new MobileAppCategoryItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategoryCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 CategoriesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CategoriesRequestBuilder WithUrl(string rawUrl) { + return new CategoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class CategoriesRequestBuilderGetQueryParameters { + /// 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 CategoriesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CategoriesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CategoriesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new categoriesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CategoriesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Categories/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Categories/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..8f6abd8bf58 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Categories/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphIosVppApp.Categories.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/mobileApps/{mobileApp%2Did}/graph.iosVppApp/categories/$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/mobileApps/{mobileApp%2Did}/graph.iosVppApp/categories/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphIosVppApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs new file mode 100644 index 00000000000..971edb2ac4f --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.MobileApps.Item.GraphIosVppApp.Categories.Item { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppCategoryItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppCategoryItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppCategoryItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class MobileAppCategoryItemRequestBuilderGetQueryParameters { + /// 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppCategoryItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppCategoryItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppCategoryItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/GraphIosVppAppRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/GraphIosVppAppRequestBuilder.cs index 2133aded66e..994535fcd7d 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/GraphIosVppAppRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/GraphIosVppAppRequestBuilder.cs @@ -1,4 +1,6 @@ // +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosVppApp.Assignments; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosVppApp.Categories; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +16,14 @@ namespace Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphIosVppApp { /// Casts the previous resource to iosVppApp. /// public class GraphIosVppAppRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + public AssignmentsRequestBuilder Assignments { get => + new AssignmentsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + public CategoriesRequestBuilder Categories { get => + new CategoriesRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GraphIosVppAppRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Assignments/AssignmentsRequestBuilder.cs new file mode 100644 index 00000000000..eda8b27bd1d --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Assignments/AssignmentsRequestBuilder.cs @@ -0,0 +1,246 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSDmgApp.Assignments.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSDmgApp.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.MobileApps.Item.GraphMacOSDmgApp.Assignments { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp 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.mobileApp entity. + /// The unique identifier of mobileAppAssignment + public MobileAppAssignmentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppAssignment%2Did", position); + return new MobileAppAssignmentItemRequestBuilder(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/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/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/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create a new mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + /// Configuration 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 a new mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppAssignment 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public AssignmentsRequestBuilder WithUrl(string rawUrl) { + return new AssignmentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + 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/MobileApps/Item/GraphMacOSDmgApp/Assignments/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Assignments/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..26d964d706d --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Assignments/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphMacOSDmgApp.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/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/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/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphMacOSDmgApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs new file mode 100644 index 00000000000..ea36fc324cd --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -0,0 +1,254 @@ +// +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.MobileApps.Item.GraphMacOSDmgApp.Assignments.Item { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppAssignmentItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Deletes a mobileAppAssignment. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the properties of a mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a mobileAppAssignment. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppAssignmentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppAssignmentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + public class MobileAppAssignmentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppAssignmentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppAssignmentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Categories/CategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Categories/CategoriesRequestBuilder.cs new file mode 100644 index 00000000000..f41ff195b1f --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Categories/CategoriesRequestBuilder.cs @@ -0,0 +1,179 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSDmgApp.Categories.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSDmgApp.Categories.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.MobileApps.Item.GraphMacOSDmgApp.Categories { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class CategoriesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// The unique identifier of mobileAppCategory + public MobileAppCategoryItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppCategory%2Did", position); + return new MobileAppCategoryItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategoryCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 CategoriesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CategoriesRequestBuilder WithUrl(string rawUrl) { + return new CategoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class CategoriesRequestBuilderGetQueryParameters { + /// 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 CategoriesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CategoriesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CategoriesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new categoriesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CategoriesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Categories/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Categories/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..ee4d83a25c0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Categories/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphMacOSDmgApp.Categories.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/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/categories/$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/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/categories/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphMacOSDmgApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs new file mode 100644 index 00000000000..0b0fe603c95 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.MobileApps.Item.GraphMacOSDmgApp.Categories.Item { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppCategoryItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppCategoryItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppCategoryItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class MobileAppCategoryItemRequestBuilderGetQueryParameters { + /// 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppCategoryItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppCategoryItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppCategoryItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/ContentVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/ContentVersionsRequestBuilder.cs new file mode 100644 index 00000000000..66eaeb8f319 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/ContentVersionsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.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.MobileApps.Item.GraphMacOSDmgApp.ContentVersions { + /// + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + /// + public class ContentVersionsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + /// The unique identifier of mobileAppContent + public MobileAppContentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppContent%2Did", position); + return new MobileAppContentItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ContentVersionsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContentVersionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ContentVersionsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContentVersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of content versions for this 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, MobileAppContentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to contentVersions 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(MobileAppContent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppContent 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of content versions for this 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 ContentVersionsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to contentVersions 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(MobileAppContent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppContent 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 ContentVersionsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ContentVersionsRequestBuilder WithUrl(string rawUrl) { + return new ContentVersionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of content versions for this app. + /// + public class ContentVersionsRequestBuilderGetQueryParameters { + /// 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 ContentVersionsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ContentVersionsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ContentVersionsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new contentVersionsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ContentVersionsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContentVersionsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new contentVersionsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ContentVersionsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..eced2f4522c --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.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/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/$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/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs new file mode 100644 index 00000000000..f089ec45d9c --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.Item.ContainedApps.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.Item.ContainedApps.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.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.Item.ContainedApps { + /// + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// + public class ContainedAppsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// The unique identifier of mobileContainedApp + public MobileContainedAppItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileContainedApp%2Did", position); + return new MobileContainedAppItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ContainedAppsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContainedAppsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ContainedAppsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileContainedAppCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to containedApps 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(MobileContainedApp body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileContainedApp 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Configuration 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 ContainedAppsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to containedApps 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(MobileContainedApp body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileContainedApp 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 ContainedAppsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ContainedAppsRequestBuilder WithUrl(string rawUrl) { + return new ContainedAppsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + public class ContainedAppsRequestBuilderGetQueryParameters { + /// 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 ContainedAppsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ContainedAppsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ContainedAppsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new containedAppsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ContainedAppsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContainedAppsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new containedAppsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ContainedAppsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..dced252a345 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.Item.ContainedApps.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/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/containedApps/$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/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/containedApps/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs new file mode 100644 index 00000000000..68285a5f21e --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -0,0 +1,251 @@ +// +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.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.Item.ContainedApps.Item { + /// + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// + public class MobileContainedAppItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileContainedAppItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileContainedAppItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property containedApps 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).ConfigureAwait(false); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property containedApps 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(MobileContainedApp body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileContainedApp 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property containedApps 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 MobileContainedAppItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Configuration 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property containedApps 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(MobileContainedApp body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileContainedApp 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 MobileContainedAppItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileContainedAppItemRequestBuilder WithUrl(string rawUrl) { + return new MobileContainedAppItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileContainedAppItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + public class MobileContainedAppItemRequestBuilderGetQueryParameters { + /// 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileContainedAppItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileContainedAppItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileContainedAppItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..a08bf8eea8a --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.Item.Files.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/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files/$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/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/FilesRequestBuilder.cs new file mode 100644 index 00000000000..a63a4a38c16 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/FilesRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.Item.Files.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.Item.Files.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.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.Item.Files { + /// + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// + public class FilesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// The unique identifier of mobileAppContentFile + public MobileAppContentFileItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppContentFile%2Did", position); + return new MobileAppContentFileItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new FilesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FilesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new FilesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of files for this app content version. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppContentFileCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to files 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(MobileAppContentFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppContentFile 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of files for this app content version. + /// + /// Configuration 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 FilesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to files 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(MobileAppContentFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppContentFile 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 FilesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public FilesRequestBuilder WithUrl(string rawUrl) { + return new FilesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of files for this app content version. + /// + public class FilesRequestBuilderGetQueryParameters { + /// 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 FilesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FilesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FilesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new filesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FilesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FilesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new filesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public FilesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs similarity index 59% rename from src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs rename to src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs index bab894be8b7..1e99d076f7f 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs @@ -1,12 +1,13 @@ // +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.DirectoryNamespace.DeletedItems.Item.CheckMemberGroups { - public class CheckMemberGroupsPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { +namespace Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.Item.Files.Item.Commit { + public class CommitPostRequestBody : 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"); } @@ -14,24 +15,24 @@ public IDictionary AdditionalData { } /// Stores model information. public IBackingStore BackingStore { get; private set; } - /// The groupIds property + /// The fileEncryptionInfo property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? GroupIds { - get { return BackingStore?.Get?>("groupIds"); } - set { BackingStore?.Set("groupIds", value); } + public Microsoft.Graph.Models.FileEncryptionInfo? FileEncryptionInfo { + get { return BackingStore?.Get("fileEncryptionInfo"); } + set { BackingStore?.Set("fileEncryptionInfo", value); } } #nullable restore #else - public List GroupIds { - get { return BackingStore?.Get>("groupIds"); } - set { BackingStore?.Set("groupIds", value); } + public Microsoft.Graph.Models.FileEncryptionInfo FileEncryptionInfo { + get { return BackingStore?.Get("fileEncryptionInfo"); } + set { BackingStore?.Set("fileEncryptionInfo", value); } } #endif /// - /// Instantiates a new checkMemberGroupsPostRequestBody and sets the default values. + /// Instantiates a new commitPostRequestBody and sets the default values. /// - public CheckMemberGroupsPostRequestBody() { + public CommitPostRequestBody() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); AdditionalData = new Dictionary(); } @@ -39,16 +40,16 @@ public CheckMemberGroupsPostRequestBody() { /// 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 CheckMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + public static CommitPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new CheckMemberGroupsPostRequestBody(); + return new CommitPostRequestBody(); } /// /// The deserialization information for the current model /// public IDictionary> GetFieldDeserializers() { return new Dictionary> { - {"groupIds", n => { GroupIds = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"fileEncryptionInfo", n => { FileEncryptionInfo = n.GetObjectValue(Microsoft.Graph.Models.FileEncryptionInfo.CreateFromDiscriminatorValue); } }, }; } /// @@ -57,7 +58,7 @@ public IDictionary> GetFieldDeserializers() { /// Serialization writer to use to serialize this model public void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteCollectionOfPrimitiveValues("groupIds", GroupIds); + writer.WriteObjectValue("fileEncryptionInfo", FileEncryptionInfo); writer.WriteAdditionalData(AdditionalData); } } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs new file mode 100644 index 00000000000..9f69854fab4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs @@ -0,0 +1,102 @@ +// +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.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.Item.Files.Item.Commit { + /// + /// Provides operations to call the commit method. + /// + public class CommitRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CommitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", pathParameters) { + } + /// + /// Instantiates a new CommitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", rawUrl) { + } + /// + /// Commits a file of a given app. + /// + /// 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(CommitPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(CommitPostRequestBody 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).ConfigureAwait(false); + } + /// + /// Commits a file of a given app. + /// + /// 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(CommitPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(CommitPostRequestBody 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 CommitRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CommitRequestBuilder WithUrl(string rawUrl) { + return new CommitRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CommitRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new commitRequestBuilderPostRequestConfiguration and sets the default values. + /// + public CommitRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs new file mode 100644 index 00000000000..fbbf407be30 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs @@ -0,0 +1,261 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.Item.Files.Item.Commit; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.Item.Files.Item.RenewUpload; +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.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.Item.Files.Item { + /// + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// + public class MobileAppContentFileItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the commit method. + public CommitRequestBuilder Commit { get => + new CommitRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the renewUpload method. + public RenewUploadRequestBuilder RenewUpload { get => + new RenewUploadRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppContentFileItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppContentFileItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property files 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).ConfigureAwait(false); + } + /// + /// The list of files for this app content version. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property files 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(MobileAppContentFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppContentFile 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property files 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 MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of files for this app content version. + /// + /// Configuration 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property files 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(MobileAppContentFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppContentFile 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 MobileAppContentFileItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppContentFileItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppContentFileItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The list of files for this app content version. + /// + public class MobileAppContentFileItemRequestBuilderGetQueryParameters { + /// 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppContentFileItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppContentFileItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentFileItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs new file mode 100644 index 00000000000..581222fa842 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs @@ -0,0 +1,97 @@ +// +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.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.Item.Files.Item.RenewUpload { + /// + /// Provides operations to call the renewUpload method. + /// + public class RenewUploadRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RenewUploadRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RenewUploadRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", pathParameters) { + } + /// + /// Instantiates a new RenewUploadRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RenewUploadRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", rawUrl) { + } + /// + /// Renews the SAS URI for an application file upload. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Renews the SAS URI for an application file upload. + /// + /// Configuration 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 RenewUploadRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public RenewUploadRequestBuilder WithUrl(string rawUrl) { + return new RenewUploadRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RenewUploadRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new renewUploadRequestBuilderPostRequestConfiguration and sets the default values. + /// + public RenewUploadRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs new file mode 100644 index 00000000000..c240f02e6f9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs @@ -0,0 +1,261 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.Item.ContainedApps; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.Item.Files; +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.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.Item { + /// + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + /// + public class MobileAppContentItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + public ContainedAppsRequestBuilder ContainedApps { get => + new ContainedAppsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + public FilesRequestBuilder Files { get => + new FilesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppContentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppContentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property contentVersions 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).ConfigureAwait(false); + } + /// + /// The list of content versions for this 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property contentVersions 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(MobileAppContent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppContent 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property contentVersions 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 MobileAppContentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of content versions for this 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 MobileAppContentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property contentVersions 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(MobileAppContent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppContent 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 MobileAppContentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppContentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppContentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The list of content versions for this app. + /// + public class MobileAppContentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppContentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppContentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppContentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppContentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/GraphMacOSDmgAppRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/GraphMacOSDmgAppRequestBuilder.cs index 7edd3314c07..f6bceec0959 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/GraphMacOSDmgAppRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/GraphMacOSDmgAppRequestBuilder.cs @@ -1,4 +1,7 @@ // +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSDmgApp.Assignments; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSDmgApp.Categories; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSDmgApp.ContentVersions; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +17,18 @@ namespace Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSDmgApp { /// Casts the previous resource to macOSDmgApp. /// public class GraphMacOSDmgAppRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + public AssignmentsRequestBuilder Assignments { get => + new AssignmentsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + public CategoriesRequestBuilder Categories { get => + new CategoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + public ContentVersionsRequestBuilder ContentVersions { get => + new ContentVersionsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GraphMacOSDmgAppRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Assignments/AssignmentsRequestBuilder.cs new file mode 100644 index 00000000000..1f0066f20d0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Assignments/AssignmentsRequestBuilder.cs @@ -0,0 +1,246 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSLobApp.Assignments.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSLobApp.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.MobileApps.Item.GraphMacOSLobApp.Assignments { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp 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.mobileApp entity. + /// The unique identifier of mobileAppAssignment + public MobileAppAssignmentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppAssignment%2Did", position); + return new MobileAppAssignmentItemRequestBuilder(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/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/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/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create a new mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + /// Configuration 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 a new mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppAssignment 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public AssignmentsRequestBuilder WithUrl(string rawUrl) { + return new AssignmentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + 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/MobileApps/Item/GraphMacOSLobApp/Assignments/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Assignments/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..66643fc2b13 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Assignments/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphMacOSLobApp.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/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/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/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphMacOSLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs new file mode 100644 index 00000000000..22b2aaa488d --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -0,0 +1,254 @@ +// +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.MobileApps.Item.GraphMacOSLobApp.Assignments.Item { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppAssignmentItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Deletes a mobileAppAssignment. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the properties of a mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a mobileAppAssignment. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppAssignmentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppAssignmentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + public class MobileAppAssignmentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppAssignmentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppAssignmentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Categories/CategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Categories/CategoriesRequestBuilder.cs new file mode 100644 index 00000000000..0d6f397eb1b --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Categories/CategoriesRequestBuilder.cs @@ -0,0 +1,179 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSLobApp.Categories.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSLobApp.Categories.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.MobileApps.Item.GraphMacOSLobApp.Categories { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class CategoriesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// The unique identifier of mobileAppCategory + public MobileAppCategoryItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppCategory%2Did", position); + return new MobileAppCategoryItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategoryCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 CategoriesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CategoriesRequestBuilder WithUrl(string rawUrl) { + return new CategoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class CategoriesRequestBuilderGetQueryParameters { + /// 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 CategoriesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CategoriesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CategoriesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new categoriesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CategoriesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Categories/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Categories/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..b2684119c93 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Categories/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphMacOSLobApp.Categories.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/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/categories/$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/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/categories/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphMacOSLobApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs new file mode 100644 index 00000000000..a5091249e14 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.MobileApps.Item.GraphMacOSLobApp.Categories.Item { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppCategoryItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppCategoryItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppCategoryItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class MobileAppCategoryItemRequestBuilderGetQueryParameters { + /// 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppCategoryItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppCategoryItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppCategoryItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/ContentVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/ContentVersionsRequestBuilder.cs new file mode 100644 index 00000000000..fa435936e92 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/ContentVersionsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSLobApp.ContentVersions.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSLobApp.ContentVersions.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.MobileApps.Item.GraphMacOSLobApp.ContentVersions { + /// + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + /// + public class ContentVersionsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + /// The unique identifier of mobileAppContent + public MobileAppContentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppContent%2Did", position); + return new MobileAppContentItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ContentVersionsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContentVersionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ContentVersionsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContentVersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of content versions for this 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, MobileAppContentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to contentVersions 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(MobileAppContent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppContent 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of content versions for this 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 ContentVersionsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to contentVersions 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(MobileAppContent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppContent 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 ContentVersionsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ContentVersionsRequestBuilder WithUrl(string rawUrl) { + return new ContentVersionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of content versions for this app. + /// + public class ContentVersionsRequestBuilderGetQueryParameters { + /// 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 ContentVersionsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ContentVersionsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ContentVersionsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new contentVersionsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ContentVersionsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContentVersionsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new contentVersionsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ContentVersionsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..e708d3c7c52 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphMacOSLobApp.ContentVersions.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/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/$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/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs new file mode 100644 index 00000000000..617f1fe54b0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSLobApp.ContentVersions.Item.ContainedApps.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSLobApp.ContentVersions.Item.ContainedApps.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.MobileApps.Item.GraphMacOSLobApp.ContentVersions.Item.ContainedApps { + /// + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// + public class ContainedAppsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// The unique identifier of mobileContainedApp + public MobileContainedAppItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileContainedApp%2Did", position); + return new MobileContainedAppItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ContainedAppsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContainedAppsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ContainedAppsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileContainedAppCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to containedApps 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(MobileContainedApp body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileContainedApp 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Configuration 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 ContainedAppsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to containedApps 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(MobileContainedApp body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileContainedApp 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 ContainedAppsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ContainedAppsRequestBuilder WithUrl(string rawUrl) { + return new ContainedAppsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + public class ContainedAppsRequestBuilderGetQueryParameters { + /// 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 ContainedAppsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ContainedAppsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ContainedAppsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new containedAppsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ContainedAppsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContainedAppsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new containedAppsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ContainedAppsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..80ad43c5204 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphMacOSLobApp.ContentVersions.Item.ContainedApps.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/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$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/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs new file mode 100644 index 00000000000..c3fc52c5eeb --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -0,0 +1,251 @@ +// +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.MobileApps.Item.GraphMacOSLobApp.ContentVersions.Item.ContainedApps.Item { + /// + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// + public class MobileContainedAppItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileContainedAppItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileContainedAppItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property containedApps 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).ConfigureAwait(false); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property containedApps 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(MobileContainedApp body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileContainedApp 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property containedApps 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 MobileContainedAppItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Configuration 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property containedApps 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(MobileContainedApp body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileContainedApp 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 MobileContainedAppItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileContainedAppItemRequestBuilder WithUrl(string rawUrl) { + return new MobileContainedAppItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileContainedAppItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + public class MobileContainedAppItemRequestBuilderGetQueryParameters { + /// 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileContainedAppItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileContainedAppItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileContainedAppItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..48613a04cbf --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphMacOSLobApp.ContentVersions.Item.Files.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/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files/$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/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs new file mode 100644 index 00000000000..f3aa13289d6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSLobApp.ContentVersions.Item.Files.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSLobApp.ContentVersions.Item.Files.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.MobileApps.Item.GraphMacOSLobApp.ContentVersions.Item.Files { + /// + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// + public class FilesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// The unique identifier of mobileAppContentFile + public MobileAppContentFileItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppContentFile%2Did", position); + return new MobileAppContentFileItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new FilesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FilesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new FilesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of files for this app content version. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppContentFileCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to files 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(MobileAppContentFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppContentFile 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of files for this app content version. + /// + /// Configuration 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 FilesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to files 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(MobileAppContentFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppContentFile 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 FilesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public FilesRequestBuilder WithUrl(string rawUrl) { + return new FilesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of files for this app content version. + /// + public class FilesRequestBuilderGetQueryParameters { + /// 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 FilesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FilesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FilesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new filesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FilesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FilesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new filesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public FilesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetAvailableExtensionProperties/GetAvailableExtensionPropertiesPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs similarity index 56% rename from src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetAvailableExtensionProperties/GetAvailableExtensionPropertiesPostRequestBody.cs rename to src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs index 8920837ef1e..330534a6d81 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetAvailableExtensionProperties/GetAvailableExtensionPropertiesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs @@ -1,12 +1,13 @@ // +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.DirectoryNamespace.DeletedItems.GetAvailableExtensionProperties { - public class GetAvailableExtensionPropertiesPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { +namespace Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSLobApp.ContentVersions.Item.Files.Item.Commit { + public class CommitPostRequestBody : 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"); } @@ -14,15 +15,24 @@ public IDictionary AdditionalData { } /// Stores model information. public IBackingStore BackingStore { get; private set; } - /// The isSyncedFromOnPremises property - public bool? IsSyncedFromOnPremises { - get { return BackingStore?.Get("isSyncedFromOnPremises"); } - set { BackingStore?.Set("isSyncedFromOnPremises", value); } + /// The fileEncryptionInfo property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.FileEncryptionInfo? FileEncryptionInfo { + get { return BackingStore?.Get("fileEncryptionInfo"); } + set { BackingStore?.Set("fileEncryptionInfo", value); } } +#nullable restore +#else + public Microsoft.Graph.Models.FileEncryptionInfo FileEncryptionInfo { + get { return BackingStore?.Get("fileEncryptionInfo"); } + set { BackingStore?.Set("fileEncryptionInfo", value); } + } +#endif /// - /// Instantiates a new getAvailableExtensionPropertiesPostRequestBody and sets the default values. + /// Instantiates a new commitPostRequestBody and sets the default values. /// - public GetAvailableExtensionPropertiesPostRequestBody() { + public CommitPostRequestBody() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); AdditionalData = new Dictionary(); } @@ -30,16 +40,16 @@ public GetAvailableExtensionPropertiesPostRequestBody() { /// 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 GetAvailableExtensionPropertiesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + public static CommitPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new GetAvailableExtensionPropertiesPostRequestBody(); + return new CommitPostRequestBody(); } /// /// The deserialization information for the current model /// public IDictionary> GetFieldDeserializers() { return new Dictionary> { - {"isSyncedFromOnPremises", n => { IsSyncedFromOnPremises = n.GetBoolValue(); } }, + {"fileEncryptionInfo", n => { FileEncryptionInfo = n.GetObjectValue(Microsoft.Graph.Models.FileEncryptionInfo.CreateFromDiscriminatorValue); } }, }; } /// @@ -48,7 +58,7 @@ public IDictionary> GetFieldDeserializers() { /// Serialization writer to use to serialize this model public void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteBoolValue("isSyncedFromOnPremises", IsSyncedFromOnPremises); + writer.WriteObjectValue("fileEncryptionInfo", FileEncryptionInfo); writer.WriteAdditionalData(AdditionalData); } } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs new file mode 100644 index 00000000000..0e5cc48586f --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs @@ -0,0 +1,102 @@ +// +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.MobileApps.Item.GraphMacOSLobApp.ContentVersions.Item.Files.Item.Commit { + /// + /// Provides operations to call the commit method. + /// + public class CommitRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CommitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", pathParameters) { + } + /// + /// Instantiates a new CommitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", rawUrl) { + } + /// + /// Commits a file of a given app. + /// + /// 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(CommitPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(CommitPostRequestBody 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).ConfigureAwait(false); + } + /// + /// Commits a file of a given app. + /// + /// 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(CommitPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(CommitPostRequestBody 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 CommitRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CommitRequestBuilder WithUrl(string rawUrl) { + return new CommitRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CommitRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new commitRequestBuilderPostRequestConfiguration and sets the default values. + /// + public CommitRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs new file mode 100644 index 00000000000..6e2269c6480 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs @@ -0,0 +1,261 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSLobApp.ContentVersions.Item.Files.Item.Commit; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSLobApp.ContentVersions.Item.Files.Item.RenewUpload; +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.MobileApps.Item.GraphMacOSLobApp.ContentVersions.Item.Files.Item { + /// + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// + public class MobileAppContentFileItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the commit method. + public CommitRequestBuilder Commit { get => + new CommitRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the renewUpload method. + public RenewUploadRequestBuilder RenewUpload { get => + new RenewUploadRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppContentFileItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppContentFileItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property files 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).ConfigureAwait(false); + } + /// + /// The list of files for this app content version. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property files 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(MobileAppContentFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppContentFile 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property files 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 MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of files for this app content version. + /// + /// Configuration 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property files 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(MobileAppContentFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppContentFile 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 MobileAppContentFileItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppContentFileItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppContentFileItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The list of files for this app content version. + /// + public class MobileAppContentFileItemRequestBuilderGetQueryParameters { + /// 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppContentFileItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppContentFileItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentFileItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs new file mode 100644 index 00000000000..b62a3caf782 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs @@ -0,0 +1,97 @@ +// +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.MobileApps.Item.GraphMacOSLobApp.ContentVersions.Item.Files.Item.RenewUpload { + /// + /// Provides operations to call the renewUpload method. + /// + public class RenewUploadRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RenewUploadRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RenewUploadRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", pathParameters) { + } + /// + /// Instantiates a new RenewUploadRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RenewUploadRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", rawUrl) { + } + /// + /// Renews the SAS URI for an application file upload. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Renews the SAS URI for an application file upload. + /// + /// Configuration 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 RenewUploadRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public RenewUploadRequestBuilder WithUrl(string rawUrl) { + return new RenewUploadRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RenewUploadRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new renewUploadRequestBuilderPostRequestConfiguration and sets the default values. + /// + public RenewUploadRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs new file mode 100644 index 00000000000..ec57c61ded1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs @@ -0,0 +1,261 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSLobApp.ContentVersions.Item.ContainedApps; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSLobApp.ContentVersions.Item.Files; +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.MobileApps.Item.GraphMacOSLobApp.ContentVersions.Item { + /// + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + /// + public class MobileAppContentItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + public ContainedAppsRequestBuilder ContainedApps { get => + new ContainedAppsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + public FilesRequestBuilder Files { get => + new FilesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppContentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppContentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property contentVersions 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).ConfigureAwait(false); + } + /// + /// The list of content versions for this 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property contentVersions 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(MobileAppContent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppContent 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property contentVersions 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 MobileAppContentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of content versions for this 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 MobileAppContentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property contentVersions 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(MobileAppContent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppContent 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 MobileAppContentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppContentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppContentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The list of content versions for this app. + /// + public class MobileAppContentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppContentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppContentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppContentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppContentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/GraphMacOSLobAppRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/GraphMacOSLobAppRequestBuilder.cs index 53eefc94221..329955165be 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/GraphMacOSLobAppRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/GraphMacOSLobAppRequestBuilder.cs @@ -1,4 +1,7 @@ // +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSLobApp.Assignments; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSLobApp.Categories; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSLobApp.ContentVersions; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +17,18 @@ namespace Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMacOSLobApp { /// Casts the previous resource to macOSLobApp. /// public class GraphMacOSLobAppRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + public AssignmentsRequestBuilder Assignments { get => + new AssignmentsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + public CategoriesRequestBuilder Categories { get => + new CategoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + public ContentVersionsRequestBuilder ContentVersions { get => + new ContentVersionsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GraphMacOSLobAppRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Assignments/AssignmentsRequestBuilder.cs new file mode 100644 index 00000000000..bd994c8d523 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Assignments/AssignmentsRequestBuilder.cs @@ -0,0 +1,246 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedAndroidLobApp.Assignments.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedAndroidLobApp.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.MobileApps.Item.GraphManagedAndroidLobApp.Assignments { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp 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.mobileApp entity. + /// The unique identifier of mobileAppAssignment + public MobileAppAssignmentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppAssignment%2Did", position); + return new MobileAppAssignmentItemRequestBuilder(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/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/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/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create a new mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + /// Configuration 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 a new mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppAssignment 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public AssignmentsRequestBuilder WithUrl(string rawUrl) { + return new AssignmentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + 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/MobileApps/Item/GraphManagedAndroidLobApp/Assignments/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Assignments/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..8063fb1b0db --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Assignments/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphManagedAndroidLobApp.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/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/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/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphManagedAndroidLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs new file mode 100644 index 00000000000..1b707305cdf --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -0,0 +1,254 @@ +// +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.MobileApps.Item.GraphManagedAndroidLobApp.Assignments.Item { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppAssignmentItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Deletes a mobileAppAssignment. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the properties of a mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a mobileAppAssignment. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppAssignmentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppAssignmentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + public class MobileAppAssignmentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppAssignmentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppAssignmentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Categories/CategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Categories/CategoriesRequestBuilder.cs new file mode 100644 index 00000000000..d6266738d17 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Categories/CategoriesRequestBuilder.cs @@ -0,0 +1,179 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedAndroidLobApp.Categories.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedAndroidLobApp.Categories.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.MobileApps.Item.GraphManagedAndroidLobApp.Categories { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class CategoriesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// The unique identifier of mobileAppCategory + public MobileAppCategoryItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppCategory%2Did", position); + return new MobileAppCategoryItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategoryCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 CategoriesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CategoriesRequestBuilder WithUrl(string rawUrl) { + return new CategoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class CategoriesRequestBuilderGetQueryParameters { + /// 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 CategoriesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CategoriesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CategoriesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new categoriesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CategoriesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Categories/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Categories/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..6ea0904716f --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Categories/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphManagedAndroidLobApp.Categories.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/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/categories/$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/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/categories/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphManagedAndroidLobApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs new file mode 100644 index 00000000000..a002fd66c20 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.MobileApps.Item.GraphManagedAndroidLobApp.Categories.Item { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppCategoryItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppCategoryItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppCategoryItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class MobileAppCategoryItemRequestBuilderGetQueryParameters { + /// 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppCategoryItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppCategoryItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppCategoryItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/ContentVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/ContentVersionsRequestBuilder.cs new file mode 100644 index 00000000000..d64e851a50e --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/ContentVersionsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.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.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions { + /// + /// Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + /// + public class ContentVersionsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + /// The unique identifier of mobileAppContent + public MobileAppContentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppContent%2Did", position); + return new MobileAppContentItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ContentVersionsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContentVersionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ContentVersionsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContentVersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of content versions for this 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, MobileAppContentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to contentVersions 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(MobileAppContent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppContent 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of content versions for this 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 ContentVersionsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to contentVersions 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(MobileAppContent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppContent 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 ContentVersionsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ContentVersionsRequestBuilder WithUrl(string rawUrl) { + return new ContentVersionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of content versions for this app. + /// + public class ContentVersionsRequestBuilderGetQueryParameters { + /// 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 ContentVersionsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ContentVersionsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ContentVersionsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new contentVersionsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ContentVersionsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContentVersionsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new contentVersionsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ContentVersionsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..184638ef90a --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.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/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/$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/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs new file mode 100644 index 00000000000..c53ec8e80c0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.Item.ContainedApps.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.Item.ContainedApps.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.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.Item.ContainedApps { + /// + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// + public class ContainedAppsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// The unique identifier of mobileContainedApp + public MobileContainedAppItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileContainedApp%2Did", position); + return new MobileContainedAppItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ContainedAppsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContainedAppsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ContainedAppsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileContainedAppCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to containedApps 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(MobileContainedApp body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileContainedApp 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Configuration 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 ContainedAppsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to containedApps 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(MobileContainedApp body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileContainedApp 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 ContainedAppsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ContainedAppsRequestBuilder WithUrl(string rawUrl) { + return new ContainedAppsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + public class ContainedAppsRequestBuilderGetQueryParameters { + /// 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 ContainedAppsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ContainedAppsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ContainedAppsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new containedAppsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ContainedAppsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContainedAppsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new containedAppsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ContainedAppsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..c7e7f5a3495 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.Item.ContainedApps.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/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$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/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs new file mode 100644 index 00000000000..25ca89fabd8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -0,0 +1,251 @@ +// +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.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.Item.ContainedApps.Item { + /// + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// + public class MobileContainedAppItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileContainedAppItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileContainedAppItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property containedApps 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).ConfigureAwait(false); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property containedApps 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(MobileContainedApp body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileContainedApp 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property containedApps 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 MobileContainedAppItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Configuration 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property containedApps 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(MobileContainedApp body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileContainedApp 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 MobileContainedAppItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileContainedAppItemRequestBuilder WithUrl(string rawUrl) { + return new MobileContainedAppItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileContainedAppItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + public class MobileContainedAppItemRequestBuilderGetQueryParameters { + /// 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileContainedAppItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileContainedAppItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileContainedAppItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..b04f307f6fd --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.Item.Files.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/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files/$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/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs new file mode 100644 index 00000000000..95b4bea5f0d --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.Item.Files.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.Item.Files.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.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.Item.Files { + /// + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// + public class FilesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// The unique identifier of mobileAppContentFile + public MobileAppContentFileItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppContentFile%2Did", position); + return new MobileAppContentFileItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new FilesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FilesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new FilesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of files for this app content version. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppContentFileCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to files 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(MobileAppContentFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppContentFile 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of files for this app content version. + /// + /// Configuration 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 FilesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to files 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(MobileAppContentFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppContentFile 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 FilesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public FilesRequestBuilder WithUrl(string rawUrl) { + return new FilesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of files for this app content version. + /// + public class FilesRequestBuilderGetQueryParameters { + /// 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 FilesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FilesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FilesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new filesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FilesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FilesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new filesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public FilesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs new file mode 100644 index 00000000000..132c31f3aa0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs @@ -0,0 +1,65 @@ +// +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.DeviceAppManagement.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.Item.Files.Item.Commit { + public class CommitPostRequestBody : 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 fileEncryptionInfo property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.FileEncryptionInfo? FileEncryptionInfo { + get { return BackingStore?.Get("fileEncryptionInfo"); } + set { BackingStore?.Set("fileEncryptionInfo", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.FileEncryptionInfo FileEncryptionInfo { + get { return BackingStore?.Get("fileEncryptionInfo"); } + set { BackingStore?.Set("fileEncryptionInfo", value); } + } +#endif + /// + /// Instantiates a new commitPostRequestBody and sets the default values. + /// + public CommitPostRequestBody() { + 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 CommitPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CommitPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"fileEncryptionInfo", n => { FileEncryptionInfo = n.GetObjectValue(Microsoft.Graph.Models.FileEncryptionInfo.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("fileEncryptionInfo", FileEncryptionInfo); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs similarity index 51% rename from src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs rename to src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs index 601f79e5971..f624177730b 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs @@ -8,38 +8,37 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.DirectoryNamespace.DeletedItems.Item.GetMemberObjects { +namespace Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.Item.Files.Item.Commit { /// - /// Provides operations to call the getMemberObjects method. + /// Provides operations to call the commit method. /// - public class GetMemberObjectsRequestBuilder : BaseRequestBuilder { + public class CommitRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new GetMemberObjectsRequestBuilder and sets the default values. + /// Instantiates a new CommitRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public GetMemberObjectsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/getMemberObjects", pathParameters) { + public CommitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", pathParameters) { } /// - /// Instantiates a new GetMemberObjectsRequestBuilder and sets the default values. + /// Instantiates a new CommitRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/getMemberObjects", rawUrl) { + public CommitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", rawUrl) { } /// - /// Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. - /// Find more info here + /// Commits a file of a given app. /// /// 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(GetMemberObjectsPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(CommitPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(GetMemberObjectsPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(CommitPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); @@ -47,19 +46,19 @@ public async Task PostAsync(GetMemberObjectsPostReques {"4XX", ODataError.CreateFromDiscriminatorValue}, {"5XX", ODataError.CreateFromDiscriminatorValue}, }; - return await RequestAdapter.SendAsync(requestInfo, GetMemberObjectsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + /// Commits a file of a given app. /// /// 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(GetMemberObjectsPostRequestBody body, Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(CommitPostRequestBody body, Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(GetMemberObjectsPostRequestBody body, Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(CommitPostRequestBody body, Action requestConfiguration = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation { @@ -67,10 +66,9 @@ public RequestInformation ToPostRequestInformation(GetMemberObjectsPostRequestBo UrlTemplate = UrlTemplate, PathParameters = PathParameters, }; - requestInfo.Headers.Add("Accept", "application/json"); requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); if (requestConfiguration != null) { - var requestConfig = new GetMemberObjectsRequestBuilderPostRequestConfiguration(); + var requestConfig = new CommitRequestBuilderPostRequestConfiguration(); requestConfiguration.Invoke(requestConfig); requestInfo.AddRequestOptions(requestConfig.Options); requestInfo.AddHeaders(requestConfig.Headers); @@ -81,21 +79,21 @@ public RequestInformation ToPostRequestInformation(GetMemberObjectsPostRequestBo /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// /// The raw URL to use for the request builder. - public GetMemberObjectsRequestBuilder WithUrl(string rawUrl) { - return new GetMemberObjectsRequestBuilder(rawUrl, RequestAdapter); + public CommitRequestBuilder WithUrl(string rawUrl) { + return new CommitRequestBuilder(rawUrl, RequestAdapter); } /// /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class GetMemberObjectsRequestBuilderPostRequestConfiguration { + public class CommitRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new getMemberObjectsRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new commitRequestBuilderPostRequestConfiguration and sets the default values. /// - public GetMemberObjectsRequestBuilderPostRequestConfiguration() { + public CommitRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs new file mode 100644 index 00000000000..e302f14e654 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs @@ -0,0 +1,261 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.Item.Files.Item.Commit; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.Item.Files.Item.RenewUpload; +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.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.Item.Files.Item { + /// + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// + public class MobileAppContentFileItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the commit method. + public CommitRequestBuilder Commit { get => + new CommitRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the renewUpload method. + public RenewUploadRequestBuilder RenewUpload { get => + new RenewUploadRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppContentFileItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppContentFileItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property files 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).ConfigureAwait(false); + } + /// + /// The list of files for this app content version. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property files 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(MobileAppContentFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppContentFile 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property files 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 MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of files for this app content version. + /// + /// Configuration 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property files 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(MobileAppContentFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppContentFile 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 MobileAppContentFileItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppContentFileItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppContentFileItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The list of files for this app content version. + /// + public class MobileAppContentFileItemRequestBuilderGetQueryParameters { + /// 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppContentFileItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppContentFileItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentFileItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs new file mode 100644 index 00000000000..8409d018815 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs @@ -0,0 +1,97 @@ +// +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.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.Item.Files.Item.RenewUpload { + /// + /// Provides operations to call the renewUpload method. + /// + public class RenewUploadRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RenewUploadRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RenewUploadRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", pathParameters) { + } + /// + /// Instantiates a new RenewUploadRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RenewUploadRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", rawUrl) { + } + /// + /// Renews the SAS URI for an application file upload. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Renews the SAS URI for an application file upload. + /// + /// Configuration 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 RenewUploadRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public RenewUploadRequestBuilder WithUrl(string rawUrl) { + return new RenewUploadRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RenewUploadRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new renewUploadRequestBuilderPostRequestConfiguration and sets the default values. + /// + public RenewUploadRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs new file mode 100644 index 00000000000..5590a97a233 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs @@ -0,0 +1,261 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.Item.ContainedApps; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.Item.Files; +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.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.Item { + /// + /// Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + /// + public class MobileAppContentItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + public ContainedAppsRequestBuilder ContainedApps { get => + new ContainedAppsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + public FilesRequestBuilder Files { get => + new FilesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppContentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppContentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property contentVersions 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).ConfigureAwait(false); + } + /// + /// The list of content versions for this 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property contentVersions 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(MobileAppContent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppContent 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property contentVersions 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 MobileAppContentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of content versions for this 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 MobileAppContentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property contentVersions 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(MobileAppContent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppContent 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 MobileAppContentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppContentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppContentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The list of content versions for this app. + /// + public class MobileAppContentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppContentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppContentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppContentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppContentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/GraphManagedAndroidLobAppRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/GraphManagedAndroidLobAppRequestBuilder.cs index d21ec46640d..d8cd9d5bffc 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/GraphManagedAndroidLobAppRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/GraphManagedAndroidLobAppRequestBuilder.cs @@ -1,4 +1,7 @@ // +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedAndroidLobApp.Assignments; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedAndroidLobApp.Categories; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +17,18 @@ namespace Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedAndroi /// Casts the previous resource to managedAndroidLobApp. /// public class GraphManagedAndroidLobAppRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + public AssignmentsRequestBuilder Assignments { get => + new AssignmentsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + public CategoriesRequestBuilder Categories { get => + new CategoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + public ContentVersionsRequestBuilder ContentVersions { get => + new ContentVersionsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GraphManagedAndroidLobAppRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Assignments/AssignmentsRequestBuilder.cs new file mode 100644 index 00000000000..61d17e1c456 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Assignments/AssignmentsRequestBuilder.cs @@ -0,0 +1,246 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedIOSLobApp.Assignments.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedIOSLobApp.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.MobileApps.Item.GraphManagedIOSLobApp.Assignments { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp 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.mobileApp entity. + /// The unique identifier of mobileAppAssignment + public MobileAppAssignmentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppAssignment%2Did", position); + return new MobileAppAssignmentItemRequestBuilder(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/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/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/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create a new mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + /// Configuration 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 a new mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppAssignment 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public AssignmentsRequestBuilder WithUrl(string rawUrl) { + return new AssignmentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + 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/MobileApps/Item/GraphManagedIOSLobApp/Assignments/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Assignments/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..46acbdb7b46 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Assignments/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphManagedIOSLobApp.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/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/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/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphManagedIOSLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs new file mode 100644 index 00000000000..54d9345dc2f --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -0,0 +1,254 @@ +// +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.MobileApps.Item.GraphManagedIOSLobApp.Assignments.Item { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppAssignmentItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Deletes a mobileAppAssignment. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the properties of a mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a mobileAppAssignment. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppAssignmentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppAssignmentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + public class MobileAppAssignmentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppAssignmentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppAssignmentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Categories/CategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Categories/CategoriesRequestBuilder.cs new file mode 100644 index 00000000000..9ae0f2b0213 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Categories/CategoriesRequestBuilder.cs @@ -0,0 +1,179 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedIOSLobApp.Categories.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedIOSLobApp.Categories.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.MobileApps.Item.GraphManagedIOSLobApp.Categories { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class CategoriesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// The unique identifier of mobileAppCategory + public MobileAppCategoryItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppCategory%2Did", position); + return new MobileAppCategoryItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategoryCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 CategoriesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CategoriesRequestBuilder WithUrl(string rawUrl) { + return new CategoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class CategoriesRequestBuilderGetQueryParameters { + /// 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 CategoriesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CategoriesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CategoriesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new categoriesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CategoriesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Categories/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Categories/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..563cd59c369 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Categories/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphManagedIOSLobApp.Categories.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/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/categories/$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/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/categories/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphManagedIOSLobApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs new file mode 100644 index 00000000000..bde52117e9b --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.MobileApps.Item.GraphManagedIOSLobApp.Categories.Item { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppCategoryItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppCategoryItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppCategoryItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class MobileAppCategoryItemRequestBuilderGetQueryParameters { + /// 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppCategoryItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppCategoryItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppCategoryItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/ContentVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/ContentVersionsRequestBuilder.cs new file mode 100644 index 00000000000..1c99eb272d9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/ContentVersionsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.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.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions { + /// + /// Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + /// + public class ContentVersionsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + /// The unique identifier of mobileAppContent + public MobileAppContentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppContent%2Did", position); + return new MobileAppContentItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ContentVersionsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContentVersionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ContentVersionsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContentVersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of content versions for this 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, MobileAppContentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to contentVersions 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(MobileAppContent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppContent 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of content versions for this 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 ContentVersionsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to contentVersions 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(MobileAppContent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppContent 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 ContentVersionsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ContentVersionsRequestBuilder WithUrl(string rawUrl) { + return new ContentVersionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of content versions for this app. + /// + public class ContentVersionsRequestBuilderGetQueryParameters { + /// 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 ContentVersionsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ContentVersionsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ContentVersionsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new contentVersionsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ContentVersionsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContentVersionsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new contentVersionsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ContentVersionsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..2da8cb7ae75 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.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/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/$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/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs new file mode 100644 index 00000000000..4176a1c2069 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.Item.ContainedApps.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.Item.ContainedApps.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.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.Item.ContainedApps { + /// + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// + public class ContainedAppsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// The unique identifier of mobileContainedApp + public MobileContainedAppItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileContainedApp%2Did", position); + return new MobileContainedAppItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ContainedAppsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContainedAppsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ContainedAppsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileContainedAppCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to containedApps 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(MobileContainedApp body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileContainedApp 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Configuration 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 ContainedAppsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to containedApps 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(MobileContainedApp body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileContainedApp 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 ContainedAppsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ContainedAppsRequestBuilder WithUrl(string rawUrl) { + return new ContainedAppsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + public class ContainedAppsRequestBuilderGetQueryParameters { + /// 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 ContainedAppsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ContainedAppsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ContainedAppsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new containedAppsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ContainedAppsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContainedAppsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new containedAppsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ContainedAppsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..1244d40fe03 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.Item.ContainedApps.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/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$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/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs new file mode 100644 index 00000000000..286463f9aad --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -0,0 +1,251 @@ +// +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.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.Item.ContainedApps.Item { + /// + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// + public class MobileContainedAppItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileContainedAppItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileContainedAppItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property containedApps 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).ConfigureAwait(false); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property containedApps 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(MobileContainedApp body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileContainedApp 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property containedApps 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 MobileContainedAppItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Configuration 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property containedApps 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(MobileContainedApp body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileContainedApp 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 MobileContainedAppItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileContainedAppItemRequestBuilder WithUrl(string rawUrl) { + return new MobileContainedAppItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileContainedAppItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + public class MobileContainedAppItemRequestBuilderGetQueryParameters { + /// 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileContainedAppItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileContainedAppItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileContainedAppItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..ab07930acc8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.Item.Files.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/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files/$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/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs new file mode 100644 index 00000000000..39d6d2ad496 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.Item.Files.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.Item.Files.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.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.Item.Files { + /// + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// + public class FilesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// The unique identifier of mobileAppContentFile + public MobileAppContentFileItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppContentFile%2Did", position); + return new MobileAppContentFileItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new FilesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FilesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new FilesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of files for this app content version. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppContentFileCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to files 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(MobileAppContentFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppContentFile 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of files for this app content version. + /// + /// Configuration 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 FilesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to files 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(MobileAppContentFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppContentFile 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 FilesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public FilesRequestBuilder WithUrl(string rawUrl) { + return new FilesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of files for this app content version. + /// + public class FilesRequestBuilderGetQueryParameters { + /// 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 FilesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FilesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FilesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new filesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FilesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FilesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new filesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public FilesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs new file mode 100644 index 00000000000..a7b1c31edd0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs @@ -0,0 +1,65 @@ +// +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.DeviceAppManagement.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.Item.Files.Item.Commit { + public class CommitPostRequestBody : 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 fileEncryptionInfo property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.FileEncryptionInfo? FileEncryptionInfo { + get { return BackingStore?.Get("fileEncryptionInfo"); } + set { BackingStore?.Set("fileEncryptionInfo", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.FileEncryptionInfo FileEncryptionInfo { + get { return BackingStore?.Get("fileEncryptionInfo"); } + set { BackingStore?.Set("fileEncryptionInfo", value); } + } +#endif + /// + /// Instantiates a new commitPostRequestBody and sets the default values. + /// + public CommitPostRequestBody() { + 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 CommitPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CommitPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"fileEncryptionInfo", n => { FileEncryptionInfo = n.GetObjectValue(Microsoft.Graph.Models.FileEncryptionInfo.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("fileEncryptionInfo", FileEncryptionInfo); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs new file mode 100644 index 00000000000..f9217cfbc47 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs @@ -0,0 +1,102 @@ +// +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.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.Item.Files.Item.Commit { + /// + /// Provides operations to call the commit method. + /// + public class CommitRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CommitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", pathParameters) { + } + /// + /// Instantiates a new CommitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", rawUrl) { + } + /// + /// Commits a file of a given app. + /// + /// 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(CommitPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(CommitPostRequestBody 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).ConfigureAwait(false); + } + /// + /// Commits a file of a given app. + /// + /// 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(CommitPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(CommitPostRequestBody 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 CommitRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CommitRequestBuilder WithUrl(string rawUrl) { + return new CommitRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CommitRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new commitRequestBuilderPostRequestConfiguration and sets the default values. + /// + public CommitRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs new file mode 100644 index 00000000000..cab89d275a1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs @@ -0,0 +1,261 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.Item.Files.Item.Commit; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.Item.Files.Item.RenewUpload; +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.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.Item.Files.Item { + /// + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// + public class MobileAppContentFileItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the commit method. + public CommitRequestBuilder Commit { get => + new CommitRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the renewUpload method. + public RenewUploadRequestBuilder RenewUpload { get => + new RenewUploadRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppContentFileItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppContentFileItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property files 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).ConfigureAwait(false); + } + /// + /// The list of files for this app content version. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property files 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(MobileAppContentFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppContentFile 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property files 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 MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of files for this app content version. + /// + /// Configuration 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property files 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(MobileAppContentFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppContentFile 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 MobileAppContentFileItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppContentFileItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppContentFileItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The list of files for this app content version. + /// + public class MobileAppContentFileItemRequestBuilderGetQueryParameters { + /// 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppContentFileItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppContentFileItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentFileItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs new file mode 100644 index 00000000000..3938af6a205 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs @@ -0,0 +1,97 @@ +// +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.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.Item.Files.Item.RenewUpload { + /// + /// Provides operations to call the renewUpload method. + /// + public class RenewUploadRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RenewUploadRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RenewUploadRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", pathParameters) { + } + /// + /// Instantiates a new RenewUploadRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RenewUploadRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", rawUrl) { + } + /// + /// Renews the SAS URI for an application file upload. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Renews the SAS URI for an application file upload. + /// + /// Configuration 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 RenewUploadRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public RenewUploadRequestBuilder WithUrl(string rawUrl) { + return new RenewUploadRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RenewUploadRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new renewUploadRequestBuilderPostRequestConfiguration and sets the default values. + /// + public RenewUploadRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs new file mode 100644 index 00000000000..ce9501f1536 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs @@ -0,0 +1,261 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.Item.ContainedApps; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.Item.Files; +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.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.Item { + /// + /// Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + /// + public class MobileAppContentItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + public ContainedAppsRequestBuilder ContainedApps { get => + new ContainedAppsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + public FilesRequestBuilder Files { get => + new FilesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppContentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppContentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property contentVersions 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).ConfigureAwait(false); + } + /// + /// The list of content versions for this 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property contentVersions 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(MobileAppContent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppContent 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property contentVersions 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 MobileAppContentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of content versions for this 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 MobileAppContentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property contentVersions 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(MobileAppContent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppContent 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 MobileAppContentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppContentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppContentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The list of content versions for this app. + /// + public class MobileAppContentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppContentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppContentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppContentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppContentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/GraphManagedIOSLobAppRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/GraphManagedIOSLobAppRequestBuilder.cs index b5cb00bc78b..444537d3cc4 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/GraphManagedIOSLobAppRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/GraphManagedIOSLobAppRequestBuilder.cs @@ -1,4 +1,7 @@ // +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedIOSLobApp.Assignments; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedIOSLobApp.Categories; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +17,18 @@ namespace Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedIOSLob /// Casts the previous resource to managedIOSLobApp. /// public class GraphManagedIOSLobAppRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + public AssignmentsRequestBuilder Assignments { get => + new AssignmentsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + public CategoriesRequestBuilder Categories { get => + new CategoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + public ContentVersionsRequestBuilder ContentVersions { get => + new ContentVersionsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GraphManagedIOSLobAppRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Assignments/AssignmentsRequestBuilder.cs new file mode 100644 index 00000000000..c0ce412d57c --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Assignments/AssignmentsRequestBuilder.cs @@ -0,0 +1,246 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedMobileLobApp.Assignments.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedMobileLobApp.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.MobileApps.Item.GraphManagedMobileLobApp.Assignments { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp 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.mobileApp entity. + /// The unique identifier of mobileAppAssignment + public MobileAppAssignmentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppAssignment%2Did", position); + return new MobileAppAssignmentItemRequestBuilder(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/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/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/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create a new mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + /// Configuration 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 a new mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppAssignment 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public AssignmentsRequestBuilder WithUrl(string rawUrl) { + return new AssignmentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + 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/MobileApps/Item/GraphManagedMobileLobApp/Assignments/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Assignments/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..27532b7c8d8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Assignments/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphManagedMobileLobApp.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/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/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/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphManagedMobileLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs new file mode 100644 index 00000000000..3976aba2206 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -0,0 +1,254 @@ +// +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.MobileApps.Item.GraphManagedMobileLobApp.Assignments.Item { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppAssignmentItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Deletes a mobileAppAssignment. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the properties of a mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a mobileAppAssignment. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppAssignmentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppAssignmentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + public class MobileAppAssignmentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppAssignmentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppAssignmentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Categories/CategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Categories/CategoriesRequestBuilder.cs new file mode 100644 index 00000000000..4aca1063d59 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Categories/CategoriesRequestBuilder.cs @@ -0,0 +1,179 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedMobileLobApp.Categories.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedMobileLobApp.Categories.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.MobileApps.Item.GraphManagedMobileLobApp.Categories { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class CategoriesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// The unique identifier of mobileAppCategory + public MobileAppCategoryItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppCategory%2Did", position); + return new MobileAppCategoryItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategoryCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 CategoriesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CategoriesRequestBuilder WithUrl(string rawUrl) { + return new CategoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class CategoriesRequestBuilderGetQueryParameters { + /// 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 CategoriesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CategoriesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CategoriesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new categoriesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CategoriesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Categories/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Categories/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..c5097e30795 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Categories/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphManagedMobileLobApp.Categories.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/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/categories/$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/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/categories/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphManagedMobileLobApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs new file mode 100644 index 00000000000..e0f44ab32c1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.MobileApps.Item.GraphManagedMobileLobApp.Categories.Item { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppCategoryItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppCategoryItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppCategoryItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class MobileAppCategoryItemRequestBuilderGetQueryParameters { + /// 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppCategoryItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppCategoryItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppCategoryItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/ContentVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/ContentVersionsRequestBuilder.cs new file mode 100644 index 00000000000..577fd29b182 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/ContentVersionsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.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.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions { + /// + /// Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + /// + public class ContentVersionsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + /// The unique identifier of mobileAppContent + public MobileAppContentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppContent%2Did", position); + return new MobileAppContentItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ContentVersionsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContentVersionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ContentVersionsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContentVersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of content versions for this 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, MobileAppContentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to contentVersions 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(MobileAppContent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppContent 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of content versions for this 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 ContentVersionsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to contentVersions 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(MobileAppContent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppContent 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 ContentVersionsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ContentVersionsRequestBuilder WithUrl(string rawUrl) { + return new ContentVersionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of content versions for this app. + /// + public class ContentVersionsRequestBuilderGetQueryParameters { + /// 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 ContentVersionsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ContentVersionsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ContentVersionsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new contentVersionsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ContentVersionsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContentVersionsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new contentVersionsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ContentVersionsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..cf1c7b3cdd5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.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/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/$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/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs new file mode 100644 index 00000000000..a2349b1831f --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.Item.ContainedApps.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.Item.ContainedApps.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.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.Item.ContainedApps { + /// + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// + public class ContainedAppsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// The unique identifier of mobileContainedApp + public MobileContainedAppItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileContainedApp%2Did", position); + return new MobileContainedAppItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ContainedAppsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContainedAppsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ContainedAppsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileContainedAppCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to containedApps 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(MobileContainedApp body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileContainedApp 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Configuration 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 ContainedAppsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to containedApps 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(MobileContainedApp body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileContainedApp 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 ContainedAppsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ContainedAppsRequestBuilder WithUrl(string rawUrl) { + return new ContainedAppsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + public class ContainedAppsRequestBuilderGetQueryParameters { + /// 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 ContainedAppsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ContainedAppsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ContainedAppsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new containedAppsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ContainedAppsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContainedAppsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new containedAppsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ContainedAppsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..19313819695 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.Item.ContainedApps.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/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$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/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs new file mode 100644 index 00000000000..3e9e7a4c0e9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -0,0 +1,251 @@ +// +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.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.Item.ContainedApps.Item { + /// + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// + public class MobileContainedAppItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileContainedAppItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileContainedAppItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property containedApps 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).ConfigureAwait(false); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property containedApps 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(MobileContainedApp body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileContainedApp 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property containedApps 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 MobileContainedAppItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Configuration 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property containedApps 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(MobileContainedApp body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileContainedApp 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 MobileContainedAppItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileContainedAppItemRequestBuilder WithUrl(string rawUrl) { + return new MobileContainedAppItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileContainedAppItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + public class MobileContainedAppItemRequestBuilderGetQueryParameters { + /// 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileContainedAppItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileContainedAppItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileContainedAppItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..dad61649273 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.Item.Files.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/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files/$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/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs new file mode 100644 index 00000000000..040a1ab09dc --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.Item.Files.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.Item.Files.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.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.Item.Files { + /// + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// + public class FilesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// The unique identifier of mobileAppContentFile + public MobileAppContentFileItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppContentFile%2Did", position); + return new MobileAppContentFileItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new FilesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FilesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new FilesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of files for this app content version. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppContentFileCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to files 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(MobileAppContentFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppContentFile 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of files for this app content version. + /// + /// Configuration 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 FilesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to files 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(MobileAppContentFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppContentFile 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 FilesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public FilesRequestBuilder WithUrl(string rawUrl) { + return new FilesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of files for this app content version. + /// + public class FilesRequestBuilderGetQueryParameters { + /// 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 FilesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FilesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FilesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new filesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FilesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FilesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new filesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public FilesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs new file mode 100644 index 00000000000..031231f9a2d --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs @@ -0,0 +1,65 @@ +// +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.DeviceAppManagement.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.Item.Files.Item.Commit { + public class CommitPostRequestBody : 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 fileEncryptionInfo property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.FileEncryptionInfo? FileEncryptionInfo { + get { return BackingStore?.Get("fileEncryptionInfo"); } + set { BackingStore?.Set("fileEncryptionInfo", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.FileEncryptionInfo FileEncryptionInfo { + get { return BackingStore?.Get("fileEncryptionInfo"); } + set { BackingStore?.Set("fileEncryptionInfo", value); } + } +#endif + /// + /// Instantiates a new commitPostRequestBody and sets the default values. + /// + public CommitPostRequestBody() { + 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 CommitPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CommitPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"fileEncryptionInfo", n => { FileEncryptionInfo = n.GetObjectValue(Microsoft.Graph.Models.FileEncryptionInfo.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("fileEncryptionInfo", FileEncryptionInfo); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs similarity index 50% rename from src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs rename to src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs index cf89a602f26..3014f17cb74 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs @@ -8,38 +8,37 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.DirectoryNamespace.DeletedItems.Item.GetMemberGroups { +namespace Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.Item.Files.Item.Commit { /// - /// Provides operations to call the getMemberGroups method. + /// Provides operations to call the commit method. /// - public class GetMemberGroupsRequestBuilder : BaseRequestBuilder { + public class CommitRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new GetMemberGroupsRequestBuilder and sets the default values. + /// Instantiates a new CommitRequestBuilder and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public GetMemberGroupsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/getMemberGroups", pathParameters) { + public CommitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", pathParameters) { } /// - /// Instantiates a new GetMemberGroupsRequestBuilder and sets the default values. + /// Instantiates a new CommitRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/getMemberGroups", rawUrl) { + public CommitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", rawUrl) { } /// - /// Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. - /// Find more info here + /// Commits a file of a given app. /// /// 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(GetMemberGroupsPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(CommitPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(GetMemberGroupsPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(CommitPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); @@ -47,19 +46,19 @@ public async Task PostAsync(GetMemberGroupsPostRequestB {"4XX", ODataError.CreateFromDiscriminatorValue}, {"5XX", ODataError.CreateFromDiscriminatorValue}, }; - return await RequestAdapter.SendAsync(requestInfo, GetMemberGroupsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. + /// Commits a file of a given app. /// /// 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(GetMemberGroupsPostRequestBody body, Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(CommitPostRequestBody body, Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(GetMemberGroupsPostRequestBody body, Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(CommitPostRequestBody body, Action requestConfiguration = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation { @@ -67,10 +66,9 @@ public RequestInformation ToPostRequestInformation(GetMemberGroupsPostRequestBod UrlTemplate = UrlTemplate, PathParameters = PathParameters, }; - requestInfo.Headers.Add("Accept", "application/json"); requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); if (requestConfiguration != null) { - var requestConfig = new GetMemberGroupsRequestBuilderPostRequestConfiguration(); + var requestConfig = new CommitRequestBuilderPostRequestConfiguration(); requestConfiguration.Invoke(requestConfig); requestInfo.AddRequestOptions(requestConfig.Options); requestInfo.AddHeaders(requestConfig.Headers); @@ -81,21 +79,21 @@ public RequestInformation ToPostRequestInformation(GetMemberGroupsPostRequestBod /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// /// The raw URL to use for the request builder. - public GetMemberGroupsRequestBuilder WithUrl(string rawUrl) { - return new GetMemberGroupsRequestBuilder(rawUrl, RequestAdapter); + public CommitRequestBuilder WithUrl(string rawUrl) { + return new CommitRequestBuilder(rawUrl, RequestAdapter); } /// /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class GetMemberGroupsRequestBuilderPostRequestConfiguration { + public class CommitRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new getMemberGroupsRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new commitRequestBuilderPostRequestConfiguration and sets the default values. /// - public GetMemberGroupsRequestBuilderPostRequestConfiguration() { + public CommitRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs new file mode 100644 index 00000000000..12325c81082 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs @@ -0,0 +1,261 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.Item.Files.Item.Commit; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.Item.Files.Item.RenewUpload; +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.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.Item.Files.Item { + /// + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// + public class MobileAppContentFileItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the commit method. + public CommitRequestBuilder Commit { get => + new CommitRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the renewUpload method. + public RenewUploadRequestBuilder RenewUpload { get => + new RenewUploadRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppContentFileItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppContentFileItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property files 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).ConfigureAwait(false); + } + /// + /// The list of files for this app content version. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property files 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(MobileAppContentFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppContentFile 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property files 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 MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of files for this app content version. + /// + /// Configuration 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property files 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(MobileAppContentFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppContentFile 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 MobileAppContentFileItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppContentFileItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppContentFileItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The list of files for this app content version. + /// + public class MobileAppContentFileItemRequestBuilderGetQueryParameters { + /// 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppContentFileItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppContentFileItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentFileItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs new file mode 100644 index 00000000000..0e4a96900f0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs @@ -0,0 +1,97 @@ +// +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.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.Item.Files.Item.RenewUpload { + /// + /// Provides operations to call the renewUpload method. + /// + public class RenewUploadRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RenewUploadRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RenewUploadRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", pathParameters) { + } + /// + /// Instantiates a new RenewUploadRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RenewUploadRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", rawUrl) { + } + /// + /// Renews the SAS URI for an application file upload. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Renews the SAS URI for an application file upload. + /// + /// Configuration 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 RenewUploadRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public RenewUploadRequestBuilder WithUrl(string rawUrl) { + return new RenewUploadRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RenewUploadRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new renewUploadRequestBuilderPostRequestConfiguration and sets the default values. + /// + public RenewUploadRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs new file mode 100644 index 00000000000..80a65fbd45e --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs @@ -0,0 +1,261 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.Item.ContainedApps; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.Item.Files; +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.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.Item { + /// + /// Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + /// + public class MobileAppContentItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + public ContainedAppsRequestBuilder ContainedApps { get => + new ContainedAppsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + public FilesRequestBuilder Files { get => + new FilesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppContentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppContentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property contentVersions 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).ConfigureAwait(false); + } + /// + /// The list of content versions for this 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property contentVersions 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(MobileAppContent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppContent 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property contentVersions 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 MobileAppContentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of content versions for this 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 MobileAppContentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property contentVersions 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(MobileAppContent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppContent 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 MobileAppContentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppContentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppContentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The list of content versions for this app. + /// + public class MobileAppContentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppContentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppContentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppContentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppContentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/GraphManagedMobileLobAppRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/GraphManagedMobileLobAppRequestBuilder.cs index 61be2cf1c1e..c54df4ab5b6 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/GraphManagedMobileLobAppRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/GraphManagedMobileLobAppRequestBuilder.cs @@ -1,4 +1,7 @@ // +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedMobileLobApp.Assignments; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedMobileLobApp.Categories; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +17,18 @@ namespace Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphManagedMobile /// Casts the previous resource to managedMobileLobApp. /// public class GraphManagedMobileLobAppRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + public AssignmentsRequestBuilder Assignments { get => + new AssignmentsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + public CategoriesRequestBuilder Categories { get => + new CategoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + public ContentVersionsRequestBuilder ContentVersions { get => + new ContentVersionsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GraphManagedMobileLobAppRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Assignments/AssignmentsRequestBuilder.cs new file mode 100644 index 00000000000..8e0c79e9a13 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Assignments/AssignmentsRequestBuilder.cs @@ -0,0 +1,246 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMicrosoftStoreForBusinessApp.Assignments.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMicrosoftStoreForBusinessApp.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.MobileApps.Item.GraphMicrosoftStoreForBusinessApp.Assignments { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp 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.mobileApp entity. + /// The unique identifier of mobileAppAssignment + public MobileAppAssignmentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppAssignment%2Did", position); + return new MobileAppAssignmentItemRequestBuilder(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/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/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/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create a new mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + /// Configuration 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 a new mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppAssignment 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public AssignmentsRequestBuilder WithUrl(string rawUrl) { + return new AssignmentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + 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/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Assignments/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Assignments/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..ee7adadd9da --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Assignments/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphMicrosoftStoreForBusinessApp.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/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/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/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs new file mode 100644 index 00000000000..059c2bbe5ab --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -0,0 +1,254 @@ +// +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.MobileApps.Item.GraphMicrosoftStoreForBusinessApp.Assignments.Item { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppAssignmentItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Deletes a mobileAppAssignment. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the properties of a mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a mobileAppAssignment. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppAssignmentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppAssignmentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + public class MobileAppAssignmentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppAssignmentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppAssignmentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Categories/CategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Categories/CategoriesRequestBuilder.cs new file mode 100644 index 00000000000..5ed426248aa --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Categories/CategoriesRequestBuilder.cs @@ -0,0 +1,179 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMicrosoftStoreForBusinessApp.Categories.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMicrosoftStoreForBusinessApp.Categories.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.MobileApps.Item.GraphMicrosoftStoreForBusinessApp.Categories { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class CategoriesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// The unique identifier of mobileAppCategory + public MobileAppCategoryItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppCategory%2Did", position); + return new MobileAppCategoryItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategoryCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 CategoriesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CategoriesRequestBuilder WithUrl(string rawUrl) { + return new CategoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class CategoriesRequestBuilderGetQueryParameters { + /// 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 CategoriesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CategoriesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CategoriesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new categoriesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CategoriesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Categories/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Categories/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..dd72c478773 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Categories/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphMicrosoftStoreForBusinessApp.Categories.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/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/categories/$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/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/categories/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs new file mode 100644 index 00000000000..59567df74f0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.MobileApps.Item.GraphMicrosoftStoreForBusinessApp.Categories.Item { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppCategoryItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppCategoryItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppCategoryItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class MobileAppCategoryItemRequestBuilderGetQueryParameters { + /// 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppCategoryItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppCategoryItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppCategoryItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/GraphMicrosoftStoreForBusinessAppRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/GraphMicrosoftStoreForBusinessAppRequestBuilder.cs index 88e59a0bb4d..07e4e1cd251 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/GraphMicrosoftStoreForBusinessAppRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/GraphMicrosoftStoreForBusinessAppRequestBuilder.cs @@ -1,4 +1,6 @@ // +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMicrosoftStoreForBusinessApp.Assignments; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMicrosoftStoreForBusinessApp.Categories; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +16,14 @@ namespace Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphMicrosoftStor /// Casts the previous resource to microsoftStoreForBusinessApp. /// public class GraphMicrosoftStoreForBusinessAppRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + public AssignmentsRequestBuilder Assignments { get => + new AssignmentsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + public CategoriesRequestBuilder Categories { get => + new CategoriesRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GraphMicrosoftStoreForBusinessAppRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Assignments/AssignmentsRequestBuilder.cs new file mode 100644 index 00000000000..dde883e8932 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Assignments/AssignmentsRequestBuilder.cs @@ -0,0 +1,246 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWin32LobApp.Assignments.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWin32LobApp.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.MobileApps.Item.GraphWin32LobApp.Assignments { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp 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.mobileApp entity. + /// The unique identifier of mobileAppAssignment + public MobileAppAssignmentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppAssignment%2Did", position); + return new MobileAppAssignmentItemRequestBuilder(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/mobileApps/{mobileApp%2Did}/graph.win32LobApp/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/mobileApps/{mobileApp%2Did}/graph.win32LobApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create a new mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + /// Configuration 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 a new mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppAssignment 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public AssignmentsRequestBuilder WithUrl(string rawUrl) { + return new AssignmentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + 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/MobileApps/Item/GraphWin32LobApp/Assignments/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Assignments/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..575111d8647 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Assignments/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphWin32LobApp.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/mobileApps/{mobileApp%2Did}/graph.win32LobApp/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/mobileApps/{mobileApp%2Did}/graph.win32LobApp/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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphWin32LobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs new file mode 100644 index 00000000000..b1486f731c7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -0,0 +1,254 @@ +// +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.MobileApps.Item.GraphWin32LobApp.Assignments.Item { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppAssignmentItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Deletes a mobileAppAssignment. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the properties of a mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a mobileAppAssignment. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppAssignmentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppAssignmentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + public class MobileAppAssignmentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppAssignmentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppAssignmentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Categories/CategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Categories/CategoriesRequestBuilder.cs new file mode 100644 index 00000000000..f329e42666d --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Categories/CategoriesRequestBuilder.cs @@ -0,0 +1,179 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWin32LobApp.Categories.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWin32LobApp.Categories.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.MobileApps.Item.GraphWin32LobApp.Categories { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class CategoriesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// The unique identifier of mobileAppCategory + public MobileAppCategoryItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppCategory%2Did", position); + return new MobileAppCategoryItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategoryCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 CategoriesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CategoriesRequestBuilder WithUrl(string rawUrl) { + return new CategoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class CategoriesRequestBuilderGetQueryParameters { + /// 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 CategoriesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CategoriesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CategoriesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new categoriesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CategoriesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Categories/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Categories/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..45b884398d8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Categories/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphWin32LobApp.Categories.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/mobileApps/{mobileApp%2Did}/graph.win32LobApp/categories/$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/mobileApps/{mobileApp%2Did}/graph.win32LobApp/categories/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphWin32LobApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs new file mode 100644 index 00000000000..132073d9b6b --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.MobileApps.Item.GraphWin32LobApp.Categories.Item { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppCategoryItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppCategoryItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppCategoryItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class MobileAppCategoryItemRequestBuilderGetQueryParameters { + /// 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppCategoryItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppCategoryItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppCategoryItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/ContentVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/ContentVersionsRequestBuilder.cs new file mode 100644 index 00000000000..d984da7090f --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/ContentVersionsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWin32LobApp.ContentVersions.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWin32LobApp.ContentVersions.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.MobileApps.Item.GraphWin32LobApp.ContentVersions { + /// + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + /// + public class ContentVersionsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + /// The unique identifier of mobileAppContent + public MobileAppContentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppContent%2Did", position); + return new MobileAppContentItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ContentVersionsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContentVersionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ContentVersionsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContentVersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of content versions for this 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, MobileAppContentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to contentVersions 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(MobileAppContent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppContent 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of content versions for this 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 ContentVersionsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to contentVersions 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(MobileAppContent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppContent 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 ContentVersionsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ContentVersionsRequestBuilder WithUrl(string rawUrl) { + return new ContentVersionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of content versions for this app. + /// + public class ContentVersionsRequestBuilderGetQueryParameters { + /// 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 ContentVersionsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ContentVersionsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ContentVersionsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new contentVersionsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ContentVersionsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContentVersionsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new contentVersionsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ContentVersionsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..fd2b5c87f68 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphWin32LobApp.ContentVersions.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/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/$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/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs new file mode 100644 index 00000000000..bed6b2eaa87 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWin32LobApp.ContentVersions.Item.ContainedApps.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWin32LobApp.ContentVersions.Item.ContainedApps.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.MobileApps.Item.GraphWin32LobApp.ContentVersions.Item.ContainedApps { + /// + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// + public class ContainedAppsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// The unique identifier of mobileContainedApp + public MobileContainedAppItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileContainedApp%2Did", position); + return new MobileContainedAppItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ContainedAppsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContainedAppsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ContainedAppsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileContainedAppCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to containedApps 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(MobileContainedApp body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileContainedApp 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Configuration 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 ContainedAppsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to containedApps 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(MobileContainedApp body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileContainedApp 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 ContainedAppsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ContainedAppsRequestBuilder WithUrl(string rawUrl) { + return new ContainedAppsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + public class ContainedAppsRequestBuilderGetQueryParameters { + /// 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 ContainedAppsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ContainedAppsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ContainedAppsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new containedAppsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ContainedAppsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContainedAppsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new containedAppsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ContainedAppsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..1d386d148e8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphWin32LobApp.ContentVersions.Item.ContainedApps.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/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$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/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs new file mode 100644 index 00000000000..6f2be5d964d --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -0,0 +1,251 @@ +// +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.MobileApps.Item.GraphWin32LobApp.ContentVersions.Item.ContainedApps.Item { + /// + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// + public class MobileContainedAppItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileContainedAppItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileContainedAppItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property containedApps 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).ConfigureAwait(false); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property containedApps 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(MobileContainedApp body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileContainedApp 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property containedApps 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 MobileContainedAppItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Configuration 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property containedApps 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(MobileContainedApp body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileContainedApp 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 MobileContainedAppItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileContainedAppItemRequestBuilder WithUrl(string rawUrl) { + return new MobileContainedAppItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileContainedAppItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + public class MobileContainedAppItemRequestBuilderGetQueryParameters { + /// 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileContainedAppItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileContainedAppItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileContainedAppItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..bb9b33d2fe1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphWin32LobApp.ContentVersions.Item.Files.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/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files/$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/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs new file mode 100644 index 00000000000..8d6b86b9572 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWin32LobApp.ContentVersions.Item.Files.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWin32LobApp.ContentVersions.Item.Files.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.MobileApps.Item.GraphWin32LobApp.ContentVersions.Item.Files { + /// + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// + public class FilesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// The unique identifier of mobileAppContentFile + public MobileAppContentFileItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppContentFile%2Did", position); + return new MobileAppContentFileItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new FilesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FilesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new FilesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of files for this app content version. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppContentFileCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to files 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(MobileAppContentFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppContentFile 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of files for this app content version. + /// + /// Configuration 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 FilesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to files 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(MobileAppContentFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppContentFile 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 FilesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public FilesRequestBuilder WithUrl(string rawUrl) { + return new FilesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of files for this app content version. + /// + public class FilesRequestBuilderGetQueryParameters { + /// 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 FilesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FilesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FilesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new filesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FilesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FilesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new filesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public FilesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs similarity index 56% rename from src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs rename to src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs index 89a38ccbd7b..f672824575f 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs @@ -1,12 +1,13 @@ // +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.DirectoryNamespace.DeletedItems.Item.GetMemberGroups { - public class GetMemberGroupsPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { +namespace Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWin32LobApp.ContentVersions.Item.Files.Item.Commit { + public class CommitPostRequestBody : 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"); } @@ -14,15 +15,24 @@ public IDictionary AdditionalData { } /// Stores model information. public IBackingStore BackingStore { get; private set; } - /// The securityEnabledOnly property - public bool? SecurityEnabledOnly { - get { return BackingStore?.Get("securityEnabledOnly"); } - set { BackingStore?.Set("securityEnabledOnly", value); } + /// The fileEncryptionInfo property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.FileEncryptionInfo? FileEncryptionInfo { + get { return BackingStore?.Get("fileEncryptionInfo"); } + set { BackingStore?.Set("fileEncryptionInfo", value); } } +#nullable restore +#else + public Microsoft.Graph.Models.FileEncryptionInfo FileEncryptionInfo { + get { return BackingStore?.Get("fileEncryptionInfo"); } + set { BackingStore?.Set("fileEncryptionInfo", value); } + } +#endif /// - /// Instantiates a new getMemberGroupsPostRequestBody and sets the default values. + /// Instantiates a new commitPostRequestBody and sets the default values. /// - public GetMemberGroupsPostRequestBody() { + public CommitPostRequestBody() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); AdditionalData = new Dictionary(); } @@ -30,16 +40,16 @@ public GetMemberGroupsPostRequestBody() { /// 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 GetMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + public static CommitPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new GetMemberGroupsPostRequestBody(); + return new CommitPostRequestBody(); } /// /// The deserialization information for the current model /// public IDictionary> GetFieldDeserializers() { return new Dictionary> { - {"securityEnabledOnly", n => { SecurityEnabledOnly = n.GetBoolValue(); } }, + {"fileEncryptionInfo", n => { FileEncryptionInfo = n.GetObjectValue(Microsoft.Graph.Models.FileEncryptionInfo.CreateFromDiscriminatorValue); } }, }; } /// @@ -48,7 +58,7 @@ public IDictionary> GetFieldDeserializers() { /// Serialization writer to use to serialize this model public void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); + writer.WriteObjectValue("fileEncryptionInfo", FileEncryptionInfo); writer.WriteAdditionalData(AdditionalData); } } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs new file mode 100644 index 00000000000..d34ad35fb4d --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs @@ -0,0 +1,102 @@ +// +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.MobileApps.Item.GraphWin32LobApp.ContentVersions.Item.Files.Item.Commit { + /// + /// Provides operations to call the commit method. + /// + public class CommitRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CommitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", pathParameters) { + } + /// + /// Instantiates a new CommitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", rawUrl) { + } + /// + /// Commits a file of a given app. + /// + /// 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(CommitPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(CommitPostRequestBody 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).ConfigureAwait(false); + } + /// + /// Commits a file of a given app. + /// + /// 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(CommitPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(CommitPostRequestBody 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 CommitRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CommitRequestBuilder WithUrl(string rawUrl) { + return new CommitRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CommitRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new commitRequestBuilderPostRequestConfiguration and sets the default values. + /// + public CommitRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs new file mode 100644 index 00000000000..b9db8d795ca --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs @@ -0,0 +1,261 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWin32LobApp.ContentVersions.Item.Files.Item.Commit; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWin32LobApp.ContentVersions.Item.Files.Item.RenewUpload; +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.MobileApps.Item.GraphWin32LobApp.ContentVersions.Item.Files.Item { + /// + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// + public class MobileAppContentFileItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the commit method. + public CommitRequestBuilder Commit { get => + new CommitRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the renewUpload method. + public RenewUploadRequestBuilder RenewUpload { get => + new RenewUploadRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppContentFileItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppContentFileItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property files 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).ConfigureAwait(false); + } + /// + /// The list of files for this app content version. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property files 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(MobileAppContentFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppContentFile 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property files 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 MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of files for this app content version. + /// + /// Configuration 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property files 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(MobileAppContentFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppContentFile 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 MobileAppContentFileItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppContentFileItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppContentFileItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The list of files for this app content version. + /// + public class MobileAppContentFileItemRequestBuilderGetQueryParameters { + /// 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppContentFileItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppContentFileItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentFileItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs new file mode 100644 index 00000000000..b1513e51b20 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs @@ -0,0 +1,97 @@ +// +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.MobileApps.Item.GraphWin32LobApp.ContentVersions.Item.Files.Item.RenewUpload { + /// + /// Provides operations to call the renewUpload method. + /// + public class RenewUploadRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RenewUploadRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RenewUploadRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", pathParameters) { + } + /// + /// Instantiates a new RenewUploadRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RenewUploadRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", rawUrl) { + } + /// + /// Renews the SAS URI for an application file upload. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Renews the SAS URI for an application file upload. + /// + /// Configuration 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 RenewUploadRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public RenewUploadRequestBuilder WithUrl(string rawUrl) { + return new RenewUploadRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RenewUploadRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new renewUploadRequestBuilderPostRequestConfiguration and sets the default values. + /// + public RenewUploadRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs new file mode 100644 index 00000000000..9dcf239d29f --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs @@ -0,0 +1,261 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWin32LobApp.ContentVersions.Item.ContainedApps; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWin32LobApp.ContentVersions.Item.Files; +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.MobileApps.Item.GraphWin32LobApp.ContentVersions.Item { + /// + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + /// + public class MobileAppContentItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + public ContainedAppsRequestBuilder ContainedApps { get => + new ContainedAppsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + public FilesRequestBuilder Files { get => + new FilesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppContentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppContentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property contentVersions 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).ConfigureAwait(false); + } + /// + /// The list of content versions for this 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property contentVersions 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(MobileAppContent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppContent 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property contentVersions 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 MobileAppContentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of content versions for this 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 MobileAppContentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property contentVersions 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(MobileAppContent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppContent 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 MobileAppContentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppContentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppContentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The list of content versions for this app. + /// + public class MobileAppContentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppContentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppContentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppContentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppContentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/GraphWin32LobAppRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/GraphWin32LobAppRequestBuilder.cs index 7226ffebe02..9fd00be122c 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/GraphWin32LobAppRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/GraphWin32LobAppRequestBuilder.cs @@ -1,4 +1,7 @@ // +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWin32LobApp.Assignments; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWin32LobApp.Categories; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWin32LobApp.ContentVersions; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +17,18 @@ namespace Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWin32LobApp { /// Casts the previous resource to win32LobApp. /// public class GraphWin32LobAppRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + public AssignmentsRequestBuilder Assignments { get => + new AssignmentsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + public CategoriesRequestBuilder Categories { get => + new CategoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + public ContentVersionsRequestBuilder ContentVersions { get => + new ContentVersionsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GraphWin32LobAppRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Assignments/AssignmentsRequestBuilder.cs new file mode 100644 index 00000000000..3959e9496ec --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Assignments/AssignmentsRequestBuilder.cs @@ -0,0 +1,246 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsAppX.Assignments.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsAppX.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.MobileApps.Item.GraphWindowsAppX.Assignments { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp 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.mobileApp entity. + /// The unique identifier of mobileAppAssignment + public MobileAppAssignmentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppAssignment%2Did", position); + return new MobileAppAssignmentItemRequestBuilder(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/mobileApps/{mobileApp%2Did}/graph.windowsAppX/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/mobileApps/{mobileApp%2Did}/graph.windowsAppX/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create a new mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + /// Configuration 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 a new mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppAssignment 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public AssignmentsRequestBuilder WithUrl(string rawUrl) { + return new AssignmentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + 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/MobileApps/Item/GraphWindowsAppX/Assignments/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Assignments/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..e8a0e5f16cb --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Assignments/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphWindowsAppX.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/mobileApps/{mobileApp%2Did}/graph.windowsAppX/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/mobileApps/{mobileApp%2Did}/graph.windowsAppX/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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphWindowsAppX/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs new file mode 100644 index 00000000000..6a331a3b026 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -0,0 +1,254 @@ +// +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.MobileApps.Item.GraphWindowsAppX.Assignments.Item { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppAssignmentItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Deletes a mobileAppAssignment. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the properties of a mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a mobileAppAssignment. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppAssignmentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppAssignmentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + public class MobileAppAssignmentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppAssignmentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppAssignmentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Categories/CategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Categories/CategoriesRequestBuilder.cs new file mode 100644 index 00000000000..b210dcde504 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Categories/CategoriesRequestBuilder.cs @@ -0,0 +1,179 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsAppX.Categories.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsAppX.Categories.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.MobileApps.Item.GraphWindowsAppX.Categories { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class CategoriesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// The unique identifier of mobileAppCategory + public MobileAppCategoryItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppCategory%2Did", position); + return new MobileAppCategoryItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategoryCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 CategoriesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CategoriesRequestBuilder WithUrl(string rawUrl) { + return new CategoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class CategoriesRequestBuilderGetQueryParameters { + /// 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 CategoriesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CategoriesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CategoriesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new categoriesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CategoriesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Categories/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Categories/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..06d8c200dc3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Categories/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphWindowsAppX.Categories.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/mobileApps/{mobileApp%2Did}/graph.windowsAppX/categories/$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/mobileApps/{mobileApp%2Did}/graph.windowsAppX/categories/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphWindowsAppX/Categories/Item/MobileAppCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Categories/Item/MobileAppCategoryItemRequestBuilder.cs new file mode 100644 index 00000000000..51b942d8262 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Categories/Item/MobileAppCategoryItemRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.MobileApps.Item.GraphWindowsAppX.Categories.Item { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppCategoryItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppCategoryItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppCategoryItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class MobileAppCategoryItemRequestBuilderGetQueryParameters { + /// 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppCategoryItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppCategoryItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppCategoryItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/ContentVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/ContentVersionsRequestBuilder.cs new file mode 100644 index 00000000000..e8c4cfeebd3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/ContentVersionsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsAppX.ContentVersions.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsAppX.ContentVersions.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.MobileApps.Item.GraphWindowsAppX.ContentVersions { + /// + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + /// + public class ContentVersionsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + /// The unique identifier of mobileAppContent + public MobileAppContentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppContent%2Did", position); + return new MobileAppContentItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ContentVersionsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContentVersionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ContentVersionsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContentVersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of content versions for this 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, MobileAppContentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to contentVersions 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(MobileAppContent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppContent 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of content versions for this 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 ContentVersionsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to contentVersions 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(MobileAppContent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppContent 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 ContentVersionsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ContentVersionsRequestBuilder WithUrl(string rawUrl) { + return new ContentVersionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of content versions for this app. + /// + public class ContentVersionsRequestBuilderGetQueryParameters { + /// 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 ContentVersionsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ContentVersionsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ContentVersionsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new contentVersionsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ContentVersionsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContentVersionsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new contentVersionsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ContentVersionsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..8dfbd0a70df --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphWindowsAppX.ContentVersions.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/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/$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/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs new file mode 100644 index 00000000000..c9582b33855 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsAppX.ContentVersions.Item.ContainedApps.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsAppX.ContentVersions.Item.ContainedApps.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.MobileApps.Item.GraphWindowsAppX.ContentVersions.Item.ContainedApps { + /// + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// + public class ContainedAppsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// The unique identifier of mobileContainedApp + public MobileContainedAppItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileContainedApp%2Did", position); + return new MobileContainedAppItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ContainedAppsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContainedAppsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ContainedAppsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileContainedAppCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to containedApps 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(MobileContainedApp body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileContainedApp 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Configuration 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 ContainedAppsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to containedApps 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(MobileContainedApp body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileContainedApp 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 ContainedAppsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ContainedAppsRequestBuilder WithUrl(string rawUrl) { + return new ContainedAppsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + public class ContainedAppsRequestBuilderGetQueryParameters { + /// 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 ContainedAppsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ContainedAppsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ContainedAppsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new containedAppsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ContainedAppsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContainedAppsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new containedAppsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ContainedAppsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..f04eb8badfc --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphWindowsAppX.ContentVersions.Item.ContainedApps.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/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/containedApps/$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/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/containedApps/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs new file mode 100644 index 00000000000..3f3f9347718 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -0,0 +1,251 @@ +// +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.MobileApps.Item.GraphWindowsAppX.ContentVersions.Item.ContainedApps.Item { + /// + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// + public class MobileContainedAppItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileContainedAppItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileContainedAppItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property containedApps 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).ConfigureAwait(false); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property containedApps 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(MobileContainedApp body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileContainedApp 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property containedApps 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 MobileContainedAppItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Configuration 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property containedApps 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(MobileContainedApp body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileContainedApp 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 MobileContainedAppItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileContainedAppItemRequestBuilder WithUrl(string rawUrl) { + return new MobileContainedAppItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileContainedAppItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + public class MobileContainedAppItemRequestBuilderGetQueryParameters { + /// 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileContainedAppItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileContainedAppItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileContainedAppItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..540a6333c37 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphWindowsAppX.ContentVersions.Item.Files.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/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files/$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/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/FilesRequestBuilder.cs new file mode 100644 index 00000000000..51453e7ccff --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/FilesRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsAppX.ContentVersions.Item.Files.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsAppX.ContentVersions.Item.Files.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.MobileApps.Item.GraphWindowsAppX.ContentVersions.Item.Files { + /// + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// + public class FilesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// The unique identifier of mobileAppContentFile + public MobileAppContentFileItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppContentFile%2Did", position); + return new MobileAppContentFileItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new FilesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FilesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new FilesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of files for this app content version. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppContentFileCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to files 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(MobileAppContentFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppContentFile 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of files for this app content version. + /// + /// Configuration 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 FilesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to files 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(MobileAppContentFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppContentFile 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 FilesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public FilesRequestBuilder WithUrl(string rawUrl) { + return new FilesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of files for this app content version. + /// + public class FilesRequestBuilderGetQueryParameters { + /// 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 FilesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FilesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FilesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new filesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FilesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FilesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new filesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public FilesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs new file mode 100644 index 00000000000..7e2a67ac9af --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs @@ -0,0 +1,65 @@ +// +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.DeviceAppManagement.MobileApps.Item.GraphWindowsAppX.ContentVersions.Item.Files.Item.Commit { + public class CommitPostRequestBody : 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 fileEncryptionInfo property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.FileEncryptionInfo? FileEncryptionInfo { + get { return BackingStore?.Get("fileEncryptionInfo"); } + set { BackingStore?.Set("fileEncryptionInfo", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.FileEncryptionInfo FileEncryptionInfo { + get { return BackingStore?.Get("fileEncryptionInfo"); } + set { BackingStore?.Set("fileEncryptionInfo", value); } + } +#endif + /// + /// Instantiates a new commitPostRequestBody and sets the default values. + /// + public CommitPostRequestBody() { + 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 CommitPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CommitPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"fileEncryptionInfo", n => { FileEncryptionInfo = n.GetObjectValue(Microsoft.Graph.Models.FileEncryptionInfo.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("fileEncryptionInfo", FileEncryptionInfo); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs new file mode 100644 index 00000000000..84ad957daaa --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs @@ -0,0 +1,102 @@ +// +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.MobileApps.Item.GraphWindowsAppX.ContentVersions.Item.Files.Item.Commit { + /// + /// Provides operations to call the commit method. + /// + public class CommitRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CommitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", pathParameters) { + } + /// + /// Instantiates a new CommitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", rawUrl) { + } + /// + /// Commits a file of a given app. + /// + /// 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(CommitPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(CommitPostRequestBody 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).ConfigureAwait(false); + } + /// + /// Commits a file of a given app. + /// + /// 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(CommitPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(CommitPostRequestBody 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 CommitRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CommitRequestBuilder WithUrl(string rawUrl) { + return new CommitRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CommitRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new commitRequestBuilderPostRequestConfiguration and sets the default values. + /// + public CommitRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs new file mode 100644 index 00000000000..a213e11e67f --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs @@ -0,0 +1,261 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsAppX.ContentVersions.Item.Files.Item.Commit; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsAppX.ContentVersions.Item.Files.Item.RenewUpload; +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.MobileApps.Item.GraphWindowsAppX.ContentVersions.Item.Files.Item { + /// + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// + public class MobileAppContentFileItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the commit method. + public CommitRequestBuilder Commit { get => + new CommitRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the renewUpload method. + public RenewUploadRequestBuilder RenewUpload { get => + new RenewUploadRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppContentFileItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppContentFileItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property files 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).ConfigureAwait(false); + } + /// + /// The list of files for this app content version. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property files 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(MobileAppContentFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppContentFile 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property files 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 MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of files for this app content version. + /// + /// Configuration 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property files 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(MobileAppContentFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppContentFile 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 MobileAppContentFileItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppContentFileItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppContentFileItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The list of files for this app content version. + /// + public class MobileAppContentFileItemRequestBuilderGetQueryParameters { + /// 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppContentFileItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppContentFileItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentFileItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs new file mode 100644 index 00000000000..42a70da86d6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs @@ -0,0 +1,97 @@ +// +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.MobileApps.Item.GraphWindowsAppX.ContentVersions.Item.Files.Item.RenewUpload { + /// + /// Provides operations to call the renewUpload method. + /// + public class RenewUploadRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RenewUploadRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RenewUploadRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", pathParameters) { + } + /// + /// Instantiates a new RenewUploadRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RenewUploadRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", rawUrl) { + } + /// + /// Renews the SAS URI for an application file upload. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Renews the SAS URI for an application file upload. + /// + /// Configuration 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 RenewUploadRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public RenewUploadRequestBuilder WithUrl(string rawUrl) { + return new RenewUploadRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RenewUploadRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new renewUploadRequestBuilderPostRequestConfiguration and sets the default values. + /// + public RenewUploadRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs new file mode 100644 index 00000000000..c35b2adb02c --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs @@ -0,0 +1,261 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsAppX.ContentVersions.Item.ContainedApps; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsAppX.ContentVersions.Item.Files; +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.MobileApps.Item.GraphWindowsAppX.ContentVersions.Item { + /// + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + /// + public class MobileAppContentItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + public ContainedAppsRequestBuilder ContainedApps { get => + new ContainedAppsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + public FilesRequestBuilder Files { get => + new FilesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppContentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppContentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property contentVersions 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).ConfigureAwait(false); + } + /// + /// The list of content versions for this 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property contentVersions 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(MobileAppContent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppContent 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property contentVersions 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 MobileAppContentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of content versions for this 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 MobileAppContentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property contentVersions 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(MobileAppContent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppContent 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 MobileAppContentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppContentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppContentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The list of content versions for this app. + /// + public class MobileAppContentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppContentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppContentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppContentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppContentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/GraphWindowsAppXRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/GraphWindowsAppXRequestBuilder.cs index e332cd55df6..22cc940af6e 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/GraphWindowsAppXRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/GraphWindowsAppXRequestBuilder.cs @@ -1,4 +1,7 @@ // +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsAppX.Assignments; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsAppX.Categories; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsAppX.ContentVersions; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +17,18 @@ namespace Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsAppX { /// Casts the previous resource to windowsAppX. /// public class GraphWindowsAppXRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + public AssignmentsRequestBuilder Assignments { get => + new AssignmentsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + public CategoriesRequestBuilder Categories { get => + new CategoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + public ContentVersionsRequestBuilder ContentVersions { get => + new ContentVersionsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GraphWindowsAppXRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Assignments/AssignmentsRequestBuilder.cs new file mode 100644 index 00000000000..a8f0f49b105 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Assignments/AssignmentsRequestBuilder.cs @@ -0,0 +1,246 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsMobileMSI.Assignments.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsMobileMSI.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.MobileApps.Item.GraphWindowsMobileMSI.Assignments { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp 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.mobileApp entity. + /// The unique identifier of mobileAppAssignment + public MobileAppAssignmentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppAssignment%2Did", position); + return new MobileAppAssignmentItemRequestBuilder(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/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/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/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create a new mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + /// Configuration 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 a new mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppAssignment 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public AssignmentsRequestBuilder WithUrl(string rawUrl) { + return new AssignmentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + 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/MobileApps/Item/GraphWindowsMobileMSI/Assignments/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Assignments/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..8a937c3a16c --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Assignments/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphWindowsMobileMSI.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/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/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/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphWindowsMobileMSI/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs new file mode 100644 index 00000000000..c78e10f3767 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -0,0 +1,254 @@ +// +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.MobileApps.Item.GraphWindowsMobileMSI.Assignments.Item { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppAssignmentItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Deletes a mobileAppAssignment. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the properties of a mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a mobileAppAssignment. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppAssignmentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppAssignmentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + public class MobileAppAssignmentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppAssignmentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppAssignmentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Categories/CategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Categories/CategoriesRequestBuilder.cs new file mode 100644 index 00000000000..cbe725d3d72 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Categories/CategoriesRequestBuilder.cs @@ -0,0 +1,179 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsMobileMSI.Categories.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsMobileMSI.Categories.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.MobileApps.Item.GraphWindowsMobileMSI.Categories { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class CategoriesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// The unique identifier of mobileAppCategory + public MobileAppCategoryItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppCategory%2Did", position); + return new MobileAppCategoryItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategoryCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 CategoriesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CategoriesRequestBuilder WithUrl(string rawUrl) { + return new CategoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class CategoriesRequestBuilderGetQueryParameters { + /// 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 CategoriesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CategoriesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CategoriesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new categoriesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CategoriesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Categories/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Categories/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..0059082780e --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Categories/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphWindowsMobileMSI.Categories.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/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/categories/$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/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/categories/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphWindowsMobileMSI/Categories/Item/MobileAppCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Categories/Item/MobileAppCategoryItemRequestBuilder.cs new file mode 100644 index 00000000000..84200c11c95 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Categories/Item/MobileAppCategoryItemRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.MobileApps.Item.GraphWindowsMobileMSI.Categories.Item { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppCategoryItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppCategoryItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppCategoryItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class MobileAppCategoryItemRequestBuilderGetQueryParameters { + /// 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppCategoryItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppCategoryItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppCategoryItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/ContentVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/ContentVersionsRequestBuilder.cs new file mode 100644 index 00000000000..f7737efa8a7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/ContentVersionsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.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.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions { + /// + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + /// + public class ContentVersionsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + /// The unique identifier of mobileAppContent + public MobileAppContentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppContent%2Did", position); + return new MobileAppContentItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ContentVersionsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContentVersionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ContentVersionsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContentVersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of content versions for this 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, MobileAppContentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to contentVersions 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(MobileAppContent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppContent 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of content versions for this 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 ContentVersionsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to contentVersions 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(MobileAppContent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppContent 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 ContentVersionsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ContentVersionsRequestBuilder WithUrl(string rawUrl) { + return new ContentVersionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of content versions for this app. + /// + public class ContentVersionsRequestBuilderGetQueryParameters { + /// 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 ContentVersionsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ContentVersionsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ContentVersionsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new contentVersionsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ContentVersionsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContentVersionsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new contentVersionsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ContentVersionsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..1afb6e3892b --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.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/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/$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/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs new file mode 100644 index 00000000000..012b88bce62 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.Item.ContainedApps.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.Item.ContainedApps.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.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.Item.ContainedApps { + /// + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// + public class ContainedAppsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// The unique identifier of mobileContainedApp + public MobileContainedAppItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileContainedApp%2Did", position); + return new MobileContainedAppItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ContainedAppsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContainedAppsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ContainedAppsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileContainedAppCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to containedApps 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(MobileContainedApp body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileContainedApp 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Configuration 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 ContainedAppsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to containedApps 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(MobileContainedApp body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileContainedApp 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 ContainedAppsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ContainedAppsRequestBuilder WithUrl(string rawUrl) { + return new ContainedAppsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + public class ContainedAppsRequestBuilderGetQueryParameters { + /// 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 ContainedAppsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ContainedAppsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ContainedAppsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new containedAppsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ContainedAppsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContainedAppsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new containedAppsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ContainedAppsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..068e96a328d --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.Item.ContainedApps.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/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/containedApps/$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/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/containedApps/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs new file mode 100644 index 00000000000..2547ca1f7c3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -0,0 +1,251 @@ +// +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.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.Item.ContainedApps.Item { + /// + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// + public class MobileContainedAppItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileContainedAppItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileContainedAppItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property containedApps 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).ConfigureAwait(false); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property containedApps 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(MobileContainedApp body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileContainedApp 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property containedApps 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 MobileContainedAppItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Configuration 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property containedApps 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(MobileContainedApp body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileContainedApp 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 MobileContainedAppItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileContainedAppItemRequestBuilder WithUrl(string rawUrl) { + return new MobileContainedAppItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileContainedAppItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + public class MobileContainedAppItemRequestBuilderGetQueryParameters { + /// 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileContainedAppItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileContainedAppItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileContainedAppItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..e007f6418b7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.Item.Files.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/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files/$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/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/FilesRequestBuilder.cs new file mode 100644 index 00000000000..3b37435af03 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/FilesRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.Item.Files.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.Item.Files.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.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.Item.Files { + /// + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// + public class FilesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// The unique identifier of mobileAppContentFile + public MobileAppContentFileItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppContentFile%2Did", position); + return new MobileAppContentFileItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new FilesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FilesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new FilesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of files for this app content version. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppContentFileCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to files 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(MobileAppContentFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppContentFile 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of files for this app content version. + /// + /// Configuration 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 FilesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to files 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(MobileAppContentFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppContentFile 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 FilesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public FilesRequestBuilder WithUrl(string rawUrl) { + return new FilesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of files for this app content version. + /// + public class FilesRequestBuilderGetQueryParameters { + /// 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 FilesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FilesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FilesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new filesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FilesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FilesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new filesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public FilesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs new file mode 100644 index 00000000000..edc87d57071 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs @@ -0,0 +1,65 @@ +// +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.DeviceAppManagement.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.Item.Files.Item.Commit { + public class CommitPostRequestBody : 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 fileEncryptionInfo property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.FileEncryptionInfo? FileEncryptionInfo { + get { return BackingStore?.Get("fileEncryptionInfo"); } + set { BackingStore?.Set("fileEncryptionInfo", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.FileEncryptionInfo FileEncryptionInfo { + get { return BackingStore?.Get("fileEncryptionInfo"); } + set { BackingStore?.Set("fileEncryptionInfo", value); } + } +#endif + /// + /// Instantiates a new commitPostRequestBody and sets the default values. + /// + public CommitPostRequestBody() { + 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 CommitPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CommitPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"fileEncryptionInfo", n => { FileEncryptionInfo = n.GetObjectValue(Microsoft.Graph.Models.FileEncryptionInfo.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("fileEncryptionInfo", FileEncryptionInfo); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs new file mode 100644 index 00000000000..1a041526ad5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs @@ -0,0 +1,102 @@ +// +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.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.Item.Files.Item.Commit { + /// + /// Provides operations to call the commit method. + /// + public class CommitRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CommitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", pathParameters) { + } + /// + /// Instantiates a new CommitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", rawUrl) { + } + /// + /// Commits a file of a given app. + /// + /// 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(CommitPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(CommitPostRequestBody 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).ConfigureAwait(false); + } + /// + /// Commits a file of a given app. + /// + /// 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(CommitPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(CommitPostRequestBody 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 CommitRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CommitRequestBuilder WithUrl(string rawUrl) { + return new CommitRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CommitRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new commitRequestBuilderPostRequestConfiguration and sets the default values. + /// + public CommitRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs new file mode 100644 index 00000000000..dd770725362 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs @@ -0,0 +1,261 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.Item.Files.Item.Commit; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.Item.Files.Item.RenewUpload; +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.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.Item.Files.Item { + /// + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// + public class MobileAppContentFileItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the commit method. + public CommitRequestBuilder Commit { get => + new CommitRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the renewUpload method. + public RenewUploadRequestBuilder RenewUpload { get => + new RenewUploadRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppContentFileItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppContentFileItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property files 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).ConfigureAwait(false); + } + /// + /// The list of files for this app content version. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property files 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(MobileAppContentFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppContentFile 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property files 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 MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of files for this app content version. + /// + /// Configuration 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property files 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(MobileAppContentFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppContentFile 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 MobileAppContentFileItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppContentFileItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppContentFileItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The list of files for this app content version. + /// + public class MobileAppContentFileItemRequestBuilderGetQueryParameters { + /// 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppContentFileItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppContentFileItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentFileItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs new file mode 100644 index 00000000000..623c5db5f8b --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs @@ -0,0 +1,97 @@ +// +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.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.Item.Files.Item.RenewUpload { + /// + /// Provides operations to call the renewUpload method. + /// + public class RenewUploadRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RenewUploadRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RenewUploadRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", pathParameters) { + } + /// + /// Instantiates a new RenewUploadRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RenewUploadRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", rawUrl) { + } + /// + /// Renews the SAS URI for an application file upload. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Renews the SAS URI for an application file upload. + /// + /// Configuration 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 RenewUploadRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public RenewUploadRequestBuilder WithUrl(string rawUrl) { + return new RenewUploadRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RenewUploadRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new renewUploadRequestBuilderPostRequestConfiguration and sets the default values. + /// + public RenewUploadRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs new file mode 100644 index 00000000000..8c553992577 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs @@ -0,0 +1,261 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.Item.ContainedApps; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.Item.Files; +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.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.Item { + /// + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + /// + public class MobileAppContentItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + public ContainedAppsRequestBuilder ContainedApps { get => + new ContainedAppsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + public FilesRequestBuilder Files { get => + new FilesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppContentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppContentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property contentVersions 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).ConfigureAwait(false); + } + /// + /// The list of content versions for this 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property contentVersions 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(MobileAppContent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppContent 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property contentVersions 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 MobileAppContentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of content versions for this 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 MobileAppContentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property contentVersions 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(MobileAppContent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppContent 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 MobileAppContentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppContentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppContentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The list of content versions for this app. + /// + public class MobileAppContentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppContentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppContentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppContentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppContentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/GraphWindowsMobileMSIRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/GraphWindowsMobileMSIRequestBuilder.cs index 22fb88342b9..d332faa7795 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/GraphWindowsMobileMSIRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/GraphWindowsMobileMSIRequestBuilder.cs @@ -1,4 +1,7 @@ // +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsMobileMSI.Assignments; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsMobileMSI.Categories; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +17,18 @@ namespace Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsMobile /// Casts the previous resource to windowsMobileMSI. /// public class GraphWindowsMobileMSIRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + public AssignmentsRequestBuilder Assignments { get => + new AssignmentsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + public CategoriesRequestBuilder Categories { get => + new CategoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + public ContentVersionsRequestBuilder ContentVersions { get => + new ContentVersionsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GraphWindowsMobileMSIRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Assignments/AssignmentsRequestBuilder.cs new file mode 100644 index 00000000000..b5f9c137802 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Assignments/AssignmentsRequestBuilder.cs @@ -0,0 +1,246 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.Assignments.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.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.MobileApps.Item.GraphWindowsUniversalAppX.Assignments { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp 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.mobileApp entity. + /// The unique identifier of mobileAppAssignment + public MobileAppAssignmentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppAssignment%2Did", position); + return new MobileAppAssignmentItemRequestBuilder(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/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/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/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create a new mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + /// Configuration 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 a new mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppAssignment 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public AssignmentsRequestBuilder WithUrl(string rawUrl) { + return new AssignmentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + 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/MobileApps/Item/GraphWindowsUniversalAppX/Assignments/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Assignments/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..a4037a3d87a --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Assignments/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphWindowsUniversalAppX.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/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/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/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphWindowsUniversalAppX/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs new file mode 100644 index 00000000000..c7c2c386ca3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -0,0 +1,254 @@ +// +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.MobileApps.Item.GraphWindowsUniversalAppX.Assignments.Item { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppAssignmentItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Deletes a mobileAppAssignment. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the properties of a mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a mobileAppAssignment. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppAssignmentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppAssignmentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + public class MobileAppAssignmentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppAssignmentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppAssignmentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Categories/CategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Categories/CategoriesRequestBuilder.cs new file mode 100644 index 00000000000..aebbd41c28f --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Categories/CategoriesRequestBuilder.cs @@ -0,0 +1,179 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.Categories.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.Categories.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.MobileApps.Item.GraphWindowsUniversalAppX.Categories { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class CategoriesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// The unique identifier of mobileAppCategory + public MobileAppCategoryItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppCategory%2Did", position); + return new MobileAppCategoryItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategoryCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 CategoriesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CategoriesRequestBuilder WithUrl(string rawUrl) { + return new CategoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class CategoriesRequestBuilderGetQueryParameters { + /// 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 CategoriesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CategoriesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CategoriesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new categoriesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CategoriesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Categories/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Categories/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..71eac3ed5aa --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Categories/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphWindowsUniversalAppX.Categories.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/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/categories/$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/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/categories/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphWindowsUniversalAppX/Categories/Item/MobileAppCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Categories/Item/MobileAppCategoryItemRequestBuilder.cs new file mode 100644 index 00000000000..bffc11ebdfa --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Categories/Item/MobileAppCategoryItemRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.MobileApps.Item.GraphWindowsUniversalAppX.Categories.Item { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppCategoryItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppCategoryItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppCategoryItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class MobileAppCategoryItemRequestBuilderGetQueryParameters { + /// 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppCategoryItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppCategoryItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppCategoryItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/CommittedContainedApps/CommittedContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/CommittedContainedApps/CommittedContainedAppsRequestBuilder.cs new file mode 100644 index 00000000000..5cd2e23d168 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/CommittedContainedApps/CommittedContainedAppsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.CommittedContainedApps.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.CommittedContainedApps.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.MobileApps.Item.GraphWindowsUniversalAppX.CommittedContainedApps { + /// + /// Provides operations to manage the committedContainedApps property of the microsoft.graph.windowsUniversalAppX entity. + /// + public class CommittedContainedAppsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the committedContainedApps property of the microsoft.graph.windowsUniversalAppX entity. + /// The unique identifier of mobileContainedApp + public MobileContainedAppItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileContainedApp%2Did", position); + return new MobileContainedAppItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new CommittedContainedAppsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommittedContainedAppsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/committedContainedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CommittedContainedAppsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommittedContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/committedContainedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The collection of contained apps in the committed mobileAppContent of a windowsUniversalAppX 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, MobileContainedAppCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to committedContainedApps 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(MobileContainedApp body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileContainedApp 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The collection of contained apps in the committed mobileAppContent of a windowsUniversalAppX 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 CommittedContainedAppsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to committedContainedApps 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(MobileContainedApp body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileContainedApp 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 CommittedContainedAppsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CommittedContainedAppsRequestBuilder WithUrl(string rawUrl) { + return new CommittedContainedAppsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The collection of contained apps in the committed mobileAppContent of a windowsUniversalAppX app. + /// + public class CommittedContainedAppsRequestBuilderGetQueryParameters { + /// 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 CommittedContainedAppsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CommittedContainedAppsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CommittedContainedAppsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new committedContainedAppsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CommittedContainedAppsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CommittedContainedAppsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new committedContainedAppsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public CommittedContainedAppsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/CommittedContainedApps/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/CommittedContainedApps/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..c70c1f33b57 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/CommittedContainedApps/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphWindowsUniversalAppX.CommittedContainedApps.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/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/committedContainedApps/$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/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/committedContainedApps/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphWindowsUniversalAppX/CommittedContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/CommittedContainedApps/Item/MobileContainedAppItemRequestBuilder.cs new file mode 100644 index 00000000000..00d4b85e1bd --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/CommittedContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -0,0 +1,251 @@ +// +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.MobileApps.Item.GraphWindowsUniversalAppX.CommittedContainedApps.Item { + /// + /// Provides operations to manage the committedContainedApps property of the microsoft.graph.windowsUniversalAppX entity. + /// + public class MobileContainedAppItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileContainedAppItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/committedContainedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileContainedAppItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/committedContainedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property committedContainedApps 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).ConfigureAwait(false); + } + /// + /// The collection of contained apps in the committed mobileAppContent of a windowsUniversalAppX 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property committedContainedApps 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(MobileContainedApp body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileContainedApp 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property committedContainedApps 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 MobileContainedAppItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The collection of contained apps in the committed mobileAppContent of a windowsUniversalAppX 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property committedContainedApps 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(MobileContainedApp body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileContainedApp 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 MobileContainedAppItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileContainedAppItemRequestBuilder WithUrl(string rawUrl) { + return new MobileContainedAppItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileContainedAppItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The collection of contained apps in the committed mobileAppContent of a windowsUniversalAppX app. + /// + public class MobileContainedAppItemRequestBuilderGetQueryParameters { + /// 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileContainedAppItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileContainedAppItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileContainedAppItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/ContentVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/ContentVersionsRequestBuilder.cs new file mode 100644 index 00000000000..4c9b91204cb --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/ContentVersionsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.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.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions { + /// + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + /// + public class ContentVersionsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + /// The unique identifier of mobileAppContent + public MobileAppContentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppContent%2Did", position); + return new MobileAppContentItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ContentVersionsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContentVersionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ContentVersionsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContentVersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of content versions for this 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, MobileAppContentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to contentVersions 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(MobileAppContent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppContent 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of content versions for this 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 ContentVersionsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to contentVersions 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(MobileAppContent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppContent 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 ContentVersionsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ContentVersionsRequestBuilder WithUrl(string rawUrl) { + return new ContentVersionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of content versions for this app. + /// + public class ContentVersionsRequestBuilderGetQueryParameters { + /// 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 ContentVersionsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ContentVersionsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ContentVersionsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new contentVersionsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ContentVersionsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContentVersionsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new contentVersionsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ContentVersionsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..87ed671542e --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.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/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/$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/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs new file mode 100644 index 00000000000..092455c46fc --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.Item.ContainedApps.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.Item.ContainedApps.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.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.Item.ContainedApps { + /// + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// + public class ContainedAppsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// The unique identifier of mobileContainedApp + public MobileContainedAppItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileContainedApp%2Did", position); + return new MobileContainedAppItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ContainedAppsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContainedAppsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ContainedAppsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileContainedAppCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to containedApps 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(MobileContainedApp body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileContainedApp 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Configuration 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 ContainedAppsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to containedApps 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(MobileContainedApp body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileContainedApp 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 ContainedAppsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ContainedAppsRequestBuilder WithUrl(string rawUrl) { + return new ContainedAppsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + public class ContainedAppsRequestBuilderGetQueryParameters { + /// 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 ContainedAppsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ContainedAppsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ContainedAppsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new containedAppsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ContainedAppsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ContainedAppsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new containedAppsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ContainedAppsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..9219044f564 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/ContainedApps/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.Item.ContainedApps.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/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/containedApps/$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/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/containedApps/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs new file mode 100644 index 00000000000..83dfd577ba2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -0,0 +1,251 @@ +// +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.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.Item.ContainedApps.Item { + /// + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + /// + public class MobileContainedAppItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileContainedAppItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileContainedAppItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property containedApps 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).ConfigureAwait(false); + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property containedApps 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(MobileContainedApp body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileContainedApp 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, MobileContainedApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property containedApps 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 MobileContainedAppItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + /// Configuration 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property containedApps 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(MobileContainedApp body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileContainedApp 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 MobileContainedAppItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileContainedAppItemRequestBuilder WithUrl(string rawUrl) { + return new MobileContainedAppItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileContainedAppItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The collection of contained apps in a MobileLobApp acting as a package. + /// + public class MobileContainedAppItemRequestBuilderGetQueryParameters { + /// 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 MobileContainedAppItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileContainedAppItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileContainedAppItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileContainedAppItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileContainedAppItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileContainedAppItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..32b97df0a52 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.Item.Files.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/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files/$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/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/FilesRequestBuilder.cs new file mode 100644 index 00000000000..a299359ea30 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/FilesRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.Item.Files.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.Item.Files.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.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.Item.Files { + /// + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// + public class FilesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// The unique identifier of mobileAppContentFile + public MobileAppContentFileItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppContentFile%2Did", position); + return new MobileAppContentFileItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new FilesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FilesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new FilesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of files for this app content version. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppContentFileCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to files 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(MobileAppContentFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppContentFile 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of files for this app content version. + /// + /// Configuration 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 FilesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to files 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(MobileAppContentFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppContentFile 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 FilesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public FilesRequestBuilder WithUrl(string rawUrl) { + return new FilesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of files for this app content version. + /// + public class FilesRequestBuilderGetQueryParameters { + /// 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 FilesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FilesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FilesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new filesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FilesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FilesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new filesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public FilesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs new file mode 100644 index 00000000000..e55af18f0f2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs @@ -0,0 +1,65 @@ +// +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.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.Item.Files.Item.Commit { + public class CommitPostRequestBody : 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 fileEncryptionInfo property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.FileEncryptionInfo? FileEncryptionInfo { + get { return BackingStore?.Get("fileEncryptionInfo"); } + set { BackingStore?.Set("fileEncryptionInfo", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.FileEncryptionInfo FileEncryptionInfo { + get { return BackingStore?.Get("fileEncryptionInfo"); } + set { BackingStore?.Set("fileEncryptionInfo", value); } + } +#endif + /// + /// Instantiates a new commitPostRequestBody and sets the default values. + /// + public CommitPostRequestBody() { + 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 CommitPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CommitPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"fileEncryptionInfo", n => { FileEncryptionInfo = n.GetObjectValue(Microsoft.Graph.Models.FileEncryptionInfo.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("fileEncryptionInfo", FileEncryptionInfo); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs new file mode 100644 index 00000000000..66debd147b2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs @@ -0,0 +1,102 @@ +// +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.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.Item.Files.Item.Commit { + /// + /// Provides operations to call the commit method. + /// + public class CommitRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CommitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", pathParameters) { + } + /// + /// Instantiates a new CommitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", rawUrl) { + } + /// + /// Commits a file of a given app. + /// + /// 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(CommitPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(CommitPostRequestBody 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).ConfigureAwait(false); + } + /// + /// Commits a file of a given app. + /// + /// 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(CommitPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(CommitPostRequestBody 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 CommitRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CommitRequestBuilder WithUrl(string rawUrl) { + return new CommitRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CommitRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new commitRequestBuilderPostRequestConfiguration and sets the default values. + /// + public CommitRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs new file mode 100644 index 00000000000..a7644213618 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs @@ -0,0 +1,261 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.Item.Files.Item.Commit; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.Item.Files.Item.RenewUpload; +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.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.Item.Files.Item { + /// + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + /// + public class MobileAppContentFileItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the commit method. + public CommitRequestBuilder Commit { get => + new CommitRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the renewUpload method. + public RenewUploadRequestBuilder RenewUpload { get => + new RenewUploadRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppContentFileItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppContentFileItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property files 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).ConfigureAwait(false); + } + /// + /// The list of files for this app content version. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property files 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(MobileAppContentFile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppContentFile 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, MobileAppContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property files 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 MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of files for this app content version. + /// + /// Configuration 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property files 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(MobileAppContentFile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppContentFile 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 MobileAppContentFileItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppContentFileItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppContentFileItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The list of files for this app content version. + /// + public class MobileAppContentFileItemRequestBuilderGetQueryParameters { + /// 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 MobileAppContentFileItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppContentFileItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppContentFileItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentFileItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentFileItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppContentFileItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs new file mode 100644 index 00000000000..e22ae1abed6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Item/RenewUpload/RenewUploadRequestBuilder.cs @@ -0,0 +1,97 @@ +// +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.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.Item.Files.Item.RenewUpload { + /// + /// Provides operations to call the renewUpload method. + /// + public class RenewUploadRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RenewUploadRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RenewUploadRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", pathParameters) { + } + /// + /// Instantiates a new RenewUploadRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RenewUploadRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", rawUrl) { + } + /// + /// Renews the SAS URI for an application file upload. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Renews the SAS URI for an application file upload. + /// + /// Configuration 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 RenewUploadRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public RenewUploadRequestBuilder WithUrl(string rawUrl) { + return new RenewUploadRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RenewUploadRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new renewUploadRequestBuilderPostRequestConfiguration and sets the default values. + /// + public RenewUploadRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs new file mode 100644 index 00000000000..0cd796004dd --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs @@ -0,0 +1,261 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.Item.ContainedApps; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.Item.Files; +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.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.Item { + /// + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + /// + public class MobileAppContentItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + public ContainedAppsRequestBuilder ContainedApps { get => + new ContainedAppsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + public FilesRequestBuilder Files { get => + new FilesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppContentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppContentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property contentVersions 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).ConfigureAwait(false); + } + /// + /// The list of content versions for this 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property contentVersions 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(MobileAppContent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppContent 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, MobileAppContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property contentVersions 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 MobileAppContentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The list of content versions for this 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 MobileAppContentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property contentVersions 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(MobileAppContent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppContent 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 MobileAppContentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppContentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppContentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The list of content versions for this app. + /// + public class MobileAppContentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppContentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppContentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppContentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppContentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppContentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppContentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppContentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/GraphWindowsUniversalAppXRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/GraphWindowsUniversalAppXRequestBuilder.cs index 174c73c7190..1d246ec66f7 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/GraphWindowsUniversalAppXRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/GraphWindowsUniversalAppXRequestBuilder.cs @@ -1,4 +1,8 @@ // +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.Assignments; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.Categories; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.CommittedContainedApps; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +18,22 @@ namespace Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsUniver /// Casts the previous resource to windowsUniversalAppX. /// public class GraphWindowsUniversalAppXRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + public AssignmentsRequestBuilder Assignments { get => + new AssignmentsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + public CategoriesRequestBuilder Categories { get => + new CategoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the committedContainedApps property of the microsoft.graph.windowsUniversalAppX entity. + public CommittedContainedAppsRequestBuilder CommittedContainedApps { get => + new CommittedContainedAppsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + public ContentVersionsRequestBuilder ContentVersions { get => + new ContentVersionsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GraphWindowsUniversalAppXRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Assignments/AssignmentsRequestBuilder.cs new file mode 100644 index 00000000000..3bae831e620 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Assignments/AssignmentsRequestBuilder.cs @@ -0,0 +1,246 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsWebApp.Assignments.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsWebApp.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.MobileApps.Item.GraphWindowsWebApp.Assignments { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp 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.mobileApp entity. + /// The unique identifier of mobileAppAssignment + public MobileAppAssignmentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppAssignment%2Did", position); + return new MobileAppAssignmentItemRequestBuilder(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/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/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/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create a new mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + /// Configuration 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 a new mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppAssignment 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public AssignmentsRequestBuilder WithUrl(string rawUrl) { + return new AssignmentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List properties and relationships of the mobileAppAssignment objects. + /// + 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/MobileApps/Item/GraphWindowsWebApp/Assignments/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Assignments/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..32bf52c9e40 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Assignments/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphWindowsWebApp.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/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/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/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphWindowsWebApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs new file mode 100644 index 00000000000..52891215acf --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -0,0 +1,254 @@ +// +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.MobileApps.Item.GraphWindowsWebApp.Assignments.Item { + /// + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppAssignmentItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppAssignmentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Deletes a mobileAppAssignment. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the properties of a mobileAppAssignment object. + /// Find more info here + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppAssignment 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, MobileAppAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a mobileAppAssignment. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + /// Configuration 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a mobileAppAssignment object. + /// + /// 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(MobileAppAssignment body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppAssignment 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 MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppAssignmentItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppAssignmentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the mobileAppAssignment object. + /// + public class MobileAppAssignmentItemRequestBuilderGetQueryParameters { + /// 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 MobileAppAssignmentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppAssignmentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppAssignmentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppAssignmentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Categories/CategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Categories/CategoriesRequestBuilder.cs new file mode 100644 index 00000000000..73fe2224309 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Categories/CategoriesRequestBuilder.cs @@ -0,0 +1,179 @@ +// +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsWebApp.Categories.Count; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsWebApp.Categories.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.MobileApps.Item.GraphWindowsWebApp.Categories { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class CategoriesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// The unique identifier of mobileAppCategory + public MobileAppCategoryItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("mobileAppCategory%2Did", position); + return new MobileAppCategoryItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CategoriesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategoryCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 CategoriesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CategoriesRequestBuilder WithUrl(string rawUrl) { + return new CategoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class CategoriesRequestBuilderGetQueryParameters { + /// 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 CategoriesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CategoriesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CategoriesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new categoriesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CategoriesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Categories/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Categories/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..0887fb30e64 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Categories/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.MobileApps.Item.GraphWindowsWebApp.Categories.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/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/categories/$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/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/categories/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/MobileApps/Item/GraphWindowsWebApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs new file mode 100644 index 00000000000..1192afcf24d --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Categories/Item/MobileAppCategoryItemRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.MobileApps.Item.GraphWindowsWebApp.Categories.Item { + /// + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + /// + public class MobileAppCategoryItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppCategoryItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// The list of categories for this 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, MobileAppCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The list of categories for this 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public MobileAppCategoryItemRequestBuilder WithUrl(string rawUrl) { + return new MobileAppCategoryItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The list of categories for this app. + /// + public class MobileAppCategoryItemRequestBuilderGetQueryParameters { + /// 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 MobileAppCategoryItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppCategoryItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppCategoryItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppCategoryItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppCategoryItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/GraphWindowsWebAppRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/GraphWindowsWebAppRequestBuilder.cs index 20892343429..e5671badd2a 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/GraphWindowsWebAppRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/GraphWindowsWebAppRequestBuilder.cs @@ -1,4 +1,6 @@ // +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsWebApp.Assignments; +using Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsWebApp.Categories; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +16,14 @@ namespace Microsoft.Graph.DeviceAppManagement.MobileApps.Item.GraphWindowsWebApp /// Casts the previous resource to windowsWebApp. /// public class GraphWindowsWebAppRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + public AssignmentsRequestBuilder Assignments { get => + new AssignmentsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + public CategoriesRequestBuilder Categories { get => + new CategoriesRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GraphWindowsWebAppRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/MobileAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/MobileAppItemRequestBuilder.cs index e170f0c688b..9e5dff5f771 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/MobileAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/MobileAppItemRequestBuilder.cs @@ -144,8 +144,8 @@ public async Task DeleteAsync(Action - /// Read properties and relationships of the webApp object. - /// Find more info here + /// Read properties and relationships of the windowsUniversalAppX object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -164,8 +164,8 @@ public async Task GetAsync(Action(requestInfo, MobileApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the properties of a windowsMicrosoftEdgeApp object. - /// Find more info here + /// Update the properties of a macOSLobApp object. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -210,7 +210,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Read properties and relationships of the webApp object. + /// Read properties and relationships of the windowsUniversalAppX object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -236,7 +236,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the properties of a windowsMicrosoftEdgeApp object. + /// Update the properties of a macOSLobApp object. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. @@ -287,7 +287,7 @@ public MobileAppItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Read properties and relationships of the webApp object. + /// Read properties and relationships of the windowsUniversalAppX object. /// public class MobileAppItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/MobileAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/MobileAppsRequestBuilder.cs index f6cc8a932d5..14b3d869387 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/MobileAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/MobileAppsRequestBuilder.cs @@ -122,8 +122,8 @@ public MobileAppsRequestBuilder(Dictionary pathParameters, IRequ public MobileAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// List properties and relationships of the win32LobApp objects. - /// Find more info here + /// List properties and relationships of the windowsMicrosoftEdgeApp objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -142,8 +142,8 @@ public async Task GetAsync(Action(requestInfo, MobileAppCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Create a new managedIOSStoreApp object. - /// Find more info here + /// Create a new windowsMobileMSI object. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -164,7 +164,7 @@ public async Task PostAsync(MobileApp body, Action(requestInfo, MobileApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List properties and relationships of the win32LobApp objects. + /// List properties and relationships of the windowsMicrosoftEdgeApp objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -190,7 +190,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new managedIOSStoreApp object. + /// Create a new windowsMobileMSI object. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. @@ -225,7 +225,7 @@ public MobileAppsRequestBuilder WithUrl(string rawUrl) { return new MobileAppsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List properties and relationships of the win32LobApp objects. + /// List properties and relationships of the windowsMicrosoftEdgeApp objects. /// public class MobileAppsRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/DeviceCompliancePoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/DeviceCompliancePoliciesRequestBuilder.cs index f6ef9863fe3..70625fa6f6d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/DeviceCompliancePoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/DeviceCompliancePoliciesRequestBuilder.cs @@ -42,8 +42,8 @@ public DeviceCompliancePoliciesRequestBuilder(Dictionary pathPar public DeviceCompliancePoliciesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// List properties and relationships of the androidWorkProfileCompliancePolicy objects. - /// Find more info here + /// List properties and relationships of the windows10CompliancePolicy objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -62,8 +62,8 @@ public async Task GetAsync(Action(requestInfo, DeviceCompliancePolicyCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Create a new macOSCompliancePolicy object. - /// Find more info here + /// Create a new androidCompliancePolicy object. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -84,7 +84,7 @@ public async Task PostAsync(DeviceCompliancePolicy body, return await RequestAdapter.SendAsync(requestInfo, DeviceCompliancePolicy.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List properties and relationships of the androidWorkProfileCompliancePolicy objects. + /// List properties and relationships of the windows10CompliancePolicy objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -110,7 +110,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new macOSCompliancePolicy object. + /// Create a new androidCompliancePolicy object. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. @@ -145,7 +145,7 @@ public DeviceCompliancePoliciesRequestBuilder WithUrl(string rawUrl) { return new DeviceCompliancePoliciesRequestBuilder(rawUrl, RequestAdapter); } /// - /// List properties and relationships of the androidWorkProfileCompliancePolicy objects. + /// List properties and relationships of the windows10CompliancePolicy objects. /// public class DeviceCompliancePoliciesRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceCompliancePolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceCompliancePolicyItemRequestBuilder.cs index 0b9f633514e..2e3fc621c05 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceCompliancePolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceCompliancePolicyItemRequestBuilder.cs @@ -74,8 +74,8 @@ public DeviceCompliancePolicyItemRequestBuilder(Dictionary pathP public DeviceCompliancePolicyItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}{?%24select,%24expand}", rawUrl) { } /// - /// Deletes a androidCompliancePolicy. - /// Find more info here + /// Deletes a windows81CompliancePolicy. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -94,8 +94,8 @@ public async Task DeleteAsync(Action - /// Read properties and relationships of the windows81CompliancePolicy object. - /// Find more info here + /// Read properties and relationships of the windows10MobileCompliancePolicy object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -136,7 +136,7 @@ public async Task PatchAsync(DeviceCompliancePolicy body return await RequestAdapter.SendAsync(requestInfo, DeviceCompliancePolicy.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Deletes a androidCompliancePolicy. + /// Deletes a windows81CompliancePolicy. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -160,7 +160,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Read properties and relationships of the windows81CompliancePolicy object. + /// Read properties and relationships of the windows10MobileCompliancePolicy object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -237,7 +237,7 @@ public DeviceCompliancePolicyItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Read properties and relationships of the windows81CompliancePolicy object. + /// Read properties and relationships of the windows10MobileCompliancePolicy object. /// public class DeviceCompliancePolicyItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/DeviceConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/DeviceConfigurationsRequestBuilder.cs index f58c025ad00..3e7c24ed148 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/DeviceConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/DeviceConfigurationsRequestBuilder.cs @@ -42,8 +42,8 @@ public DeviceConfigurationsRequestBuilder(Dictionary pathParamet public DeviceConfigurationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/deviceConfigurations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// List properties and relationships of the windows10EndpointProtectionConfiguration objects. - /// Find more info here + /// List properties and relationships of the windows10GeneralConfiguration objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -62,8 +62,8 @@ public async Task GetAsync(Action(requestInfo, DeviceConfigurationCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Create a new macOSCustomConfiguration object. - /// Find more info here + /// Create a new macOSDeviceFeaturesConfiguration object. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -84,7 +84,7 @@ public async Task PostAsync(DeviceConfiguration body, Actio return await RequestAdapter.SendAsync(requestInfo, DeviceConfiguration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List properties and relationships of the windows10EndpointProtectionConfiguration objects. + /// List properties and relationships of the windows10GeneralConfiguration objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -110,7 +110,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new macOSCustomConfiguration object. + /// Create a new macOSDeviceFeaturesConfiguration object. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. @@ -145,7 +145,7 @@ public DeviceConfigurationsRequestBuilder WithUrl(string rawUrl) { return new DeviceConfigurationsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List properties and relationships of the windows10EndpointProtectionConfiguration objects. + /// List properties and relationships of the windows10GeneralConfiguration objects. /// public class DeviceConfigurationsRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceConfigurationItemRequestBuilder.cs index 36ee03c9377..09a1a032be8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceConfigurationItemRequestBuilder.cs @@ -65,8 +65,8 @@ public DeviceConfigurationItemRequestBuilder(Dictionary pathPara public DeviceConfigurationItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}{?%24select,%24expand}", rawUrl) { } /// - /// Deletes a windows10EnterpriseModernAppManagementConfiguration. - /// Find more info here + /// Deletes a androidWorkProfileCustomConfiguration. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -85,8 +85,8 @@ public async Task DeleteAsync(Action - /// Read properties and relationships of the androidWorkProfileCustomConfiguration object. - /// Find more info here + /// Read properties and relationships of the windowsPhone81CustomConfiguration object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -113,8 +113,8 @@ public GetOmaSettingPlainTextValueWithSecretReferenceValueIdRequestBuilder GetOm return new GetOmaSettingPlainTextValueWithSecretReferenceValueIdRequestBuilder(PathParameters, RequestAdapter, secretReferenceValueId); } /// - /// Update the properties of a windows81GeneralConfiguration object. - /// Find more info here + /// Update the properties of a windows10TeamGeneralConfiguration object. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -135,7 +135,7 @@ public async Task PatchAsync(DeviceConfiguration body, Acti return await RequestAdapter.SendAsync(requestInfo, DeviceConfiguration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Deletes a windows10EnterpriseModernAppManagementConfiguration. + /// Deletes a androidWorkProfileCustomConfiguration. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -159,7 +159,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Read properties and relationships of the androidWorkProfileCustomConfiguration object. + /// Read properties and relationships of the windowsPhone81CustomConfiguration object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -185,7 +185,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the properties of a windows81GeneralConfiguration object. + /// Update the properties of a windows10TeamGeneralConfiguration object. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. @@ -236,7 +236,7 @@ public DeviceConfigurationItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Read properties and relationships of the androidWorkProfileCustomConfiguration object. + /// Read properties and relationships of the windowsPhone81CustomConfiguration object. /// public class DeviceConfigurationItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/DeviceEnrollmentConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/DeviceEnrollmentConfigurationsRequestBuilder.cs index e434e467e54..0f8b3e5174a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/DeviceEnrollmentConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/DeviceEnrollmentConfigurationsRequestBuilder.cs @@ -62,8 +62,8 @@ public async Task GetAsync(Acti return await RequestAdapter.SendAsync(requestInfo, DeviceEnrollmentConfigurationCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Create a new deviceEnrollmentWindowsHelloForBusinessConfiguration object. - /// Find more info here + /// Create a new deviceEnrollmentLimitConfiguration object. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -110,7 +110,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new deviceEnrollmentWindowsHelloForBusinessConfiguration object. + /// Create a new deviceEnrollmentLimitConfiguration object. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/DeviceEnrollmentConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/DeviceEnrollmentConfigurationItemRequestBuilder.cs index 699c68e36fe..2b49ef6cb06 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/DeviceEnrollmentConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/DeviceEnrollmentConfigurationItemRequestBuilder.cs @@ -64,8 +64,8 @@ public async Task DeleteAsync(Action - /// Read properties and relationships of the deviceEnrollmentConfiguration object. - /// Find more info here + /// Read properties and relationships of the deviceEnrollmentWindowsHelloForBusinessConfiguration object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -130,7 +130,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Read properties and relationships of the deviceEnrollmentConfiguration object. + /// Read properties and relationships of the deviceEnrollmentWindowsHelloForBusinessConfiguration object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -207,7 +207,7 @@ public DeviceEnrollmentConfigurationItemRequestBuilderDeleteRequestConfiguration } } /// - /// Read properties and relationships of the deviceEnrollmentConfiguration object. + /// Read properties and relationships of the deviceEnrollmentWindowsHelloForBusinessConfiguration object. /// public class DeviceEnrollmentConfigurationItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementRequestBuilder.cs index 230c9dc9b8b..37a6011c7b7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementRequestBuilder.cs @@ -322,7 +322,7 @@ public DeviceManagementRequestBuilder(string rawUrl, IRequestAdapter requestAdap } /// /// Read properties and relationships of the deviceManagement object. - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -350,7 +350,7 @@ public GetEffectivePermissionsWithScopeRequestBuilder GetEffectivePermissionsWit } /// /// Update the properties of a deviceManagement object. - /// Find more info here + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/Item/RoleDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/Item/RoleDefinitionItemRequestBuilder.cs index fe2e9f90063..e2165d3390f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/Item/RoleDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/Item/RoleDefinitionItemRequestBuilder.cs @@ -34,8 +34,8 @@ public RoleDefinitionItemRequestBuilder(Dictionary pathParameter public RoleDefinitionItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/roleDefinitions/{roleDefinition%2Did}{?%24select,%24expand}", rawUrl) { } /// - /// Deletes a roleDefinition. - /// Find more info here + /// Deletes a deviceAndAppManagementRoleDefinition. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -74,8 +74,8 @@ public async Task DeleteAsync(Action(requestInfo, Microsoft.Graph.Models.RoleDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the properties of a roleDefinition object. - /// Find more info here + /// Update the properties of a deviceAndAppManagementRoleDefinition object. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action(requestInfo, Microsoft.Graph.Models.RoleDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Deletes a roleDefinition. + /// Deletes a deviceAndAppManagementRoleDefinition. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -146,7 +146,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the properties of a roleDefinition object. + /// Update the properties of a deviceAndAppManagementRoleDefinition object. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/RoleDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/RoleDefinitionsRequestBuilder.cs index 36cecfdb580..ab784a02a38 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/RoleDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/RoleDefinitionsRequestBuilder.cs @@ -42,8 +42,8 @@ public RoleDefinitionsRequestBuilder(Dictionary pathParameters, public RoleDefinitionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/roleDefinitions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// List properties and relationships of the roleDefinition objects. - /// Find more info here + /// List properties and relationships of the deviceAndAppManagementRoleDefinition objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -62,8 +62,8 @@ public async Task GetAsync(Action(requestInfo, RoleDefinitionCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Create a new roleDefinition object. - /// Find more info here + /// Create a new deviceAndAppManagementRoleDefinition object. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -84,7 +84,7 @@ public async Task GetAsync(Action(requestInfo, Microsoft.Graph.Models.RoleDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List properties and relationships of the roleDefinition objects. + /// List properties and relationships of the deviceAndAppManagementRoleDefinition objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -110,7 +110,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new roleDefinition object. + /// Create a new deviceAndAppManagementRoleDefinition object. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. @@ -145,7 +145,7 @@ public RoleDefinitionsRequestBuilder WithUrl(string rawUrl) { return new RoleDefinitionsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List properties and relationships of the roleDefinition objects. + /// List properties and relationships of the deviceAndAppManagementRoleDefinition objects. /// public class RoleDefinitionsRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/DeletedItemsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/DeletedItemsRequestBuilder.cs index 598e3976ae2..bf1f83196b3 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/DeletedItemsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/DeletedItemsRequestBuilder.cs @@ -1,8 +1,5 @@ // using Microsoft.Graph.DirectoryNamespace.DeletedItems.Count; -using Microsoft.Graph.DirectoryNamespace.DeletedItems.Delta; -using Microsoft.Graph.DirectoryNamespace.DeletedItems.GetAvailableExtensionProperties; -using Microsoft.Graph.DirectoryNamespace.DeletedItems.GetByIds; using Microsoft.Graph.DirectoryNamespace.DeletedItems.GraphAdministrativeUnit; using Microsoft.Graph.DirectoryNamespace.DeletedItems.GraphApplication; using Microsoft.Graph.DirectoryNamespace.DeletedItems.GraphDevice; @@ -10,7 +7,6 @@ using Microsoft.Graph.DirectoryNamespace.DeletedItems.GraphServicePrincipal; using Microsoft.Graph.DirectoryNamespace.DeletedItems.GraphUser; using Microsoft.Graph.DirectoryNamespace.DeletedItems.Item; -using Microsoft.Graph.DirectoryNamespace.DeletedItems.ValidateProperties; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -30,18 +26,6 @@ public class DeletedItemsRequestBuilder : BaseRequestBuilder { public CountRequestBuilder Count { get => new CountRequestBuilder(PathParameters, RequestAdapter); } - /// Provides operations to call the delta method. - public DeltaRequestBuilder Delta { get => - new DeltaRequestBuilder(PathParameters, RequestAdapter); - } - /// Provides operations to call the getAvailableExtensionProperties method. - public GetAvailableExtensionPropertiesRequestBuilder GetAvailableExtensionProperties { get => - new GetAvailableExtensionPropertiesRequestBuilder(PathParameters, RequestAdapter); - } - /// Provides operations to call the getByIds method. - public GetByIdsRequestBuilder GetByIds { get => - new GetByIdsRequestBuilder(PathParameters, RequestAdapter); - } /// Casts the previous resource to administrativeUnit. public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); @@ -66,10 +50,6 @@ public class DeletedItemsRequestBuilder : BaseRequestBuilder { public GraphUserRequestBuilder GraphUser { get => new GraphUserRequestBuilder(PathParameters, RequestAdapter); } - /// Provides operations to call the validateProperties method. - public ValidatePropertiesRequestBuilder ValidateProperties { get => - new ValidatePropertiesRequestBuilder(PathParameters, RequestAdapter); - } /// Provides operations to manage the deletedItems property of the microsoft.graph.directory entity. /// The unique identifier of directoryObject public DirectoryObjectItemRequestBuilder this[string position] { get { @@ -111,27 +91,6 @@ public async Task GetAsync(Action(requestInfo, DirectoryObjectCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Create new navigation property to deletedItems for directory - /// - /// 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(DirectoryObject body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(DirectoryObject 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, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); - } - /// /// Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. /// /// Configuration for the request such as headers, query parameters, and middleware options. @@ -158,34 +117,6 @@ public RequestInformation ToGetRequestInformation(Action - /// Create new navigation property to deletedItems for directory - /// - /// 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(DirectoryObject body, Action? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(DirectoryObject 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 DeletedItemsRequestBuilderPostRequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } - return requestInfo; - } - /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// /// The raw URL to use for the request builder. @@ -274,21 +205,5 @@ public DeletedItemsRequestBuilderGetRequestConfiguration() { Headers = new RequestHeaders(); } } - /// - /// Configuration for the request such as headers, query parameters, and middleware options. - /// - public class DeletedItemsRequestBuilderPostRequestConfiguration { - /// Request headers - public RequestHeaders Headers { get; set; } - /// Request options - public IList Options { get; set; } - /// - /// Instantiates a new deletedItemsRequestBuilderPostRequestConfiguration and sets the default values. - /// - public DeletedItemsRequestBuilderPostRequestConfiguration() { - Options = new List(); - Headers = new RequestHeaders(); - } - } } } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetAvailableExtensionProperties/GetAvailableExtensionPropertiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetAvailableExtensionProperties/GetAvailableExtensionPropertiesRequestBuilder.cs deleted file mode 100644 index 40af4f1ac16..00000000000 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetAvailableExtensionProperties/GetAvailableExtensionPropertiesRequestBuilder.cs +++ /dev/null @@ -1,104 +0,0 @@ -// -using Microsoft.Graph.Models.ODataErrors; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace Microsoft.Graph.DirectoryNamespace.DeletedItems.GetAvailableExtensionProperties { - /// - /// Provides operations to call the getAvailableExtensionProperties method. - /// - public class GetAvailableExtensionPropertiesRequestBuilder : BaseRequestBuilder { - /// - /// Instantiates a new GetAvailableExtensionPropertiesRequestBuilder and sets the default values. - /// - /// Path parameters for the request - /// The request adapter to use to execute the requests. - public GetAvailableExtensionPropertiesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directory/deletedItems/getAvailableExtensionProperties", pathParameters) { - } - /// - /// Instantiates a new GetAvailableExtensionPropertiesRequestBuilder and sets the default values. - /// - /// The raw URL to use for the request builder. - /// The request adapter to use to execute the requests. - public GetAvailableExtensionPropertiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directory/deletedItems/getAvailableExtensionProperties", rawUrl) { - } - /// - /// Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization - /// Find more info here - /// - /// 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(GetAvailableExtensionPropertiesPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(GetAvailableExtensionPropertiesPostRequestBody 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, GetAvailableExtensionPropertiesResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); - } - /// - /// Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ 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(GetAvailableExtensionPropertiesPostRequestBody body, Action? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(GetAvailableExtensionPropertiesPostRequestBody 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 GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } - return requestInfo; - } - /// - /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - /// - /// The raw URL to use for the request builder. - public GetAvailableExtensionPropertiesRequestBuilder WithUrl(string rawUrl) { - return new GetAvailableExtensionPropertiesRequestBuilder(rawUrl, RequestAdapter); - } - /// - /// Configuration for the request such as headers, query parameters, and middleware options. - /// - public class GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration { - /// Request headers - public RequestHeaders Headers { get; set; } - /// Request options - public IList Options { get; set; } - /// - /// Instantiates a new getAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration and sets the default values. - /// - public GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration() { - Options = new List(); - Headers = new RequestHeaders(); - } - } - } -} diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsPostRequestBody.cs deleted file mode 100644 index 55bcb25e4f2..00000000000 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsPostRequestBody.cs +++ /dev/null @@ -1,80 +0,0 @@ -// -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.DirectoryNamespace.DeletedItems.GetByIds { - public class GetByIdsPostRequestBody : 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 ids property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public List? Ids { - get { return BackingStore?.Get?>("ids"); } - set { BackingStore?.Set("ids", value); } - } -#nullable restore -#else - public List Ids { - get { return BackingStore?.Get>("ids"); } - set { BackingStore?.Set("ids", value); } - } -#endif - /// The types property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public List? Types { - get { return BackingStore?.Get?>("types"); } - set { BackingStore?.Set("types", value); } - } -#nullable restore -#else - public List Types { - get { return BackingStore?.Get>("types"); } - set { BackingStore?.Set("types", value); } - } -#endif - /// - /// Instantiates a new getByIdsPostRequestBody and sets the default values. - /// - public GetByIdsPostRequestBody() { - 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 GetByIdsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new GetByIdsPostRequestBody(); - } - /// - /// The deserialization information for the current model - /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"ids", n => { Ids = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"types", n => { Types = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - }; - } - /// - /// 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.WriteCollectionOfPrimitiveValues("ids", Ids); - writer.WriteCollectionOfPrimitiveValues("types", Types); - writer.WriteAdditionalData(AdditionalData); - } - } -} diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs deleted file mode 100644 index ec82a7ea800..00000000000 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs +++ /dev/null @@ -1,104 +0,0 @@ -// -using Microsoft.Graph.Models.ODataErrors; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace Microsoft.Graph.DirectoryNamespace.DeletedItems.Item.CheckMemberGroups { - /// - /// Provides operations to call the checkMemberGroups method. - /// - public class CheckMemberGroupsRequestBuilder : BaseRequestBuilder { - /// - /// Instantiates a new CheckMemberGroupsRequestBuilder and sets the default values. - /// - /// Path parameters for the request - /// The request adapter to use to execute the requests. - public CheckMemberGroupsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/checkMemberGroups", pathParameters) { - } - /// - /// Instantiates a new CheckMemberGroupsRequestBuilder and sets the default values. - /// - /// The raw URL to use for the request builder. - /// The request adapter to use to execute the requests. - public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/checkMemberGroups", rawUrl) { - } - /// - /// Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. - /// Find more info here - /// - /// 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(CheckMemberGroupsPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(CheckMemberGroupsPostRequestBody 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, CheckMemberGroupsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); - } - /// - /// Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. - /// - /// 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(CheckMemberGroupsPostRequestBody body, Action? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(CheckMemberGroupsPostRequestBody 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 CheckMemberGroupsRequestBuilderPostRequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } - return requestInfo; - } - /// - /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - /// - /// The raw URL to use for the request builder. - public CheckMemberGroupsRequestBuilder WithUrl(string rawUrl) { - return new CheckMemberGroupsRequestBuilder(rawUrl, RequestAdapter); - } - /// - /// Configuration for the request such as headers, query parameters, and middleware options. - /// - public class CheckMemberGroupsRequestBuilderPostRequestConfiguration { - /// Request headers - public RequestHeaders Headers { get; set; } - /// Request options - public IList Options { get; set; } - /// - /// Instantiates a new checkMemberGroupsRequestBuilderPostRequestConfiguration and sets the default values. - /// - public CheckMemberGroupsRequestBuilderPostRequestConfiguration() { - Options = new List(); - Headers = new RequestHeaders(); - } - } - } -} diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs deleted file mode 100644 index 917843f5d45..00000000000 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs +++ /dev/null @@ -1,50 +0,0 @@ -// -using Microsoft.Graph.Models; -using Microsoft.Kiota.Abstractions.Serialization; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System; -namespace Microsoft.Graph.DirectoryNamespace.DeletedItems.Item.CheckMemberObjects { - public class CheckMemberObjectsResponse : 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 CheckMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new CheckMemberObjectsResponse(); - } - /// - /// The deserialization information for the current model - /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"value", n => { Value = n.GetCollectionOfPrimitiveValues()?.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.WriteCollectionOfPrimitiveValues("value", Value); - } - } -} diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/DirectoryObjectItemRequestBuilder.cs index da7d2b99348..797f5bff720 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/DirectoryObjectItemRequestBuilder.cs @@ -1,15 +1,10 @@ // -using Microsoft.Graph.DirectoryNamespace.DeletedItems.Item.CheckMemberGroups; -using Microsoft.Graph.DirectoryNamespace.DeletedItems.Item.CheckMemberObjects; -using Microsoft.Graph.DirectoryNamespace.DeletedItems.Item.GetMemberGroups; -using Microsoft.Graph.DirectoryNamespace.DeletedItems.Item.GetMemberObjects; using Microsoft.Graph.DirectoryNamespace.DeletedItems.Item.GraphAdministrativeUnit; using Microsoft.Graph.DirectoryNamespace.DeletedItems.Item.GraphApplication; using Microsoft.Graph.DirectoryNamespace.DeletedItems.Item.GraphDevice; using Microsoft.Graph.DirectoryNamespace.DeletedItems.Item.GraphGroup; using Microsoft.Graph.DirectoryNamespace.DeletedItems.Item.GraphServicePrincipal; using Microsoft.Graph.DirectoryNamespace.DeletedItems.Item.GraphUser; -using Microsoft.Graph.DirectoryNamespace.DeletedItems.Item.Restore; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,22 +20,6 @@ namespace Microsoft.Graph.DirectoryNamespace.DeletedItems.Item { /// Provides operations to manage the deletedItems property of the microsoft.graph.directory entity. /// public class DirectoryObjectItemRequestBuilder : BaseRequestBuilder { - /// Provides operations to call the checkMemberGroups method. - public CheckMemberGroupsRequestBuilder CheckMemberGroups { get => - new CheckMemberGroupsRequestBuilder(PathParameters, RequestAdapter); - } - /// Provides operations to call the checkMemberObjects method. - public CheckMemberObjectsRequestBuilder CheckMemberObjects { get => - new CheckMemberObjectsRequestBuilder(PathParameters, RequestAdapter); - } - /// Provides operations to call the getMemberGroups method. - public GetMemberGroupsRequestBuilder GetMemberGroups { get => - new GetMemberGroupsRequestBuilder(PathParameters, RequestAdapter); - } - /// Provides operations to call the getMemberObjects method. - public GetMemberObjectsRequestBuilder GetMemberObjects { get => - new GetMemberObjectsRequestBuilder(PathParameters, RequestAdapter); - } /// Casts the previous resource to administrativeUnit. public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); @@ -65,10 +44,6 @@ public class DirectoryObjectItemRequestBuilder : BaseRequestBuilder { public GraphUserRequestBuilder GraphUser { get => new GraphUserRequestBuilder(PathParameters, RequestAdapter); } - /// Provides operations to call the restore method. - public RestoreRequestBuilder Restore { get => - new RestoreRequestBuilder(PathParameters, RequestAdapter); - } /// /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. /// @@ -124,27 +99,6 @@ public async Task GetAsync(Action(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the navigation property deletedItems in directory - /// - /// 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(DirectoryObject body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(DirectoryObject 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, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); - } - /// /// Permanently delete a recently deleted application, group, servicePrincipal, or user object from deleted items. After an item is permanently deleted, it cannot be restored. Administrative units cannot be permanently deleted by using the deletedItems API. Soft-deleted administrative units will be permanently deleted 30 days after initial deletion unless they are restored. /// /// Configuration for the request such as headers, query parameters, and middleware options. @@ -195,34 +149,6 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the navigation property deletedItems in directory - /// - /// 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(DirectoryObject body, Action? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(DirectoryObject 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 DirectoryObjectItemRequestBuilderPatchRequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } - return requestInfo; - } - /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// /// The raw URL to use for the request builder. @@ -288,21 +214,5 @@ public DirectoryObjectItemRequestBuilderGetRequestConfiguration() { Headers = new RequestHeaders(); } } - /// - /// Configuration for the request such as headers, query parameters, and middleware options. - /// - public class DirectoryObjectItemRequestBuilderPatchRequestConfiguration { - /// Request headers - public RequestHeaders Headers { get; set; } - /// Request options - public IList Options { get; set; } - /// - /// Instantiates a new DirectoryObjectItemRequestBuilderPatchRequestConfiguration and sets the default values. - /// - public DirectoryObjectItemRequestBuilderPatchRequestConfiguration() { - Options = new List(); - Headers = new RequestHeaders(); - } - } } } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs deleted file mode 100644 index 4269f71500b..00000000000 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs +++ /dev/null @@ -1,55 +0,0 @@ -// -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.DirectoryNamespace.DeletedItems.Item.GetMemberObjects { - public class GetMemberObjectsPostRequestBody : 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 securityEnabledOnly property - public bool? SecurityEnabledOnly { - get { return BackingStore?.Get("securityEnabledOnly"); } - set { BackingStore?.Set("securityEnabledOnly", value); } - } - /// - /// Instantiates a new getMemberObjectsPostRequestBody and sets the default values. - /// - public GetMemberObjectsPostRequestBody() { - 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 GetMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new GetMemberObjectsPostRequestBody(); - } - /// - /// The deserialization information for the current model - /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"securityEnabledOnly", n => { SecurityEnabledOnly = 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("securityEnabledOnly", SecurityEnabledOnly); - writer.WriteAdditionalData(AdditionalData); - } - } -} diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsResponse.cs deleted file mode 100644 index ba2febe5f7f..00000000000 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsResponse.cs +++ /dev/null @@ -1,50 +0,0 @@ -// -using Microsoft.Graph.Models; -using Microsoft.Kiota.Abstractions.Serialization; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System; -namespace Microsoft.Graph.DirectoryNamespace.DeletedItems.Item.GetMemberObjects { - public class GetMemberObjectsResponse : 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 GetMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new GetMemberObjectsResponse(); - } - /// - /// The deserialization information for the current model - /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"value", n => { Value = n.GetCollectionOfPrimitiveValues()?.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.WriteCollectionOfPrimitiveValues("value", Value); - } - } -} diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/ValidateProperties/ValidatePropertiesPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/ValidateProperties/ValidatePropertiesPostRequestBody.cs deleted file mode 100644 index 4431ec40544..00000000000 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/ValidateProperties/ValidatePropertiesPostRequestBody.cs +++ /dev/null @@ -1,103 +0,0 @@ -// -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.DirectoryNamespace.DeletedItems.ValidateProperties { - public class ValidatePropertiesPostRequestBody : 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 entityType property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? EntityType { - get { return BackingStore?.Get("entityType"); } - set { BackingStore?.Set("entityType", value); } - } -#nullable restore -#else - public string EntityType { - get { return BackingStore?.Get("entityType"); } - set { BackingStore?.Set("entityType", value); } - } -#endif - /// The mailNickname property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? MailNickname { - get { return BackingStore?.Get("mailNickname"); } - set { BackingStore?.Set("mailNickname", value); } - } -#nullable restore -#else - public string MailNickname { - get { return BackingStore?.Get("mailNickname"); } - set { BackingStore?.Set("mailNickname", value); } - } -#endif - /// The onBehalfOfUserId property - public Guid? OnBehalfOfUserId { - get { return BackingStore?.Get("onBehalfOfUserId"); } - set { BackingStore?.Set("onBehalfOfUserId", value); } - } - /// - /// Instantiates a new validatePropertiesPostRequestBody and sets the default values. - /// - public ValidatePropertiesPostRequestBody() { - 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 ValidatePropertiesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ValidatePropertiesPostRequestBody(); - } - /// - /// The deserialization information for the current model - /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"entityType", n => { EntityType = n.GetStringValue(); } }, - {"mailNickname", n => { MailNickname = n.GetStringValue(); } }, - {"onBehalfOfUserId", n => { OnBehalfOfUserId = n.GetGuidValue(); } }, - }; - } - /// - /// 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("entityType", EntityType); - writer.WriteStringValue("mailNickname", MailNickname); - writer.WriteGuidValue("onBehalfOfUserId", OnBehalfOfUserId); - writer.WriteAdditionalData(AdditionalData); - } - } -} diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/ValidateProperties/ValidatePropertiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/ValidateProperties/ValidatePropertiesRequestBuilder.cs deleted file mode 100644 index c670cb19833..00000000000 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/ValidateProperties/ValidatePropertiesRequestBuilder.cs +++ /dev/null @@ -1,103 +0,0 @@ -// -using Microsoft.Graph.Models.ODataErrors; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace Microsoft.Graph.DirectoryNamespace.DeletedItems.ValidateProperties { - /// - /// Provides operations to call the validateProperties method. - /// - public class ValidatePropertiesRequestBuilder : BaseRequestBuilder { - /// - /// Instantiates a new ValidatePropertiesRequestBuilder and sets the default values. - /// - /// Path parameters for the request - /// The request adapter to use to execute the requests. - public ValidatePropertiesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directory/deletedItems/validateProperties", pathParameters) { - } - /// - /// Instantiates a new ValidatePropertiesRequestBuilder and sets the default values. - /// - /// The raw URL to use for the request builder. - /// The request adapter to use to execute the requests. - public ValidatePropertiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directory/deletedItems/validateProperties", rawUrl) { - } - /// - /// Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. - /// Find more info here - /// - /// 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(ValidatePropertiesPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(ValidatePropertiesPostRequestBody 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).ConfigureAwait(false); - } - /// - /// Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. - /// - /// 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(ValidatePropertiesPostRequestBody body, Action? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(ValidatePropertiesPostRequestBody 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 ValidatePropertiesRequestBuilderPostRequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } - return requestInfo; - } - /// - /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - /// - /// The raw URL to use for the request builder. - public ValidatePropertiesRequestBuilder WithUrl(string rawUrl) { - return new ValidatePropertiesRequestBuilder(rawUrl, RequestAdapter); - } - /// - /// Configuration for the request such as headers, query parameters, and middleware options. - /// - public class ValidatePropertiesRequestBuilderPostRequestConfiguration { - /// Request headers - public RequestHeaders Headers { get; set; } - /// Request options - public IList Options { get; set; } - /// - /// Instantiates a new validatePropertiesRequestBuilderPostRequestConfiguration and sets the default values. - /// - public ValidatePropertiesRequestBuilderPostRequestConfiguration() { - Options = new List(); - Headers = new RequestHeaders(); - } - } - } -} diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/DirectoryRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/DirectoryRolesRequestBuilder.cs index e834d3b6699..94a96650d43 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/DirectoryRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/DirectoryRolesRequestBuilder.cs @@ -62,7 +62,7 @@ public DirectoryRolesRequestBuilder(Dictionary pathParameters, I public DirectoryRolesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directoryRoles{?%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// List the directory roles that are activated in the tenant. This operation only returns roles that have been activated. A role becomes activated when an admin activates the role using the Activate directoryRole API. Not all built-in roles are initially activated. When assigning a role using the Azure portal, the role activation step is implicitly done on the admin's behalf. To get the full list of roles that are available in Azure AD, use List directoryRoleTemplates. + /// List the directory roles that are activated in the tenant. This operation only returns roles that have been activated. A role becomes activated when an admin activates the role using the Activate directoryRole API. Not all built-in roles are initially activated. When assigning a role using the Microsoft Entra admin center, the role activation step is implicitly done on the admin's behalf. To get the full list of roles that are available in Azure AD, use List directoryRoleTemplates. /// Find more info here /// /// Cancellation token to use when cancelling requests @@ -104,7 +104,7 @@ public async Task PostAsync(DirectoryRole body, Action(requestInfo, DirectoryRole.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List the directory roles that are activated in the tenant. This operation only returns roles that have been activated. A role becomes activated when an admin activates the role using the Activate directoryRole API. Not all built-in roles are initially activated. When assigning a role using the Azure portal, the role activation step is implicitly done on the admin's behalf. To get the full list of roles that are available in Azure AD, use List directoryRoleTemplates. + /// List the directory roles that are activated in the tenant. This operation only returns roles that have been activated. A role becomes activated when an admin activates the role using the Activate directoryRole API. Not all built-in roles are initially activated. When assigning a role using the Microsoft Entra admin center, the role activation step is implicitly done on the admin's behalf. To get the full list of roles that are available in Azure AD, use List directoryRoleTemplates. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -165,7 +165,7 @@ public DirectoryRolesRequestBuilder WithUrl(string rawUrl) { return new DirectoryRolesRequestBuilder(rawUrl, RequestAdapter); } /// - /// List the directory roles that are activated in the tenant. This operation only returns roles that have been activated. A role becomes activated when an admin activates the role using the Activate directoryRole API. Not all built-in roles are initially activated. When assigning a role using the Azure portal, the role activation step is implicitly done on the admin's behalf. To get the full list of roles that are available in Azure AD, use List directoryRoleTemplates. + /// List the directory roles that are activated in the tenant. This operation only returns roles that have been activated. A role becomes activated when an admin activates the role using the Activate directoryRole API. Not all built-in roles are initially activated. When assigning a role using the Microsoft Entra admin center, the role activation step is implicitly done on the admin's behalf. To get the full list of roles that are available in Azure AD, use List directoryRoleTemplates. /// public class DirectoryRolesRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/DirectoryRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/DirectoryRoleItemRequestBuilder.cs index 5f09bf7a21f..eda9eb3b2aa 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/DirectoryRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/DirectoryRoleItemRequestBuilder.cs @@ -83,7 +83,7 @@ public async Task DeleteAsync(Action - /// Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + /// Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. /// Find more info here /// /// Cancellation token to use when cancelling requests @@ -148,7 +148,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + /// Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -225,7 +225,7 @@ public DirectoryRoleItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + /// Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. /// public class DirectoryRoleItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/Members/Item/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/Members/Item/Ref/RefRequestBuilder.cs index e750d546e0a..f2743ceebb7 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/Members/Item/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/Members/Item/Ref/RefRequestBuilder.cs @@ -28,7 +28,7 @@ public RefRequestBuilder(Dictionary pathParameters, IRequestAdap public RefRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/{directoryObject%2Did}/$ref{?%40id*}", rawUrl) { } /// - /// Remove a member from a directoryRole. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + /// Remove a member from a directoryRole. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. /// Find more info here /// /// Cancellation token to use when cancelling requests @@ -48,7 +48,7 @@ public async Task DeleteAsync(Action - /// Remove a member from a directoryRole. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + /// Remove a member from a directoryRole. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -80,7 +80,7 @@ public RefRequestBuilder WithUrl(string rawUrl) { return new RefRequestBuilder(rawUrl, RequestAdapter); } /// - /// Remove a member from a directoryRole. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + /// Remove a member from a directoryRole. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. /// public class RefRequestBuilderDeleteQueryParameters { /// Delete Uri diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/Members/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/Members/Ref/RefRequestBuilder.cs index 72fcf6bc70f..502566c319b 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/Members/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/Members/Ref/RefRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task GetAsync(Action(requestInfo, StringCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Create a new directory role member. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + /// Create a new directory role member. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. /// Find more info here /// /// The request body @@ -97,7 +97,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new directory role member. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + /// Create a new directory role member. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/DirectoryRolesWithRoleTemplateId/DirectoryRolesWithRoleTemplateIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRolesWithRoleTemplateId/DirectoryRolesWithRoleTemplateIdRequestBuilder.cs index ae75f6f4a21..7c3aa080abd 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRolesWithRoleTemplateId/DirectoryRolesWithRoleTemplateIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRolesWithRoleTemplateId/DirectoryRolesWithRoleTemplateIdRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task DeleteAsync(Action - /// Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + /// Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. /// Find more info here /// /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + /// Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -192,7 +192,7 @@ public DirectoryRolesWithRoleTemplateIdRequestBuilderDeleteRequestConfiguration( } } /// - /// Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + /// Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. /// public class DirectoryRolesWithRoleTemplateIdRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Drives/Item/CreatedByUser/CreatedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/CreatedByUser/CreatedByUserRequestBuilder.cs index 604f490cab9..54e9088d353 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/CreatedByUser/CreatedByUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/CreatedByUser/CreatedByUserRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.Drives.Item.CreatedByUser.MailboxSettings; +using Microsoft.Graph.Drives.Item.CreatedByUser.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class CreatedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..809c525e7ce --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Drives.Item.CreatedByUser.ServiceProvisioningErrors.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}/drives/{drive%2Did}/createdByUser/serviceProvisioningErrors/$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}/createdByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Drives/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..7f8c8683af2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Drives.Item.CreatedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \drives\{drive-id}\createdByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} 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 index 2aa8df1ee01..5cc8e004a2d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreatedByUser/CreatedByUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreatedByUser/CreatedByUserRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.Drives.Item.Items.Item.CreatedByUser.MailboxSettings; +using Microsoft.Graph.Drives.Item.Items.Item.CreatedByUser.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class CreatedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..30be3f6d237 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Drives.Item.Items.Item.CreatedByUser.ServiceProvisioningErrors.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}/drives/{drive%2Did}/items/{driveItem%2Did}/createdByUser/serviceProvisioningErrors/$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}/createdByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Drives/Item/Items/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..c75d3f43ab8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Drives.Item.Items.Item.CreatedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \drives\{drive-id}\items\{driveItem-id}\createdByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} 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 index 3b5b69d13d1..e2314745138 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.Drives.Item.Items.Item.LastModifiedByUser.MailboxSettings; +using Microsoft.Graph.Drives.Item.Items.Item.LastModifiedByUser.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..8e9b2ccc15e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Drives.Item.Items.Item.LastModifiedByUser.ServiceProvisioningErrors.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}/drives/{drive%2Did}/items/{driveItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$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}/lastModifiedByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Drives/Item/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..65a409c9b46 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Drives.Item.Items.Item.LastModifiedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \drives\{drive-id}\items\{driveItem-id}\lastModifiedByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Round/RoundPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Round/RoundPostRequestBody.cs index 4c707b0ecc2..5d83489bdd3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Round/RoundPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Round/RoundPostRequestBody.cs @@ -63,8 +63,8 @@ public static RoundPostRequestBody CreateFromDiscriminatorValue(IParseNode parse /// public IDictionary> GetFieldDeserializers() { return new Dictionary> { - {"number", n => { Number = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, {"numDigits", n => { NumDigits = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, + {"number", n => { Number = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, }; } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RoundDown/RoundDownPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RoundDown/RoundDownPostRequestBody.cs index c1eed304eed..63c4d8af7f9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RoundDown/RoundDownPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RoundDown/RoundDownPostRequestBody.cs @@ -63,8 +63,8 @@ public static RoundDownPostRequestBody CreateFromDiscriminatorValue(IParseNode p /// public IDictionary> GetFieldDeserializers() { return new Dictionary> { - {"number", n => { Number = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, {"numDigits", n => { NumDigits = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, + {"number", n => { Number = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, }; } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RoundUp/RoundUpPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RoundUp/RoundUpPostRequestBody.cs index 71d9c7afca0..7b3a35119b0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RoundUp/RoundUpPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RoundUp/RoundUpPostRequestBody.cs @@ -63,8 +63,8 @@ public static RoundUpPostRequestBody CreateFromDiscriminatorValue(IParseNode par /// public IDictionary> GetFieldDeserializers() { return new Dictionary> { - {"number", n => { Number = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, {"numDigits", n => { NumDigits = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, + {"number", n => { Number = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, }; } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Trunc/TruncPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Trunc/TruncPostRequestBody.cs index d063f063bc0..9b00a8fbb80 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Trunc/TruncPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Trunc/TruncPostRequestBody.cs @@ -63,8 +63,8 @@ public static TruncPostRequestBody CreateFromDiscriminatorValue(IParseNode parse /// public IDictionary> GetFieldDeserializers() { return new Dictionary> { - {"number", n => { Number = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, {"numDigits", n => { NumDigits = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, + {"number", n => { Number = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, }; } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/RangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/RangeRequestBuilder.cs index 63cba8b1b35..d303ce019bc 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/RangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/RangeRequestBuilder.cs @@ -29,8 +29,8 @@ public RangeRequestBuilder(Dictionary pathParameters, IRequestAd public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/names/{workbookNamedItem%2Did}/range()", rawUrl) { } /// - /// Returns the range object that is associated with the name. Throws an exception if the named item's type is not a range. - /// Find more info here + /// Retrieve the properties and relationships of range object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -49,7 +49,7 @@ public async Task GetAsync(Action(requestInfo, WorkbookRange.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Returns the range object that is associated with the name. Throws an exception if the named item's type is not a range. + /// Retrieve the properties and relationships of range object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/NamesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/NamesRequestBuilder.cs index 4882b3a67a5..e10da62bc1a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/NamesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/NamesRequestBuilder.cs @@ -53,7 +53,7 @@ public NamesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base } /// /// Retrieve a list of nameditem objects. - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/ColumnsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/ColumnsRequestBuilder.cs index a08bc4669cf..c70536bd44d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/ColumnsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/ColumnsRequestBuilder.cs @@ -49,7 +49,7 @@ public ColumnsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba } /// /// Retrieve a list of tablecolumn objects. - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/TablesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/TablesRequestBuilder.cs index e5c1c294091..926d319122d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/TablesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/TablesRequestBuilder.cs @@ -49,7 +49,7 @@ public TablesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas } /// /// Retrieve a list of table objects. - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/RangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/RangeRequestBuilder.cs index 6e738bbb58a..e964276fb67 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/RangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/RangeRequestBuilder.cs @@ -29,8 +29,8 @@ public RangeRequestBuilder(Dictionary pathParameters, IRequestAd public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/names/{workbookNamedItem%2Did}/range()", rawUrl) { } /// - /// Returns the range object that is associated with the name. Throws an exception if the named item's type is not a range. - /// Find more info here + /// Retrieve the properties and relationships of range object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -49,7 +49,7 @@ public async Task GetAsync(Action(requestInfo, WorkbookRange.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Returns the range object that is associated with the name. Throws an exception if the named item's type is not a range. + /// Retrieve the properties and relationships of range object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/ColumnsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/ColumnsRequestBuilder.cs index 8fb2a086462..e9cfaed1b46 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/ColumnsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/ColumnsRequestBuilder.cs @@ -49,7 +49,7 @@ public ColumnsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba } /// /// Retrieve a list of tablecolumn objects. - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Drives/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs index 88339b92804..516dadfb185 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.Drives.Item.LastModifiedByUser.MailboxSettings; +using Microsoft.Graph.Drives.Item.LastModifiedByUser.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..18e79d74b6e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Drives.Item.LastModifiedByUser.ServiceProvisioningErrors.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}/drives/{drive%2Did}/lastModifiedByUser/serviceProvisioningErrors/$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}/lastModifiedByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Drives/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..7a9cb0d89b5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Drives.Item.LastModifiedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \drives\{drive-id}\lastModifiedByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + 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 index 5986e20aad3..bd717297ea6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/CreatedByUser/CreatedByUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/CreatedByUser/CreatedByUserRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.Drives.Item.List.CreatedByUser.MailboxSettings; +using Microsoft.Graph.Drives.Item.List.CreatedByUser.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class CreatedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..e8941f30d88 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Drives.Item.List.CreatedByUser.ServiceProvisioningErrors.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}/drives/{drive%2Did}/list/createdByUser/serviceProvisioningErrors/$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}/list/createdByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Drives/Item/List/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..220c549387e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Drives.Item.List.CreatedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \drives\{drive-id}\list\createdByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + 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 index c81bbc3d214..afee93c802b 100644 --- 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 @@ -1,5 +1,6 @@ // using Microsoft.Graph.Drives.Item.List.Items.Item.CreatedByUser.MailboxSettings; +using Microsoft.Graph.Drives.Item.List.Items.Item.CreatedByUser.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class CreatedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..a14fb08cae3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Drives.Item.List.Items.Item.CreatedByUser.ServiceProvisioningErrors.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}/drives/{drive%2Did}/list/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors/$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}/list/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Drives/Item/List/Items/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..017aa5ac82a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Drives.Item.List.Items.Item.CreatedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \drives\{drive-id}\list\items\{listItem-id}\createdByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + 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 index 27626737123..eea00478a71 100644 --- 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 @@ -1,5 +1,6 @@ // using Microsoft.Graph.Drives.Item.List.Items.Item.LastModifiedByUser.MailboxSettings; +using Microsoft.Graph.Drives.Item.List.Items.Item.LastModifiedByUser.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..713fdf5dcdb --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Drives.Item.List.Items.Item.LastModifiedByUser.ServiceProvisioningErrors.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}/drives/{drive%2Did}/list/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$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}/list/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Drives/Item/List/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..1bc8fbbc14d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Drives.Item.List.Items.Item.LastModifiedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \drives\{drive-id}\list\items\{listItem-id}\lastModifiedByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs index 72e7f95921f..723a9c29b1b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.Drives.Item.List.LastModifiedByUser.MailboxSettings; +using Microsoft.Graph.Drives.Item.List.LastModifiedByUser.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..dfd7759cfa9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Drives.Item.List.LastModifiedByUser.ServiceProvisioningErrors.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}/drives/{drive%2Did}/list/lastModifiedByUser/serviceProvisioningErrors/$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}/list/lastModifiedByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Drives/Item/List/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..01eb86c1c20 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Drives.Item.List.LastModifiedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \drives\{drive-id}\list\lastModifiedByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Group/GroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Group/GroupRequestBuilder.cs index 17bceddc9b6..7f9c31c8137 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Group/GroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Group/GroupRequestBuilder.cs @@ -1,4 +1,5 @@ // +using Microsoft.Graph.Education.Classes.Item.Group.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Education.Classes.Item.Group { /// Provides operations to manage the group property of the microsoft.graph.educationClass entity. /// public class GroupRequestBuilder : BaseRequestBuilder { + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GroupRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..6ad35ea0575 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Education.Classes.Item.Group.ServiceProvisioningErrors.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}/education/classes/{educationClass%2Did}/group/serviceProvisioningErrors/$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}/education/classes/{educationClass%2Did}/group/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Education/Classes/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..7d0059fe511 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Education.Classes.Item.Group.ServiceProvisioningErrors.Count; +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.Education.Classes.Item.Group.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \education\classes\{educationClass-id}\group\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/education/classes/{educationClass%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/education/classes/{educationClass%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Education/Me/User/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/User/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..d2e661be250 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Education/Me/User/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Education.Me.User.ServiceProvisioningErrors.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}/education/me/user/serviceProvisioningErrors/$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}/education/me/user/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Education/Me/User/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/User/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..a9a6b463ef3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Education/Me/User/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Education.Me.User.ServiceProvisioningErrors.Count; +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.Education.Me.User.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \education\me\user\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/education/me/user/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/education/me/user/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Education/Me/User/UserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/User/UserRequestBuilder.cs index 4a22ef0b942..5d32b06bae4 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/User/UserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/User/UserRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.Education.Me.User.MailboxSettings; +using Microsoft.Graph.Education.Me.User.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class UserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new UserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/User/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/User/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..b6be666b7b2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/User/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Education.Users.Item.User.ServiceProvisioningErrors.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}/education/users/{educationUser%2Did}/user/serviceProvisioningErrors/$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}/education/users/{educationUser%2Did}/user/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Education/Users/Item/User/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/User/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..23cc17f1c4b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/User/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Education.Users.Item.User.ServiceProvisioningErrors.Count; +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.Education.Users.Item.User.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \education\users\{educationUser-id}\user\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/education/users/{educationUser%2Did}/user/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/education/users/{educationUser%2Did}/user/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/User/UserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/User/UserRequestBuilder.cs index b018401158a..28d94436366 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/User/UserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/User/UserRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.Education.Users.Item.User.MailboxSettings; +using Microsoft.Graph.Education.Users.Item.User.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class UserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new UserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/ConversationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/ConversationItemRequestBuilder.cs index 4ca4036df68..e18a695e3b1 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/ConversationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/ConversationItemRequestBuilder.cs @@ -35,7 +35,7 @@ public ConversationItemRequestBuilder(string rawUrl, IRequestAdapter requestAdap } /// /// Delete conversation. - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/PostsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/PostsRequestBuilder.cs index ba142ad2769..aa10f67c84d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/PostsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/PostsRequestBuilder.cs @@ -42,8 +42,8 @@ public PostsRequestBuilder(Dictionary pathParameters, IRequestAd public PostsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/conversations/{conversation%2Did}/threads/{conversationThread%2Did}/posts{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. - /// Find more info here + /// Get the properties and relationships of a post in a specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. Since the post resource supports extensions, you can also use the GET operation to get custom properties and extension data in a post instance. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -62,7 +62,7 @@ public async Task GetAsync(Action(requestInfo, PostCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. + /// Get the properties and relationships of a post in a specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. Since the post resource supports extensions, you can also use the GET operation to get custom properties and extension data in a post instance. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -95,7 +95,7 @@ public PostsRequestBuilder WithUrl(string rawUrl) { return new PostsRequestBuilder(rawUrl, RequestAdapter); } /// - /// Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. + /// Get the properties and relationships of a post in a specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. Since the post resource supports extensions, you can also use the GET operation to get custom properties and extension data in a post instance. /// public class PostsRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Reply/ReplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Reply/ReplyRequestBuilder.cs index 1fd7e4b1548..233798c72c0 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Reply/ReplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Reply/ReplyRequestBuilder.cs @@ -28,8 +28,8 @@ public ReplyRequestBuilder(Dictionary pathParameters, IRequestAd public ReplyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/conversations/{conversation%2Did}/threads/{conversationThread%2Did}/reply", rawUrl) { } /// - /// Add an attachment when creating a group post. This operation limits the size of the attachment you can add to under 3 MB. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - /// Find more info here + /// Reply to a thread in a group conversation and add a new post to it. You can specify the parent conversation in the request, or, you can specify just the thread without the parent conversation. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -50,7 +50,7 @@ public async Task PostAsync(ReplyPostRequestBody body, Action - /// Add an attachment when creating a group post. This operation limits the size of the attachment you can add to under 3 MB. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + /// Reply to a thread in a group conversation and add a new post to it. You can specify the parent conversation in the request, or, you can specify just the thread without the parent conversation. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GroupItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/GroupItemRequestBuilder.cs index 6f99a3897be..8940c249db4 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GroupItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GroupItemRequestBuilder.cs @@ -32,6 +32,7 @@ using Microsoft.Graph.Groups.Item.ResetUnseenCount; using Microsoft.Graph.Groups.Item.Restore; using Microsoft.Graph.Groups.Item.RetryServiceProvisioning; +using Microsoft.Graph.Groups.Item.ServiceProvisioningErrors; using Microsoft.Graph.Groups.Item.Settings; using Microsoft.Graph.Groups.Item.Sites; using Microsoft.Graph.Groups.Item.SubscribeByMail; @@ -188,6 +189,10 @@ public class GroupItemRequestBuilder : BaseRequestBuilder { public RetryServiceProvisioningRequestBuilder RetryServiceProvisioning { get => new RetryServiceProvisioningRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the settings property of the microsoft.graph.group entity. public SettingsRequestBuilder Settings { get => new SettingsRequestBuilder(PathParameters, RequestAdapter); @@ -279,8 +284,8 @@ public async Task DeleteAsync(Action(requestInfo, Microsoft.Graph.Models.Group.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the properties of a group object. - /// Find more info here + /// Add a member to a security or Microsoft 365 group through the members navigation property. The following table shows the types of members that can be added to either security groups or Microsoft 365 groups. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -351,7 +356,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the properties of a group object. + /// Add a member to a security or Microsoft 365 group through the members navigation property. The following table shows the types of members that can be added to either security groups or Microsoft 365 groups. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..dcaaa2877ce --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,116 @@ +// +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.Groups.Item.ServiceProvisioningErrors.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}/groups/{group%2Did}/serviceProvisioningErrors/$count{?%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}/groups/{group%2Did}/serviceProvisioningErrors/$count{?%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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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 + } + /// + /// 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/Groups/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..57938610693 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Groups.Item.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \groups\{group-id}\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} 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 index eed699d8ded..7657461ec71 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/CreatedByUser/CreatedByUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/CreatedByUser/CreatedByUserRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.Groups.Item.Sites.Item.CreatedByUser.MailboxSettings; +using Microsoft.Graph.Groups.Item.Sites.Item.CreatedByUser.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class CreatedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..76378edb8be --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Groups.Item.Sites.Item.CreatedByUser.ServiceProvisioningErrors.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}/groups/{group%2Did}/sites/{site%2Did}/createdByUser/serviceProvisioningErrors/$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}/groups/{group%2Did}/sites/{site%2Did}/createdByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Groups/Item/Sites/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..53093a76b17 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Groups.Item.Sites.Item.CreatedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \groups\{group-id}\sites\{site-id}\createdByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + 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 index 7baa2bad061..aad313e2fe0 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.Groups.Item.Sites.Item.LastModifiedByUser.MailboxSettings; +using Microsoft.Graph.Groups.Item.Sites.Item.LastModifiedByUser.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..866cd6115e8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Groups.Item.Sites.Item.LastModifiedByUser.ServiceProvisioningErrors.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}/groups/{group%2Did}/sites/{site%2Did}/lastModifiedByUser/serviceProvisioningErrors/$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}/groups/{group%2Did}/sites/{site%2Did}/lastModifiedByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Groups/Item/Sites/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..1a74ab4114e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Groups.Item.Sites.Item.LastModifiedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \groups\{group-id}\sites\{site-id}\lastModifiedByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + 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 index 04e9c6b81d8..6c36ebb18d4 100644 --- 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 @@ -1,5 +1,6 @@ // using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.CreatedByUser.MailboxSettings; +using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.CreatedByUser.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class CreatedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..9579dc43916 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Groups.Item.Sites.Item.Lists.Item.CreatedByUser.ServiceProvisioningErrors.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}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/createdByUser/serviceProvisioningErrors/$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}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/createdByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Groups/Item/Sites/Item/Lists/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..382e81c1055 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.CreatedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \groups\{group-id}\sites\{site-id}\lists\{list-id}\createdByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + 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 index d7b63aa8100..28c70c1fa94 100644 --- 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 @@ -1,5 +1,6 @@ // using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Items.Item.CreatedByUser.MailboxSettings; +using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Items.Item.CreatedByUser.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class CreatedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..3ddf60462d2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Groups.Item.Sites.Item.Lists.Item.Items.Item.CreatedByUser.ServiceProvisioningErrors.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}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors/$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}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Groups/Item/Sites/Item/Lists/Item/Items/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..885293878c5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Items.Item.CreatedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \groups\{group-id}\sites\{site-id}\lists\{list-id}\items\{listItem-id}\createdByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + 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 index 097de9ee9ab..31aed8879cd 100644 --- 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 @@ -1,5 +1,6 @@ // using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Items.Item.LastModifiedByUser.MailboxSettings; +using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Items.Item.LastModifiedByUser.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..a1d3930541a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Groups.Item.Sites.Item.Lists.Item.Items.Item.LastModifiedByUser.ServiceProvisioningErrors.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}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$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}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Groups/Item/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..9a0ffbaf09e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.Items.Item.LastModifiedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \groups\{group-id}\sites\{site-id}\lists\{list-id}\items\{listItem-id}\lastModifiedByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} 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 index 44857f0e214..378d2a2d0cf 100644 --- 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 @@ -1,5 +1,6 @@ // using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.LastModifiedByUser.MailboxSettings; +using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.LastModifiedByUser.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..79a7d3e01c9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Groups.Item.Sites.Item.Lists.Item.LastModifiedByUser.ServiceProvisioningErrors.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}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/lastModifiedByUser/serviceProvisioningErrors/$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}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/lastModifiedByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Groups/Item/Sites/Item/Lists/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..421ef5f7fc9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Groups.Item.Sites.Item.Lists.Item.LastModifiedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \groups\{group-id}\sites\{site-id}\lists\{list-id}\lastModifiedByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + 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 fa14e21b3e7..0c43c9b0352 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 @@ -88,8 +88,8 @@ public async Task DeleteAsync(Action - /// Get a list of rich long-running operations associated with a list. - /// Find more info here + /// Returns the metadata for a [list][]. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -153,7 +153,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Get a list of rich long-running operations associated with a list. + /// Returns the metadata for a [list][]. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -230,7 +230,7 @@ public ListItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Get a list of rich long-running operations associated with a list. + /// Returns the metadata for a [list][]. /// public class ListItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Item/ConversationMemberItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Item/ConversationMemberItemRequestBuilder.cs index 538948daf9e..e1dea1610aa 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Item/ConversationMemberItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Item/ConversationMemberItemRequestBuilder.cs @@ -69,8 +69,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMember.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the role of a conversationMember in a team or channel. - /// Find more info here + /// Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -141,7 +141,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the role of a conversationMember in a team or channel. + /// Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/MembersRequestBuilder.cs index 34b0aca95d5..e4b54dc3c66 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/MembersRequestBuilder.cs @@ -67,8 +67,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMemberCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Add a conversationMember to a channel. - /// Find more info here + /// Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Add a conversationMember to a channel. + /// Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/MessagesRequestBuilder.cs index 8bd6451909c..42d9c0c9f40 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/MessagesRequestBuilder.cs @@ -67,8 +67,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Send a new chatMessage in the specified channel. - /// Find more info here + /// Send a new chatMessage in the specified channel or a chat. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel. + /// Send a new chatMessage in the specified channel or a chat. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Group/GroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Group/GroupRequestBuilder.cs index 6dc2d670e71..b36dfa4222d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Group/GroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Group/GroupRequestBuilder.cs @@ -1,4 +1,5 @@ // +using Microsoft.Graph.Groups.Item.Team.Group.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Groups.Item.Team.Group { /// Provides operations to manage the group property of the microsoft.graph.team entity. /// public class GroupRequestBuilder : BaseRequestBuilder { + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GroupRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..b69a3e75f69 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Groups.Item.Team.Group.ServiceProvisioningErrors.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}/groups/{group%2Did}/team/group/serviceProvisioningErrors/$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}/groups/{group%2Did}/team/group/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Groups/Item/Team/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..a25c6ece0ff --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Groups.Item.Team.Group.ServiceProvisioningErrors.Count; +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.Group.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \groups\{group-id}\team\group\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/team/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/team/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Item/ConversationMemberItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Item/ConversationMemberItemRequestBuilder.cs index 8fed5d62528..f3debaf03a2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Item/ConversationMemberItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Item/ConversationMemberItemRequestBuilder.cs @@ -69,8 +69,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMember.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the role of a conversationMember in a team or channel. - /// Find more info here + /// Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -141,7 +141,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the role of a conversationMember in a team or channel. + /// Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/MembersRequestBuilder.cs index 9254e60accf..3e420c3ca08 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/MembersRequestBuilder.cs @@ -67,8 +67,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMemberCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Add a conversationMember to a channel. - /// Find more info here + /// Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Add a conversationMember to a channel. + /// Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/MessagesRequestBuilder.cs index aa38d96beb5..c0a3b7393ed 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/MessagesRequestBuilder.cs @@ -67,8 +67,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Send a new chatMessage in the specified channel. - /// Find more info here + /// Send a new chatMessage in the specified channel or a chat. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel. + /// Send a new chatMessage in the specified channel or a chat. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/ConversationThreadItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/ConversationThreadItemRequestBuilder.cs index c0dda7aa226..76343e727bf 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/ConversationThreadItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/ConversationThreadItemRequestBuilder.cs @@ -40,7 +40,7 @@ public ConversationThreadItemRequestBuilder(string rawUrl, IRequestAdapter reque } /// /// Delete conversationThread. - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -59,8 +59,8 @@ public async Task DeleteAsync(Action - /// Get a thread object. - /// Find more info here + /// Get a specific thread that belongs to a group. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -125,7 +125,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Get a thread object. + /// Get a specific thread that belongs to a group. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -202,7 +202,7 @@ public ConversationThreadItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Get a thread object. + /// Get a specific thread that belongs to a group. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. /// public class ConversationThreadItemRequestBuilderGetQueryParameters { /// Select properties to be returned diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/PostsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/PostsRequestBuilder.cs index 94ca99b4447..4bd6bc09200 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/PostsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/PostsRequestBuilder.cs @@ -42,8 +42,8 @@ public PostsRequestBuilder(Dictionary pathParameters, IRequestAd public PostsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/threads/{conversationThread%2Did}/posts{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. - /// Find more info here + /// Get the properties and relationships of a post in a specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. Since the post resource supports extensions, you can also use the GET operation to get custom properties and extension data in a post instance. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -62,7 +62,7 @@ public async Task GetAsync(Action(requestInfo, PostCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. + /// Get the properties and relationships of a post in a specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. Since the post resource supports extensions, you can also use the GET operation to get custom properties and extension data in a post instance. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -95,7 +95,7 @@ public PostsRequestBuilder WithUrl(string rawUrl) { return new PostsRequestBuilder(rawUrl, RequestAdapter); } /// - /// Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. + /// Get the properties and relationships of a post in a specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. Since the post resource supports extensions, you can also use the GET operation to get custom properties and extension data in a post instance. /// public class PostsRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Reply/ReplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Reply/ReplyRequestBuilder.cs index 62a5217536a..6191ab4849a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Reply/ReplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Reply/ReplyRequestBuilder.cs @@ -28,8 +28,8 @@ public ReplyRequestBuilder(Dictionary pathParameters, IRequestAd public ReplyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/threads/{conversationThread%2Did}/reply", rawUrl) { } /// - /// Add an attachment when creating a group post. This operation limits the size of the attachment you can add to under 3 MB. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - /// Find more info here + /// Reply to a thread in a group conversation and add a new post to it. You can specify the parent conversation in the request, or, you can specify just the thread without the parent conversation. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -50,7 +50,7 @@ public async Task PostAsync(ReplyPostRequestBody body, Action - /// Add an attachment when creating a group post. This operation limits the size of the attachment you can add to under 3 MB. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + /// Reply to a thread in a group conversation and add a new post to it. You can specify the parent conversation in the request, or, you can specify just the thread without the parent conversation. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/Item/CombinationConfigurations/Item/AuthenticationCombinationConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/Item/CombinationConfigurations/Item/AuthenticationCombinationConfigurationItemRequestBuilder.cs index ce952f5326e..250f2467f51 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/Item/CombinationConfigurations/Item/AuthenticationCombinationConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/Item/CombinationConfigurations/Item/AuthenticationCombinationConfigurationItemRequestBuilder.cs @@ -69,7 +69,7 @@ public async Task GetAsync(Action(requestInfo, AuthenticationCombinationConfiguration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the properties of an authenticationCombinationConfiguration object. In use, only fido2combinationConfigurations may be updated as they are the only type of authenticationCombinationConfiguration that may be created. + /// Update the properties of an authenticationCombinationConfiguration object. In use, only fido2combinationConfigurations may be updated as they're the only type of authenticationCombinationConfiguration that may be created. /// Find more info here /// /// The request body @@ -141,7 +141,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the properties of an authenticationCombinationConfiguration object. In use, only fido2combinationConfigurations may be updated as they are the only type of authenticationCombinationConfiguration that may be created. + /// Update the properties of an authenticationCombinationConfiguration object. In use, only fido2combinationConfigurations may be updated as they're the only type of authenticationCombinationConfiguration that may be created. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/NamedLocations/Item/NamedLocationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/NamedLocations/Item/NamedLocationItemRequestBuilder.cs index 0f515a5c398..af15fc76e95 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/NamedLocations/Item/NamedLocationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/NamedLocations/Item/NamedLocationItemRequestBuilder.cs @@ -29,8 +29,8 @@ public NamedLocationItemRequestBuilder(Dictionary pathParameters public NamedLocationItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identity/conditionalAccess/namedLocations/{namedLocation%2Did}{?%24select,%24expand}", rawUrl) { } /// - /// Delete a countryNamedLocation object. - /// Find more info here + /// Delete a namedLocation object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -49,8 +49,8 @@ public async Task DeleteAsync(Action - /// Retrieve the properties and relationships of a countryNamedLocation object. - /// Find more info here + /// Retrieve the properties and relationships of an ipNamedLocation object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -69,8 +69,8 @@ public async Task GetAsync(Action(requestInfo, NamedLocation.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the properties of a countryNamedLocation object. - /// Find more info here + /// Update the properties of an ipNamedLocation object. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -91,7 +91,7 @@ public async Task PatchAsync(NamedLocation body, Action(requestInfo, NamedLocation.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Delete a countryNamedLocation object. + /// Delete a namedLocation object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -115,7 +115,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Retrieve the properties and relationships of a countryNamedLocation object. + /// Retrieve the properties and relationships of an ipNamedLocation object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -141,7 +141,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the properties of a countryNamedLocation object. + /// Update the properties of an ipNamedLocation object. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. @@ -192,7 +192,7 @@ public NamedLocationItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Retrieve the properties and relationships of a countryNamedLocation object. + /// Retrieve the properties and relationships of an ipNamedLocation object. /// public class NamedLocationItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Identity/UserFlowAttributes/Item/IdentityUserFlowAttributeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/UserFlowAttributes/Item/IdentityUserFlowAttributeItemRequestBuilder.cs index 49b9a5db5e8..41e3f19b420 100644 --- a/src/Microsoft.Graph/Generated/Identity/UserFlowAttributes/Item/IdentityUserFlowAttributeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/UserFlowAttributes/Item/IdentityUserFlowAttributeItemRequestBuilder.cs @@ -29,7 +29,7 @@ public IdentityUserFlowAttributeItemRequestBuilder(Dictionary pa public IdentityUserFlowAttributeItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identity/userFlowAttributes/{identityUserFlowAttribute%2Did}{?%24select,%24expand}", rawUrl) { } /// - /// Delete an identityUserFlowAttribute. Only custom user flow attributes can be deleted. + /// Delete a custom identityUserFlowAttribute. /// Find more info here /// /// Cancellation token to use when cancelling requests @@ -69,7 +69,7 @@ public async Task GetAsync(Action(requestInfo, IdentityUserFlowAttribute.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the properties of a identityUserFlowAttribute object. Only custom user flow attributes can be updated. + /// Update the properties of a custom identityUserFlowAttribute object. /// Find more info here /// /// The request body @@ -91,7 +91,7 @@ public async Task PatchAsync(IdentityUserFlowAttribut return await RequestAdapter.SendAsync(requestInfo, IdentityUserFlowAttribute.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Delete an identityUserFlowAttribute. Only custom user flow attributes can be deleted. + /// Delete a custom identityUserFlowAttribute. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -141,7 +141,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the properties of a identityUserFlowAttribute object. Only custom user flow attributes can be updated. + /// Update the properties of a custom identityUserFlowAttribute object. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Identity/UserFlowAttributes/UserFlowAttributesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/UserFlowAttributes/UserFlowAttributesRequestBuilder.cs index 6c91a88058e..d9112f77a3f 100644 --- a/src/Microsoft.Graph/Generated/Identity/UserFlowAttributes/UserFlowAttributesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/UserFlowAttributes/UserFlowAttributesRequestBuilder.cs @@ -62,7 +62,7 @@ public async Task GetAsync(Action(requestInfo, IdentityUserFlowAttributeCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Create a new identityUserFlowAttribute object. + /// Create a new custom identityUserFlowAttribute object. /// Find more info here /// /// The request body @@ -110,7 +110,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new identityUserFlowAttribute object. + /// Create a new custom identityUserFlowAttribute object. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageItemRequestBuilder.cs index ed5d068bba3..8c319e607eb 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageItemRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task DeleteAsync(Action - /// Retrieve an access package with a list of accessPackageResourceRoleScope objects. These objects represent the resource roles that an access package assigns to each subject. Each object links to an accessPackageResourceRole and an accessPackageResourceScope. - /// Find more info here + /// Retrieve the properties and relationships of an accessPackage object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -150,7 +150,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Retrieve an access package with a list of accessPackageResourceRoleScope objects. These objects represent the resource roles that an access package assigns to each subject. Each object links to an accessPackageResourceRole and an accessPackageResourceScope. + /// Retrieve the properties and relationships of an accessPackage object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -227,7 +227,7 @@ public AccessPackageItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Retrieve an access package with a list of accessPackageResourceRoleScope objects. These objects represent the resource roles that an access package assigns to each subject. Each object links to an accessPackageResourceRole and an accessPackageResourceScope. + /// Retrieve the properties and relationships of an accessPackage object. /// public class AccessPackageItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/IncompatibleGroups/Item/GroupItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/IncompatibleGroups/Item/GroupItemRequestBuilder.cs index 49bf9e6d467..92e961bd20f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/IncompatibleGroups/Item/GroupItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/IncompatibleGroups/Item/GroupItemRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.EntitlementManagement.AccessPackages.Item.IncompatibleGroups.Item.Ref; +using Microsoft.Graph.IdentityGovernance.EntitlementManagement.AccessPackages.Item.IncompatibleGroups.Item.ServiceProvisioningErrors; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; using System.IO; @@ -15,6 +16,10 @@ public class GroupItemRequestBuilder : BaseRequestBuilder { public RefRequestBuilder Ref { get => new RefRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GroupItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/IncompatibleGroups/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/IncompatibleGroups/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..01a50dd1a37 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/IncompatibleGroups/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.EntitlementManagement.AccessPackages.Item.IncompatibleGroups.Item.ServiceProvisioningErrors.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}/identityGovernance/entitlementManagement/accessPackages/{accessPackage%2Did}/incompatibleGroups/{group%2Did}/serviceProvisioningErrors/$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}/identityGovernance/entitlementManagement/accessPackages/{accessPackage%2Did}/incompatibleGroups/{group%2Did}/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/EntitlementManagement/AccessPackages/Item/IncompatibleGroups/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/IncompatibleGroups/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..a46e80821a5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/IncompatibleGroups/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.EntitlementManagement.AccessPackages.Item.IncompatibleGroups.Item.ServiceProvisioningErrors.Count; +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.IdentityGovernance.EntitlementManagement.AccessPackages.Item.IncompatibleGroups.Item.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\entitlementManagement\accessPackages\{accessPackage-id}\incompatibleGroups\{group-id}\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/entitlementManagement/accessPackages/{accessPackage%2Did}/incompatibleGroups/{group%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/entitlementManagement/accessPackages/{accessPackage%2Did}/incompatibleGroups/{group%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/IdentityGovernanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/IdentityGovernanceRequestBuilder.cs index afc39b8e873..fdff5be6418 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/IdentityGovernanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/IdentityGovernanceRequestBuilder.cs @@ -3,6 +3,7 @@ using Microsoft.Graph.IdentityGovernance.AppConsent; using Microsoft.Graph.IdentityGovernance.EntitlementManagement; using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess; using Microsoft.Graph.IdentityGovernance.TermsOfUse; using Microsoft.Graph.Models.IdentityGovernance; using Microsoft.Graph.Models.ODataErrors; @@ -35,6 +36,10 @@ public class IdentityGovernanceRequestBuilder : BaseRequestBuilder { public LifecycleWorkflowsRequestBuilder LifecycleWorkflows { get => new LifecycleWorkflowsRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the privilegedAccess property of the microsoft.graph.identityGovernance entity. + public PrivilegedAccessRequestBuilder PrivilegedAccess { get => + new PrivilegedAccessRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the termsOfUse property of the microsoft.graph.identityGovernance entity. public TermsOfUseRequestBuilder TermsOfUse { get => new TermsOfUseRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/CreatedBy/CreatedByRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/CreatedBy/CreatedByRequestBuilder.cs index 5f5e19ba2a1..d4ecc9798e1 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/CreatedBy/CreatedByRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/CreatedBy/CreatedByRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.CustomTaskExtensions.Item.CreatedBy.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.CustomTaskExtensions.Item.CreatedBy.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class CreatedByRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new CreatedByRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/CreatedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/CreatedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..32bcfbcae4d --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/CreatedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.CustomTaskExtensions.Item.CreatedBy.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/customTaskExtensions/{customTaskExtension%2Did}/createdBy/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/customTaskExtensions/{customTaskExtension%2Did}/createdBy/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/CreatedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/CreatedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..50945e2be51 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/CreatedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.CustomTaskExtensions.Item.CreatedBy.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.CustomTaskExtensions.Item.CreatedBy.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\customTaskExtensions\{customTaskExtension-id}\createdBy\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/customTaskExtensions/{customTaskExtension%2Did}/createdBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/customTaskExtensions/{customTaskExtension%2Did}/createdBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/LastModifiedBy/LastModifiedByRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/LastModifiedBy/LastModifiedByRequestBuilder.cs index ca22d9a2c82..11797370f9f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/LastModifiedBy/LastModifiedByRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/LastModifiedBy/LastModifiedByRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.CustomTaskExtensions.Item.LastModifiedBy.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.CustomTaskExtensions.Item.LastModifiedBy.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class LastModifiedByRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new LastModifiedByRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/LastModifiedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/LastModifiedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..4b89264cb1a --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/LastModifiedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.CustomTaskExtensions.Item.LastModifiedBy.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/customTaskExtensions/{customTaskExtension%2Did}/lastModifiedBy/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/customTaskExtensions/{customTaskExtension%2Did}/lastModifiedBy/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/LastModifiedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/LastModifiedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..c914ddd6cdc --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/LastModifiedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.CustomTaskExtensions.Item.LastModifiedBy.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.CustomTaskExtensions.Item.LastModifiedBy.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\customTaskExtensions\{customTaskExtension-id}\lastModifiedBy\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/customTaskExtensions/{customTaskExtension%2Did}/lastModifiedBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/customTaskExtensions/{customTaskExtension%2Did}/lastModifiedBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/CreatedBy/CreatedByRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/CreatedBy/CreatedByRequestBuilder.cs index 3c1c86db523..934ea464a8e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/CreatedBy/CreatedByRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/CreatedBy/CreatedByRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.CreatedBy.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.CreatedBy.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class CreatedByRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new CreatedByRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/CreatedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/CreatedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..49e21ba0e77 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/CreatedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.CreatedBy.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/createdBy/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/createdBy/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/CreatedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/CreatedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..441f7ecf452 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/CreatedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.CreatedBy.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.CreatedBy.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\createdBy\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/createdBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/createdBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/LastModifiedBy/LastModifiedByRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/LastModifiedBy/LastModifiedByRequestBuilder.cs index c2e2c6af3fe..b1e157a03ab 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/LastModifiedBy/LastModifiedByRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/LastModifiedBy/LastModifiedByRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.LastModifiedBy.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.LastModifiedBy.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class LastModifiedByRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new LastModifiedByRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/LastModifiedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/LastModifiedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..2531e028127 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/LastModifiedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.LastModifiedBy.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/lastModifiedBy/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/lastModifiedBy/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/LastModifiedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/LastModifiedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..71d7b3acc62 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/LastModifiedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.LastModifiedBy.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.LastModifiedBy.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\lastModifiedBy\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/lastModifiedBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/lastModifiedBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..fd85a8ef25f --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..e70af4f619d --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\runs\{run-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs index 09160b49f70..2d7c8a17278 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.TaskProcessingResults.Item.Subject.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class SubjectRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SubjectRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..14bde14b830 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.UserProcessingResults.Item.Subject.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..31c693bd62c --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.UserProcessingResults.Item.Subject.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.UserProcessingResults.Item.Subject.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\runs\{run-id}\userProcessingResults\{userProcessingResult-id}\subject\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/SubjectRequestBuilder.cs index bf6f0f98ef2..8acac6e6114 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/SubjectRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.UserProcessingResults.Item.Subject.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.UserProcessingResults.Item.Subject.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class SubjectRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SubjectRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..e994446a0c2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.UserProcessingResults.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..2904cd7c135 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.UserProcessingResults.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.UserProcessingResults.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\runs\{run-id}\userProcessingResults\{userProcessingResult-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs index a7bbcf5c5ef..aa38fc26f9c 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.UserProcessingResults.Item.TaskProcessingResults.Item.Subject.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.UserProcessingResults.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class SubjectRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SubjectRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..472b66fba1b --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.TaskReports.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/taskReports/{taskReport%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/taskReports/{taskReport%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..b0dab8fedff --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.TaskReports.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.TaskReports.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\taskReports\{taskReport-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/taskReports/{taskReport%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/taskReports/{taskReport%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs index 43f0fa8feab..28267314923 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.TaskReports.Item.TaskProcessingResults.Item.Subject.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.TaskReports.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class SubjectRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SubjectRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..be84435df93 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Tasks.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..21c21f92a99 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Tasks.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Tasks.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\tasks\{task-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs index e9cb1e7a36c..ed23a06b81d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Tasks.Item.TaskProcessingResults.Item.Subject.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Tasks.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class SubjectRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SubjectRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..c52469434fd --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.UserProcessingResults.Item.Subject.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..761dd492ab8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.UserProcessingResults.Item.Subject.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.UserProcessingResults.Item.Subject.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\userProcessingResults\{userProcessingResult-id}\subject\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/Subject/SubjectRequestBuilder.cs index 20e0a598d46..28724fd958a 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/Subject/SubjectRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.UserProcessingResults.Item.Subject.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.UserProcessingResults.Item.Subject.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class SubjectRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SubjectRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..7d6e14f2709 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.UserProcessingResults.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..2f54b25de77 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.UserProcessingResults.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.UserProcessingResults.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\userProcessingResults\{userProcessingResult-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs index 58c5ec2250a..52c4206e14c 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.UserProcessingResults.Item.TaskProcessingResults.Item.Subject.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.UserProcessingResults.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class SubjectRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SubjectRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/CreatedBy/CreatedByRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/CreatedBy/CreatedByRequestBuilder.cs index fc6436f5e55..ec61199053c 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/CreatedBy/CreatedByRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/CreatedBy/CreatedByRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Versions.Item.CreatedBy.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Versions.Item.CreatedBy.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class CreatedByRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new CreatedByRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/CreatedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/CreatedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..b483e1f033c --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/CreatedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Versions.Item.CreatedBy.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/createdBy/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/createdBy/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/CreatedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/CreatedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..0dc6bd7204c --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/CreatedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Versions.Item.CreatedBy.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Versions.Item.CreatedBy.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\versions\{workflowVersion-versionNumber}\createdBy\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/createdBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/createdBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/LastModifiedBy/LastModifiedByRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/LastModifiedBy/LastModifiedByRequestBuilder.cs index 9c723d524f9..bd261c24278 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/LastModifiedBy/LastModifiedByRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/LastModifiedBy/LastModifiedByRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Versions.Item.LastModifiedBy.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Versions.Item.LastModifiedBy.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class LastModifiedByRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new LastModifiedByRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/LastModifiedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/LastModifiedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..34fa0872873 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/LastModifiedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Versions.Item.LastModifiedBy.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/lastModifiedBy/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/lastModifiedBy/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/LastModifiedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/LastModifiedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..d97884a1c8a --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/LastModifiedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Versions.Item.LastModifiedBy.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Versions.Item.LastModifiedBy.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\versions\{workflowVersion-versionNumber}\lastModifiedBy\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/lastModifiedBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/lastModifiedBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..b97263213a8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Versions.Item.Tasks.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..f69ec17961c --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Versions.Item.Tasks.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Versions.Item.Tasks.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\versions\{workflowVersion-versionNumber}\tasks\{task-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs index 76549efeef9..54853066950 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Versions.Item.Tasks.Item.TaskProcessingResults.Item.Subject.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Versions.Item.Tasks.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class SubjectRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SubjectRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/WorkflowTemplates/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/WorkflowTemplates/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..547779c7eeb --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/WorkflowTemplates/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.WorkflowTemplates.Item.Tasks.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/workflowTemplates/{workflowTemplate%2Did}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/workflowTemplates/{workflowTemplate%2Did}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/WorkflowTemplates/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/WorkflowTemplates/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..3281df55690 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/WorkflowTemplates/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.WorkflowTemplates.Item.Tasks.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.WorkflowTemplates.Item.Tasks.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflowTemplates\{workflowTemplate-id}\tasks\{task-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflowTemplates/{workflowTemplate%2Did}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflowTemplates/{workflowTemplate%2Did}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/WorkflowTemplates/Item/Tasks/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/WorkflowTemplates/Item/Tasks/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs index df2f40bcfa6..33b7981ee0a 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/WorkflowTemplates/Item/Tasks/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/WorkflowTemplates/Item/Tasks/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.WorkflowTemplates.Item.Tasks.Item.TaskProcessingResults.Item.Subject.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.WorkflowTemplates.Item.Tasks.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class SubjectRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SubjectRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/CreatedBy/CreatedByRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/CreatedBy/CreatedByRequestBuilder.cs index 57536cfc48b..162a94dd447 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/CreatedBy/CreatedByRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/CreatedBy/CreatedByRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.CreatedBy.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.CreatedBy.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class CreatedByRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new CreatedByRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/CreatedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/CreatedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..addd31af092 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/CreatedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.Workflows.Item.CreatedBy.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/createdBy/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/createdBy/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/Workflows/Item/CreatedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/CreatedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..4c722b79a40 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/CreatedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.CreatedBy.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.Workflows.Item.CreatedBy.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflows\{workflow-id}\createdBy\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/createdBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/createdBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/LastModifiedBy/LastModifiedByRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/LastModifiedBy/LastModifiedByRequestBuilder.cs index 3eb4ec9c4f0..b650c57ef12 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/LastModifiedBy/LastModifiedByRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/LastModifiedBy/LastModifiedByRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.LastModifiedBy.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.LastModifiedBy.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class LastModifiedByRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new LastModifiedByRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/LastModifiedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/LastModifiedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..e05de09c2a5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/LastModifiedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.Workflows.Item.LastModifiedBy.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/lastModifiedBy/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/lastModifiedBy/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/Workflows/Item/LastModifiedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/LastModifiedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..c2ae0a08ade --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/LastModifiedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.LastModifiedBy.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.Workflows.Item.LastModifiedBy.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflows\{workflow-id}\lastModifiedBy\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/lastModifiedBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/lastModifiedBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..4e5db9def7e --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..94b17f9c08b --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflows\{workflow-id}\runs\{run-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs index d8d3040355c..54d28dd2aa1 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.TaskProcessingResults.Item.Subject.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class SubjectRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SubjectRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..5a133c9fde0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.UserProcessingResults.Item.Subject.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..4b5f91014ca --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.UserProcessingResults.Item.Subject.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.UserProcessingResults.Item.Subject.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflows\{workflow-id}\runs\{run-id}\userProcessingResults\{userProcessingResult-id}\subject\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/SubjectRequestBuilder.cs index aaf261be585..d19e77dcd98 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/SubjectRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.UserProcessingResults.Item.Subject.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.UserProcessingResults.Item.Subject.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class SubjectRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SubjectRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..6a217413fb5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.UserProcessingResults.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..b090cb1351e --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.UserProcessingResults.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.UserProcessingResults.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflows\{workflow-id}\runs\{run-id}\userProcessingResults\{userProcessingResult-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs index 016d794d2f0..2bba8fe1bec 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.UserProcessingResults.Item.TaskProcessingResults.Item.Subject.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.UserProcessingResults.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class SubjectRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SubjectRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..fa4a457c97a --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.Workflows.Item.TaskReports.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/taskReports/{taskReport%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/taskReports/{taskReport%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..afd3417d115 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.TaskReports.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.Workflows.Item.TaskReports.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflows\{workflow-id}\taskReports\{taskReport-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/taskReports/{taskReport%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/taskReports/{taskReport%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs index 4acbb4ba3cf..8bba0afa1ce 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.TaskReports.Item.TaskProcessingResults.Item.Subject.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.TaskReports.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class SubjectRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SubjectRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..a933549936f --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Tasks.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..6858ddfd8b3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Tasks.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Tasks.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflows\{workflow-id}\tasks\{task-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs index 055e2bcac05..3d7c4f8d1ed 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Tasks.Item.TaskProcessingResults.Item.Subject.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Tasks.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class SubjectRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SubjectRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..dff881c78f3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.Workflows.Item.UserProcessingResults.Item.Subject.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..ff180185801 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.UserProcessingResults.Item.Subject.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.Workflows.Item.UserProcessingResults.Item.Subject.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflows\{workflow-id}\userProcessingResults\{userProcessingResult-id}\subject\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/Subject/SubjectRequestBuilder.cs index 08e1c258059..157e8274a7e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/Subject/SubjectRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.UserProcessingResults.Item.Subject.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.UserProcessingResults.Item.Subject.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class SubjectRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SubjectRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..acdf0639739 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.Workflows.Item.UserProcessingResults.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..ac36fc45f4f --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.UserProcessingResults.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.Workflows.Item.UserProcessingResults.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflows\{workflow-id}\userProcessingResults\{userProcessingResult-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs index 118c21f6196..cf9a2a6f53e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.UserProcessingResults.Item.TaskProcessingResults.Item.Subject.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.UserProcessingResults.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class SubjectRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SubjectRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/CreatedBy/CreatedByRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/CreatedBy/CreatedByRequestBuilder.cs index cc99046df93..90ceb0e8c92 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/CreatedBy/CreatedByRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/CreatedBy/CreatedByRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Versions.Item.CreatedBy.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Versions.Item.CreatedBy.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class CreatedByRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new CreatedByRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/CreatedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/CreatedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..c12937c616e --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/CreatedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Versions.Item.CreatedBy.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/createdBy/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/createdBy/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/CreatedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/CreatedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..10f38883e15 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/CreatedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Versions.Item.CreatedBy.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Versions.Item.CreatedBy.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflows\{workflow-id}\versions\{workflowVersion-versionNumber}\createdBy\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/createdBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/createdBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/LastModifiedBy/LastModifiedByRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/LastModifiedBy/LastModifiedByRequestBuilder.cs index 379a442a690..b91f303881c 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/LastModifiedBy/LastModifiedByRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/LastModifiedBy/LastModifiedByRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Versions.Item.LastModifiedBy.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Versions.Item.LastModifiedBy.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class LastModifiedByRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new LastModifiedByRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/LastModifiedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/LastModifiedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..5e2c899671b --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/LastModifiedBy/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Versions.Item.LastModifiedBy.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/lastModifiedBy/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/lastModifiedBy/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/LastModifiedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/LastModifiedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..57b3a17b065 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/LastModifiedBy/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Versions.Item.LastModifiedBy.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Versions.Item.LastModifiedBy.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflows\{workflow-id}\versions\{workflowVersion-versionNumber}\lastModifiedBy\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/lastModifiedBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/lastModifiedBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..1a0b2469b69 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Versions.Item.Tasks.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..3ffaba978ea --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Versions.Item.Tasks.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.Count; +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.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Versions.Item.Tasks.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflows\{workflow-id}\versions\{workflowVersion-versionNumber}\tasks\{task-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs index 26cf3c246a6..5d3f68bce48 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/SubjectRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Versions.Item.Tasks.Item.TaskProcessingResults.Item.Subject.MailboxSettings; +using Microsoft.Graph.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Versions.Item.Tasks.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class SubjectRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new SubjectRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/AssignmentApprovalsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/AssignmentApprovalsRequestBuilder.cs new file mode 100644 index 00000000000..a8771d6707f --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/AssignmentApprovalsRequestBuilder.cs @@ -0,0 +1,253 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentApprovals.Count; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentApprovals.FilterByCurrentUserWithOn; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentApprovals.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.IdentityGovernance.PrivilegedAccess.Group.AssignmentApprovals { + /// + /// Provides operations to manage the assignmentApprovals property of the microsoft.graph.privilegedAccessGroup entity. + /// + public class AssignmentApprovalsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the assignmentApprovals property of the microsoft.graph.privilegedAccessGroup entity. + /// The unique identifier of approval + public ApprovalItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("approval%2Did", position); + return new ApprovalItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new AssignmentApprovalsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AssignmentApprovalsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentApprovals{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AssignmentApprovalsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AssignmentApprovalsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentApprovals{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Provides operations to call the filterByCurrentUser method. + /// + /// Usage: on='{on}' + public FilterByCurrentUserWithOnRequestBuilder FilterByCurrentUserWithOn(string on) { + if(string.IsNullOrEmpty(on)) throw new ArgumentNullException(nameof(on)); + return new FilterByCurrentUserWithOnRequestBuilder(PathParameters, RequestAdapter, on); + } + /// + /// Get assignmentApprovals from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ApprovalCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to assignmentApprovals for identityGovernance + /// + /// 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.Approval body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Microsoft.Graph.Models.Approval 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.Approval.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get assignmentApprovals from identityGovernance + /// + /// Configuration 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 AssignmentApprovalsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to assignmentApprovals for identityGovernance + /// + /// 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.Approval body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Microsoft.Graph.Models.Approval 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 AssignmentApprovalsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public AssignmentApprovalsRequestBuilder WithUrl(string rawUrl) { + return new AssignmentApprovalsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get assignmentApprovals from identityGovernance + /// + public class AssignmentApprovalsRequestBuilderGetQueryParameters { + /// 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 AssignmentApprovalsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AssignmentApprovalsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AssignmentApprovalsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new assignmentApprovalsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AssignmentApprovalsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AssignmentApprovalsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new assignmentApprovalsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public AssignmentApprovalsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..55d24564619 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentApprovals.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}/identityGovernance/privilegedAccess/group/assignmentApprovals/$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}/identityGovernance/privilegedAccess/group/assignmentApprovals/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/DirectoryNamespace/DeletedItems/Delta/DeltaRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnRequestBuilder.cs similarity index 63% rename from src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Delta/DeltaRequestBuilder.cs rename to src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnRequestBuilder.cs index bb1b7683dc8..f0e88092f84 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Delta/DeltaRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnRequestBuilder.cs @@ -8,54 +8,56 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.DirectoryNamespace.DeletedItems.Delta { +namespace Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentApprovals.FilterByCurrentUserWithOn { /// - /// Provides operations to call the delta method. + /// Provides operations to call the filterByCurrentUser method. /// - public class DeltaRequestBuilder : BaseRequestBuilder { + public class FilterByCurrentUserWithOnRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new DeltaRequestBuilder and sets the default values. + /// Instantiates a new FilterByCurrentUserWithOnRequestBuilder and sets the default values. /// + /// Usage: on='{on}' /// Path parameters for the request /// The request adapter to use to execute the requests. - public DeltaRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directory/deletedItems/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", pathParameters) { + public FilterByCurrentUserWithOnRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter, string on = "") : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentApprovals/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", pathParameters) { + if (!string.IsNullOrWhiteSpace(on)) PathParameters.Add("on", on); } /// - /// Instantiates a new DeltaRequestBuilder and sets the default values. + /// Instantiates a new FilterByCurrentUserWithOnRequestBuilder and sets the default values. /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public DeltaRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directory/deletedItems/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", rawUrl) { + public FilterByCurrentUserWithOnRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentApprovals/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", rawUrl) { } /// - /// Invoke function delta + /// Invoke function filterByCurrentUser /// /// Cancellation token to use when cancelling requests /// Configuration for 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> { {"4XX", ODataError.CreateFromDiscriminatorValue}, {"5XX", ODataError.CreateFromDiscriminatorValue}, }; - return await RequestAdapter.SendAsync(requestInfo, DeltaResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return await RequestAdapter.SendAsync(requestInfo, FilterByCurrentUserWithOnResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Invoke function delta + /// Invoke function filterByCurrentUser /// /// Configuration 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, @@ -64,7 +66,7 @@ public RequestInformation ToGetRequestInformation(Action /// The raw URL to use for the request builder. - public DeltaRequestBuilder WithUrl(string rawUrl) { - return new DeltaRequestBuilder(rawUrl, RequestAdapter); + public FilterByCurrentUserWithOnRequestBuilder WithUrl(string rawUrl) { + return new FilterByCurrentUserWithOnRequestBuilder(rawUrl, RequestAdapter); } /// - /// Invoke function delta + /// Invoke function filterByCurrentUser /// - public class DeltaRequestBuilderGetQueryParameters { + public class FilterByCurrentUserWithOnRequestBuilderGetQueryParameters { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -136,17 +138,17 @@ public class DeltaRequestBuilderGetQueryParameters { /// /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class DeltaRequestBuilderGetRequestConfiguration { + public class FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// Request query parameters - public DeltaRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DeltaRequestBuilderGetQueryParameters(); + public FilterByCurrentUserWithOnRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FilterByCurrentUserWithOnRequestBuilderGetQueryParameters(); /// - /// Instantiates a new deltaRequestBuilderGetRequestConfiguration and sets the default values. + /// Instantiates a new filterByCurrentUserWithOnRequestBuilderGetRequestConfiguration and sets the default values. /// - public DeltaRequestBuilderGetRequestConfiguration() { + public FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs new file mode 100644 index 00000000000..0716c7d03da --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -0,0 +1,50 @@ +// +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentApprovals.FilterByCurrentUserWithOn { + public class FilterByCurrentUserWithOnResponse : 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 FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FilterByCurrentUserWithOnResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.Approval.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/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Item/ApprovalItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Item/ApprovalItemRequestBuilder.cs new file mode 100644 index 00000000000..4282935a46a --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Item/ApprovalItemRequestBuilder.cs @@ -0,0 +1,256 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentApprovals.Item.Stages; +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentApprovals.Item { + /// + /// Provides operations to manage the assignmentApprovals property of the microsoft.graph.privilegedAccessGroup entity. + /// + public class ApprovalItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the stages property of the microsoft.graph.approval entity. + public StagesRequestBuilder Stages { get => + new StagesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ApprovalItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ApprovalItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentApprovals/{approval%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ApprovalItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ApprovalItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentApprovals/{approval%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property assignmentApprovals for identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Get assignmentApprovals from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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.Approval.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property assignmentApprovals in identityGovernance + /// + /// 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.Approval body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.Approval 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.Approval.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property assignmentApprovals for identityGovernance + /// + /// Configuration 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 ApprovalItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get assignmentApprovals from identityGovernance + /// + /// Configuration 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 ApprovalItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property assignmentApprovals in identityGovernance + /// + /// 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.Approval body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.Approval 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 ApprovalItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ApprovalItemRequestBuilder WithUrl(string rawUrl) { + return new ApprovalItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ApprovalItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new ApprovalItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public ApprovalItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get assignmentApprovals from identityGovernance + /// + public class ApprovalItemRequestBuilderGetQueryParameters { + /// 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 ApprovalItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ApprovalItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ApprovalItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new ApprovalItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ApprovalItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ApprovalItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new ApprovalItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public ApprovalItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Item/Stages/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Item/Stages/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..e400c2390c5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Item/Stages/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentApprovals.Item.Stages.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}/identityGovernance/privilegedAccess/group/assignmentApprovals/{approval%2Did}/stages/$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}/identityGovernance/privilegedAccess/group/assignmentApprovals/{approval%2Did}/stages/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Item/Stages/Item/ApprovalStageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Item/Stages/Item/ApprovalStageItemRequestBuilder.cs new file mode 100644 index 00000000000..a1114b6cc9d --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Item/Stages/Item/ApprovalStageItemRequestBuilder.cs @@ -0,0 +1,253 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentApprovals.Item.Stages.Item { + /// + /// Provides operations to manage the stages property of the microsoft.graph.approval entity. + /// + public class ApprovalStageItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new ApprovalStageItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ApprovalStageItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentApprovals/{approval%2Did}/stages/{approvalStage%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ApprovalStageItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ApprovalStageItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentApprovals/{approval%2Did}/stages/{approvalStage%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property stages for identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// In Azure AD entitlement management, retrieve the properties of an approvalStage object. An approval stage is contained within an approval object. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ApprovalStage.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// In Azure AD entitlement management, approve or deny an approvalStage object in an approval. + /// Find more info here + /// + /// 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(ApprovalStage body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(ApprovalStage 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, ApprovalStage.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property stages for identityGovernance + /// + /// Configuration 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 ApprovalStageItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// In Azure AD entitlement management, retrieve the properties of an approvalStage object. An approval stage is contained within an approval object. + /// + /// Configuration 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 ApprovalStageItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// In Azure AD entitlement management, approve or deny an approvalStage object in an approval. + /// + /// 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(ApprovalStage body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(ApprovalStage 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 ApprovalStageItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ApprovalStageItemRequestBuilder WithUrl(string rawUrl) { + return new ApprovalStageItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ApprovalStageItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new ApprovalStageItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public ApprovalStageItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// In Azure AD entitlement management, retrieve the properties of an approvalStage object. An approval stage is contained within an approval object. + /// + public class ApprovalStageItemRequestBuilderGetQueryParameters { + /// 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 ApprovalStageItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ApprovalStageItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ApprovalStageItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new ApprovalStageItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ApprovalStageItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ApprovalStageItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new ApprovalStageItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public ApprovalStageItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Item/Stages/StagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Item/Stages/StagesRequestBuilder.cs new file mode 100644 index 00000000000..a8568ec3ec7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Item/Stages/StagesRequestBuilder.cs @@ -0,0 +1,245 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentApprovals.Item.Stages.Count; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentApprovals.Item.Stages.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.IdentityGovernance.PrivilegedAccess.Group.AssignmentApprovals.Item.Stages { + /// + /// Provides operations to manage the stages property of the microsoft.graph.approval entity. + /// + public class StagesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the stages property of the microsoft.graph.approval entity. + /// The unique identifier of approvalStage + public ApprovalStageItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("approvalStage%2Did", position); + return new ApprovalStageItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new StagesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StagesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentApprovals/{approval%2Did}/stages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new StagesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public StagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentApprovals/{approval%2Did}/stages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// In Azure AD entitlement management, list the approvalStage objects associated with an approval object. This call can be made by an approver, providing the identifier of the access package assignment request. + /// Find more info here + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ApprovalStageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to stages for identityGovernance + /// + /// 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(ApprovalStage body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ApprovalStage 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, ApprovalStage.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// In Azure AD entitlement management, list the approvalStage objects associated with an approval object. This call can be made by an approver, providing the identifier of the access package assignment 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 StagesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to stages for identityGovernance + /// + /// 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(ApprovalStage body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ApprovalStage 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 StagesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public StagesRequestBuilder WithUrl(string rawUrl) { + return new StagesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// In Azure AD entitlement management, list the approvalStage objects associated with an approval object. This call can be made by an approver, providing the identifier of the access package assignment request. + /// + public class StagesRequestBuilderGetQueryParameters { + /// 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 StagesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public StagesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new StagesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new stagesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public StagesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class StagesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new stagesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public StagesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/AssignmentScheduleInstancesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/AssignmentScheduleInstancesRequestBuilder.cs new file mode 100644 index 00000000000..a8000968a6d --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/AssignmentScheduleInstancesRequestBuilder.cs @@ -0,0 +1,253 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances.Count; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances.FilterByCurrentUserWithOn; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances.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.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances { + /// + /// Provides operations to manage the assignmentScheduleInstances property of the microsoft.graph.privilegedAccessGroup entity. + /// + public class AssignmentScheduleInstancesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the assignmentScheduleInstances property of the microsoft.graph.privilegedAccessGroup entity. + /// The unique identifier of privilegedAccessGroupAssignmentScheduleInstance + public PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("privilegedAccessGroupAssignmentScheduleInstance%2Did", position); + return new PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new AssignmentScheduleInstancesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AssignmentScheduleInstancesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AssignmentScheduleInstancesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AssignmentScheduleInstancesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Provides operations to call the filterByCurrentUser method. + /// + /// Usage: on='{on}' + public FilterByCurrentUserWithOnRequestBuilder FilterByCurrentUserWithOn(string on) { + if(string.IsNullOrEmpty(on)) throw new ArgumentNullException(nameof(on)); + return new FilterByCurrentUserWithOnRequestBuilder(PathParameters, RequestAdapter, on); + } + /// + /// Get assignmentScheduleInstances from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to assignmentScheduleInstances for identityGovernance + /// + /// 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(PrivilegedAccessGroupAssignmentScheduleInstance body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(PrivilegedAccessGroupAssignmentScheduleInstance 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, PrivilegedAccessGroupAssignmentScheduleInstance.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get assignmentScheduleInstances from identityGovernance + /// + /// Configuration 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 AssignmentScheduleInstancesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to assignmentScheduleInstances for identityGovernance + /// + /// 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(PrivilegedAccessGroupAssignmentScheduleInstance body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(PrivilegedAccessGroupAssignmentScheduleInstance 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 AssignmentScheduleInstancesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public AssignmentScheduleInstancesRequestBuilder WithUrl(string rawUrl) { + return new AssignmentScheduleInstancesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get assignmentScheduleInstances from identityGovernance + /// + public class AssignmentScheduleInstancesRequestBuilderGetQueryParameters { + /// 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 AssignmentScheduleInstancesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AssignmentScheduleInstancesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AssignmentScheduleInstancesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new assignmentScheduleInstancesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AssignmentScheduleInstancesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AssignmentScheduleInstancesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new assignmentScheduleInstancesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public AssignmentScheduleInstancesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..e3be9af5f9b --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances.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}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/$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}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnRequestBuilder.cs new file mode 100644 index 00000000000..8ed313a6c60 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnRequestBuilder.cs @@ -0,0 +1,157 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances.FilterByCurrentUserWithOn { + /// + /// Provides operations to call the filterByCurrentUser method. + /// + public class FilterByCurrentUserWithOnRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new FilterByCurrentUserWithOnRequestBuilder and sets the default values. + /// + /// Usage: on='{on}' + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FilterByCurrentUserWithOnRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter, string on = "") : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", pathParameters) { + if (!string.IsNullOrWhiteSpace(on)) PathParameters.Add("on", on); + } + /// + /// Instantiates a new FilterByCurrentUserWithOnRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FilterByCurrentUserWithOnRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", rawUrl) { + } + /// + /// Invoke function filterByCurrentUser + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, FilterByCurrentUserWithOnResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Invoke function filterByCurrentUser + /// + /// Configuration 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 FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public FilterByCurrentUserWithOnRequestBuilder WithUrl(string rawUrl) { + return new FilterByCurrentUserWithOnRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Invoke function filterByCurrentUser + /// + public class FilterByCurrentUserWithOnRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// 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 FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FilterByCurrentUserWithOnRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FilterByCurrentUserWithOnRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new filterByCurrentUserWithOnRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs new file mode 100644 index 00000000000..24cf678a673 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -0,0 +1,50 @@ +// +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances.FilterByCurrentUserWithOn { + public class FilterByCurrentUserWithOnResponse : 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 FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FilterByCurrentUserWithOnResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(PrivilegedAccessGroupAssignmentScheduleInstance.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/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Item/ActivatedUsing/ActivatedUsingRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Item/ActivatedUsing/ActivatedUsingRequestBuilder.cs new file mode 100644 index 00000000000..41b4a300c87 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Item/ActivatedUsing/ActivatedUsingRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances.Item.ActivatedUsing { + /// + /// Provides operations to manage the activatedUsing property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleInstance entity. + /// + public class ActivatedUsingRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new ActivatedUsingRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ActivatedUsingRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/{privilegedAccessGroupAssignmentScheduleInstance%2Did}/activatedUsing{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ActivatedUsingRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ActivatedUsingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/{privilegedAccessGroupAssignmentScheduleInstance%2Did}/activatedUsing{?%24select,%24expand}", rawUrl) { + } + /// + /// Get activatedUsing from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, PrivilegedAccessGroupEligibilityScheduleInstance.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get activatedUsing from identityGovernance + /// + /// Configuration 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 ActivatedUsingRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ActivatedUsingRequestBuilder WithUrl(string rawUrl) { + return new ActivatedUsingRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get activatedUsing from identityGovernance + /// + public class ActivatedUsingRequestBuilderGetQueryParameters { + /// 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 ActivatedUsingRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ActivatedUsingRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ActivatedUsingRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new activatedUsingRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ActivatedUsingRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Item/Group/GroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Item/Group/GroupRequestBuilder.cs new file mode 100644 index 00000000000..d68b00fe532 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Item/Group/GroupRequestBuilder.cs @@ -0,0 +1,132 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances.Item.Group.ServiceProvisioningErrors; +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances.Item.Group { + /// + /// Provides operations to manage the group property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleInstance entity. + /// + public class GroupRequestBuilder : BaseRequestBuilder { + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new GroupRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GroupRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/{privilegedAccessGroupAssignmentScheduleInstance%2Did}/group{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new GroupRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GroupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/{privilegedAccessGroupAssignmentScheduleInstance%2Did}/group{?%24select,%24expand}", rawUrl) { + } + /// + /// Get group from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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.Group.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get group from identityGovernance + /// + /// Configuration 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 GroupRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public GroupRequestBuilder WithUrl(string rawUrl) { + return new GroupRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get group from identityGovernance + /// + public class GroupRequestBuilderGetQueryParameters { + /// 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 GroupRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GroupRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GroupRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new groupRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GroupRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..eea8a762087 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances.Item.Group.ServiceProvisioningErrors.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}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/{privilegedAccessGroupAssignmentScheduleInstance%2Did}/group/serviceProvisioningErrors/$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}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/{privilegedAccessGroupAssignmentScheduleInstance%2Did}/group/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..d51be34acc0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances.Item.Group.ServiceProvisioningErrors.Count; +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances.Item.Group.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\privilegedAccess\group\assignmentScheduleInstances\{privilegedAccessGroupAssignmentScheduleInstance-id}\group\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/{privilegedAccessGroupAssignmentScheduleInstance%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/{privilegedAccessGroupAssignmentScheduleInstance%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Item/Principal/PrincipalRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Item/Principal/PrincipalRequestBuilder.cs new file mode 100644 index 00000000000..833dc340a8d --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Item/Principal/PrincipalRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances.Item.Principal { + /// + /// Provides operations to manage the principal property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleInstance 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}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/{privilegedAccessGroupAssignmentScheduleInstance%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}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/{privilegedAccessGroupAssignmentScheduleInstance%2Did}/principal{?%24select,%24expand}", rawUrl) { + } + /// + /// Get principal from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Get principal from identityGovernance + /// + /// Configuration 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public PrincipalRequestBuilder WithUrl(string rawUrl) { + return new PrincipalRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get principal from identityGovernance + /// + 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/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Item/PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Item/PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder.cs new file mode 100644 index 00000000000..cf47669a940 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Item/PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder.cs @@ -0,0 +1,266 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances.Item.ActivatedUsing; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances.Item.Group; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances.Item.Principal; +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances.Item { + /// + /// Provides operations to manage the assignmentScheduleInstances property of the microsoft.graph.privilegedAccessGroup entity. + /// + public class PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the activatedUsing property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleInstance entity. + public ActivatedUsingRequestBuilder ActivatedUsing { get => + new ActivatedUsingRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the group property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleInstance entity. + public Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances.Item.Group.GroupRequestBuilder Group { get => + new Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances.Item.Group.GroupRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the principal property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleInstance entity. + public PrincipalRequestBuilder Principal { get => + new PrincipalRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/{privilegedAccessGroupAssignmentScheduleInstance%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/{privilegedAccessGroupAssignmentScheduleInstance%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property assignmentScheduleInstances for identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Get assignmentScheduleInstances from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, PrivilegedAccessGroupAssignmentScheduleInstance.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property assignmentScheduleInstances in identityGovernance + /// + /// 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(PrivilegedAccessGroupAssignmentScheduleInstance body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(PrivilegedAccessGroupAssignmentScheduleInstance 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, PrivilegedAccessGroupAssignmentScheduleInstance.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property assignmentScheduleInstances for identityGovernance + /// + /// Configuration 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 PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get assignmentScheduleInstances from identityGovernance + /// + /// Configuration 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 PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property assignmentScheduleInstances in identityGovernance + /// + /// 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(PrivilegedAccessGroupAssignmentScheduleInstance body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(PrivilegedAccessGroupAssignmentScheduleInstance 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 PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder WithUrl(string rawUrl) { + return new PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get assignmentScheduleInstances from identityGovernance + /// + public class PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderGetQueryParameters { + /// 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 PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/AssignmentScheduleRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/AssignmentScheduleRequestsRequestBuilder.cs new file mode 100644 index 00000000000..cb9b00db476 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/AssignmentScheduleRequestsRequestBuilder.cs @@ -0,0 +1,253 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.Count; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.FilterByCurrentUserWithOn; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.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.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests { + /// + /// Provides operations to manage the assignmentScheduleRequests property of the microsoft.graph.privilegedAccessGroup entity. + /// + public class AssignmentScheduleRequestsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the assignmentScheduleRequests property of the microsoft.graph.privilegedAccessGroup entity. + /// The unique identifier of privilegedAccessGroupAssignmentScheduleRequest + public PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("privilegedAccessGroupAssignmentScheduleRequest%2Did", position); + return new PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new AssignmentScheduleRequestsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AssignmentScheduleRequestsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AssignmentScheduleRequestsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AssignmentScheduleRequestsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Provides operations to call the filterByCurrentUser method. + /// + /// Usage: on='{on}' + public FilterByCurrentUserWithOnRequestBuilder FilterByCurrentUserWithOn(string on) { + if(string.IsNullOrEmpty(on)) throw new ArgumentNullException(nameof(on)); + return new FilterByCurrentUserWithOnRequestBuilder(PathParameters, RequestAdapter, on); + } + /// + /// Get assignmentScheduleRequests from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to assignmentScheduleRequests for identityGovernance + /// + /// 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(PrivilegedAccessGroupAssignmentScheduleRequest body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(PrivilegedAccessGroupAssignmentScheduleRequest 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, PrivilegedAccessGroupAssignmentScheduleRequest.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get assignmentScheduleRequests from identityGovernance + /// + /// Configuration 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 AssignmentScheduleRequestsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to assignmentScheduleRequests for identityGovernance + /// + /// 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(PrivilegedAccessGroupAssignmentScheduleRequest body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(PrivilegedAccessGroupAssignmentScheduleRequest 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 AssignmentScheduleRequestsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public AssignmentScheduleRequestsRequestBuilder WithUrl(string rawUrl) { + return new AssignmentScheduleRequestsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get assignmentScheduleRequests from identityGovernance + /// + public class AssignmentScheduleRequestsRequestBuilderGetQueryParameters { + /// 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 AssignmentScheduleRequestsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AssignmentScheduleRequestsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AssignmentScheduleRequestsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new assignmentScheduleRequestsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AssignmentScheduleRequestsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AssignmentScheduleRequestsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new assignmentScheduleRequestsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public AssignmentScheduleRequestsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..9a76bc46744 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.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}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/$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}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnRequestBuilder.cs new file mode 100644 index 00000000000..4599374f6f9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnRequestBuilder.cs @@ -0,0 +1,157 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.FilterByCurrentUserWithOn { + /// + /// Provides operations to call the filterByCurrentUser method. + /// + public class FilterByCurrentUserWithOnRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new FilterByCurrentUserWithOnRequestBuilder and sets the default values. + /// + /// Usage: on='{on}' + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FilterByCurrentUserWithOnRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter, string on = "") : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", pathParameters) { + if (!string.IsNullOrWhiteSpace(on)) PathParameters.Add("on", on); + } + /// + /// Instantiates a new FilterByCurrentUserWithOnRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FilterByCurrentUserWithOnRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", rawUrl) { + } + /// + /// Invoke function filterByCurrentUser + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, FilterByCurrentUserWithOnResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Invoke function filterByCurrentUser + /// + /// Configuration 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 FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public FilterByCurrentUserWithOnRequestBuilder WithUrl(string rawUrl) { + return new FilterByCurrentUserWithOnRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Invoke function filterByCurrentUser + /// + public class FilterByCurrentUserWithOnRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// 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 FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FilterByCurrentUserWithOnRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FilterByCurrentUserWithOnRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new filterByCurrentUserWithOnRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs new file mode 100644 index 00000000000..cd972eefb40 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -0,0 +1,50 @@ +// +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.FilterByCurrentUserWithOn { + public class FilterByCurrentUserWithOnResponse : 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 FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FilterByCurrentUserWithOnResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(PrivilegedAccessGroupAssignmentScheduleRequest.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/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/ActivatedUsing/ActivatedUsingRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/ActivatedUsing/ActivatedUsingRequestBuilder.cs new file mode 100644 index 00000000000..9c2a5d22e72 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/ActivatedUsing/ActivatedUsingRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.Item.ActivatedUsing { + /// + /// Provides operations to manage the activatedUsing property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest entity. + /// + public class ActivatedUsingRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new ActivatedUsingRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ActivatedUsingRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}/activatedUsing{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ActivatedUsingRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ActivatedUsingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}/activatedUsing{?%24select,%24expand}", rawUrl) { + } + /// + /// Get activatedUsing from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, PrivilegedAccessGroupEligibilitySchedule.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get activatedUsing from identityGovernance + /// + /// Configuration 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 ActivatedUsingRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ActivatedUsingRequestBuilder WithUrl(string rawUrl) { + return new ActivatedUsingRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get activatedUsing from identityGovernance + /// + public class ActivatedUsingRequestBuilderGetQueryParameters { + /// 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 ActivatedUsingRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ActivatedUsingRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ActivatedUsingRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new activatedUsingRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ActivatedUsingRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/Restore/RestoreRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/Cancel/CancelRequestBuilder.cs similarity index 52% rename from src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/Restore/RestoreRequestBuilder.cs rename to src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/Cancel/CancelRequestBuilder.cs index 1210eb5c866..4376ba478f3 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/Restore/RestoreRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/Cancel/CancelRequestBuilder.cs @@ -1,6 +1,5 @@ // using Microsoft.Graph.Models.ODataErrors; -using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -9,64 +8,62 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace Microsoft.Graph.DirectoryNamespace.DeletedItems.Item.Restore { +namespace Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.Item.Cancel { /// - /// Provides operations to call the restore method. + /// Provides operations to call the cancel method. /// - public class RestoreRequestBuilder : BaseRequestBuilder { + public class CancelRequestBuilder : BaseRequestBuilder { /// - /// Instantiates a new RestoreRequestBuilder 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 RestoreRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/restore", pathParameters) { + public CancelRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}/cancel", pathParameters) { } /// - /// Instantiates a new RestoreRequestBuilder 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 RestoreRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/restore", rawUrl) { + public CancelRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}/cancel", rawUrl) { } /// - /// Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. - /// Find more info here + /// 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> { {"4XX", ODataError.CreateFromDiscriminatorValue}, {"5XX", ODataError.CreateFromDiscriminatorValue}, }; - return await RequestAdapter.SendAsync(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + /// 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, UrlTemplate = UrlTemplate, PathParameters = PathParameters, }; - requestInfo.Headers.Add("Accept", "application/json"); if (requestConfiguration != null) { - var requestConfig = new RestoreRequestBuilderPostRequestConfiguration(); + var requestConfig = new CancelRequestBuilderPostRequestConfiguration(); requestConfiguration.Invoke(requestConfig); requestInfo.AddRequestOptions(requestConfig.Options); requestInfo.AddHeaders(requestConfig.Headers); @@ -77,21 +74,21 @@ public RequestInformation ToPostRequestInformation(Action /// The raw URL to use for the request builder. - public RestoreRequestBuilder WithUrl(string rawUrl) { - return new RestoreRequestBuilder(rawUrl, RequestAdapter); + public CancelRequestBuilder WithUrl(string rawUrl) { + return new CancelRequestBuilder(rawUrl, RequestAdapter); } /// /// Configuration for the request such as headers, query parameters, and middleware options. /// - public class RestoreRequestBuilderPostRequestConfiguration { + public class CancelRequestBuilderPostRequestConfiguration { /// Request headers public RequestHeaders Headers { get; set; } /// Request options public IList Options { get; set; } /// - /// Instantiates a new restoreRequestBuilderPostRequestConfiguration and sets the default values. + /// Instantiates a new cancelRequestBuilderPostRequestConfiguration and sets the default values. /// - public RestoreRequestBuilderPostRequestConfiguration() { + public CancelRequestBuilderPostRequestConfiguration() { Options = new List(); Headers = new RequestHeaders(); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/Group/GroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/Group/GroupRequestBuilder.cs new file mode 100644 index 00000000000..484b0189a83 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/Group/GroupRequestBuilder.cs @@ -0,0 +1,132 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.Item.Group.ServiceProvisioningErrors; +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.Item.Group { + /// + /// Provides operations to manage the group property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest entity. + /// + public class GroupRequestBuilder : BaseRequestBuilder { + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new GroupRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GroupRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}/group{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new GroupRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GroupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}/group{?%24select,%24expand}", rawUrl) { + } + /// + /// Get group from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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.Group.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get group from identityGovernance + /// + /// Configuration 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 GroupRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public GroupRequestBuilder WithUrl(string rawUrl) { + return new GroupRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get group from identityGovernance + /// + public class GroupRequestBuilderGetQueryParameters { + /// 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 GroupRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GroupRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GroupRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new groupRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GroupRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..6caec0444fa --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.Item.Group.ServiceProvisioningErrors.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}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}/group/serviceProvisioningErrors/$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}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}/group/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..bf502eacfee --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.Item.Group.ServiceProvisioningErrors.Count; +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.Item.Group.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\privilegedAccess\group\assignmentScheduleRequests\{privilegedAccessGroupAssignmentScheduleRequest-id}\group\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/Principal/PrincipalRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/Principal/PrincipalRequestBuilder.cs new file mode 100644 index 00000000000..c845a15bdcc --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/Principal/PrincipalRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.Item.Principal { + /// + /// Provides operations to manage the principal property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest 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}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%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}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}/principal{?%24select,%24expand}", rawUrl) { + } + /// + /// Get principal from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Get principal from identityGovernance + /// + /// Configuration 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public PrincipalRequestBuilder WithUrl(string rawUrl) { + return new PrincipalRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get principal from identityGovernance + /// + 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/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder.cs new file mode 100644 index 00000000000..90733cb65fe --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder.cs @@ -0,0 +1,276 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.Item.ActivatedUsing; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.Item.Cancel; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.Item.Group; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.Item.Principal; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.Item.TargetSchedule; +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.Item { + /// + /// Provides operations to manage the assignmentScheduleRequests property of the microsoft.graph.privilegedAccessGroup entity. + /// + public class PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the activatedUsing property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest entity. + public ActivatedUsingRequestBuilder ActivatedUsing { get => + new ActivatedUsingRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the cancel method. + public CancelRequestBuilder Cancel { get => + new CancelRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the group property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest entity. + public Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.Item.Group.GroupRequestBuilder Group { get => + new Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.Item.Group.GroupRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the principal property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest entity. + public PrincipalRequestBuilder Principal { get => + new PrincipalRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the targetSchedule property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest entity. + public TargetScheduleRequestBuilder TargetSchedule { get => + new TargetScheduleRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property assignmentScheduleRequests for identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Get assignmentScheduleRequests from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, PrivilegedAccessGroupAssignmentScheduleRequest.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property assignmentScheduleRequests in identityGovernance + /// + /// 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(PrivilegedAccessGroupAssignmentScheduleRequest body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(PrivilegedAccessGroupAssignmentScheduleRequest 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, PrivilegedAccessGroupAssignmentScheduleRequest.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property assignmentScheduleRequests for identityGovernance + /// + /// Configuration 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 PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get assignmentScheduleRequests from identityGovernance + /// + /// Configuration 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 PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property assignmentScheduleRequests in identityGovernance + /// + /// 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(PrivilegedAccessGroupAssignmentScheduleRequest body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(PrivilegedAccessGroupAssignmentScheduleRequest 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 PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder WithUrl(string rawUrl) { + return new PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get assignmentScheduleRequests from identityGovernance + /// + public class PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderGetQueryParameters { + /// 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 PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/TargetSchedule/TargetScheduleRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/TargetSchedule/TargetScheduleRequestBuilder.cs new file mode 100644 index 00000000000..cfe2c416d72 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/TargetSchedule/TargetScheduleRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.Item.TargetSchedule { + /// + /// Provides operations to manage the targetSchedule property of the microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest entity. + /// + public class TargetScheduleRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new TargetScheduleRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TargetScheduleRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}/targetSchedule{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TargetScheduleRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TargetScheduleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}/targetSchedule{?%24select,%24expand}", rawUrl) { + } + /// + /// Get targetSchedule from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, PrivilegedAccessGroupEligibilitySchedule.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get targetSchedule from identityGovernance + /// + /// Configuration 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 TargetScheduleRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public TargetScheduleRequestBuilder WithUrl(string rawUrl) { + return new TargetScheduleRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get targetSchedule from identityGovernance + /// + public class TargetScheduleRequestBuilderGetQueryParameters { + /// 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 TargetScheduleRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TargetScheduleRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TargetScheduleRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new targetScheduleRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TargetScheduleRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/AssignmentSchedulesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/AssignmentSchedulesRequestBuilder.cs new file mode 100644 index 00000000000..50569adf3d8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/AssignmentSchedulesRequestBuilder.cs @@ -0,0 +1,253 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules.Count; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules.FilterByCurrentUserWithOn; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules.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.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules { + /// + /// Provides operations to manage the assignmentSchedules property of the microsoft.graph.privilegedAccessGroup entity. + /// + public class AssignmentSchedulesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the assignmentSchedules property of the microsoft.graph.privilegedAccessGroup entity. + /// The unique identifier of privilegedAccessGroupAssignmentSchedule + public PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("privilegedAccessGroupAssignmentSchedule%2Did", position); + return new PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new AssignmentSchedulesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AssignmentSchedulesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentSchedules{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AssignmentSchedulesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AssignmentSchedulesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentSchedules{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Provides operations to call the filterByCurrentUser method. + /// + /// Usage: on='{on}' + public FilterByCurrentUserWithOnRequestBuilder FilterByCurrentUserWithOn(string on) { + if(string.IsNullOrEmpty(on)) throw new ArgumentNullException(nameof(on)); + return new FilterByCurrentUserWithOnRequestBuilder(PathParameters, RequestAdapter, on); + } + /// + /// Get assignmentSchedules from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, PrivilegedAccessGroupAssignmentScheduleCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to assignmentSchedules for identityGovernance + /// + /// 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(PrivilegedAccessGroupAssignmentSchedule body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(PrivilegedAccessGroupAssignmentSchedule 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, PrivilegedAccessGroupAssignmentSchedule.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get assignmentSchedules from identityGovernance + /// + /// Configuration 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 AssignmentSchedulesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to assignmentSchedules for identityGovernance + /// + /// 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(PrivilegedAccessGroupAssignmentSchedule body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(PrivilegedAccessGroupAssignmentSchedule 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 AssignmentSchedulesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public AssignmentSchedulesRequestBuilder WithUrl(string rawUrl) { + return new AssignmentSchedulesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get assignmentSchedules from identityGovernance + /// + public class AssignmentSchedulesRequestBuilderGetQueryParameters { + /// 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 AssignmentSchedulesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AssignmentSchedulesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AssignmentSchedulesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new assignmentSchedulesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AssignmentSchedulesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AssignmentSchedulesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new assignmentSchedulesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public AssignmentSchedulesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..b0e9a77f58d --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules.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}/identityGovernance/privilegedAccess/group/assignmentSchedules/$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}/identityGovernance/privilegedAccess/group/assignmentSchedules/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnRequestBuilder.cs new file mode 100644 index 00000000000..abe8373f262 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnRequestBuilder.cs @@ -0,0 +1,157 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules.FilterByCurrentUserWithOn { + /// + /// Provides operations to call the filterByCurrentUser method. + /// + public class FilterByCurrentUserWithOnRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new FilterByCurrentUserWithOnRequestBuilder and sets the default values. + /// + /// Usage: on='{on}' + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FilterByCurrentUserWithOnRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter, string on = "") : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentSchedules/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", pathParameters) { + if (!string.IsNullOrWhiteSpace(on)) PathParameters.Add("on", on); + } + /// + /// Instantiates a new FilterByCurrentUserWithOnRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FilterByCurrentUserWithOnRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentSchedules/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", rawUrl) { + } + /// + /// Invoke function filterByCurrentUser + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, FilterByCurrentUserWithOnResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Invoke function filterByCurrentUser + /// + /// Configuration 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 FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public FilterByCurrentUserWithOnRequestBuilder WithUrl(string rawUrl) { + return new FilterByCurrentUserWithOnRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Invoke function filterByCurrentUser + /// + public class FilterByCurrentUserWithOnRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// 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 FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FilterByCurrentUserWithOnRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FilterByCurrentUserWithOnRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new filterByCurrentUserWithOnRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs new file mode 100644 index 00000000000..15ec6ec540a --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -0,0 +1,50 @@ +// +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules.FilterByCurrentUserWithOn { + public class FilterByCurrentUserWithOnResponse : 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 FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FilterByCurrentUserWithOnResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(PrivilegedAccessGroupAssignmentSchedule.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/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Item/ActivatedUsing/ActivatedUsingRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Item/ActivatedUsing/ActivatedUsingRequestBuilder.cs new file mode 100644 index 00000000000..23e2f081c40 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Item/ActivatedUsing/ActivatedUsingRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules.Item.ActivatedUsing { + /// + /// Provides operations to manage the activatedUsing property of the microsoft.graph.privilegedAccessGroupAssignmentSchedule entity. + /// + public class ActivatedUsingRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new ActivatedUsingRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ActivatedUsingRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentSchedules/{privilegedAccessGroupAssignmentSchedule%2Did}/activatedUsing{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ActivatedUsingRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ActivatedUsingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentSchedules/{privilegedAccessGroupAssignmentSchedule%2Did}/activatedUsing{?%24select,%24expand}", rawUrl) { + } + /// + /// Get activatedUsing from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, PrivilegedAccessGroupEligibilitySchedule.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get activatedUsing from identityGovernance + /// + /// Configuration 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 ActivatedUsingRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ActivatedUsingRequestBuilder WithUrl(string rawUrl) { + return new ActivatedUsingRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get activatedUsing from identityGovernance + /// + public class ActivatedUsingRequestBuilderGetQueryParameters { + /// 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 ActivatedUsingRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ActivatedUsingRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ActivatedUsingRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new activatedUsingRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ActivatedUsingRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Item/Group/GroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Item/Group/GroupRequestBuilder.cs new file mode 100644 index 00000000000..9f87bb3e841 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Item/Group/GroupRequestBuilder.cs @@ -0,0 +1,132 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules.Item.Group.ServiceProvisioningErrors; +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules.Item.Group { + /// + /// Provides operations to manage the group property of the microsoft.graph.privilegedAccessGroupAssignmentSchedule entity. + /// + public class GroupRequestBuilder : BaseRequestBuilder { + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new GroupRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GroupRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentSchedules/{privilegedAccessGroupAssignmentSchedule%2Did}/group{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new GroupRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GroupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentSchedules/{privilegedAccessGroupAssignmentSchedule%2Did}/group{?%24select,%24expand}", rawUrl) { + } + /// + /// Get group from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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.Group.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get group from identityGovernance + /// + /// Configuration 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 GroupRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public GroupRequestBuilder WithUrl(string rawUrl) { + return new GroupRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get group from identityGovernance + /// + public class GroupRequestBuilderGetQueryParameters { + /// 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 GroupRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GroupRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GroupRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new groupRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GroupRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..b846e0c4bdc --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules.Item.Group.ServiceProvisioningErrors.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}/identityGovernance/privilegedAccess/group/assignmentSchedules/{privilegedAccessGroupAssignmentSchedule%2Did}/group/serviceProvisioningErrors/$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}/identityGovernance/privilegedAccess/group/assignmentSchedules/{privilegedAccessGroupAssignmentSchedule%2Did}/group/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..a629d89174b --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules.Item.Group.ServiceProvisioningErrors.Count; +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules.Item.Group.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\privilegedAccess\group\assignmentSchedules\{privilegedAccessGroupAssignmentSchedule-id}\group\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentSchedules/{privilegedAccessGroupAssignmentSchedule%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentSchedules/{privilegedAccessGroupAssignmentSchedule%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Item/Principal/PrincipalRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Item/Principal/PrincipalRequestBuilder.cs new file mode 100644 index 00000000000..6a3c838daa6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Item/Principal/PrincipalRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules.Item.Principal { + /// + /// Provides operations to manage the principal property of the microsoft.graph.privilegedAccessGroupAssignmentSchedule 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}/identityGovernance/privilegedAccess/group/assignmentSchedules/{privilegedAccessGroupAssignmentSchedule%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}/identityGovernance/privilegedAccess/group/assignmentSchedules/{privilegedAccessGroupAssignmentSchedule%2Did}/principal{?%24select,%24expand}", rawUrl) { + } + /// + /// Get principal from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Get principal from identityGovernance + /// + /// Configuration 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public PrincipalRequestBuilder WithUrl(string rawUrl) { + return new PrincipalRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get principal from identityGovernance + /// + 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/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Item/PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Item/PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder.cs new file mode 100644 index 00000000000..d8e66e3a472 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Item/PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder.cs @@ -0,0 +1,266 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules.Item.ActivatedUsing; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules.Item.Group; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules.Item.Principal; +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.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules.Item { + /// + /// Provides operations to manage the assignmentSchedules property of the microsoft.graph.privilegedAccessGroup entity. + /// + public class PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the activatedUsing property of the microsoft.graph.privilegedAccessGroupAssignmentSchedule entity. + public ActivatedUsingRequestBuilder ActivatedUsing { get => + new ActivatedUsingRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the group property of the microsoft.graph.privilegedAccessGroupAssignmentSchedule entity. + public Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules.Item.Group.GroupRequestBuilder Group { get => + new Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules.Item.Group.GroupRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the principal property of the microsoft.graph.privilegedAccessGroupAssignmentSchedule entity. + public PrincipalRequestBuilder Principal { get => + new PrincipalRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentSchedules/{privilegedAccessGroupAssignmentSchedule%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentSchedules/{privilegedAccessGroupAssignmentSchedule%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property assignmentSchedules for identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Get assignmentSchedules from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, PrivilegedAccessGroupAssignmentSchedule.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property assignmentSchedules in identityGovernance + /// + /// 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(PrivilegedAccessGroupAssignmentSchedule body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(PrivilegedAccessGroupAssignmentSchedule 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, PrivilegedAccessGroupAssignmentSchedule.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property assignmentSchedules for identityGovernance + /// + /// Configuration 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 PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get assignmentSchedules from identityGovernance + /// + /// Configuration 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 PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property assignmentSchedules in identityGovernance + /// + /// 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(PrivilegedAccessGroupAssignmentSchedule body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(PrivilegedAccessGroupAssignmentSchedule 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 PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder WithUrl(string rawUrl) { + return new PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get assignmentSchedules from identityGovernance + /// + public class PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderGetQueryParameters { + /// 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 PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public PrivilegedAccessGroupAssignmentScheduleItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..7fcf3108bbe --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleInstances.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}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances/$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}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/EligibilityScheduleInstancesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/EligibilityScheduleInstancesRequestBuilder.cs new file mode 100644 index 00000000000..4ceb91c0076 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/EligibilityScheduleInstancesRequestBuilder.cs @@ -0,0 +1,253 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleInstances.Count; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleInstances.FilterByCurrentUserWithOn; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleInstances.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.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleInstances { + /// + /// Provides operations to manage the eligibilityScheduleInstances property of the microsoft.graph.privilegedAccessGroup entity. + /// + public class EligibilityScheduleInstancesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the eligibilityScheduleInstances property of the microsoft.graph.privilegedAccessGroup entity. + /// The unique identifier of privilegedAccessGroupEligibilityScheduleInstance + public PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("privilegedAccessGroupEligibilityScheduleInstance%2Did", position); + return new PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new EligibilityScheduleInstancesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public EligibilityScheduleInstancesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new EligibilityScheduleInstancesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public EligibilityScheduleInstancesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Provides operations to call the filterByCurrentUser method. + /// + /// Usage: on='{on}' + public FilterByCurrentUserWithOnRequestBuilder FilterByCurrentUserWithOn(string on) { + if(string.IsNullOrEmpty(on)) throw new ArgumentNullException(nameof(on)); + return new FilterByCurrentUserWithOnRequestBuilder(PathParameters, RequestAdapter, on); + } + /// + /// Get eligibilityScheduleInstances from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to eligibilityScheduleInstances for identityGovernance + /// + /// 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(PrivilegedAccessGroupEligibilityScheduleInstance body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(PrivilegedAccessGroupEligibilityScheduleInstance 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, PrivilegedAccessGroupEligibilityScheduleInstance.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get eligibilityScheduleInstances from identityGovernance + /// + /// Configuration 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 EligibilityScheduleInstancesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to eligibilityScheduleInstances for identityGovernance + /// + /// 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(PrivilegedAccessGroupEligibilityScheduleInstance body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(PrivilegedAccessGroupEligibilityScheduleInstance 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 EligibilityScheduleInstancesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public EligibilityScheduleInstancesRequestBuilder WithUrl(string rawUrl) { + return new EligibilityScheduleInstancesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get eligibilityScheduleInstances from identityGovernance + /// + public class EligibilityScheduleInstancesRequestBuilderGetQueryParameters { + /// 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 EligibilityScheduleInstancesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public EligibilityScheduleInstancesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new EligibilityScheduleInstancesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new eligibilityScheduleInstancesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public EligibilityScheduleInstancesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class EligibilityScheduleInstancesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new eligibilityScheduleInstancesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public EligibilityScheduleInstancesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnRequestBuilder.cs new file mode 100644 index 00000000000..0d652a3959f --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnRequestBuilder.cs @@ -0,0 +1,157 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleInstances.FilterByCurrentUserWithOn { + /// + /// Provides operations to call the filterByCurrentUser method. + /// + public class FilterByCurrentUserWithOnRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new FilterByCurrentUserWithOnRequestBuilder and sets the default values. + /// + /// Usage: on='{on}' + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FilterByCurrentUserWithOnRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter, string on = "") : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", pathParameters) { + if (!string.IsNullOrWhiteSpace(on)) PathParameters.Add("on", on); + } + /// + /// Instantiates a new FilterByCurrentUserWithOnRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FilterByCurrentUserWithOnRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", rawUrl) { + } + /// + /// Invoke function filterByCurrentUser + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, FilterByCurrentUserWithOnResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Invoke function filterByCurrentUser + /// + /// Configuration 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 FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public FilterByCurrentUserWithOnRequestBuilder WithUrl(string rawUrl) { + return new FilterByCurrentUserWithOnRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Invoke function filterByCurrentUser + /// + public class FilterByCurrentUserWithOnRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// 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 FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FilterByCurrentUserWithOnRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FilterByCurrentUserWithOnRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new filterByCurrentUserWithOnRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs new file mode 100644 index 00000000000..10ff1c84efd --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -0,0 +1,50 @@ +// +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleInstances.FilterByCurrentUserWithOn { + public class FilterByCurrentUserWithOnResponse : 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 FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FilterByCurrentUserWithOnResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(PrivilegedAccessGroupEligibilityScheduleInstance.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/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/Item/Group/GroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/Item/Group/GroupRequestBuilder.cs new file mode 100644 index 00000000000..705f12c3c3f --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/Item/Group/GroupRequestBuilder.cs @@ -0,0 +1,132 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleInstances.Item.Group.ServiceProvisioningErrors; +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.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleInstances.Item.Group { + /// + /// Provides operations to manage the group property of the microsoft.graph.privilegedAccessGroupEligibilityScheduleInstance entity. + /// + public class GroupRequestBuilder : BaseRequestBuilder { + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new GroupRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GroupRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances/{privilegedAccessGroupEligibilityScheduleInstance%2Did}/group{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new GroupRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GroupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances/{privilegedAccessGroupEligibilityScheduleInstance%2Did}/group{?%24select,%24expand}", rawUrl) { + } + /// + /// Get group from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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.Group.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get group from identityGovernance + /// + /// Configuration 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 GroupRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public GroupRequestBuilder WithUrl(string rawUrl) { + return new GroupRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get group from identityGovernance + /// + public class GroupRequestBuilderGetQueryParameters { + /// 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 GroupRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GroupRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GroupRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new groupRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GroupRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..fc098fbc3aa --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleInstances.Item.Group.ServiceProvisioningErrors.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}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances/{privilegedAccessGroupEligibilityScheduleInstance%2Did}/group/serviceProvisioningErrors/$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}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances/{privilegedAccessGroupEligibilityScheduleInstance%2Did}/group/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..df1ed45861d --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleInstances.Item.Group.ServiceProvisioningErrors.Count; +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.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleInstances.Item.Group.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\privilegedAccess\group\eligibilityScheduleInstances\{privilegedAccessGroupEligibilityScheduleInstance-id}\group\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances/{privilegedAccessGroupEligibilityScheduleInstance%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances/{privilegedAccessGroupEligibilityScheduleInstance%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/Item/Principal/PrincipalRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/Item/Principal/PrincipalRequestBuilder.cs new file mode 100644 index 00000000000..97f755d5be9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/Item/Principal/PrincipalRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleInstances.Item.Principal { + /// + /// Provides operations to manage the principal property of the microsoft.graph.privilegedAccessGroupEligibilityScheduleInstance 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}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances/{privilegedAccessGroupEligibilityScheduleInstance%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}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances/{privilegedAccessGroupEligibilityScheduleInstance%2Did}/principal{?%24select,%24expand}", rawUrl) { + } + /// + /// Get principal from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Get principal from identityGovernance + /// + /// Configuration 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public PrincipalRequestBuilder WithUrl(string rawUrl) { + return new PrincipalRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get principal from identityGovernance + /// + 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/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/Item/PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/Item/PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder.cs new file mode 100644 index 00000000000..e99b650cd22 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/Item/PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder.cs @@ -0,0 +1,261 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleInstances.Item.Group; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleInstances.Item.Principal; +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.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleInstances.Item { + /// + /// Provides operations to manage the eligibilityScheduleInstances property of the microsoft.graph.privilegedAccessGroup entity. + /// + public class PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the group property of the microsoft.graph.privilegedAccessGroupEligibilityScheduleInstance entity. + public Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleInstances.Item.Group.GroupRequestBuilder Group { get => + new Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleInstances.Item.Group.GroupRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the principal property of the microsoft.graph.privilegedAccessGroupEligibilityScheduleInstance entity. + public PrincipalRequestBuilder Principal { get => + new PrincipalRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances/{privilegedAccessGroupEligibilityScheduleInstance%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances/{privilegedAccessGroupEligibilityScheduleInstance%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property eligibilityScheduleInstances for identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Get eligibilityScheduleInstances from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, PrivilegedAccessGroupEligibilityScheduleInstance.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property eligibilityScheduleInstances in identityGovernance + /// + /// 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(PrivilegedAccessGroupEligibilityScheduleInstance body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(PrivilegedAccessGroupEligibilityScheduleInstance 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, PrivilegedAccessGroupEligibilityScheduleInstance.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property eligibilityScheduleInstances for identityGovernance + /// + /// Configuration 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 PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get eligibilityScheduleInstances from identityGovernance + /// + /// Configuration 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 PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property eligibilityScheduleInstances in identityGovernance + /// + /// 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(PrivilegedAccessGroupEligibilityScheduleInstance body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(PrivilegedAccessGroupEligibilityScheduleInstance 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 PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder WithUrl(string rawUrl) { + return new PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get eligibilityScheduleInstances from identityGovernance + /// + public class PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderGetQueryParameters { + /// 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 PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..0be539f69af --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.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}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/$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}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/EligibilityScheduleRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/EligibilityScheduleRequestsRequestBuilder.cs new file mode 100644 index 00000000000..d1c17e700ce --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/EligibilityScheduleRequestsRequestBuilder.cs @@ -0,0 +1,253 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.Count; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.FilterByCurrentUserWithOn; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.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.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests { + /// + /// Provides operations to manage the eligibilityScheduleRequests property of the microsoft.graph.privilegedAccessGroup entity. + /// + public class EligibilityScheduleRequestsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the eligibilityScheduleRequests property of the microsoft.graph.privilegedAccessGroup entity. + /// The unique identifier of privilegedAccessGroupEligibilityScheduleRequest + public PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("privilegedAccessGroupEligibilityScheduleRequest%2Did", position); + return new PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new EligibilityScheduleRequestsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public EligibilityScheduleRequestsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new EligibilityScheduleRequestsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public EligibilityScheduleRequestsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Provides operations to call the filterByCurrentUser method. + /// + /// Usage: on='{on}' + public FilterByCurrentUserWithOnRequestBuilder FilterByCurrentUserWithOn(string on) { + if(string.IsNullOrEmpty(on)) throw new ArgumentNullException(nameof(on)); + return new FilterByCurrentUserWithOnRequestBuilder(PathParameters, RequestAdapter, on); + } + /// + /// Get eligibilityScheduleRequests from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to eligibilityScheduleRequests for identityGovernance + /// + /// 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(PrivilegedAccessGroupEligibilityScheduleRequest body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(PrivilegedAccessGroupEligibilityScheduleRequest 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, PrivilegedAccessGroupEligibilityScheduleRequest.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get eligibilityScheduleRequests from identityGovernance + /// + /// Configuration 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 EligibilityScheduleRequestsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to eligibilityScheduleRequests for identityGovernance + /// + /// 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(PrivilegedAccessGroupEligibilityScheduleRequest body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(PrivilegedAccessGroupEligibilityScheduleRequest 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 EligibilityScheduleRequestsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public EligibilityScheduleRequestsRequestBuilder WithUrl(string rawUrl) { + return new EligibilityScheduleRequestsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get eligibilityScheduleRequests from identityGovernance + /// + public class EligibilityScheduleRequestsRequestBuilderGetQueryParameters { + /// 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 EligibilityScheduleRequestsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public EligibilityScheduleRequestsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new EligibilityScheduleRequestsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new eligibilityScheduleRequestsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public EligibilityScheduleRequestsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class EligibilityScheduleRequestsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new eligibilityScheduleRequestsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public EligibilityScheduleRequestsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnRequestBuilder.cs new file mode 100644 index 00000000000..c1f23a4faf7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnRequestBuilder.cs @@ -0,0 +1,157 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.FilterByCurrentUserWithOn { + /// + /// Provides operations to call the filterByCurrentUser method. + /// + public class FilterByCurrentUserWithOnRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new FilterByCurrentUserWithOnRequestBuilder and sets the default values. + /// + /// Usage: on='{on}' + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FilterByCurrentUserWithOnRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter, string on = "") : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", pathParameters) { + if (!string.IsNullOrWhiteSpace(on)) PathParameters.Add("on", on); + } + /// + /// Instantiates a new FilterByCurrentUserWithOnRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FilterByCurrentUserWithOnRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", rawUrl) { + } + /// + /// Invoke function filterByCurrentUser + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, FilterByCurrentUserWithOnResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Invoke function filterByCurrentUser + /// + /// Configuration 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 FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public FilterByCurrentUserWithOnRequestBuilder WithUrl(string rawUrl) { + return new FilterByCurrentUserWithOnRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Invoke function filterByCurrentUser + /// + public class FilterByCurrentUserWithOnRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// 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 FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FilterByCurrentUserWithOnRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FilterByCurrentUserWithOnRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new filterByCurrentUserWithOnRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs new file mode 100644 index 00000000000..ad3ed26326f --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -0,0 +1,50 @@ +// +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.FilterByCurrentUserWithOn { + public class FilterByCurrentUserWithOnResponse : 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 FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FilterByCurrentUserWithOnResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(PrivilegedAccessGroupEligibilityScheduleRequest.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/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/Cancel/CancelRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/Cancel/CancelRequestBuilder.cs new file mode 100644 index 00000000000..97deb44de75 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/Cancel/CancelRequestBuilder.cs @@ -0,0 +1,97 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.Item.Cancel { + /// + /// Provides operations to call the cancel method. + /// + public class CancelRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CancelRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CancelRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/{privilegedAccessGroupEligibilityScheduleRequest%2Did}/cancel", pathParameters) { + } + /// + /// 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 CancelRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/{privilegedAccessGroupEligibilityScheduleRequest%2Did}/cancel", rawUrl) { + } + /// + /// 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) { +#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).ConfigureAwait(false); + } + /// + /// 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) { +#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 CancelRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CancelRequestBuilder WithUrl(string rawUrl) { + return new CancelRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CancelRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new cancelRequestBuilderPostRequestConfiguration and sets the default values. + /// + public CancelRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/Group/GroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/Group/GroupRequestBuilder.cs new file mode 100644 index 00000000000..28d77e9842c --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/Group/GroupRequestBuilder.cs @@ -0,0 +1,132 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.Item.Group.ServiceProvisioningErrors; +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.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.Item.Group { + /// + /// Provides operations to manage the group property of the microsoft.graph.privilegedAccessGroupEligibilityScheduleRequest entity. + /// + public class GroupRequestBuilder : BaseRequestBuilder { + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new GroupRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GroupRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/{privilegedAccessGroupEligibilityScheduleRequest%2Did}/group{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new GroupRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GroupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/{privilegedAccessGroupEligibilityScheduleRequest%2Did}/group{?%24select,%24expand}", rawUrl) { + } + /// + /// Get group from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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.Group.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get group from identityGovernance + /// + /// Configuration 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 GroupRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public GroupRequestBuilder WithUrl(string rawUrl) { + return new GroupRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get group from identityGovernance + /// + public class GroupRequestBuilderGetQueryParameters { + /// 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 GroupRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GroupRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GroupRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new groupRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GroupRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..b8ab5514691 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.Item.Group.ServiceProvisioningErrors.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}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/{privilegedAccessGroupEligibilityScheduleRequest%2Did}/group/serviceProvisioningErrors/$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}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/{privilegedAccessGroupEligibilityScheduleRequest%2Did}/group/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..99296644846 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.Item.Group.ServiceProvisioningErrors.Count; +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.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.Item.Group.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\privilegedAccess\group\eligibilityScheduleRequests\{privilegedAccessGroupEligibilityScheduleRequest-id}\group\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/{privilegedAccessGroupEligibilityScheduleRequest%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/{privilegedAccessGroupEligibilityScheduleRequest%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/Principal/PrincipalRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/Principal/PrincipalRequestBuilder.cs new file mode 100644 index 00000000000..bbed0e958a3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/Principal/PrincipalRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.Item.Principal { + /// + /// Provides operations to manage the principal property of the microsoft.graph.privilegedAccessGroupEligibilityScheduleRequest 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}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/{privilegedAccessGroupEligibilityScheduleRequest%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}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/{privilegedAccessGroupEligibilityScheduleRequest%2Did}/principal{?%24select,%24expand}", rawUrl) { + } + /// + /// Get principal from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Get principal from identityGovernance + /// + /// Configuration 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public PrincipalRequestBuilder WithUrl(string rawUrl) { + return new PrincipalRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get principal from identityGovernance + /// + 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/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder.cs new file mode 100644 index 00000000000..ae38fe1bc3a --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder.cs @@ -0,0 +1,271 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.Item.Cancel; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.Item.Group; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.Item.Principal; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.Item.TargetSchedule; +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.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.Item { + /// + /// Provides operations to manage the eligibilityScheduleRequests property of the microsoft.graph.privilegedAccessGroup entity. + /// + public class PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the cancel method. + public CancelRequestBuilder Cancel { get => + new CancelRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the group property of the microsoft.graph.privilegedAccessGroupEligibilityScheduleRequest entity. + public Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.Item.Group.GroupRequestBuilder Group { get => + new Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.Item.Group.GroupRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the principal property of the microsoft.graph.privilegedAccessGroupEligibilityScheduleRequest entity. + public PrincipalRequestBuilder Principal { get => + new PrincipalRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the targetSchedule property of the microsoft.graph.privilegedAccessGroupEligibilityScheduleRequest entity. + public TargetScheduleRequestBuilder TargetSchedule { get => + new TargetScheduleRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/{privilegedAccessGroupEligibilityScheduleRequest%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/{privilegedAccessGroupEligibilityScheduleRequest%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property eligibilityScheduleRequests for identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Get eligibilityScheduleRequests from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, PrivilegedAccessGroupEligibilityScheduleRequest.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property eligibilityScheduleRequests in identityGovernance + /// + /// 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(PrivilegedAccessGroupEligibilityScheduleRequest body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(PrivilegedAccessGroupEligibilityScheduleRequest 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, PrivilegedAccessGroupEligibilityScheduleRequest.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property eligibilityScheduleRequests for identityGovernance + /// + /// Configuration 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 PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get eligibilityScheduleRequests from identityGovernance + /// + /// Configuration 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 PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property eligibilityScheduleRequests in identityGovernance + /// + /// 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(PrivilegedAccessGroupEligibilityScheduleRequest body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(PrivilegedAccessGroupEligibilityScheduleRequest 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 PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder WithUrl(string rawUrl) { + return new PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get eligibilityScheduleRequests from identityGovernance + /// + public class PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderGetQueryParameters { + /// 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 PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/TargetSchedule/TargetScheduleRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/TargetSchedule/TargetScheduleRequestBuilder.cs new file mode 100644 index 00000000000..f1de4e90171 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/TargetSchedule/TargetScheduleRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.Item.TargetSchedule { + /// + /// Provides operations to manage the targetSchedule property of the microsoft.graph.privilegedAccessGroupEligibilityScheduleRequest entity. + /// + public class TargetScheduleRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new TargetScheduleRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TargetScheduleRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/{privilegedAccessGroupEligibilityScheduleRequest%2Did}/targetSchedule{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TargetScheduleRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TargetScheduleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/{privilegedAccessGroupEligibilityScheduleRequest%2Did}/targetSchedule{?%24select,%24expand}", rawUrl) { + } + /// + /// Get targetSchedule from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, PrivilegedAccessGroupEligibilitySchedule.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get targetSchedule from identityGovernance + /// + /// Configuration 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 TargetScheduleRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public TargetScheduleRequestBuilder WithUrl(string rawUrl) { + return new TargetScheduleRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get targetSchedule from identityGovernance + /// + public class TargetScheduleRequestBuilderGetQueryParameters { + /// 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 TargetScheduleRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TargetScheduleRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TargetScheduleRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new targetScheduleRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TargetScheduleRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..f5ecf956c53 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.EligibilitySchedules.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}/identityGovernance/privilegedAccess/group/eligibilitySchedules/$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}/identityGovernance/privilegedAccess/group/eligibilitySchedules/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/EligibilitySchedulesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/EligibilitySchedulesRequestBuilder.cs new file mode 100644 index 00000000000..603159a95e9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/EligibilitySchedulesRequestBuilder.cs @@ -0,0 +1,253 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilitySchedules.Count; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilitySchedules.FilterByCurrentUserWithOn; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilitySchedules.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.IdentityGovernance.PrivilegedAccess.Group.EligibilitySchedules { + /// + /// Provides operations to manage the eligibilitySchedules property of the microsoft.graph.privilegedAccessGroup entity. + /// + public class EligibilitySchedulesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the eligibilitySchedules property of the microsoft.graph.privilegedAccessGroup entity. + /// The unique identifier of privilegedAccessGroupEligibilitySchedule + public PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("privilegedAccessGroupEligibilitySchedule%2Did", position); + return new PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new EligibilitySchedulesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public EligibilitySchedulesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilitySchedules{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new EligibilitySchedulesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public EligibilitySchedulesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilitySchedules{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Provides operations to call the filterByCurrentUser method. + /// + /// Usage: on='{on}' + public FilterByCurrentUserWithOnRequestBuilder FilterByCurrentUserWithOn(string on) { + if(string.IsNullOrEmpty(on)) throw new ArgumentNullException(nameof(on)); + return new FilterByCurrentUserWithOnRequestBuilder(PathParameters, RequestAdapter, on); + } + /// + /// Get eligibilitySchedules from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, PrivilegedAccessGroupEligibilityScheduleCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to eligibilitySchedules for identityGovernance + /// + /// 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(PrivilegedAccessGroupEligibilitySchedule body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(PrivilegedAccessGroupEligibilitySchedule 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, PrivilegedAccessGroupEligibilitySchedule.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get eligibilitySchedules from identityGovernance + /// + /// Configuration 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 EligibilitySchedulesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to eligibilitySchedules for identityGovernance + /// + /// 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(PrivilegedAccessGroupEligibilitySchedule body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(PrivilegedAccessGroupEligibilitySchedule 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 EligibilitySchedulesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public EligibilitySchedulesRequestBuilder WithUrl(string rawUrl) { + return new EligibilitySchedulesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get eligibilitySchedules from identityGovernance + /// + public class EligibilitySchedulesRequestBuilderGetQueryParameters { + /// 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 EligibilitySchedulesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public EligibilitySchedulesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new EligibilitySchedulesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new eligibilitySchedulesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public EligibilitySchedulesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class EligibilitySchedulesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new eligibilitySchedulesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public EligibilitySchedulesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnRequestBuilder.cs new file mode 100644 index 00000000000..9a96486fd75 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnRequestBuilder.cs @@ -0,0 +1,157 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.EligibilitySchedules.FilterByCurrentUserWithOn { + /// + /// Provides operations to call the filterByCurrentUser method. + /// + public class FilterByCurrentUserWithOnRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new FilterByCurrentUserWithOnRequestBuilder and sets the default values. + /// + /// Usage: on='{on}' + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FilterByCurrentUserWithOnRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter, string on = "") : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilitySchedules/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", pathParameters) { + if (!string.IsNullOrWhiteSpace(on)) PathParameters.Add("on", on); + } + /// + /// Instantiates a new FilterByCurrentUserWithOnRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FilterByCurrentUserWithOnRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilitySchedules/filterByCurrentUser(on='{on}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", rawUrl) { + } + /// + /// Invoke function filterByCurrentUser + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, FilterByCurrentUserWithOnResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Invoke function filterByCurrentUser + /// + /// Configuration 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 FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public FilterByCurrentUserWithOnRequestBuilder WithUrl(string rawUrl) { + return new FilterByCurrentUserWithOnRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Invoke function filterByCurrentUser + /// + public class FilterByCurrentUserWithOnRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// 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 FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FilterByCurrentUserWithOnRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FilterByCurrentUserWithOnRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new filterByCurrentUserWithOnRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FilterByCurrentUserWithOnRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs new file mode 100644 index 00000000000..fac3a0afbfa --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -0,0 +1,50 @@ +// +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilitySchedules.FilterByCurrentUserWithOn { + public class FilterByCurrentUserWithOnResponse : 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 FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FilterByCurrentUserWithOnResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(PrivilegedAccessGroupEligibilitySchedule.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/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/Item/Group/GroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/Item/Group/GroupRequestBuilder.cs new file mode 100644 index 00000000000..660fede2e82 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/Item/Group/GroupRequestBuilder.cs @@ -0,0 +1,132 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilitySchedules.Item.Group.ServiceProvisioningErrors; +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.IdentityGovernance.PrivilegedAccess.Group.EligibilitySchedules.Item.Group { + /// + /// Provides operations to manage the group property of the microsoft.graph.privilegedAccessGroupEligibilitySchedule entity. + /// + public class GroupRequestBuilder : BaseRequestBuilder { + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new GroupRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GroupRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilitySchedules/{privilegedAccessGroupEligibilitySchedule%2Did}/group{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new GroupRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GroupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilitySchedules/{privilegedAccessGroupEligibilitySchedule%2Did}/group{?%24select,%24expand}", rawUrl) { + } + /// + /// Get group from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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.Group.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get group from identityGovernance + /// + /// Configuration 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 GroupRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public GroupRequestBuilder WithUrl(string rawUrl) { + return new GroupRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get group from identityGovernance + /// + public class GroupRequestBuilderGetQueryParameters { + /// 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 GroupRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GroupRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GroupRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new groupRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GroupRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..bb248022573 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.EligibilitySchedules.Item.Group.ServiceProvisioningErrors.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}/identityGovernance/privilegedAccess/group/eligibilitySchedules/{privilegedAccessGroupEligibilitySchedule%2Did}/group/serviceProvisioningErrors/$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}/identityGovernance/privilegedAccess/group/eligibilitySchedules/{privilegedAccessGroupEligibilitySchedule%2Did}/group/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..166d4913f5d --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilitySchedules.Item.Group.ServiceProvisioningErrors.Count; +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.IdentityGovernance.PrivilegedAccess.Group.EligibilitySchedules.Item.Group.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \identityGovernance\privilegedAccess\group\eligibilitySchedules\{privilegedAccessGroupEligibilitySchedule-id}\group\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilitySchedules/{privilegedAccessGroupEligibilitySchedule%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilitySchedules/{privilegedAccessGroupEligibilitySchedule%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/Item/Principal/PrincipalRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/Item/Principal/PrincipalRequestBuilder.cs new file mode 100644 index 00000000000..dcd20024cb3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/Item/Principal/PrincipalRequestBuilder.cs @@ -0,0 +1,127 @@ +// +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.IdentityGovernance.PrivilegedAccess.Group.EligibilitySchedules.Item.Principal { + /// + /// Provides operations to manage the principal property of the microsoft.graph.privilegedAccessGroupEligibilitySchedule 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}/identityGovernance/privilegedAccess/group/eligibilitySchedules/{privilegedAccessGroupEligibilitySchedule%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}/identityGovernance/privilegedAccess/group/eligibilitySchedules/{privilegedAccessGroupEligibilitySchedule%2Did}/principal{?%24select,%24expand}", rawUrl) { + } + /// + /// Get principal from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Get principal from identityGovernance + /// + /// Configuration 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public PrincipalRequestBuilder WithUrl(string rawUrl) { + return new PrincipalRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get principal from identityGovernance + /// + 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/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/Item/PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/Item/PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder.cs new file mode 100644 index 00000000000..82c0a286eae --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/Item/PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder.cs @@ -0,0 +1,261 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilitySchedules.Item.Group; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilitySchedules.Item.Principal; +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.IdentityGovernance.PrivilegedAccess.Group.EligibilitySchedules.Item { + /// + /// Provides operations to manage the eligibilitySchedules property of the microsoft.graph.privilegedAccessGroup entity. + /// + public class PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the group property of the microsoft.graph.privilegedAccessGroupEligibilitySchedule entity. + public Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilitySchedules.Item.Group.GroupRequestBuilder Group { get => + new Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilitySchedules.Item.Group.GroupRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the principal property of the microsoft.graph.privilegedAccessGroupEligibilitySchedule entity. + public PrincipalRequestBuilder Principal { get => + new PrincipalRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilitySchedules/{privilegedAccessGroupEligibilitySchedule%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilitySchedules/{privilegedAccessGroupEligibilitySchedule%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property eligibilitySchedules for identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Get eligibilitySchedules from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, PrivilegedAccessGroupEligibilitySchedule.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property eligibilitySchedules in identityGovernance + /// + /// 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(PrivilegedAccessGroupEligibilitySchedule body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(PrivilegedAccessGroupEligibilitySchedule 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, PrivilegedAccessGroupEligibilitySchedule.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property eligibilitySchedules for identityGovernance + /// + /// Configuration 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 PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get eligibilitySchedules from identityGovernance + /// + /// Configuration 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 PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property eligibilitySchedules in identityGovernance + /// + /// 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(PrivilegedAccessGroupEligibilitySchedule body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(PrivilegedAccessGroupEligibilitySchedule 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 PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder WithUrl(string rawUrl) { + return new PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get eligibilitySchedules from identityGovernance + /// + public class PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderGetQueryParameters { + /// 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 PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public PrivilegedAccessGroupEligibilityScheduleItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/GroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/GroupRequestBuilder.cs new file mode 100644 index 00000000000..ac2fead1ab3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/GroupRequestBuilder.cs @@ -0,0 +1,286 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentApprovals; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleInstances; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests; +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group.EligibilitySchedules; +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.IdentityGovernance.PrivilegedAccess.Group { + /// + /// Provides operations to manage the group property of the microsoft.graph.privilegedAccessRoot entity. + /// + public class GroupRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the assignmentApprovals property of the microsoft.graph.privilegedAccessGroup entity. + public AssignmentApprovalsRequestBuilder AssignmentApprovals { get => + new AssignmentApprovalsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the assignmentScheduleInstances property of the microsoft.graph.privilegedAccessGroup entity. + public AssignmentScheduleInstancesRequestBuilder AssignmentScheduleInstances { get => + new AssignmentScheduleInstancesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the assignmentScheduleRequests property of the microsoft.graph.privilegedAccessGroup entity. + public AssignmentScheduleRequestsRequestBuilder AssignmentScheduleRequests { get => + new AssignmentScheduleRequestsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the assignmentSchedules property of the microsoft.graph.privilegedAccessGroup entity. + public AssignmentSchedulesRequestBuilder AssignmentSchedules { get => + new AssignmentSchedulesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the eligibilityScheduleInstances property of the microsoft.graph.privilegedAccessGroup entity. + public EligibilityScheduleInstancesRequestBuilder EligibilityScheduleInstances { get => + new EligibilityScheduleInstancesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the eligibilityScheduleRequests property of the microsoft.graph.privilegedAccessGroup entity. + public EligibilityScheduleRequestsRequestBuilder EligibilityScheduleRequests { get => + new EligibilityScheduleRequestsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the eligibilitySchedules property of the microsoft.graph.privilegedAccessGroup entity. + public EligibilitySchedulesRequestBuilder EligibilitySchedules { get => + new EligibilitySchedulesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new GroupRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GroupRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new GroupRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GroupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property group for identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Get group from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, PrivilegedAccessGroup.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property group in identityGovernance + /// + /// 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(PrivilegedAccessGroup body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(PrivilegedAccessGroup 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, PrivilegedAccessGroup.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property group for identityGovernance + /// + /// Configuration 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 GroupRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get group from identityGovernance + /// + /// Configuration 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 GroupRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property group in identityGovernance + /// + /// 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(PrivilegedAccessGroup body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(PrivilegedAccessGroup 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 GroupRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public GroupRequestBuilder WithUrl(string rawUrl) { + return new GroupRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GroupRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new groupRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public GroupRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get group from identityGovernance + /// + public class GroupRequestBuilderGetQueryParameters { + /// 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 GroupRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GroupRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GroupRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new groupRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GroupRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GroupRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new groupRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public GroupRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/PrivilegedAccessRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/PrivilegedAccessRequestBuilder.cs new file mode 100644 index 00000000000..f632aeb2fd8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/PrivilegedAccessRequestBuilder.cs @@ -0,0 +1,256 @@ +// +using Microsoft.Graph.IdentityGovernance.PrivilegedAccess.Group; +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.IdentityGovernance.PrivilegedAccess { + /// + /// Provides operations to manage the privilegedAccess property of the microsoft.graph.identityGovernance entity. + /// + public class PrivilegedAccessRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the group property of the microsoft.graph.privilegedAccessRoot entity. + public GroupRequestBuilder Group { get => + new GroupRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new PrivilegedAccessRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PrivilegedAccessRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PrivilegedAccessRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PrivilegedAccessRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property privilegedAccess for identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Get privilegedAccess from identityGovernance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, PrivilegedAccessRoot.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property privilegedAccess in identityGovernance + /// + /// 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(PrivilegedAccessRoot body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(PrivilegedAccessRoot 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, PrivilegedAccessRoot.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property privilegedAccess for identityGovernance + /// + /// Configuration 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 PrivilegedAccessRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get privilegedAccess from identityGovernance + /// + /// Configuration 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 PrivilegedAccessRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property privilegedAccess in identityGovernance + /// + /// 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(PrivilegedAccessRoot body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(PrivilegedAccessRoot 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 PrivilegedAccessRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public PrivilegedAccessRequestBuilder WithUrl(string rawUrl) { + return new PrivilegedAccessRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrivilegedAccessRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new privilegedAccessRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public PrivilegedAccessRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get privilegedAccess from identityGovernance + /// + public class PrivilegedAccessRequestBuilderGetQueryParameters { + /// 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 PrivilegedAccessRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PrivilegedAccessRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PrivilegedAccessRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new privilegedAccessRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PrivilegedAccessRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PrivilegedAccessRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new privilegedAccessRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public PrivilegedAccessRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Item/History/HistoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Item/History/HistoryRequestBuilder.cs index 09a9abeb276..7f583e5ecff 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Item/History/HistoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Item/History/HistoryRequestBuilder.cs @@ -42,8 +42,8 @@ public HistoryRequestBuilder(Dictionary pathParameters, IRequest public HistoryRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityProtection/riskyUsers/{riskyUser%2Did}/history{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// Get the riskyUserHistoryItems from the history navigation property. - /// Find more info here + /// Read the properties and relationships of a riskyUserHistoryItem object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -83,7 +83,7 @@ public async Task PostAsync(RiskyUserHistoryItem body, Act return await RequestAdapter.SendAsync(requestInfo, RiskyUserHistoryItem.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Get the riskyUserHistoryItems from the history navigation property. + /// Read the properties and relationships of a riskyUserHistoryItem object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -144,7 +144,7 @@ public HistoryRequestBuilder WithUrl(string rawUrl) { return new HistoryRequestBuilder(rawUrl, RequestAdapter); } /// - /// Get the riskyUserHistoryItems from the history navigation property. + /// Read the properties and relationships of a riskyUserHistoryItem object. /// public class HistoryRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Invitations/Item/InvitedUser/InvitedUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Invitations/Item/InvitedUser/InvitedUserRequestBuilder.cs index c498b367f8a..de7b04aa33e 100644 --- a/src/Microsoft.Graph/Generated/Invitations/Item/InvitedUser/InvitedUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Invitations/Item/InvitedUser/InvitedUserRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.Invitations.Item.InvitedUser.MailboxSettings; +using Microsoft.Graph.Invitations.Item.InvitedUser.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,6 +20,10 @@ public class InvitedUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new InvitedUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Invitations/Item/InvitedUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Invitations/Item/InvitedUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..5d2d3e99a67 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Invitations/Item/InvitedUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Invitations.Item.InvitedUser.ServiceProvisioningErrors.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}/invitations/{invitation%2Did}/invitedUser/serviceProvisioningErrors/$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}/invitations/{invitation%2Did}/invitedUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Invitations/Item/InvitedUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Invitations/Item/InvitedUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..b78299e0b3a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Invitations/Item/InvitedUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Invitations.Item.InvitedUser.ServiceProvisioningErrors.Count; +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.Invitations.Item.InvitedUser.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \invitations\{invitation-id}\invitedUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/invitations/{invitation%2Did}/invitedUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/invitations/{invitation%2Did}/invitedUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Members/Item/ConversationMemberItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Members/Item/ConversationMemberItemRequestBuilder.cs index d514ea03fc0..a0e7305f076 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Members/Item/ConversationMemberItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Members/Item/ConversationMemberItemRequestBuilder.cs @@ -69,8 +69,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMember.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the role of a conversationMember in a team or channel. - /// Find more info here + /// Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -141,7 +141,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the role of a conversationMember in a team or channel. + /// Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Members/MembersRequestBuilder.cs index ba6bbc3f851..649f2f11041 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Members/MembersRequestBuilder.cs @@ -67,8 +67,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMemberCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Add a conversationMember to a channel. - /// Find more info here + /// Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Add a conversationMember to a channel. + /// Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs index eb73877e747..e74708b2229 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs @@ -67,8 +67,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Send a new chatMessage in the specified channel. - /// Find more info here + /// Send a new chatMessage in the specified channel or a chat. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel. + /// Send a new chatMessage in the specified channel or a chat. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Group/GroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Group/GroupRequestBuilder.cs index 8b36743edd3..f529b09d61a 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Group/GroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Group/GroupRequestBuilder.cs @@ -1,4 +1,5 @@ // +using Microsoft.Graph.Me.JoinedTeams.Item.Group.ServiceProvisioningErrors; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Me.JoinedTeams.Item.Group { /// Provides operations to manage the group property of the microsoft.graph.team entity. /// public class GroupRequestBuilder : BaseRequestBuilder { + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GroupRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..1298b3f0c56 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Me.JoinedTeams.Item.Group.ServiceProvisioningErrors.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}/me/joinedTeams/{team%2Did}/group/serviceProvisioningErrors/$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}/me/joinedTeams/{team%2Did}/group/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Me/JoinedTeams/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..04f5d43b9ef --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Me.JoinedTeams.Item.Group.ServiceProvisioningErrors.Count; +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.Group.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \me\joinedTeams\{team-id}\group\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Members/Item/ConversationMemberItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Members/Item/ConversationMemberItemRequestBuilder.cs index 4a2c1a66121..bd60da42038 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Members/Item/ConversationMemberItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Members/Item/ConversationMemberItemRequestBuilder.cs @@ -69,8 +69,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMember.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the role of a conversationMember in a team or channel. - /// Find more info here + /// Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -141,7 +141,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the role of a conversationMember in a team or channel. + /// Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Members/MembersRequestBuilder.cs index 739265ebb65..7793c37d21e 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Members/MembersRequestBuilder.cs @@ -67,8 +67,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMemberCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Add a conversationMember to a channel. - /// Find more info here + /// Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Add a conversationMember to a channel. + /// Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs index b82d74c8c6d..c4b23c7fa56 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs @@ -67,8 +67,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Send a new chatMessage in the specified channel. - /// Find more info here + /// Send a new chatMessage in the specified channel or a chat. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel. + /// Send a new chatMessage in the specified channel or a chat. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs index 4a06c15b436..17448709749 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs @@ -67,8 +67,8 @@ public async Task GetAsync(Action(requestInfo, AttachmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or you canadd an attachment to a message that is being created and sent on the fly. This operation limits the size of the attachment you can add to under 3 MB. - /// Find more info here + /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or you canadd an attachment to a message that is being created and sent on the fly. This operation limits the size of the attachment you can add to under 3 MB. + /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs index 207ab8141cd..861c6cab414 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs @@ -67,8 +67,8 @@ public async Task GetAsync(Action(requestInfo, AttachmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or you canadd an attachment to a message that is being created and sent on the fly. This operation limits the size of the attachment you can add to under 3 MB. - /// Find more info here + /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or you canadd an attachment to a message that is being created and sent on the fly. This operation limits the size of the attachment you can add to under 3 MB. + /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/MeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MeRequestBuilder.cs index 66f506d7ddf..c85c7bba717 100644 --- a/src/Microsoft.Graph/Generated/Me/MeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MeRequestBuilder.cs @@ -64,6 +64,7 @@ using Microsoft.Graph.Me.RevokeSignInSessions; using Microsoft.Graph.Me.ScopedRoleMemberOf; using Microsoft.Graph.Me.SendMail; +using Microsoft.Graph.Me.ServiceProvisioningErrors; using Microsoft.Graph.Me.Settings; using Microsoft.Graph.Me.Teamwork; using Microsoft.Graph.Me.Todo; @@ -337,6 +338,10 @@ public class MeRequestBuilder : BaseRequestBuilder { public SendMailRequestBuilder SendMail { get => new SendMailRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the settings property of the microsoft.graph.user entity. public SettingsRequestBuilder Settings { get => new SettingsRequestBuilder(PathParameters, RequestAdapter); @@ -386,8 +391,8 @@ public ExportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder ExportDevic return new ExportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder(PathParameters, RequestAdapter, skip, top); } /// - /// Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. - /// Find more info here + /// Retrieve the properties and relationships of user object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -438,7 +443,7 @@ public ReminderViewWithStartDateTimeWithEndDateTimeRequestBuilder ReminderViewWi return new ReminderViewWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// - /// Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. + /// Retrieve the properties and relationships of user object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -499,7 +504,7 @@ public MeRequestBuilder WithUrl(string rawUrl) { return new MeRequestBuilder(rawUrl, RequestAdapter); } /// - /// Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. + /// Retrieve the properties and relationships of user object. /// public class MeRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/Attachments/AttachmentsRequestBuilder.cs index a9181205aeb..a7f1e956984 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/Attachments/AttachmentsRequestBuilder.cs @@ -67,8 +67,8 @@ public async Task GetAsync(Action(requestInfo, AttachmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or you canadd an attachment to a message that is being created and sent on the fly. This operation limits the size of the attachment you can add to under 3 MB. - /// Find more info here + /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or you canadd an attachment to a message that is being created and sent on the fly. This operation limits the size of the attachment you can add to under 3 MB. + /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/MessageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/MessageItemRequestBuilder.cs index 6e24bddf8dc..bf30aad08de 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/MessageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/MessageItemRequestBuilder.cs @@ -89,8 +89,8 @@ public MessageItemRequestBuilder(Dictionary pathParameters, IReq public MessageItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/messages/{message%2Did}{?includeHiddenMessages*,%24select,%24expand}", rawUrl) { } /// - /// Delete eventMessage. - /// Find more info here + /// Delete a message in the specified user's mailbox, or delete a relationship of the message. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -129,8 +129,8 @@ public async Task DeleteAsync(Action(requestInfo, Microsoft.Graph.Models.Message.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the properties of a message object. - /// Find more info here + /// Update the properties of an eventMessage object. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -151,7 +151,7 @@ public async Task DeleteAsync(Action(requestInfo, Microsoft.Graph.Models.Message.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Delete eventMessage. + /// Delete a message in the specified user's mailbox, or delete a relationship of the message. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -201,7 +201,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the properties of a message object. + /// Update the properties of an eventMessage object. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/Value/ContentRequestBuilder.cs index 702cb5165f5..267117d7037 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/Value/ContentRequestBuilder.cs @@ -29,7 +29,7 @@ public ContentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba } /// /// Get media content for the navigation property messages from me - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/MessagesRequestBuilder.cs index 1a7d60727a5..1ee3aa40fb8 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/MessagesRequestBuilder.cs @@ -48,7 +48,7 @@ public MessagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b } /// /// The messages in a mailbox or folder. Read-only. Nullable. - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/MasterCategories/Item/OutlookCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Outlook/MasterCategories/Item/OutlookCategoryItemRequestBuilder.cs index bd1e504bb2b..b5ce5e33a8b 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/MasterCategories/Item/OutlookCategoryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/MasterCategories/Item/OutlookCategoryItemRequestBuilder.cs @@ -69,7 +69,7 @@ public async Task GetAsync(Action(requestInfo, OutlookCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the writable property, color, of the specified outlookCategory object. You cannot modify the displayName propertyonce you have created the category. + /// Update the writable property, color, of the specified outlookCategory object. You can't modify the displayName propertyonce you have created the category. /// Find more info here /// /// The request body @@ -141,7 +141,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the writable property, color, of the specified outlookCategory object. You cannot modify the displayName propertyonce you have created the category. + /// Update the writable property, color, of the specified outlookCategory object. You can't modify the displayName propertyonce you have created the category. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/RegisteredDevices/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/RegisteredDevices/Item/DirectoryObjectItemRequestBuilder.cs index ee328738386..db400d9e71e 100644 --- a/src/Microsoft.Graph/Generated/Me/RegisteredDevices/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/RegisteredDevices/Item/DirectoryObjectItemRequestBuilder.cs @@ -44,7 +44,7 @@ public DirectoryObjectItemRequestBuilder(Dictionary pathParamete public DirectoryObjectItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/registeredDevices/{directoryObject%2Did}{?%24select,%24expand}", rawUrl) { } /// - /// Devices that are registered for the user. Read-only. Nullable. Supports $expand. + /// Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -63,7 +63,7 @@ public async Task GetAsync(Action(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Devices that are registered for the user. Read-only. Nullable. Supports $expand. + /// Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. /// /// 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 DirectoryObjectItemRequestBuilder WithUrl(string rawUrl) { return new DirectoryObjectItemRequestBuilder(rawUrl, RequestAdapter); } /// - /// Devices that are registered for the user. Read-only. Nullable. Supports $expand. + /// Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. /// public class DirectoryObjectItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Me/RegisteredDevices/RegisteredDevicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/RegisteredDevices/RegisteredDevicesRequestBuilder.cs index a3d0f2c4e99..c787d1b646c 100644 --- a/src/Microsoft.Graph/Generated/Me/RegisteredDevices/RegisteredDevicesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/RegisteredDevices/RegisteredDevicesRequestBuilder.cs @@ -57,7 +57,7 @@ public RegisteredDevicesRequestBuilder(Dictionary pathParameters public RegisteredDevicesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/registeredDevices{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// Devices that are registered for the user. Read-only. Nullable. Supports $expand. + /// Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. /// Find more info here /// /// Cancellation token to use when cancelling requests @@ -77,7 +77,7 @@ public async Task GetAsync(Action(requestInfo, DirectoryObjectCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Devices that are registered for the user. Read-only. Nullable. Supports $expand. + /// Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -110,7 +110,7 @@ public RegisteredDevicesRequestBuilder WithUrl(string rawUrl) { return new RegisteredDevicesRequestBuilder(rawUrl, RequestAdapter); } /// - /// Devices that are registered for the user. Read-only. Nullable. Supports $expand. + /// Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. /// public class RegisteredDevicesRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Me/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..7b47b8060e5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Me.ServiceProvisioningErrors.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}/me/serviceProvisioningErrors/$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}/me/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Me/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..af2d8faa2c2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Me.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \me\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequest.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequest.cs index ed114095eff..c0c3b702db8 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequest.cs @@ -143,8 +143,8 @@ public string Status { {"completedDateTime", n => { CompletedDateTime = n.GetDateTimeOffsetValue(); } }, {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, {"customExtensionCalloutInstances", n => { CustomExtensionCalloutInstances = n.GetCollectionOfObjectValues(CustomExtensionCalloutInstance.CreateFromDiscriminatorValue)?.ToList(); } }, - {"requestor", n => { Requestor = n.GetObjectValue(AccessPackageSubject.CreateFromDiscriminatorValue); } }, {"requestType", n => { RequestType = n.GetEnumValue(); } }, + {"requestor", n => { Requestor = n.GetObjectValue(AccessPackageSubject.CreateFromDiscriminatorValue); } }, {"schedule", n => { Schedule = n.GetObjectValue(EntitlementManagementSchedule.CreateFromDiscriminatorValue); } }, {"state", n => { State = n.GetEnumValue(); } }, {"status", n => { Status = n.GetStringValue(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageCatalog.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageCatalog.cs index a4c613c5eaa..cc2ff9dee3c 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageCatalog.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageCatalog.cs @@ -151,8 +151,8 @@ public AccessPackageCatalogState? State { {"isExternallyVisible", n => { IsExternallyVisible = n.GetBoolValue(); } }, {"modifiedDateTime", n => { ModifiedDateTime = n.GetDateTimeOffsetValue(); } }, {"resourceRoles", n => { ResourceRoles = n.GetCollectionOfObjectValues(AccessPackageResourceRole.CreateFromDiscriminatorValue)?.ToList(); } }, - {"resources", n => { Resources = n.GetCollectionOfObjectValues(AccessPackageResource.CreateFromDiscriminatorValue)?.ToList(); } }, {"resourceScopes", n => { ResourceScopes = n.GetCollectionOfObjectValues(AccessPackageResourceScope.CreateFromDiscriminatorValue)?.ToList(); } }, + {"resources", n => { Resources = n.GetCollectionOfObjectValues(AccessPackageResource.CreateFromDiscriminatorValue)?.ToList(); } }, {"state", n => { State = n.GetEnumValue(); } }, }; } diff --git a/src/Microsoft.Graph/Generated/Models/AgreementFileProperties.cs b/src/Microsoft.Graph/Generated/Models/AgreementFileProperties.cs index 9bd9fe8b640..3cdcdf63e07 100644 --- a/src/Microsoft.Graph/Generated/Models/AgreementFileProperties.cs +++ b/src/Microsoft.Graph/Generated/Models/AgreementFileProperties.cs @@ -6,7 +6,7 @@ using System; namespace Microsoft.Graph.Models { public class AgreementFileProperties : Entity, IParsable { - /// The date time representing when the file was created.The Timestamp type 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. + /// The date time representing when the file was created. The Timestamp type 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. public DateTimeOffset? CreatedDateTime { get { return BackingStore?.Get("createdDateTime"); } set { BackingStore?.Set("createdDateTime", value); } @@ -53,7 +53,7 @@ public string FileName { set { BackingStore?.Set("fileName", value); } } #endif - /// If none of the languages matches the client preference, indicates whether this is the default agreement file . If none of the files are marked as default, the first one is treated as the default. Read-only. + /// If none of the languages matches the client preference, indicates whether this is the default agreement file. If none of the files are marked as default, the first one is treated as the default. Read-only. public bool? IsDefault { get { return BackingStore?.Get("isDefault"); } set { BackingStore?.Set("isDefault", value); } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidGeneralDeviceConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidGeneralDeviceConfiguration.cs index ca2f3cf8b00..a3880018761 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidGeneralDeviceConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidGeneralDeviceConfiguration.cs @@ -356,9 +356,9 @@ public AndroidGeneralDeviceConfiguration() : base() { {"voiceAssistantBlocked", n => { VoiceAssistantBlocked = n.GetBoolValue(); } }, {"voiceDialingBlocked", n => { VoiceDialingBlocked = n.GetBoolValue(); } }, {"webBrowserBlockAutofill", n => { WebBrowserBlockAutofill = n.GetBoolValue(); } }, - {"webBrowserBlocked", n => { WebBrowserBlocked = n.GetBoolValue(); } }, {"webBrowserBlockJavaScript", n => { WebBrowserBlockJavaScript = n.GetBoolValue(); } }, {"webBrowserBlockPopups", n => { WebBrowserBlockPopups = n.GetBoolValue(); } }, + {"webBrowserBlocked", n => { WebBrowserBlocked = n.GetBoolValue(); } }, {"webBrowserCookieSettings", n => { WebBrowserCookieSettings = n.GetEnumValue(); } }, {"wiFiBlocked", n => { WiFiBlocked = n.GetBoolValue(); } }, }; diff --git a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileGeneralDeviceConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileGeneralDeviceConfiguration.cs index 206ad65fcfd..c7300fe51c3 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileGeneralDeviceConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileGeneralDeviceConfiguration.cs @@ -220,13 +220,13 @@ public AndroidWorkProfileGeneralDeviceConfiguration() : base() { {"workProfilePasswordBlockFingerprintUnlock", n => { WorkProfilePasswordBlockFingerprintUnlock = n.GetBoolValue(); } }, {"workProfilePasswordBlockTrustAgents", n => { WorkProfilePasswordBlockTrustAgents = n.GetBoolValue(); } }, {"workProfilePasswordExpirationDays", n => { WorkProfilePasswordExpirationDays = n.GetIntValue(); } }, - {"workProfilePasswordMinimumLength", n => { WorkProfilePasswordMinimumLength = n.GetIntValue(); } }, {"workProfilePasswordMinLetterCharacters", n => { WorkProfilePasswordMinLetterCharacters = n.GetIntValue(); } }, {"workProfilePasswordMinLowerCaseCharacters", n => { WorkProfilePasswordMinLowerCaseCharacters = n.GetIntValue(); } }, {"workProfilePasswordMinNonLetterCharacters", n => { WorkProfilePasswordMinNonLetterCharacters = n.GetIntValue(); } }, {"workProfilePasswordMinNumericCharacters", n => { WorkProfilePasswordMinNumericCharacters = n.GetIntValue(); } }, {"workProfilePasswordMinSymbolCharacters", n => { WorkProfilePasswordMinSymbolCharacters = n.GetIntValue(); } }, {"workProfilePasswordMinUpperCaseCharacters", n => { WorkProfilePasswordMinUpperCaseCharacters = n.GetIntValue(); } }, + {"workProfilePasswordMinimumLength", n => { WorkProfilePasswordMinimumLength = n.GetIntValue(); } }, {"workProfilePasswordMinutesOfInactivityBeforeScreenTimeout", n => { WorkProfilePasswordMinutesOfInactivityBeforeScreenTimeout = n.GetIntValue(); } }, {"workProfilePasswordPreviousPasswordBlockCount", n => { WorkProfilePasswordPreviousPasswordBlockCount = n.GetIntValue(); } }, {"workProfilePasswordRequiredType", n => { WorkProfilePasswordRequiredType = n.GetEnumValue(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/ApiApplication.cs b/src/Microsoft.Graph/Generated/Models/ApiApplication.cs index 3ad23012190..4e3df5b70b9 100644 --- a/src/Microsoft.Graph/Generated/Models/ApiApplication.cs +++ b/src/Microsoft.Graph/Generated/Models/ApiApplication.cs @@ -61,7 +61,7 @@ public string OdataType { set { BackingStore?.Set("@odata.type", value); } } #endif - /// Lists the client applications that are pre-authorized with the specified delegated permissions to access this application's APIs. Users are not required to consent to any pre-authorized application (for the permissions specified). However, any additional permissions not listed in preAuthorizedApplications (requested through incremental consent for example) will require user consent. + /// Lists the client applications that are preauthorized with the specified delegated permissions to access this application's APIs. Users aren't required to consent to any preauthorized application (for the permissions specified). However, any other permissions not listed in preAuthorizedApplications (requested through incremental consent for example) will require user consent. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? PreAuthorizedApplications { diff --git a/src/Microsoft.Graph/Generated/Models/AppIdentity.cs b/src/Microsoft.Graph/Generated/Models/AppIdentity.cs index 59e9ef9e4e9..5902a88885c 100644 --- a/src/Microsoft.Graph/Generated/Models/AppIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/AppIdentity.cs @@ -28,7 +28,7 @@ public string AppId { #endif /// Stores model information. public IBackingStore BackingStore { get; private set; } - /// Refers to the Application Name displayed in the Azure Portal. + /// Refers to the application name displayed in the Microsoft Entra admin center. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? DisplayName { diff --git a/src/Microsoft.Graph/Generated/Models/Application.cs b/src/Microsoft.Graph/Generated/Models/Application.cs index a8d9f6a6de7..8c3898d60ac 100644 --- a/src/Microsoft.Graph/Generated/Models/Application.cs +++ b/src/Microsoft.Graph/Generated/Models/Application.cs @@ -613,9 +613,9 @@ public Application() : base() { {"addIns", n => { AddIns = n.GetCollectionOfObjectValues(AddIn.CreateFromDiscriminatorValue)?.ToList(); } }, {"api", n => { Api = n.GetObjectValue(ApiApplication.CreateFromDiscriminatorValue); } }, {"appId", n => { AppId = n.GetStringValue(); } }, - {"applicationTemplateId", n => { ApplicationTemplateId = n.GetStringValue(); } }, {"appManagementPolicies", n => { AppManagementPolicies = n.GetCollectionOfObjectValues(AppManagementPolicy.CreateFromDiscriminatorValue)?.ToList(); } }, {"appRoles", n => { AppRoles = n.GetCollectionOfObjectValues(AppRole.CreateFromDiscriminatorValue)?.ToList(); } }, + {"applicationTemplateId", n => { ApplicationTemplateId = n.GetStringValue(); } }, {"certification", n => { Certification = n.GetObjectValue(Microsoft.Graph.Models.Certification.CreateFromDiscriminatorValue); } }, {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, {"createdOnBehalfOf", n => { CreatedOnBehalfOf = n.GetObjectValue(DirectoryObject.CreateFromDiscriminatorValue); } }, diff --git a/src/Microsoft.Graph/Generated/Models/ApprovalStage.cs b/src/Microsoft.Graph/Generated/Models/ApprovalStage.cs index 7f94ada1e81..99df7071eaa 100644 --- a/src/Microsoft.Graph/Generated/Models/ApprovalStage.cs +++ b/src/Microsoft.Graph/Generated/Models/ApprovalStage.cs @@ -102,9 +102,9 @@ public string Status { {"assignedToMe", n => { AssignedToMe = n.GetBoolValue(); } }, {"displayName", n => { DisplayName = n.GetStringValue(); } }, {"justification", n => { Justification = n.GetStringValue(); } }, + {"reviewResult", n => { ReviewResult = n.GetStringValue(); } }, {"reviewedBy", n => { ReviewedBy = n.GetObjectValue(Identity.CreateFromDiscriminatorValue); } }, {"reviewedDateTime", n => { ReviewedDateTime = n.GetDateTimeOffsetValue(); } }, - {"reviewResult", n => { ReviewResult = n.GetStringValue(); } }, {"status", n => { Status = n.GetStringValue(); } }, }; } diff --git a/src/Microsoft.Graph/Generated/Models/AttachmentBase.cs b/src/Microsoft.Graph/Generated/Models/AttachmentBase.cs index af17b38d483..839e1916df7 100644 --- a/src/Microsoft.Graph/Generated/Models/AttachmentBase.cs +++ b/src/Microsoft.Graph/Generated/Models/AttachmentBase.cs @@ -25,7 +25,7 @@ public DateTimeOffset? LastModifiedDateTime { get { return BackingStore?.Get("lastModifiedDateTime"); } set { BackingStore?.Set("lastModifiedDateTime", value); } } - /// The display name of the attachment. This does not need to be the actual file name. + /// The display name of the attachment. This doesn't need to be the actual file name. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Name { diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationContextClassReference.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationContextClassReference.cs index 9a1808977be..47b171155da 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationContextClassReference.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationContextClassReference.cs @@ -34,7 +34,7 @@ public string DisplayName { set { BackingStore?.Set("displayName", value); } } #endif - /// Indicates whether the authenticationContextClassReference has been published by the security admin and is ready for use by apps. When it is set to false, it should not be shown in authentication context selection UX, or used to protect app resources. It will be shown and available for Conditional Access policy authoring. The default value is false. Supports $filter (eq). + /// Indicates whether the authenticationContextClassReference has been published by the security admin and is ready for use by apps. When it's set to false, it shouldn't be shown in authentication context selection UX, or used to protect app resources. It's shown and available for Conditional Access policy authoring. The default value is false. Supports $filter (eq). public bool? IsAvailable { get { return BackingStore?.Get("isAvailable"); } set { BackingStore?.Set("isAvailable", value); } diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodsRegistrationCampaignIncludeTarget.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodsRegistrationCampaignIncludeTarget.cs index 418f1d52d32..d498e4d9e86 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodsRegistrationCampaignIncludeTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodsRegistrationCampaignIncludeTarget.cs @@ -83,8 +83,8 @@ public IDictionary> GetFieldDeserializers() { return new Dictionary> { {"id", n => { Id = n.GetStringValue(); } }, {"@odata.type", n => { OdataType = n.GetStringValue(); } }, - {"targetedAuthenticationMethod", n => { TargetedAuthenticationMethod = n.GetStringValue(); } }, {"targetType", n => { TargetType = n.GetEnumValue(); } }, + {"targetedAuthenticationMethod", n => { TargetedAuthenticationMethod = n.GetStringValue(); } }, }; } /// diff --git a/src/Microsoft.Graph/Generated/Models/AuthorizationPolicy.cs b/src/Microsoft.Graph/Generated/Models/AuthorizationPolicy.cs index 2bb0b878a58..cff8ad508f4 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthorizationPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthorizationPolicy.cs @@ -74,11 +74,11 @@ public AuthorizationPolicy() : base() { /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { - {"allowedToSignUpEmailBasedSubscriptions", n => { AllowedToSignUpEmailBasedSubscriptions = n.GetBoolValue(); } }, - {"allowedToUseSSPR", n => { AllowedToUseSSPR = n.GetBoolValue(); } }, {"allowEmailVerifiedUsersToJoinOrganization", n => { AllowEmailVerifiedUsersToJoinOrganization = n.GetBoolValue(); } }, {"allowInvitesFrom", n => { AllowInvitesFrom = n.GetEnumValue(); } }, {"allowUserConsentForRiskyApps", n => { AllowUserConsentForRiskyApps = n.GetBoolValue(); } }, + {"allowedToSignUpEmailBasedSubscriptions", n => { AllowedToSignUpEmailBasedSubscriptions = n.GetBoolValue(); } }, + {"allowedToUseSSPR", n => { AllowedToUseSSPR = n.GetBoolValue(); } }, {"blockMsolPowerShell", n => { BlockMsolPowerShell = n.GetBoolValue(); } }, {"defaultUserRolePermissions", n => { DefaultUserRolePermissions = n.GetObjectValue(Microsoft.Graph.Models.DefaultUserRolePermissions.CreateFromDiscriminatorValue); } }, {"guestUserRoleId", n => { GuestUserRoleId = n.GetGuidValue(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/BookingAppointment.cs b/src/Microsoft.Graph/Generated/Models/BookingAppointment.cs index 37683bce116..20e9b08d59f 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingAppointment.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingAppointment.cs @@ -270,8 +270,8 @@ public DateTimeTimeZone StartDateTime { return new Dictionary>(base.GetFieldDeserializers()) { {"additionalInformation", n => { AdditionalInformation = n.GetStringValue(); } }, {"anonymousJoinWebUrl", n => { AnonymousJoinWebUrl = n.GetStringValue(); } }, - {"customers", n => { Customers = n.GetCollectionOfObjectValues(BookingCustomerInformationBase.CreateFromDiscriminatorValue)?.ToList(); } }, {"customerTimeZone", n => { CustomerTimeZone = n.GetStringValue(); } }, + {"customers", n => { Customers = n.GetCollectionOfObjectValues(BookingCustomerInformationBase.CreateFromDiscriminatorValue)?.ToList(); } }, {"duration", n => { Duration = n.GetTimeSpanValue(); } }, {"endDateTime", n => { EndDateTime = n.GetObjectValue(DateTimeTimeZone.CreateFromDiscriminatorValue); } }, {"filledAttendeesCount", n => { FilledAttendeesCount = n.GetIntValue(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/BookingBusiness.cs b/src/Microsoft.Graph/Generated/Models/BookingBusiness.cs index 190a22dae87..4f90f973e6d 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingBusiness.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingBusiness.cs @@ -270,8 +270,8 @@ public string WebSiteUrl { {"businessHours", n => { BusinessHours = n.GetCollectionOfObjectValues(BookingWorkHours.CreateFromDiscriminatorValue)?.ToList(); } }, {"businessType", n => { BusinessType = n.GetStringValue(); } }, {"calendarView", n => { CalendarView = n.GetCollectionOfObjectValues(BookingAppointment.CreateFromDiscriminatorValue)?.ToList(); } }, - {"customers", n => { Customers = n.GetCollectionOfObjectValues(BookingCustomerBase.CreateFromDiscriminatorValue)?.ToList(); } }, {"customQuestions", n => { CustomQuestions = n.GetCollectionOfObjectValues(BookingCustomQuestion.CreateFromDiscriminatorValue)?.ToList(); } }, + {"customers", n => { Customers = n.GetCollectionOfObjectValues(BookingCustomerBase.CreateFromDiscriminatorValue)?.ToList(); } }, {"defaultCurrencyIso", n => { DefaultCurrencyIso = n.GetStringValue(); } }, {"displayName", n => { DisplayName = n.GetStringValue(); } }, {"email", n => { Email = n.GetStringValue(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/BookingCustomerInformation.cs b/src/Microsoft.Graph/Generated/Models/BookingCustomerInformation.cs index 2d5a9063ee5..dffff9ce522 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingCustomerInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingCustomerInformation.cs @@ -137,8 +137,8 @@ public BookingCustomerInformation() : base() { /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { - {"customerId", n => { CustomerId = n.GetStringValue(); } }, {"customQuestionAnswers", n => { CustomQuestionAnswers = n.GetCollectionOfObjectValues(BookingQuestionAnswer.CreateFromDiscriminatorValue)?.ToList(); } }, + {"customerId", n => { CustomerId = n.GetStringValue(); } }, {"emailAddress", n => { EmailAddress = n.GetStringValue(); } }, {"location", n => { Location = n.GetObjectValue(Microsoft.Graph.Models.Location.CreateFromDiscriminatorValue); } }, {"name", n => { Name = n.GetStringValue(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/Call.cs b/src/Microsoft.Graph/Generated/Models/Call.cs index dadc2ac4873..06d1e6a2017 100644 --- a/src/Microsoft.Graph/Generated/Models/Call.cs +++ b/src/Microsoft.Graph/Generated/Models/Call.cs @@ -338,10 +338,10 @@ public CallTranscriptionInfo Transcription { public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { {"audioRoutingGroups", n => { AudioRoutingGroups = n.GetCollectionOfObjectValues(AudioRoutingGroup.CreateFromDiscriminatorValue)?.ToList(); } }, - {"callbackUri", n => { CallbackUri = n.GetStringValue(); } }, {"callChainId", n => { CallChainId = n.GetStringValue(); } }, {"callOptions", n => { CallOptions = n.GetObjectValue(Microsoft.Graph.Models.CallOptions.CreateFromDiscriminatorValue); } }, {"callRoutes", n => { CallRoutes = n.GetCollectionOfObjectValues(CallRoute.CreateFromDiscriminatorValue)?.ToList(); } }, + {"callbackUri", n => { CallbackUri = n.GetStringValue(); } }, {"chatInfo", n => { ChatInfo = n.GetObjectValue(Microsoft.Graph.Models.ChatInfo.CreateFromDiscriminatorValue); } }, {"contentSharingSessions", n => { ContentSharingSessions = n.GetCollectionOfObjectValues(ContentSharingSession.CreateFromDiscriminatorValue)?.ToList(); } }, {"direction", n => { Direction = n.GetEnumValue(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/DirectRoutingLogRow.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/DirectRoutingLogRow.cs index 54a9f7c91bf..06c557f83dc 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/DirectRoutingLogRow.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/DirectRoutingLogRow.cs @@ -261,10 +261,10 @@ public static DirectRoutingLogRow CreateFromDiscriminatorValue(IParseNode parseN /// public IDictionary> GetFieldDeserializers() { return new Dictionary> { - {"calleeNumber", n => { CalleeNumber = n.GetStringValue(); } }, {"callEndSubReason", n => { CallEndSubReason = n.GetIntValue(); } }, - {"callerNumber", n => { CallerNumber = n.GetStringValue(); } }, {"callType", n => { CallType = n.GetStringValue(); } }, + {"calleeNumber", n => { CalleeNumber = n.GetStringValue(); } }, + {"callerNumber", n => { CallerNumber = n.GetStringValue(); } }, {"correlationId", n => { CorrelationId = n.GetStringValue(); } }, {"duration", n => { Duration = n.GetIntValue(); } }, {"endDateTime", n => { EndDateTime = n.GetDateTimeOffsetValue(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/PstnCallLogRow.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/PstnCallLogRow.cs index ace8d51a457..6a741984300 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/PstnCallLogRow.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/PstnCallLogRow.cs @@ -317,10 +317,10 @@ public static PstnCallLogRow CreateFromDiscriminatorValue(IParseNode parseNode) public IDictionary> GetFieldDeserializers() { return new Dictionary> { {"callDurationSource", n => { CallDurationSource = n.GetEnumValue(); } }, - {"calleeNumber", n => { CalleeNumber = n.GetStringValue(); } }, - {"callerNumber", n => { CallerNumber = n.GetStringValue(); } }, {"callId", n => { CallId = n.GetStringValue(); } }, {"callType", n => { CallType = n.GetStringValue(); } }, + {"calleeNumber", n => { CalleeNumber = n.GetStringValue(); } }, + {"callerNumber", n => { CallerNumber = n.GetStringValue(); } }, {"charge", n => { Charge = n.GetDecimalValue(); } }, {"conferenceId", n => { ConferenceId = n.GetStringValue(); } }, {"connectionCharge", n => { ConnectionCharge = n.GetDecimalValue(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/ChatMessageMention.cs b/src/Microsoft.Graph/Generated/Models/ChatMessageMention.cs index b4dbb692595..c7c74eeaba4 100644 --- a/src/Microsoft.Graph/Generated/Models/ChatMessageMention.cs +++ b/src/Microsoft.Graph/Generated/Models/ChatMessageMention.cs @@ -82,8 +82,8 @@ public static ChatMessageMention CreateFromDiscriminatorValue(IParseNode parseNo public IDictionary> GetFieldDeserializers() { return new Dictionary> { {"id", n => { Id = n.GetIntValue(); } }, - {"mentioned", n => { Mentioned = n.GetObjectValue(ChatMessageMentionedIdentitySet.CreateFromDiscriminatorValue); } }, {"mentionText", n => { MentionText = n.GetStringValue(); } }, + {"mentioned", n => { Mentioned = n.GetObjectValue(ChatMessageMentionedIdentitySet.CreateFromDiscriminatorValue); } }, {"@odata.type", n => { OdataType = n.GetStringValue(); } }, }; } diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessConditionSet.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessConditionSet.cs index d76af40d887..a7f440aacbc 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessConditionSet.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessConditionSet.cs @@ -189,8 +189,8 @@ public static ConditionalAccessConditionSet CreateFromDiscriminatorValue(IParseN public IDictionary> GetFieldDeserializers() { return new Dictionary> { {"applications", n => { Applications = n.GetObjectValue(ConditionalAccessApplications.CreateFromDiscriminatorValue); } }, - {"clientApplications", n => { ClientApplications = n.GetObjectValue(ConditionalAccessClientApplications.CreateFromDiscriminatorValue); } }, {"clientAppTypes", n => { ClientAppTypes = n.GetCollectionOfEnumValues()?.ToList(); } }, + {"clientApplications", n => { ClientApplications = n.GetObjectValue(ConditionalAccessClientApplications.CreateFromDiscriminatorValue); } }, {"devices", n => { Devices = n.GetObjectValue(ConditionalAccessDevices.CreateFromDiscriminatorValue); } }, {"locations", n => { Locations = n.GetObjectValue(ConditionalAccessLocations.CreateFromDiscriminatorValue); } }, {"@odata.type", n => { OdataType = n.GetStringValue(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/ConversationThread.cs b/src/Microsoft.Graph/Generated/Models/ConversationThread.cs index 55174c23622..966fe58e76e 100644 --- a/src/Microsoft.Graph/Generated/Models/ConversationThread.cs +++ b/src/Microsoft.Graph/Generated/Models/ConversationThread.cs @@ -124,8 +124,8 @@ public List UniqueSenders { {"lastDeliveredDateTime", n => { LastDeliveredDateTime = n.GetDateTimeOffsetValue(); } }, {"posts", n => { Posts = n.GetCollectionOfObjectValues(Post.CreateFromDiscriminatorValue)?.ToList(); } }, {"preview", n => { Preview = n.GetStringValue(); } }, - {"topic", n => { Topic = n.GetStringValue(); } }, {"toRecipients", n => { ToRecipients = n.GetCollectionOfObjectValues(Recipient.CreateFromDiscriminatorValue)?.ToList(); } }, + {"topic", n => { Topic = n.GetStringValue(); } }, {"uniqueSenders", n => { UniqueSenders = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, }; } diff --git a/src/Microsoft.Graph/Generated/Models/DefaultUserRolePermissions.cs b/src/Microsoft.Graph/Generated/Models/DefaultUserRolePermissions.cs index d91b6ac572c..c1c32b439ee 100644 --- a/src/Microsoft.Graph/Generated/Models/DefaultUserRolePermissions.cs +++ b/src/Microsoft.Graph/Generated/Models/DefaultUserRolePermissions.cs @@ -12,17 +12,17 @@ public IDictionary AdditionalData { get { return BackingStore?.Get>("additionalData"); } set { BackingStore?.Set("additionalData", value); } } - /// Indicates whether the default user role can create applications. This setting corresponds to the Users can register applications setting in the User settings menu in the Azure portal. + /// Indicates whether the default user role can create applications. This setting corresponds to the Users can register applications setting in the User settings menu in the Microsoft Entra admin center. public bool? AllowedToCreateApps { get { return BackingStore?.Get("allowedToCreateApps"); } set { BackingStore?.Set("allowedToCreateApps", value); } } - /// Indicates whether the default user role can create security groups. This setting corresponds to the following menus in the Azure portal: The Users can create security groups in Azure portals, API or PowerShell setting in the Group settings menu. Users can create security groups setting in the User settings menu. + /// Indicates whether the default user role can create security groups. This setting corresponds to the following menus in the Microsoft Entra admin center: The Users can create security groups in Microsoft Entra admin centers, API or PowerShell setting in the Group settings menu. Users can create security groups setting in the User settings menu. public bool? AllowedToCreateSecurityGroups { get { return BackingStore?.Get("allowedToCreateSecurityGroups"); } set { BackingStore?.Set("allowedToCreateSecurityGroups", value); } } - /// Indicates whether the default user role can create tenants. This setting corresponds to the Restrict non-admin users from creating tenants setting in the User settings menu in the Azure portal. When this setting is false, users assigned the Tenant Creator role can still create tenants. + /// Indicates whether the default user role can create tenants. This setting corresponds to the Restrict non-admin users from creating tenants setting in the User settings menu in the Microsoft Entra admin center. When this setting is false, users assigned the Tenant Creator role can still create tenants. public bool? AllowedToCreateTenants { get { return BackingStore?.Get("allowedToCreateTenants"); } set { BackingStore?.Set("allowedToCreateTenants", value); } diff --git a/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationship.cs b/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationship.cs index 1d22e9e50c2..c1c84193026 100644 --- a/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationship.cs +++ b/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationship.cs @@ -126,7 +126,11 @@ public DelegatedAdminRelationshipStatus? Status { /// The parse node to use to read the discriminator value and create the object public static new DelegatedAdminRelationship CreateFromDiscriminatorValue(IParseNode parseNode) { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DelegatedAdminRelationship(); + var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); + return mappingValue switch { + "#microsoft.graph.resellerDelegatedAdminRelationship" => new ResellerDelegatedAdminRelationship(), + _ => new DelegatedAdminRelationship(), + }; } /// /// The deserialization information for the current model diff --git a/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipRequestAction.cs b/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipRequestAction.cs index 5224b0291d0..a41e6ee6e83 100644 --- a/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipRequestAction.cs +++ b/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipRequestAction.cs @@ -11,5 +11,7 @@ public enum DelegatedAdminRelationshipRequestAction { Terminate, [EnumMember(Value = "unknownFutureValue")] UnknownFutureValue, + [EnumMember(Value = "reject")] + Reject, } } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicy.cs b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicy.cs index b5b237efc42..6d0d50369e5 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicy.cs @@ -178,13 +178,13 @@ public int? Version { {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, {"description", n => { Description = n.GetStringValue(); } }, {"deviceSettingStateSummaries", n => { DeviceSettingStateSummaries = n.GetCollectionOfObjectValues(SettingStateDeviceSummary.CreateFromDiscriminatorValue)?.ToList(); } }, - {"deviceStatuses", n => { DeviceStatuses = n.GetCollectionOfObjectValues(DeviceComplianceDeviceStatus.CreateFromDiscriminatorValue)?.ToList(); } }, {"deviceStatusOverview", n => { DeviceStatusOverview = n.GetObjectValue(DeviceComplianceDeviceOverview.CreateFromDiscriminatorValue); } }, + {"deviceStatuses", n => { DeviceStatuses = n.GetCollectionOfObjectValues(DeviceComplianceDeviceStatus.CreateFromDiscriminatorValue)?.ToList(); } }, {"displayName", n => { DisplayName = n.GetStringValue(); } }, {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, {"scheduledActionsForRule", n => { ScheduledActionsForRule = n.GetCollectionOfObjectValues(DeviceComplianceScheduledActionForRule.CreateFromDiscriminatorValue)?.ToList(); } }, - {"userStatuses", n => { UserStatuses = n.GetCollectionOfObjectValues(DeviceComplianceUserStatus.CreateFromDiscriminatorValue)?.ToList(); } }, {"userStatusOverview", n => { UserStatusOverview = n.GetObjectValue(DeviceComplianceUserOverview.CreateFromDiscriminatorValue); } }, + {"userStatuses", n => { UserStatuses = n.GetCollectionOfObjectValues(DeviceComplianceUserStatus.CreateFromDiscriminatorValue)?.ToList(); } }, {"version", n => { Version = n.GetIntValue(); } }, }; } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceConfiguration.cs b/src/Microsoft.Graph/Generated/Models/DeviceConfiguration.cs index b935a771996..5a280033820 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceConfiguration.cs @@ -182,12 +182,12 @@ public int? Version { {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, {"description", n => { Description = n.GetStringValue(); } }, {"deviceSettingStateSummaries", n => { DeviceSettingStateSummaries = n.GetCollectionOfObjectValues(SettingStateDeviceSummary.CreateFromDiscriminatorValue)?.ToList(); } }, - {"deviceStatuses", n => { DeviceStatuses = n.GetCollectionOfObjectValues(DeviceConfigurationDeviceStatus.CreateFromDiscriminatorValue)?.ToList(); } }, {"deviceStatusOverview", n => { DeviceStatusOverview = n.GetObjectValue(DeviceConfigurationDeviceOverview.CreateFromDiscriminatorValue); } }, + {"deviceStatuses", n => { DeviceStatuses = n.GetCollectionOfObjectValues(DeviceConfigurationDeviceStatus.CreateFromDiscriminatorValue)?.ToList(); } }, {"displayName", n => { DisplayName = n.GetStringValue(); } }, {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, - {"userStatuses", n => { UserStatuses = n.GetCollectionOfObjectValues(DeviceConfigurationUserStatus.CreateFromDiscriminatorValue)?.ToList(); } }, {"userStatusOverview", n => { UserStatusOverview = n.GetObjectValue(DeviceConfigurationUserOverview.CreateFromDiscriminatorValue); } }, + {"userStatuses", n => { UserStatuses = n.GetCollectionOfObjectValues(DeviceConfigurationUserStatus.CreateFromDiscriminatorValue)?.ToList(); } }, {"version", n => { Version = n.GetIntValue(); } }, }; } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagement.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagement.cs index 581c32a584f..91d34c1d7c0 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagement.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagement.cs @@ -949,8 +949,8 @@ public Microsoft.Graph.Models.WindowsMalwareOverview WindowsMalwareOverview { {"userExperienceAnalyticsDevicePerformance", n => { UserExperienceAnalyticsDevicePerformance = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.UserExperienceAnalyticsDevicePerformance.CreateFromDiscriminatorValue)?.ToList(); } }, {"userExperienceAnalyticsDeviceScores", n => { UserExperienceAnalyticsDeviceScores = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.UserExperienceAnalyticsDeviceScores.CreateFromDiscriminatorValue)?.ToList(); } }, {"userExperienceAnalyticsDeviceStartupHistory", n => { UserExperienceAnalyticsDeviceStartupHistory = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.UserExperienceAnalyticsDeviceStartupHistory.CreateFromDiscriminatorValue)?.ToList(); } }, - {"userExperienceAnalyticsDeviceStartupProcesses", n => { UserExperienceAnalyticsDeviceStartupProcesses = n.GetCollectionOfObjectValues(UserExperienceAnalyticsDeviceStartupProcess.CreateFromDiscriminatorValue)?.ToList(); } }, {"userExperienceAnalyticsDeviceStartupProcessPerformance", n => { UserExperienceAnalyticsDeviceStartupProcessPerformance = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.UserExperienceAnalyticsDeviceStartupProcessPerformance.CreateFromDiscriminatorValue)?.ToList(); } }, + {"userExperienceAnalyticsDeviceStartupProcesses", n => { UserExperienceAnalyticsDeviceStartupProcesses = n.GetCollectionOfObjectValues(UserExperienceAnalyticsDeviceStartupProcess.CreateFromDiscriminatorValue)?.ToList(); } }, {"userExperienceAnalyticsMetricHistory", n => { UserExperienceAnalyticsMetricHistory = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.UserExperienceAnalyticsMetricHistory.CreateFromDiscriminatorValue)?.ToList(); } }, {"userExperienceAnalyticsModelScores", n => { UserExperienceAnalyticsModelScores = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.UserExperienceAnalyticsModelScores.CreateFromDiscriminatorValue)?.ToList(); } }, {"userExperienceAnalyticsOverview", n => { UserExperienceAnalyticsOverview = n.GetObjectValue(Microsoft.Graph.Models.UserExperienceAnalyticsOverview.CreateFromDiscriminatorValue); } }, diff --git a/src/Microsoft.Graph/Generated/Models/DriveItem.cs b/src/Microsoft.Graph/Generated/Models/DriveItem.cs index 40b2ff14ab5..7eb2174ffd3 100644 --- a/src/Microsoft.Graph/Generated/Models/DriveItem.cs +++ b/src/Microsoft.Graph/Generated/Models/DriveItem.cs @@ -467,9 +467,9 @@ public DriveItem() : base() { {"analytics", n => { Analytics = n.GetObjectValue(ItemAnalytics.CreateFromDiscriminatorValue); } }, {"audio", n => { Audio = n.GetObjectValue(Microsoft.Graph.Models.Audio.CreateFromDiscriminatorValue); } }, {"bundle", n => { Bundle = n.GetObjectValue(Microsoft.Graph.Models.Bundle.CreateFromDiscriminatorValue); } }, + {"cTag", n => { CTag = n.GetStringValue(); } }, {"children", n => { Children = n.GetCollectionOfObjectValues(DriveItem.CreateFromDiscriminatorValue)?.ToList(); } }, {"content", n => { Content = n.GetByteArrayValue(); } }, - {"cTag", n => { CTag = n.GetStringValue(); } }, {"deleted", n => { Deleted = n.GetObjectValue(Microsoft.Graph.Models.Deleted.CreateFromDiscriminatorValue); } }, {"file", n => { File = n.GetObjectValue(FileObject.CreateFromDiscriminatorValue); } }, {"fileSystemInfo", n => { FileSystemInfo = n.GetObjectValue(Microsoft.Graph.Models.FileSystemInfo.CreateFromDiscriminatorValue); } }, diff --git a/src/Microsoft.Graph/Generated/Models/EducationAssignment.cs b/src/Microsoft.Graph/Generated/Models/EducationAssignment.cs index a67b012f2c0..2d3835f9109 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationAssignment.cs @@ -284,13 +284,13 @@ public string WebUrl { /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { - {"addedStudentAction", n => { AddedStudentAction = n.GetEnumValue(); } }, {"addToCalendarAction", n => { AddToCalendarAction = n.GetEnumValue(); } }, + {"addedStudentAction", n => { AddedStudentAction = n.GetEnumValue(); } }, {"allowLateSubmissions", n => { AllowLateSubmissions = n.GetBoolValue(); } }, {"allowStudentsToAddResourcesToSubmission", n => { AllowStudentsToAddResourcesToSubmission = n.GetBoolValue(); } }, {"assignDateTime", n => { AssignDateTime = n.GetDateTimeOffsetValue(); } }, - {"assignedDateTime", n => { AssignedDateTime = n.GetDateTimeOffsetValue(); } }, {"assignTo", n => { AssignTo = n.GetObjectValue(EducationAssignmentRecipient.CreateFromDiscriminatorValue); } }, + {"assignedDateTime", n => { AssignedDateTime = n.GetDateTimeOffsetValue(); } }, {"categories", n => { Categories = n.GetCollectionOfObjectValues(EducationCategory.CreateFromDiscriminatorValue)?.ToList(); } }, {"classId", n => { ClassId = n.GetStringValue(); } }, {"closeDateTime", n => { CloseDateTime = n.GetDateTimeOffsetValue(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/EducationAssignmentDefaults.cs b/src/Microsoft.Graph/Generated/Models/EducationAssignmentDefaults.cs index d677e45c7eb..0b21d442d4b 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationAssignmentDefaults.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationAssignmentDefaults.cs @@ -49,8 +49,8 @@ public string NotificationChannelUrl { /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { - {"addedStudentAction", n => { AddedStudentAction = n.GetEnumValue(); } }, {"addToCalendarAction", n => { AddToCalendarAction = n.GetEnumValue(); } }, + {"addedStudentAction", n => { AddedStudentAction = n.GetEnumValue(); } }, {"dueTime", n => { DueTime = n.GetTimeValue(); } }, {"notificationChannelUrl", n => { NotificationChannelUrl = n.GetStringValue(); } }, }; diff --git a/src/Microsoft.Graph/Generated/Models/EducationClass.cs b/src/Microsoft.Graph/Generated/Models/EducationClass.cs index e34068b660b..8dbda829ea8 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationClass.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationClass.cs @@ -292,8 +292,8 @@ public EducationTerm Term { return new Dictionary>(base.GetFieldDeserializers()) { {"assignmentCategories", n => { AssignmentCategories = n.GetCollectionOfObjectValues(EducationCategory.CreateFromDiscriminatorValue)?.ToList(); } }, {"assignmentDefaults", n => { AssignmentDefaults = n.GetObjectValue(EducationAssignmentDefaults.CreateFromDiscriminatorValue); } }, - {"assignments", n => { Assignments = n.GetCollectionOfObjectValues(EducationAssignment.CreateFromDiscriminatorValue)?.ToList(); } }, {"assignmentSettings", n => { AssignmentSettings = n.GetObjectValue(EducationAssignmentSettings.CreateFromDiscriminatorValue); } }, + {"assignments", n => { Assignments = n.GetCollectionOfObjectValues(EducationAssignment.CreateFromDiscriminatorValue)?.ToList(); } }, {"classCode", n => { ClassCode = n.GetStringValue(); } }, {"course", n => { Course = n.GetObjectValue(EducationCourse.CreateFromDiscriminatorValue); } }, {"createdBy", n => { CreatedBy = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, diff --git a/src/Microsoft.Graph/Generated/Models/EducationUser.cs b/src/Microsoft.Graph/Generated/Models/EducationUser.cs index bc32ee6abee..3acdb2cec58 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationUser.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationUser.cs @@ -519,8 +519,8 @@ public string UserType { {"externalSourceDetail", n => { ExternalSourceDetail = n.GetStringValue(); } }, {"givenName", n => { GivenName = n.GetStringValue(); } }, {"mail", n => { Mail = n.GetStringValue(); } }, - {"mailingAddress", n => { MailingAddress = n.GetObjectValue(PhysicalAddress.CreateFromDiscriminatorValue); } }, {"mailNickname", n => { MailNickname = n.GetStringValue(); } }, + {"mailingAddress", n => { MailingAddress = n.GetObjectValue(PhysicalAddress.CreateFromDiscriminatorValue); } }, {"middleName", n => { MiddleName = n.GetStringValue(); } }, {"mobilePhone", n => { MobilePhone = n.GetStringValue(); } }, {"officeLocation", n => { OfficeLocation = n.GetStringValue(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/Entity.cs b/src/Microsoft.Graph/Generated/Models/Entity.cs index 93c387134bf..600a918ed3a 100644 --- a/src/Microsoft.Graph/Generated/Models/Entity.cs +++ b/src/Microsoft.Graph/Generated/Models/Entity.cs @@ -530,6 +530,17 @@ public static Entity CreateFromDiscriminatorValue(IParseNode parseNode) { "#microsoft.graph.printUsage" => new PrintUsage(), "#microsoft.graph.printUsageByPrinter" => new PrintUsageByPrinter(), "#microsoft.graph.printUsageByUser" => new PrintUsageByUser(), + "#microsoft.graph.privilegedAccessGroup" => new PrivilegedAccessGroup(), + "#microsoft.graph.privilegedAccessGroupAssignmentSchedule" => new PrivilegedAccessGroupAssignmentSchedule(), + "#microsoft.graph.privilegedAccessGroupAssignmentScheduleInstance" => new PrivilegedAccessGroupAssignmentScheduleInstance(), + "#microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest" => new PrivilegedAccessGroupAssignmentScheduleRequest(), + "#microsoft.graph.privilegedAccessGroupEligibilitySchedule" => new PrivilegedAccessGroupEligibilitySchedule(), + "#microsoft.graph.privilegedAccessGroupEligibilityScheduleInstance" => new PrivilegedAccessGroupEligibilityScheduleInstance(), + "#microsoft.graph.privilegedAccessGroupEligibilityScheduleRequest" => new PrivilegedAccessGroupEligibilityScheduleRequest(), + "#microsoft.graph.privilegedAccessRoot" => new PrivilegedAccessRoot(), + "#microsoft.graph.privilegedAccessSchedule" => new PrivilegedAccessSchedule(), + "#microsoft.graph.privilegedAccessScheduleInstance" => new PrivilegedAccessScheduleInstance(), + "#microsoft.graph.privilegedAccessScheduleRequest" => new PrivilegedAccessScheduleRequest(), "#microsoft.graph.profilePhoto" => new ProfilePhoto(), "#microsoft.graph.provisioningObjectSummary" => new ProvisioningObjectSummary(), "#microsoft.graph.rbacApplication" => new RbacApplication(), @@ -537,6 +548,7 @@ public static Entity CreateFromDiscriminatorValue(IParseNode parseNode) { "#microsoft.graph.referenceAttachment" => new ReferenceAttachment(), "#microsoft.graph.remoteAssistancePartner" => new RemoteAssistancePartner(), "#microsoft.graph.request" => new Request(), + "#microsoft.graph.resellerDelegatedAdminRelationship" => new ResellerDelegatedAdminRelationship(), "#microsoft.graph.resourceOperation" => new ResourceOperation(), "#microsoft.graph.resourceSpecificPermissionGrant" => new ResourceSpecificPermissionGrant(), "#microsoft.graph.richLongRunningOperation" => new RichLongRunningOperation(), diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Acl.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Acl.cs index fe6cdf422b0..343cce490e0 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Acl.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Acl.cs @@ -38,7 +38,7 @@ public AclType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } - /// The unique identifer of the identity. In case of Azure Active Directory identities, value is set to the object identifier of the user, group or tenant for types user, group and everyone (and everyoneExceptGuests) respectively. In case of external groups value is set to the ID of the externalGroup + /// The unique identifer of the identity. For Azure Active Directory identities, value is set to the object identifier of the user, group or tenant for types user, group and everyone (and everyoneExceptGuests) respectively. For external groups value is set to the ID of the externalGroup #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Value { diff --git a/src/Microsoft.Graph/Generated/Models/FileEncryptionInfo.cs b/src/Microsoft.Graph/Generated/Models/FileEncryptionInfo.cs new file mode 100644 index 00000000000..7ca37e46097 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/FileEncryptionInfo.cs @@ -0,0 +1,179 @@ +// +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 { + /// + /// Contains properties for file encryption information for the content version of a line of business app. + /// + public class FileEncryptionInfo : 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 key used to encrypt the file content. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public byte[]? EncryptionKey { + get { return BackingStore?.Get("encryptionKey"); } + set { BackingStore?.Set("encryptionKey", value); } + } +#nullable restore +#else + public byte[] EncryptionKey { + get { return BackingStore?.Get("encryptionKey"); } + set { BackingStore?.Set("encryptionKey", value); } + } +#endif + /// The file digest prior to encryption. ProfileVersion1 requires a non-null FileDigest. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public byte[]? FileDigest { + get { return BackingStore?.Get("fileDigest"); } + set { BackingStore?.Set("fileDigest", value); } + } +#nullable restore +#else + public byte[] FileDigest { + get { return BackingStore?.Get("fileDigest"); } + set { BackingStore?.Set("fileDigest", value); } + } +#endif + /// The file digest algorithm. ProfileVersion1 currently only supports SHA256 for the FileDigestAlgorithm. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FileDigestAlgorithm { + get { return BackingStore?.Get("fileDigestAlgorithm"); } + set { BackingStore?.Set("fileDigestAlgorithm", value); } + } +#nullable restore +#else + public string FileDigestAlgorithm { + get { return BackingStore?.Get("fileDigestAlgorithm"); } + set { BackingStore?.Set("fileDigestAlgorithm", value); } + } +#endif + /// The initialization vector (IV) used for the encryption algorithm. Must be 16 bytes. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public byte[]? InitializationVector { + get { return BackingStore?.Get("initializationVector"); } + set { BackingStore?.Set("initializationVector", value); } + } +#nullable restore +#else + public byte[] InitializationVector { + get { return BackingStore?.Get("initializationVector"); } + set { BackingStore?.Set("initializationVector", value); } + } +#endif + /// The hash of the concatenation of the IV and encrypted file content. Must be 32 bytes. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public byte[]? Mac { + get { return BackingStore?.Get("mac"); } + set { BackingStore?.Set("mac", value); } + } +#nullable restore +#else + public byte[] Mac { + get { return BackingStore?.Get("mac"); } + set { BackingStore?.Set("mac", value); } + } +#endif + /// The key used to compute the message authentication code of the concatenation of the IV and encrypted file content. Must be 32 bytes. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public byte[]? MacKey { + get { return BackingStore?.Get("macKey"); } + set { BackingStore?.Set("macKey", value); } + } +#nullable restore +#else + public byte[] MacKey { + get { return BackingStore?.Get("macKey"); } + set { BackingStore?.Set("macKey", 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 profile identifier. Maps to the strategy used to encrypt the file. Currently, only ProfileVersion1 is supported. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProfileIdentifier { + get { return BackingStore?.Get("profileIdentifier"); } + set { BackingStore?.Set("profileIdentifier", value); } + } +#nullable restore +#else + public string ProfileIdentifier { + get { return BackingStore?.Get("profileIdentifier"); } + set { BackingStore?.Set("profileIdentifier", value); } + } +#endif + /// + /// Instantiates a new fileEncryptionInfo and sets the default values. + /// + public FileEncryptionInfo() { + 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 FileEncryptionInfo CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FileEncryptionInfo(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"encryptionKey", n => { EncryptionKey = n.GetByteArrayValue(); } }, + {"fileDigest", n => { FileDigest = n.GetByteArrayValue(); } }, + {"fileDigestAlgorithm", n => { FileDigestAlgorithm = n.GetStringValue(); } }, + {"initializationVector", n => { InitializationVector = n.GetByteArrayValue(); } }, + {"mac", n => { Mac = n.GetByteArrayValue(); } }, + {"macKey", n => { MacKey = n.GetByteArrayValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"profileIdentifier", n => { ProfileIdentifier = 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.WriteByteArrayValue("encryptionKey", EncryptionKey); + writer.WriteByteArrayValue("fileDigest", FileDigest); + writer.WriteStringValue("fileDigestAlgorithm", FileDigestAlgorithm); + writer.WriteByteArrayValue("initializationVector", InitializationVector); + writer.WriteByteArrayValue("mac", Mac); + writer.WriteByteArrayValue("macKey", MacKey); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteStringValue("profileIdentifier", ProfileIdentifier); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Group.cs b/src/Microsoft.Graph/Generated/Models/Group.cs index a0de20c4650..f0076dee045 100644 --- a/src/Microsoft.Graph/Generated/Models/Group.cs +++ b/src/Microsoft.Graph/Generated/Models/Group.cs @@ -838,10 +838,9 @@ public Group() : base() { {"mailNickname", n => { MailNickname = n.GetStringValue(); } }, {"memberOf", n => { MemberOf = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, {"members", n => { Members = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, + {"membersWithLicenseErrors", n => { MembersWithLicenseErrors = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, {"membershipRule", n => { MembershipRule = n.GetStringValue(); } }, {"membershipRuleProcessingState", n => { MembershipRuleProcessingState = n.GetStringValue(); } }, - {"membersWithLicenseErrors", n => { MembersWithLicenseErrors = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"onenote", n => { Onenote = n.GetObjectValue(Microsoft.Graph.Models.Onenote.CreateFromDiscriminatorValue); } }, {"onPremisesDomainName", n => { OnPremisesDomainName = n.GetStringValue(); } }, {"onPremisesLastSyncDateTime", n => { OnPremisesLastSyncDateTime = n.GetDateTimeOffsetValue(); } }, {"onPremisesNetBiosName", n => { OnPremisesNetBiosName = n.GetStringValue(); } }, @@ -849,6 +848,7 @@ public Group() : base() { {"onPremisesSamAccountName", n => { OnPremisesSamAccountName = n.GetStringValue(); } }, {"onPremisesSecurityIdentifier", n => { OnPremisesSecurityIdentifier = n.GetStringValue(); } }, {"onPremisesSyncEnabled", n => { OnPremisesSyncEnabled = n.GetBoolValue(); } }, + {"onenote", n => { Onenote = n.GetObjectValue(Microsoft.Graph.Models.Onenote.CreateFromDiscriminatorValue); } }, {"owners", n => { Owners = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, {"permissionGrants", n => { PermissionGrants = n.GetCollectionOfObjectValues(ResourceSpecificPermissionGrant.CreateFromDiscriminatorValue)?.ToList(); } }, {"photo", n => { Photo = n.GetObjectValue(ProfilePhoto.CreateFromDiscriminatorValue); } }, diff --git a/src/Microsoft.Graph/Generated/Models/HostSecurityState.cs b/src/Microsoft.Graph/Generated/Models/HostSecurityState.cs index fb5e2c8b67b..b2182602b0d 100644 --- a/src/Microsoft.Graph/Generated/Models/HostSecurityState.cs +++ b/src/Microsoft.Graph/Generated/Models/HostSecurityState.cs @@ -71,7 +71,7 @@ public string OdataType { set { BackingStore?.Set("@odata.type", value); } } #endif - /// Host Operating System. (For example, Windows10, MacOS, RHEL, etc.). + /// Host Operating System. (For example, Windows 10, macOS, RHEL, etc.). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Os { diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/IdentityGovernance.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/IdentityGovernance.cs index 64f07ca1017..cf54da6f4a3 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/IdentityGovernance.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/IdentityGovernance.cs @@ -83,6 +83,20 @@ public string OdataType { get { return BackingStore?.Get("@odata.type"); } set { BackingStore?.Set("@odata.type", value); } } +#endif + /// The privilegedAccess property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.PrivilegedAccessRoot? PrivilegedAccess { + get { return BackingStore?.Get("privilegedAccess"); } + set { BackingStore?.Set("privilegedAccess", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.PrivilegedAccessRoot PrivilegedAccess { + get { return BackingStore?.Get("privilegedAccess"); } + set { BackingStore?.Set("privilegedAccess", value); } + } #endif /// The termsOfUse property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -123,6 +137,7 @@ public IDictionary> GetFieldDeserializers() { {"entitlementManagement", n => { EntitlementManagement = n.GetObjectValue(Microsoft.Graph.Models.EntitlementManagement.CreateFromDiscriminatorValue); } }, {"lifecycleWorkflows", n => { LifecycleWorkflows = n.GetObjectValue(LifecycleWorkflowsContainer.CreateFromDiscriminatorValue); } }, {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"privilegedAccess", n => { PrivilegedAccess = n.GetObjectValue(Microsoft.Graph.Models.PrivilegedAccessRoot.CreateFromDiscriminatorValue); } }, {"termsOfUse", n => { TermsOfUse = n.GetObjectValue(Microsoft.Graph.Models.TermsOfUseContainer.CreateFromDiscriminatorValue); } }, }; } @@ -137,6 +152,7 @@ public void Serialize(ISerializationWriter writer) { writer.WriteObjectValue("entitlementManagement", EntitlementManagement); writer.WriteObjectValue("lifecycleWorkflows", LifecycleWorkflows); writer.WriteStringValue("@odata.type", OdataType); + writer.WriteObjectValue("privilegedAccess", PrivilegedAccess); writer.WriteObjectValue("termsOfUse", TermsOfUse); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/LifecycleWorkflowsContainer.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/LifecycleWorkflowsContainer.cs index 6c098b9240b..14c7ac89284 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/LifecycleWorkflowsContainer.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/LifecycleWorkflowsContainer.cs @@ -107,8 +107,8 @@ public List WorkflowTemplates { {"deletedItems", n => { DeletedItems = n.GetObjectValue(Microsoft.Graph.Models.DeletedItemContainer.CreateFromDiscriminatorValue); } }, {"settings", n => { Settings = n.GetObjectValue(LifecycleManagementSettings.CreateFromDiscriminatorValue); } }, {"taskDefinitions", n => { TaskDefinitions = n.GetCollectionOfObjectValues(TaskDefinition.CreateFromDiscriminatorValue)?.ToList(); } }, - {"workflows", n => { Workflows = n.GetCollectionOfObjectValues(Workflow.CreateFromDiscriminatorValue)?.ToList(); } }, {"workflowTemplates", n => { WorkflowTemplates = n.GetCollectionOfObjectValues(WorkflowTemplate.CreateFromDiscriminatorValue)?.ToList(); } }, + {"workflows", n => { Workflows = n.GetCollectionOfObjectValues(Workflow.CreateFromDiscriminatorValue)?.ToList(); } }, }; } /// diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/Parameter.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/Parameter.cs index 6eed2dd1ef1..eb90d668da8 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/Parameter.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/Parameter.cs @@ -83,8 +83,8 @@ public IDictionary> GetFieldDeserializers() { return new Dictionary> { {"name", n => { Name = n.GetStringValue(); } }, {"@odata.type", n => { OdataType = n.GetStringValue(); } }, - {"values", n => { Values = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, {"valueType", n => { ValueType = n.GetEnumValue(); } }, + {"values", n => { Values = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, }; } /// diff --git a/src/Microsoft.Graph/Generated/Models/IdentityUserFlowAttribute.cs b/src/Microsoft.Graph/Generated/Models/IdentityUserFlowAttribute.cs index 42a6f8d73d7..535c7aedd61 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityUserFlowAttribute.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityUserFlowAttribute.cs @@ -25,7 +25,7 @@ public string Description { set { BackingStore?.Set("description", value); } } #endif - /// The display name of the user flow attribute. + /// The display name of the user flow attribute. Supports $filter (eq, ne). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? DisplayName { diff --git a/src/Microsoft.Graph/Generated/Models/InsightIdentity.cs b/src/Microsoft.Graph/Generated/Models/InsightIdentity.cs index fa394bf1dd5..3aac033ccdc 100644 --- a/src/Microsoft.Graph/Generated/Models/InsightIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/InsightIdentity.cs @@ -42,7 +42,7 @@ public string DisplayName { set { BackingStore?.Set("displayName", value); } } #endif - /// The id of the user who shared the item. + /// The ID of the user who shared the item. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Id { diff --git a/src/Microsoft.Graph/Generated/Models/InternalDomainFederation.cs b/src/Microsoft.Graph/Generated/Models/InternalDomainFederation.cs index 8eba6272ad8..347ba355a65 100644 --- a/src/Microsoft.Graph/Generated/Models/InternalDomainFederation.cs +++ b/src/Microsoft.Graph/Generated/Models/InternalDomainFederation.cs @@ -101,8 +101,8 @@ public InternalDomainFederation() : base() { {"isSignedAuthenticationRequestRequired", n => { IsSignedAuthenticationRequestRequired = n.GetBoolValue(); } }, {"nextSigningCertificate", n => { NextSigningCertificate = n.GetStringValue(); } }, {"promptLoginBehavior", n => { PromptLoginBehavior = n.GetEnumValue(); } }, - {"signingCertificateUpdateStatus", n => { SigningCertificateUpdateStatus = n.GetObjectValue(Microsoft.Graph.Models.SigningCertificateUpdateStatus.CreateFromDiscriminatorValue); } }, {"signOutUri", n => { SignOutUri = n.GetStringValue(); } }, + {"signingCertificateUpdateStatus", n => { SigningCertificateUpdateStatus = n.GetObjectValue(Microsoft.Graph.Models.SigningCertificateUpdateStatus.CreateFromDiscriminatorValue); } }, }; } /// diff --git a/src/Microsoft.Graph/Generated/Models/Invitation.cs b/src/Microsoft.Graph/Generated/Models/Invitation.cs index 4128b3173aa..fa8c4d30f6e 100644 --- a/src/Microsoft.Graph/Generated/Models/Invitation.cs +++ b/src/Microsoft.Graph/Generated/Models/Invitation.cs @@ -141,13 +141,13 @@ public string Status { /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { + {"inviteRedeemUrl", n => { InviteRedeemUrl = n.GetStringValue(); } }, + {"inviteRedirectUrl", n => { InviteRedirectUrl = n.GetStringValue(); } }, {"invitedUser", n => { InvitedUser = n.GetObjectValue(User.CreateFromDiscriminatorValue); } }, {"invitedUserDisplayName", n => { InvitedUserDisplayName = n.GetStringValue(); } }, {"invitedUserEmailAddress", n => { InvitedUserEmailAddress = n.GetStringValue(); } }, {"invitedUserMessageInfo", n => { InvitedUserMessageInfo = n.GetObjectValue(Microsoft.Graph.Models.InvitedUserMessageInfo.CreateFromDiscriminatorValue); } }, {"invitedUserType", n => { InvitedUserType = n.GetStringValue(); } }, - {"inviteRedeemUrl", n => { InviteRedeemUrl = n.GetStringValue(); } }, - {"inviteRedirectUrl", n => { InviteRedirectUrl = n.GetStringValue(); } }, {"resetRedemption", n => { ResetRedemption = n.GetBoolValue(); } }, {"sendInvitationMessage", n => { SendInvitationMessage = n.GetBoolValue(); } }, {"status", n => { Status = n.GetStringValue(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/IosGeneralDeviceConfiguration.cs b/src/Microsoft.Graph/Generated/Models/IosGeneralDeviceConfiguration.cs index f83f3abb757..274fb69452b 100644 --- a/src/Microsoft.Graph/Generated/Models/IosGeneralDeviceConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/IosGeneralDeviceConfiguration.cs @@ -859,15 +859,15 @@ public IosGeneralDeviceConfiguration() : base() { {"airDropBlocked", n => { AirDropBlocked = n.GetBoolValue(); } }, {"airDropForceUnmanagedDropTarget", n => { AirDropForceUnmanagedDropTarget = n.GetBoolValue(); } }, {"airPlayForcePairingPasswordForOutgoingRequests", n => { AirPlayForcePairingPasswordForOutgoingRequests = n.GetBoolValue(); } }, - {"appleNewsBlocked", n => { AppleNewsBlocked = n.GetBoolValue(); } }, - {"appleWatchBlockPairing", n => { AppleWatchBlockPairing = n.GetBoolValue(); } }, - {"appleWatchForceWristDetection", n => { AppleWatchForceWristDetection = n.GetBoolValue(); } }, - {"appsSingleAppModeList", n => { AppsSingleAppModeList = n.GetCollectionOfObjectValues(AppListItem.CreateFromDiscriminatorValue)?.ToList(); } }, {"appStoreBlockAutomaticDownloads", n => { AppStoreBlockAutomaticDownloads = n.GetBoolValue(); } }, - {"appStoreBlocked", n => { AppStoreBlocked = n.GetBoolValue(); } }, {"appStoreBlockInAppPurchases", n => { AppStoreBlockInAppPurchases = n.GetBoolValue(); } }, {"appStoreBlockUIAppInstallation", n => { AppStoreBlockUIAppInstallation = n.GetBoolValue(); } }, + {"appStoreBlocked", n => { AppStoreBlocked = n.GetBoolValue(); } }, {"appStoreRequirePassword", n => { AppStoreRequirePassword = n.GetBoolValue(); } }, + {"appleNewsBlocked", n => { AppleNewsBlocked = n.GetBoolValue(); } }, + {"appleWatchBlockPairing", n => { AppleWatchBlockPairing = n.GetBoolValue(); } }, + {"appleWatchForceWristDetection", n => { AppleWatchForceWristDetection = n.GetBoolValue(); } }, + {"appsSingleAppModeList", n => { AppsSingleAppModeList = n.GetCollectionOfObjectValues(AppListItem.CreateFromDiscriminatorValue)?.ToList(); } }, {"appsVisibilityList", n => { AppsVisibilityList = n.GetCollectionOfObjectValues(AppListItem.CreateFromDiscriminatorValue)?.ToList(); } }, {"appsVisibilityListType", n => { AppsVisibilityListType = n.GetEnumValue(); } }, {"bluetoothBlockModification", n => { BluetoothBlockModification = n.GetBoolValue(); } }, @@ -900,8 +900,8 @@ public IosGeneralDeviceConfiguration() : base() { {"gamingBlockGameCenterFriends", n => { GamingBlockGameCenterFriends = n.GetBoolValue(); } }, {"gamingBlockMultiplayer", n => { GamingBlockMultiplayer = n.GetBoolValue(); } }, {"hostPairingBlocked", n => { HostPairingBlocked = n.GetBoolValue(); } }, - {"iBooksStoreBlocked", n => { IBooksStoreBlocked = n.GetBoolValue(); } }, {"iBooksStoreBlockErotica", n => { IBooksStoreBlockErotica = n.GetBoolValue(); } }, + {"iBooksStoreBlocked", n => { IBooksStoreBlocked = n.GetBoolValue(); } }, {"iCloudBlockActivityContinuation", n => { ICloudBlockActivityContinuation = n.GetBoolValue(); } }, {"iCloudBlockBackup", n => { ICloudBlockBackup = n.GetBoolValue(); } }, {"iCloudBlockDocumentSync", n => { ICloudBlockDocumentSync = n.GetBoolValue(); } }, @@ -969,17 +969,17 @@ public IosGeneralDeviceConfiguration() : base() { {"passcodeSignInFailureCountBeforeWipe", n => { PasscodeSignInFailureCountBeforeWipe = n.GetIntValue(); } }, {"podcastsBlocked", n => { PodcastsBlocked = n.GetBoolValue(); } }, {"safariBlockAutofill", n => { SafariBlockAutofill = n.GetBoolValue(); } }, - {"safariBlocked", n => { SafariBlocked = n.GetBoolValue(); } }, {"safariBlockJavaScript", n => { SafariBlockJavaScript = n.GetBoolValue(); } }, {"safariBlockPopups", n => { SafariBlockPopups = n.GetBoolValue(); } }, + {"safariBlocked", n => { SafariBlocked = n.GetBoolValue(); } }, {"safariCookieSettings", n => { SafariCookieSettings = n.GetEnumValue(); } }, {"safariManagedDomains", n => { SafariManagedDomains = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, {"safariPasswordAutoFillDomains", n => { SafariPasswordAutoFillDomains = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, {"safariRequireFraudWarning", n => { SafariRequireFraudWarning = n.GetBoolValue(); } }, {"screenCaptureBlocked", n => { ScreenCaptureBlocked = n.GetBoolValue(); } }, + {"siriBlockUserGeneratedContent", n => { SiriBlockUserGeneratedContent = n.GetBoolValue(); } }, {"siriBlocked", n => { SiriBlocked = n.GetBoolValue(); } }, {"siriBlockedWhenLocked", n => { SiriBlockedWhenLocked = n.GetBoolValue(); } }, - {"siriBlockUserGeneratedContent", n => { SiriBlockUserGeneratedContent = n.GetBoolValue(); } }, {"siriRequireProfanityFilter", n => { SiriRequireProfanityFilter = n.GetBoolValue(); } }, {"spotlightBlockInternetResults", n => { SpotlightBlockInternetResults = n.GetBoolValue(); } }, {"voiceDialingBlocked", n => { VoiceDialingBlocked = n.GetBoolValue(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/IosNetworkUsageRule.cs b/src/Microsoft.Graph/Generated/Models/IosNetworkUsageRule.cs index e93d91dba40..8bcd493e279 100644 --- a/src/Microsoft.Graph/Generated/Models/IosNetworkUsageRule.cs +++ b/src/Microsoft.Graph/Generated/Models/IosNetworkUsageRule.cs @@ -75,8 +75,8 @@ public static IosNetworkUsageRule CreateFromDiscriminatorValue(IParseNode parseN /// public IDictionary> GetFieldDeserializers() { return new Dictionary> { - {"cellularDataBlocked", n => { CellularDataBlocked = n.GetBoolValue(); } }, {"cellularDataBlockWhenRoaming", n => { CellularDataBlockWhenRoaming = n.GetBoolValue(); } }, + {"cellularDataBlocked", n => { CellularDataBlocked = n.GetBoolValue(); } }, {"managedApps", n => { ManagedApps = n.GetCollectionOfObjectValues(AppListItem.CreateFromDiscriminatorValue)?.ToList(); } }, {"@odata.type", n => { OdataType = n.GetStringValue(); } }, }; diff --git a/src/Microsoft.Graph/Generated/Models/IosStoreApp.cs b/src/Microsoft.Graph/Generated/Models/IosStoreApp.cs index cea787109b2..7ce55becfba 100644 --- a/src/Microsoft.Graph/Generated/Models/IosStoreApp.cs +++ b/src/Microsoft.Graph/Generated/Models/IosStoreApp.cs @@ -84,8 +84,8 @@ public IosStoreApp() : base() { /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { - {"applicableDeviceType", n => { ApplicableDeviceType = n.GetObjectValue(IosDeviceType.CreateFromDiscriminatorValue); } }, {"appStoreUrl", n => { AppStoreUrl = n.GetStringValue(); } }, + {"applicableDeviceType", n => { ApplicableDeviceType = n.GetObjectValue(IosDeviceType.CreateFromDiscriminatorValue); } }, {"bundleId", n => { BundleId = n.GetStringValue(); } }, {"minimumSupportedOperatingSystem", n => { MinimumSupportedOperatingSystem = n.GetObjectValue(IosMinimumOperatingSystem.CreateFromDiscriminatorValue); } }, }; diff --git a/src/Microsoft.Graph/Generated/Models/IosVppApp.cs b/src/Microsoft.Graph/Generated/Models/IosVppApp.cs index eaabc3b7c45..6863fb20d4c 100644 --- a/src/Microsoft.Graph/Generated/Models/IosVppApp.cs +++ b/src/Microsoft.Graph/Generated/Models/IosVppApp.cs @@ -132,8 +132,8 @@ public IosVppApp() : base() { /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { - {"applicableDeviceType", n => { ApplicableDeviceType = n.GetObjectValue(IosDeviceType.CreateFromDiscriminatorValue); } }, {"appStoreUrl", n => { AppStoreUrl = n.GetStringValue(); } }, + {"applicableDeviceType", n => { ApplicableDeviceType = n.GetObjectValue(IosDeviceType.CreateFromDiscriminatorValue); } }, {"bundleId", n => { BundleId = n.GetStringValue(); } }, {"licensingType", n => { LicensingType = n.GetObjectValue(VppLicensingType.CreateFromDiscriminatorValue); } }, {"releaseDateTime", n => { ReleaseDateTime = n.GetDateTimeOffsetValue(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/MacOSCompliancePolicy.cs b/src/Microsoft.Graph/Generated/Models/MacOSCompliancePolicy.cs index ecb38a917b0..2dd7b96cae6 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSCompliancePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSCompliancePolicy.cs @@ -134,8 +134,8 @@ public MacOSCompliancePolicy() : base() { {"deviceThreatProtectionEnabled", n => { DeviceThreatProtectionEnabled = n.GetBoolValue(); } }, {"deviceThreatProtectionRequiredSecurityLevel", n => { DeviceThreatProtectionRequiredSecurityLevel = n.GetEnumValue(); } }, {"firewallBlockAllIncoming", n => { FirewallBlockAllIncoming = n.GetBoolValue(); } }, - {"firewallEnabled", n => { FirewallEnabled = n.GetBoolValue(); } }, {"firewallEnableStealthMode", n => { FirewallEnableStealthMode = n.GetBoolValue(); } }, + {"firewallEnabled", n => { FirewallEnabled = n.GetBoolValue(); } }, {"osMaximumVersion", n => { OsMaximumVersion = n.GetStringValue(); } }, {"osMinimumVersion", n => { OsMinimumVersion = n.GetStringValue(); } }, {"passwordBlockSimple", n => { PasswordBlockSimple = n.GetBoolValue(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfiguration.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfiguration.cs index fd24a9bb5c1..f19b771b98a 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfiguration.cs @@ -156,13 +156,13 @@ public int? Version { {"assignments", n => { Assignments = n.GetCollectionOfObjectValues(ManagedDeviceMobileAppConfigurationAssignment.CreateFromDiscriminatorValue)?.ToList(); } }, {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, {"description", n => { Description = n.GetStringValue(); } }, - {"deviceStatuses", n => { DeviceStatuses = n.GetCollectionOfObjectValues(ManagedDeviceMobileAppConfigurationDeviceStatus.CreateFromDiscriminatorValue)?.ToList(); } }, {"deviceStatusSummary", n => { DeviceStatusSummary = n.GetObjectValue(ManagedDeviceMobileAppConfigurationDeviceSummary.CreateFromDiscriminatorValue); } }, + {"deviceStatuses", n => { DeviceStatuses = n.GetCollectionOfObjectValues(ManagedDeviceMobileAppConfigurationDeviceStatus.CreateFromDiscriminatorValue)?.ToList(); } }, {"displayName", n => { DisplayName = n.GetStringValue(); } }, {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, {"targetedMobileApps", n => { TargetedMobileApps = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"userStatuses", n => { UserStatuses = n.GetCollectionOfObjectValues(ManagedDeviceMobileAppConfigurationUserStatus.CreateFromDiscriminatorValue)?.ToList(); } }, {"userStatusSummary", n => { UserStatusSummary = n.GetObjectValue(ManagedDeviceMobileAppConfigurationUserSummary.CreateFromDiscriminatorValue); } }, + {"userStatuses", n => { UserStatuses = n.GetCollectionOfObjectValues(ManagedDeviceMobileAppConfigurationUserStatus.CreateFromDiscriminatorValue)?.ToList(); } }, {"version", n => { Version = n.GetIntValue(); } }, }; } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedIOSStoreApp.cs b/src/Microsoft.Graph/Generated/Models/ManagedIOSStoreApp.cs index 57acfdb3be7..fcac1d9e9f1 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedIOSStoreApp.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedIOSStoreApp.cs @@ -84,8 +84,8 @@ public ManagedIOSStoreApp() : base() { /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { - {"applicableDeviceType", n => { ApplicableDeviceType = n.GetObjectValue(IosDeviceType.CreateFromDiscriminatorValue); } }, {"appStoreUrl", n => { AppStoreUrl = n.GetStringValue(); } }, + {"applicableDeviceType", n => { ApplicableDeviceType = n.GetObjectValue(IosDeviceType.CreateFromDiscriminatorValue); } }, {"bundleId", n => { BundleId = n.GetStringValue(); } }, {"minimumSupportedOperatingSystem", n => { MinimumSupportedOperatingSystem = n.GetObjectValue(IosMinimumOperatingSystem.CreateFromDiscriminatorValue); } }, }; diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Models/MobileAppContentCollectionResponse.cs similarity index 67% rename from src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Delta/DeltaResponse.cs rename to src/Microsoft.Graph/Generated/Models/MobileAppContentCollectionResponse.cs index ceaf6e56c27..38bc1cc7054 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppContentCollectionResponse.cs @@ -1,23 +1,22 @@ // -using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; using System.Linq; using System; -namespace Microsoft.Graph.DirectoryNamespace.DeletedItems.Delta { - public class DeltaResponse : BaseDeltaFunctionResponse, IParsable { +namespace Microsoft.Graph.Models { + public class MobileAppContentCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { - get { return BackingStore?.Get?>("value"); } + public List? Value { + get { return BackingStore?.Get?>("value"); } set { BackingStore?.Set("value", value); } } #nullable restore #else - public List Value { - get { return BackingStore?.Get>("value"); } + public List Value { + get { return BackingStore?.Get>("value"); } set { BackingStore?.Set("value", value); } } #endif @@ -25,16 +24,16 @@ public List Value { /// 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 DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new MobileAppContentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DeltaResponse(); + return new MobileAppContentCollectionResponse(); } /// /// The deserialization information for the current model /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { - {"value", n => { Value = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, + {"value", n => { Value = n.GetCollectionOfObjectValues(MobileAppContent.CreateFromDiscriminatorValue)?.ToList(); } }, }; } /// @@ -44,7 +43,7 @@ public List Value { public new void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); } } } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetAvailableExtensionProperties/GetAvailableExtensionPropertiesResponse.cs b/src/Microsoft.Graph/Generated/Models/MobileAppContentFileCollectionResponse.cs similarity index 64% rename from src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetAvailableExtensionProperties/GetAvailableExtensionPropertiesResponse.cs rename to src/Microsoft.Graph/Generated/Models/MobileAppContentFileCollectionResponse.cs index c6680e6e1ee..7c99938b3d2 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetAvailableExtensionProperties/GetAvailableExtensionPropertiesResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppContentFileCollectionResponse.cs @@ -1,23 +1,22 @@ // -using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; using System.Linq; using System; -namespace Microsoft.Graph.DirectoryNamespace.DeletedItems.GetAvailableExtensionProperties { - public class GetAvailableExtensionPropertiesResponse : BaseCollectionPaginationCountResponse, IParsable { +namespace Microsoft.Graph.Models { + public class MobileAppContentFileCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { - get { return BackingStore?.Get?>("value"); } + public List? Value { + get { return BackingStore?.Get?>("value"); } set { BackingStore?.Set("value", value); } } #nullable restore #else - public List Value { - get { return BackingStore?.Get>("value"); } + public List Value { + get { return BackingStore?.Get>("value"); } set { BackingStore?.Set("value", value); } } #endif @@ -25,16 +24,16 @@ public List Value { /// 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 GetAvailableExtensionPropertiesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new MobileAppContentFileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new GetAvailableExtensionPropertiesResponse(); + return new MobileAppContentFileCollectionResponse(); } /// /// The deserialization information for the current model /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { - {"value", n => { Value = n.GetCollectionOfObjectValues(ExtensionProperty.CreateFromDiscriminatorValue)?.ToList(); } }, + {"value", n => { Value = n.GetCollectionOfObjectValues(MobileAppContentFile.CreateFromDiscriminatorValue)?.ToList(); } }, }; } /// @@ -44,7 +43,7 @@ public List Value { public new void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); } } } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsResponse.cs b/src/Microsoft.Graph/Generated/Models/MobileContainedAppCollectionResponse.cs similarity index 67% rename from src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsResponse.cs rename to src/Microsoft.Graph/Generated/Models/MobileContainedAppCollectionResponse.cs index 5bdd81e59e6..400f7e53865 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileContainedAppCollectionResponse.cs @@ -1,23 +1,22 @@ // -using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; using System.Linq; using System; -namespace Microsoft.Graph.DirectoryNamespace.DeletedItems.GetByIds { - public class GetByIdsResponse : BaseCollectionPaginationCountResponse, IParsable { +namespace Microsoft.Graph.Models { + public class MobileContainedAppCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { - get { return BackingStore?.Get?>("value"); } + public List? Value { + get { return BackingStore?.Get?>("value"); } set { BackingStore?.Set("value", value); } } #nullable restore #else - public List Value { - get { return BackingStore?.Get>("value"); } + public List Value { + get { return BackingStore?.Get>("value"); } set { BackingStore?.Set("value", value); } } #endif @@ -25,16 +24,16 @@ public List Value { /// 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 GetByIdsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new MobileContainedAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new GetByIdsResponse(); + return new MobileContainedAppCollectionResponse(); } /// /// The deserialization information for the current model /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { - {"value", n => { Value = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, + {"value", n => { Value = n.GetCollectionOfObjectValues(MobileContainedApp.CreateFromDiscriminatorValue)?.ToList(); } }, }; } /// @@ -44,7 +43,7 @@ public List Value { public new void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); } } } diff --git a/src/Microsoft.Graph/Generated/Models/OnlineMeeting.cs b/src/Microsoft.Graph/Generated/Models/OnlineMeeting.cs index e46d3de68e6..6bf4e3ccd0a 100644 --- a/src/Microsoft.Graph/Generated/Models/OnlineMeeting.cs +++ b/src/Microsoft.Graph/Generated/Models/OnlineMeeting.cs @@ -282,10 +282,10 @@ public WatermarkProtectionValues WatermarkProtection { return new Dictionary>(base.GetFieldDeserializers()) { {"allowAttendeeToEnableCamera", n => { AllowAttendeeToEnableCamera = n.GetBoolValue(); } }, {"allowAttendeeToEnableMic", n => { AllowAttendeeToEnableMic = n.GetBoolValue(); } }, - {"allowedPresenters", n => { AllowedPresenters = n.GetEnumValue(); } }, {"allowMeetingChat", n => { AllowMeetingChat = n.GetEnumValue(); } }, {"allowParticipantsToChangeName", n => { AllowParticipantsToChangeName = n.GetBoolValue(); } }, {"allowTeamworkReactions", n => { AllowTeamworkReactions = n.GetBoolValue(); } }, + {"allowedPresenters", n => { AllowedPresenters = n.GetEnumValue(); } }, {"attendanceReports", n => { AttendanceReports = n.GetCollectionOfObjectValues(MeetingAttendanceReport.CreateFromDiscriminatorValue)?.ToList(); } }, {"attendeeReport", n => { AttendeeReport = n.GetByteArrayValue(); } }, {"audioConferencing", n => { AudioConferencing = n.GetObjectValue(Microsoft.Graph.Models.AudioConferencing.CreateFromDiscriminatorValue); } }, diff --git a/src/Microsoft.Graph/Generated/Models/OrganizationalBrandingProperties.cs b/src/Microsoft.Graph/Generated/Models/OrganizationalBrandingProperties.cs index 730960611fa..e004702f42a 100644 --- a/src/Microsoft.Graph/Generated/Models/OrganizationalBrandingProperties.cs +++ b/src/Microsoft.Graph/Generated/Models/OrganizationalBrandingProperties.cs @@ -451,10 +451,10 @@ public string UsernameHintText { {"bannerLogoRelativeUrl", n => { BannerLogoRelativeUrl = n.GetStringValue(); } }, {"cdnList", n => { CdnList = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, {"customAccountResetCredentialsUrl", n => { CustomAccountResetCredentialsUrl = n.GetStringValue(); } }, - {"customCannotAccessYourAccountText", n => { CustomCannotAccessYourAccountText = n.GetStringValue(); } }, - {"customCannotAccessYourAccountUrl", n => { CustomCannotAccessYourAccountUrl = n.GetStringValue(); } }, {"customCSS", n => { CustomCSS = n.GetByteArrayValue(); } }, {"customCSSRelativeUrl", n => { CustomCSSRelativeUrl = n.GetStringValue(); } }, + {"customCannotAccessYourAccountText", n => { CustomCannotAccessYourAccountText = n.GetStringValue(); } }, + {"customCannotAccessYourAccountUrl", n => { CustomCannotAccessYourAccountUrl = n.GetStringValue(); } }, {"customForgotMyPasswordText", n => { CustomForgotMyPasswordText = n.GetStringValue(); } }, {"customPrivacyAndCookiesText", n => { CustomPrivacyAndCookiesText = n.GetStringValue(); } }, {"customPrivacyAndCookiesUrl", n => { CustomPrivacyAndCookiesUrl = n.GetStringValue(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/PermissionGrantConditionSet.cs b/src/Microsoft.Graph/Generated/Models/PermissionGrantConditionSet.cs index 841842c334e..dcba3cea186 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionGrantConditionSet.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionGrantConditionSet.cs @@ -115,11 +115,11 @@ public string ResourceApplication { return new Dictionary>(base.GetFieldDeserializers()) { {"clientApplicationIds", n => { ClientApplicationIds = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, {"clientApplicationPublisherIds", n => { ClientApplicationPublisherIds = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"clientApplicationsFromVerifiedPublisherOnly", n => { ClientApplicationsFromVerifiedPublisherOnly = n.GetBoolValue(); } }, {"clientApplicationTenantIds", n => { ClientApplicationTenantIds = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"clientApplicationsFromVerifiedPublisherOnly", n => { ClientApplicationsFromVerifiedPublisherOnly = n.GetBoolValue(); } }, {"permissionClassification", n => { PermissionClassification = n.GetStringValue(); } }, - {"permissions", n => { Permissions = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, {"permissionType", n => { PermissionType = n.GetEnumValue(); } }, + {"permissions", n => { Permissions = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, {"resourceApplication", n => { ResourceApplication = n.GetStringValue(); } }, }; } diff --git a/src/Microsoft.Graph/Generated/Models/Pkcs12CertificateInformation.cs b/src/Microsoft.Graph/Generated/Models/Pkcs12CertificateInformation.cs index 13f5243490b..a8fdfb63c64 100644 --- a/src/Microsoft.Graph/Generated/Models/Pkcs12CertificateInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/Pkcs12CertificateInformation.cs @@ -14,7 +14,7 @@ public IDictionary AdditionalData { } /// Stores model information. public IBackingStore BackingStore { get; private set; } - /// Represents whether the certificate is the active certificate to be used for calling the API connector. The active certificate is the most recently uploaded certificate which is not yet expired but whose notBefore time is in the past. + /// Represents whether the certificate is the active certificate to be used for calling the API connector. The active certificate is the most recently uploaded certificate that isn't yet expired but whose notBefore time is in the past. public bool? IsActive { get { return BackingStore?.Get("isActive"); } set { BackingStore?.Set("isActive", value); } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerPlan.cs b/src/Microsoft.Graph/Generated/Models/PlannerPlan.cs index 49c924db7ea..80447ada33b 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerPlan.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerPlan.cs @@ -20,7 +20,7 @@ public List Buckets { set { BackingStore?.Set("buckets", value); } } #endif - /// Identifies the container of the plan. Specify only the url, the containerId and type, or all properties. After it is set, this property can’t be updated. Required. + /// Identifies the container of the plan. Specify only the url, the containerId and type, or all properties. After it's set, this property can’t be updated. Required. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public PlannerPlanContainer? Container { @@ -53,7 +53,7 @@ public DateTimeOffset? CreatedDateTime { get { return BackingStore?.Get("createdDateTime"); } set { BackingStore?.Set("createdDateTime", value); } } - /// Read-only. Nullable. Additional details about the plan. + /// Read-only. Nullable. Extra details about the plan. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public PlannerPlanDetails? Details { diff --git a/src/Microsoft.Graph/Generated/Models/PrinterBase.cs b/src/Microsoft.Graph/Generated/Models/PrinterBase.cs index a1086ca88e5..ef0a81712cb 100644 --- a/src/Microsoft.Graph/Generated/Models/PrinterBase.cs +++ b/src/Microsoft.Graph/Generated/Models/PrinterBase.cs @@ -48,7 +48,7 @@ public string DisplayName { set { BackingStore?.Set("displayName", value); } } #endif - /// Whether the printer/printerShare is currently accepting new print jobs. + /// Specifies whether the printer/printerShare is currently accepting new print jobs. public bool? IsAcceptingJobs { get { return BackingStore?.Get("isAcceptingJobs"); } set { BackingStore?.Set("isAcceptingJobs", value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroup.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroup.cs new file mode 100644 index 00000000000..a4e740e0dd9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroup.cs @@ -0,0 +1,145 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class PrivilegedAccessGroup : Entity, IParsable { + /// The assignmentApprovals property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AssignmentApprovals { + get { return BackingStore?.Get?>("assignmentApprovals"); } + set { BackingStore?.Set("assignmentApprovals", value); } + } +#nullable restore +#else + public List AssignmentApprovals { + get { return BackingStore?.Get>("assignmentApprovals"); } + set { BackingStore?.Set("assignmentApprovals", value); } + } +#endif + /// The assignmentScheduleInstances property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AssignmentScheduleInstances { + get { return BackingStore?.Get?>("assignmentScheduleInstances"); } + set { BackingStore?.Set("assignmentScheduleInstances", value); } + } +#nullable restore +#else + public List AssignmentScheduleInstances { + get { return BackingStore?.Get>("assignmentScheduleInstances"); } + set { BackingStore?.Set("assignmentScheduleInstances", value); } + } +#endif + /// The assignmentScheduleRequests property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AssignmentScheduleRequests { + get { return BackingStore?.Get?>("assignmentScheduleRequests"); } + set { BackingStore?.Set("assignmentScheduleRequests", value); } + } +#nullable restore +#else + public List AssignmentScheduleRequests { + get { return BackingStore?.Get>("assignmentScheduleRequests"); } + set { BackingStore?.Set("assignmentScheduleRequests", value); } + } +#endif + /// The assignmentSchedules property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AssignmentSchedules { + get { return BackingStore?.Get?>("assignmentSchedules"); } + set { BackingStore?.Set("assignmentSchedules", value); } + } +#nullable restore +#else + public List AssignmentSchedules { + get { return BackingStore?.Get>("assignmentSchedules"); } + set { BackingStore?.Set("assignmentSchedules", value); } + } +#endif + /// The eligibilityScheduleInstances property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? EligibilityScheduleInstances { + get { return BackingStore?.Get?>("eligibilityScheduleInstances"); } + set { BackingStore?.Set("eligibilityScheduleInstances", value); } + } +#nullable restore +#else + public List EligibilityScheduleInstances { + get { return BackingStore?.Get>("eligibilityScheduleInstances"); } + set { BackingStore?.Set("eligibilityScheduleInstances", value); } + } +#endif + /// The eligibilityScheduleRequests property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? EligibilityScheduleRequests { + get { return BackingStore?.Get?>("eligibilityScheduleRequests"); } + set { BackingStore?.Set("eligibilityScheduleRequests", value); } + } +#nullable restore +#else + public List EligibilityScheduleRequests { + get { return BackingStore?.Get>("eligibilityScheduleRequests"); } + set { BackingStore?.Set("eligibilityScheduleRequests", value); } + } +#endif + /// The eligibilitySchedules property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? EligibilitySchedules { + get { return BackingStore?.Get?>("eligibilitySchedules"); } + set { BackingStore?.Set("eligibilitySchedules", value); } + } +#nullable restore +#else + public List EligibilitySchedules { + get { return BackingStore?.Get>("eligibilitySchedules"); } + set { BackingStore?.Set("eligibilitySchedules", 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 PrivilegedAccessGroup CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PrivilegedAccessGroup(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"assignmentApprovals", n => { AssignmentApprovals = n.GetCollectionOfObjectValues(Approval.CreateFromDiscriminatorValue)?.ToList(); } }, + {"assignmentScheduleInstances", n => { AssignmentScheduleInstances = n.GetCollectionOfObjectValues(PrivilegedAccessGroupAssignmentScheduleInstance.CreateFromDiscriminatorValue)?.ToList(); } }, + {"assignmentScheduleRequests", n => { AssignmentScheduleRequests = n.GetCollectionOfObjectValues(PrivilegedAccessGroupAssignmentScheduleRequest.CreateFromDiscriminatorValue)?.ToList(); } }, + {"assignmentSchedules", n => { AssignmentSchedules = n.GetCollectionOfObjectValues(PrivilegedAccessGroupAssignmentSchedule.CreateFromDiscriminatorValue)?.ToList(); } }, + {"eligibilityScheduleInstances", n => { EligibilityScheduleInstances = n.GetCollectionOfObjectValues(PrivilegedAccessGroupEligibilityScheduleInstance.CreateFromDiscriminatorValue)?.ToList(); } }, + {"eligibilityScheduleRequests", n => { EligibilityScheduleRequests = n.GetCollectionOfObjectValues(PrivilegedAccessGroupEligibilityScheduleRequest.CreateFromDiscriminatorValue)?.ToList(); } }, + {"eligibilitySchedules", n => { EligibilitySchedules = n.GetCollectionOfObjectValues(PrivilegedAccessGroupEligibilitySchedule.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("assignmentApprovals", AssignmentApprovals); + writer.WriteCollectionOfObjectValues("assignmentScheduleInstances", AssignmentScheduleInstances); + writer.WriteCollectionOfObjectValues("assignmentScheduleRequests", AssignmentScheduleRequests); + writer.WriteCollectionOfObjectValues("assignmentSchedules", AssignmentSchedules); + writer.WriteCollectionOfObjectValues("eligibilityScheduleInstances", EligibilityScheduleInstances); + writer.WriteCollectionOfObjectValues("eligibilityScheduleRequests", EligibilityScheduleRequests); + writer.WriteCollectionOfObjectValues("eligibilitySchedules", EligibilitySchedules); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentSchedule.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentSchedule.cs new file mode 100644 index 00000000000..d2f11e65999 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentSchedule.cs @@ -0,0 +1,140 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class PrivilegedAccessGroupAssignmentSchedule : PrivilegedAccessSchedule, IParsable { + /// The accessId property + public PrivilegedAccessGroupRelationships? AccessId { + get { return BackingStore?.Get("accessId"); } + set { BackingStore?.Set("accessId", value); } + } + /// The activatedUsing property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public PrivilegedAccessGroupEligibilitySchedule? ActivatedUsing { + get { return BackingStore?.Get("activatedUsing"); } + set { BackingStore?.Set("activatedUsing", value); } + } +#nullable restore +#else + public PrivilegedAccessGroupEligibilitySchedule ActivatedUsing { + get { return BackingStore?.Get("activatedUsing"); } + set { BackingStore?.Set("activatedUsing", value); } + } +#endif + /// The assignmentType property + public PrivilegedAccessGroupAssignmentType? AssignmentType { + get { return BackingStore?.Get("assignmentType"); } + set { BackingStore?.Set("assignmentType", value); } + } + /// The group property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.Group? Group { + get { return BackingStore?.Get("group"); } + set { BackingStore?.Set("group", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.Group Group { + get { return BackingStore?.Get("group"); } + set { BackingStore?.Set("group", value); } + } +#endif + /// The groupId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GroupId { + get { return BackingStore?.Get("groupId"); } + set { BackingStore?.Set("groupId", value); } + } +#nullable restore +#else + public string GroupId { + get { return BackingStore?.Get("groupId"); } + set { BackingStore?.Set("groupId", value); } + } +#endif + /// The memberType property + public PrivilegedAccessGroupMemberType? MemberType { + get { return BackingStore?.Get("memberType"); } + set { BackingStore?.Set("memberType", value); } + } + /// The principal property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public DirectoryObject? Principal { + get { return BackingStore?.Get("principal"); } + set { BackingStore?.Set("principal", value); } + } +#nullable restore +#else + public DirectoryObject Principal { + get { return BackingStore?.Get("principal"); } + set { BackingStore?.Set("principal", value); } + } +#endif + /// The principalId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PrincipalId { + get { return BackingStore?.Get("principalId"); } + set { BackingStore?.Set("principalId", value); } + } +#nullable restore +#else + public string PrincipalId { + get { return BackingStore?.Get("principalId"); } + set { BackingStore?.Set("principalId", value); } + } +#endif + /// + /// Instantiates a new privilegedAccessGroupAssignmentSchedule and sets the default values. + /// + public PrivilegedAccessGroupAssignmentSchedule() : base() { + OdataType = "#microsoft.graph.privilegedAccessGroupAssignmentSchedule"; + } + /// + /// 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 PrivilegedAccessGroupAssignmentSchedule CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PrivilegedAccessGroupAssignmentSchedule(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"accessId", n => { AccessId = n.GetEnumValue(); } }, + {"activatedUsing", n => { ActivatedUsing = n.GetObjectValue(PrivilegedAccessGroupEligibilitySchedule.CreateFromDiscriminatorValue); } }, + {"assignmentType", n => { AssignmentType = n.GetEnumValue(); } }, + {"group", n => { Group = n.GetObjectValue(Microsoft.Graph.Models.Group.CreateFromDiscriminatorValue); } }, + {"groupId", n => { GroupId = n.GetStringValue(); } }, + {"memberType", n => { MemberType = n.GetEnumValue(); } }, + {"principal", n => { Principal = n.GetObjectValue(DirectoryObject.CreateFromDiscriminatorValue); } }, + {"principalId", n => { PrincipalId = n.GetStringValue(); } }, + }; + } + /// + /// 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.WriteEnumValue("accessId", AccessId); + writer.WriteObjectValue("activatedUsing", ActivatedUsing); + writer.WriteEnumValue("assignmentType", AssignmentType); + writer.WriteObjectValue("group", Group); + writer.WriteStringValue("groupId", GroupId); + writer.WriteEnumValue("memberType", MemberType); + writer.WriteObjectValue("principal", Principal); + writer.WriteStringValue("principalId", PrincipalId); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleCollectionResponse.cs new file mode 100644 index 00000000000..5f8e3efe0ec --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleCollectionResponse.cs @@ -0,0 +1,49 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class PrivilegedAccessGroupAssignmentScheduleCollectionResponse : 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 PrivilegedAccessGroupAssignmentScheduleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PrivilegedAccessGroupAssignmentScheduleCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(PrivilegedAccessGroupAssignmentSchedule.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/PrivilegedAccessGroupAssignmentScheduleInstance.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleInstance.cs new file mode 100644 index 00000000000..8701a44c861 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleInstance.cs @@ -0,0 +1,156 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class PrivilegedAccessGroupAssignmentScheduleInstance : PrivilegedAccessScheduleInstance, IParsable { + /// The accessId property + public PrivilegedAccessGroupRelationships? AccessId { + get { return BackingStore?.Get("accessId"); } + set { BackingStore?.Set("accessId", value); } + } + /// The activatedUsing property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public PrivilegedAccessGroupEligibilityScheduleInstance? ActivatedUsing { + get { return BackingStore?.Get("activatedUsing"); } + set { BackingStore?.Set("activatedUsing", value); } + } +#nullable restore +#else + public PrivilegedAccessGroupEligibilityScheduleInstance ActivatedUsing { + get { return BackingStore?.Get("activatedUsing"); } + set { BackingStore?.Set("activatedUsing", value); } + } +#endif + /// The assignmentScheduleId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AssignmentScheduleId { + get { return BackingStore?.Get("assignmentScheduleId"); } + set { BackingStore?.Set("assignmentScheduleId", value); } + } +#nullable restore +#else + public string AssignmentScheduleId { + get { return BackingStore?.Get("assignmentScheduleId"); } + set { BackingStore?.Set("assignmentScheduleId", value); } + } +#endif + /// The assignmentType property + public PrivilegedAccessGroupAssignmentType? AssignmentType { + get { return BackingStore?.Get("assignmentType"); } + set { BackingStore?.Set("assignmentType", value); } + } + /// The group property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.Group? Group { + get { return BackingStore?.Get("group"); } + set { BackingStore?.Set("group", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.Group Group { + get { return BackingStore?.Get("group"); } + set { BackingStore?.Set("group", value); } + } +#endif + /// The groupId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GroupId { + get { return BackingStore?.Get("groupId"); } + set { BackingStore?.Set("groupId", value); } + } +#nullable restore +#else + public string GroupId { + get { return BackingStore?.Get("groupId"); } + set { BackingStore?.Set("groupId", value); } + } +#endif + /// The memberType property + public PrivilegedAccessGroupMemberType? MemberType { + get { return BackingStore?.Get("memberType"); } + set { BackingStore?.Set("memberType", value); } + } + /// The principal property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public DirectoryObject? Principal { + get { return BackingStore?.Get("principal"); } + set { BackingStore?.Set("principal", value); } + } +#nullable restore +#else + public DirectoryObject Principal { + get { return BackingStore?.Get("principal"); } + set { BackingStore?.Set("principal", value); } + } +#endif + /// The principalId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PrincipalId { + get { return BackingStore?.Get("principalId"); } + set { BackingStore?.Set("principalId", value); } + } +#nullable restore +#else + public string PrincipalId { + get { return BackingStore?.Get("principalId"); } + set { BackingStore?.Set("principalId", value); } + } +#endif + /// + /// Instantiates a new privilegedAccessGroupAssignmentScheduleInstance and sets the default values. + /// + public PrivilegedAccessGroupAssignmentScheduleInstance() : base() { + OdataType = "#microsoft.graph.privilegedAccessGroupAssignmentScheduleInstance"; + } + /// + /// 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 PrivilegedAccessGroupAssignmentScheduleInstance CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PrivilegedAccessGroupAssignmentScheduleInstance(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"accessId", n => { AccessId = n.GetEnumValue(); } }, + {"activatedUsing", n => { ActivatedUsing = n.GetObjectValue(PrivilegedAccessGroupEligibilityScheduleInstance.CreateFromDiscriminatorValue); } }, + {"assignmentScheduleId", n => { AssignmentScheduleId = n.GetStringValue(); } }, + {"assignmentType", n => { AssignmentType = n.GetEnumValue(); } }, + {"group", n => { Group = n.GetObjectValue(Microsoft.Graph.Models.Group.CreateFromDiscriminatorValue); } }, + {"groupId", n => { GroupId = n.GetStringValue(); } }, + {"memberType", n => { MemberType = n.GetEnumValue(); } }, + {"principal", n => { Principal = n.GetObjectValue(DirectoryObject.CreateFromDiscriminatorValue); } }, + {"principalId", n => { PrincipalId = n.GetStringValue(); } }, + }; + } + /// + /// 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.WriteEnumValue("accessId", AccessId); + writer.WriteObjectValue("activatedUsing", ActivatedUsing); + writer.WriteStringValue("assignmentScheduleId", AssignmentScheduleId); + writer.WriteEnumValue("assignmentType", AssignmentType); + writer.WriteObjectValue("group", Group); + writer.WriteStringValue("groupId", GroupId); + writer.WriteEnumValue("memberType", MemberType); + writer.WriteObjectValue("principal", Principal); + writer.WriteStringValue("principalId", PrincipalId); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse.cs new file mode 100644 index 00000000000..65e94e8e3bb --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse.cs @@ -0,0 +1,49 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse : 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 PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(PrivilegedAccessGroupAssignmentScheduleInstance.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/PrivilegedAccessGroupAssignmentScheduleRequest.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleRequest.cs new file mode 100644 index 00000000000..bc748d4329a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleRequest.cs @@ -0,0 +1,158 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class PrivilegedAccessGroupAssignmentScheduleRequest : PrivilegedAccessScheduleRequest, IParsable { + /// The accessId property + public PrivilegedAccessGroupRelationships? AccessId { + get { return BackingStore?.Get("accessId"); } + set { BackingStore?.Set("accessId", value); } + } + /// The activatedUsing property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public PrivilegedAccessGroupEligibilitySchedule? ActivatedUsing { + get { return BackingStore?.Get("activatedUsing"); } + set { BackingStore?.Set("activatedUsing", value); } + } +#nullable restore +#else + public PrivilegedAccessGroupEligibilitySchedule ActivatedUsing { + get { return BackingStore?.Get("activatedUsing"); } + set { BackingStore?.Set("activatedUsing", value); } + } +#endif + /// The group property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.Group? Group { + get { return BackingStore?.Get("group"); } + set { BackingStore?.Set("group", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.Group Group { + get { return BackingStore?.Get("group"); } + set { BackingStore?.Set("group", value); } + } +#endif + /// The groupId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GroupId { + get { return BackingStore?.Get("groupId"); } + set { BackingStore?.Set("groupId", value); } + } +#nullable restore +#else + public string GroupId { + get { return BackingStore?.Get("groupId"); } + set { BackingStore?.Set("groupId", value); } + } +#endif + /// The principal property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public DirectoryObject? Principal { + get { return BackingStore?.Get("principal"); } + set { BackingStore?.Set("principal", value); } + } +#nullable restore +#else + public DirectoryObject Principal { + get { return BackingStore?.Get("principal"); } + set { BackingStore?.Set("principal", value); } + } +#endif + /// The principalId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PrincipalId { + get { return BackingStore?.Get("principalId"); } + set { BackingStore?.Set("principalId", value); } + } +#nullable restore +#else + public string PrincipalId { + get { return BackingStore?.Get("principalId"); } + set { BackingStore?.Set("principalId", value); } + } +#endif + /// The targetSchedule property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public PrivilegedAccessGroupEligibilitySchedule? TargetSchedule { + get { return BackingStore?.Get("targetSchedule"); } + set { BackingStore?.Set("targetSchedule", value); } + } +#nullable restore +#else + public PrivilegedAccessGroupEligibilitySchedule TargetSchedule { + get { return BackingStore?.Get("targetSchedule"); } + set { BackingStore?.Set("targetSchedule", value); } + } +#endif + /// The targetScheduleId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TargetScheduleId { + get { return BackingStore?.Get("targetScheduleId"); } + set { BackingStore?.Set("targetScheduleId", value); } + } +#nullable restore +#else + public string TargetScheduleId { + get { return BackingStore?.Get("targetScheduleId"); } + set { BackingStore?.Set("targetScheduleId", value); } + } +#endif + /// + /// Instantiates a new privilegedAccessGroupAssignmentScheduleRequest and sets the default values. + /// + public PrivilegedAccessGroupAssignmentScheduleRequest() : base() { + OdataType = "#microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest"; + } + /// + /// 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 PrivilegedAccessGroupAssignmentScheduleRequest CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PrivilegedAccessGroupAssignmentScheduleRequest(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"accessId", n => { AccessId = n.GetEnumValue(); } }, + {"activatedUsing", n => { ActivatedUsing = n.GetObjectValue(PrivilegedAccessGroupEligibilitySchedule.CreateFromDiscriminatorValue); } }, + {"group", n => { Group = n.GetObjectValue(Microsoft.Graph.Models.Group.CreateFromDiscriminatorValue); } }, + {"groupId", n => { GroupId = n.GetStringValue(); } }, + {"principal", n => { Principal = n.GetObjectValue(DirectoryObject.CreateFromDiscriminatorValue); } }, + {"principalId", n => { PrincipalId = n.GetStringValue(); } }, + {"targetSchedule", n => { TargetSchedule = n.GetObjectValue(PrivilegedAccessGroupEligibilitySchedule.CreateFromDiscriminatorValue); } }, + {"targetScheduleId", n => { TargetScheduleId = n.GetStringValue(); } }, + }; + } + /// + /// 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.WriteEnumValue("accessId", AccessId); + writer.WriteObjectValue("activatedUsing", ActivatedUsing); + writer.WriteObjectValue("group", Group); + writer.WriteStringValue("groupId", GroupId); + writer.WriteObjectValue("principal", Principal); + writer.WriteStringValue("principalId", PrincipalId); + writer.WriteObjectValue("targetSchedule", TargetSchedule); + writer.WriteStringValue("targetScheduleId", TargetScheduleId); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse.cs new file mode 100644 index 00000000000..0c2ebbf086d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse.cs @@ -0,0 +1,49 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse : 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 PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(PrivilegedAccessGroupAssignmentScheduleRequest.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/PrivilegedAccessGroupAssignmentType.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentType.cs new file mode 100644 index 00000000000..0dddc7c21a2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentType.cs @@ -0,0 +1,13 @@ +// +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum PrivilegedAccessGroupAssignmentType { + [EnumMember(Value = "assigned")] + Assigned, + [EnumMember(Value = "activated")] + Activated, + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilitySchedule.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilitySchedule.cs new file mode 100644 index 00000000000..3e84d614a0d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilitySchedule.cs @@ -0,0 +1,117 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class PrivilegedAccessGroupEligibilitySchedule : PrivilegedAccessSchedule, IParsable { + /// The accessId property + public PrivilegedAccessGroupRelationships? AccessId { + get { return BackingStore?.Get("accessId"); } + set { BackingStore?.Set("accessId", value); } + } + /// The group property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.Group? Group { + get { return BackingStore?.Get("group"); } + set { BackingStore?.Set("group", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.Group Group { + get { return BackingStore?.Get("group"); } + set { BackingStore?.Set("group", value); } + } +#endif + /// The groupId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GroupId { + get { return BackingStore?.Get("groupId"); } + set { BackingStore?.Set("groupId", value); } + } +#nullable restore +#else + public string GroupId { + get { return BackingStore?.Get("groupId"); } + set { BackingStore?.Set("groupId", value); } + } +#endif + /// The memberType property + public PrivilegedAccessGroupMemberType? MemberType { + get { return BackingStore?.Get("memberType"); } + set { BackingStore?.Set("memberType", value); } + } + /// The principal property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public DirectoryObject? Principal { + get { return BackingStore?.Get("principal"); } + set { BackingStore?.Set("principal", value); } + } +#nullable restore +#else + public DirectoryObject Principal { + get { return BackingStore?.Get("principal"); } + set { BackingStore?.Set("principal", value); } + } +#endif + /// The principalId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PrincipalId { + get { return BackingStore?.Get("principalId"); } + set { BackingStore?.Set("principalId", value); } + } +#nullable restore +#else + public string PrincipalId { + get { return BackingStore?.Get("principalId"); } + set { BackingStore?.Set("principalId", value); } + } +#endif + /// + /// Instantiates a new privilegedAccessGroupEligibilitySchedule and sets the default values. + /// + public PrivilegedAccessGroupEligibilitySchedule() : base() { + OdataType = "#microsoft.graph.privilegedAccessGroupEligibilitySchedule"; + } + /// + /// 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 PrivilegedAccessGroupEligibilitySchedule CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PrivilegedAccessGroupEligibilitySchedule(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"accessId", n => { AccessId = n.GetEnumValue(); } }, + {"group", n => { Group = n.GetObjectValue(Microsoft.Graph.Models.Group.CreateFromDiscriminatorValue); } }, + {"groupId", n => { GroupId = n.GetStringValue(); } }, + {"memberType", n => { MemberType = n.GetEnumValue(); } }, + {"principal", n => { Principal = n.GetObjectValue(DirectoryObject.CreateFromDiscriminatorValue); } }, + {"principalId", n => { PrincipalId = n.GetStringValue(); } }, + }; + } + /// + /// 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.WriteEnumValue("accessId", AccessId); + writer.WriteObjectValue("group", Group); + writer.WriteStringValue("groupId", GroupId); + writer.WriteEnumValue("memberType", MemberType); + writer.WriteObjectValue("principal", Principal); + writer.WriteStringValue("principalId", PrincipalId); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleCollectionResponse.cs new file mode 100644 index 00000000000..1ff345567fa --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleCollectionResponse.cs @@ -0,0 +1,49 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class PrivilegedAccessGroupEligibilityScheduleCollectionResponse : 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 PrivilegedAccessGroupEligibilityScheduleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PrivilegedAccessGroupEligibilityScheduleCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(PrivilegedAccessGroupEligibilitySchedule.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/PrivilegedAccessGroupEligibilityScheduleInstance.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleInstance.cs new file mode 100644 index 00000000000..1d85365e71f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleInstance.cs @@ -0,0 +1,133 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class PrivilegedAccessGroupEligibilityScheduleInstance : PrivilegedAccessScheduleInstance, IParsable { + /// The accessId property + public PrivilegedAccessGroupRelationships? AccessId { + get { return BackingStore?.Get("accessId"); } + set { BackingStore?.Set("accessId", value); } + } + /// The eligibilityScheduleId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EligibilityScheduleId { + get { return BackingStore?.Get("eligibilityScheduleId"); } + set { BackingStore?.Set("eligibilityScheduleId", value); } + } +#nullable restore +#else + public string EligibilityScheduleId { + get { return BackingStore?.Get("eligibilityScheduleId"); } + set { BackingStore?.Set("eligibilityScheduleId", value); } + } +#endif + /// The group property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.Group? Group { + get { return BackingStore?.Get("group"); } + set { BackingStore?.Set("group", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.Group Group { + get { return BackingStore?.Get("group"); } + set { BackingStore?.Set("group", value); } + } +#endif + /// The groupId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GroupId { + get { return BackingStore?.Get("groupId"); } + set { BackingStore?.Set("groupId", value); } + } +#nullable restore +#else + public string GroupId { + get { return BackingStore?.Get("groupId"); } + set { BackingStore?.Set("groupId", value); } + } +#endif + /// The memberType property + public PrivilegedAccessGroupMemberType? MemberType { + get { return BackingStore?.Get("memberType"); } + set { BackingStore?.Set("memberType", value); } + } + /// The principal property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public DirectoryObject? Principal { + get { return BackingStore?.Get("principal"); } + set { BackingStore?.Set("principal", value); } + } +#nullable restore +#else + public DirectoryObject Principal { + get { return BackingStore?.Get("principal"); } + set { BackingStore?.Set("principal", value); } + } +#endif + /// The principalId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PrincipalId { + get { return BackingStore?.Get("principalId"); } + set { BackingStore?.Set("principalId", value); } + } +#nullable restore +#else + public string PrincipalId { + get { return BackingStore?.Get("principalId"); } + set { BackingStore?.Set("principalId", value); } + } +#endif + /// + /// Instantiates a new privilegedAccessGroupEligibilityScheduleInstance and sets the default values. + /// + public PrivilegedAccessGroupEligibilityScheduleInstance() : base() { + OdataType = "#microsoft.graph.privilegedAccessGroupEligibilityScheduleInstance"; + } + /// + /// 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 PrivilegedAccessGroupEligibilityScheduleInstance CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PrivilegedAccessGroupEligibilityScheduleInstance(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"accessId", n => { AccessId = n.GetEnumValue(); } }, + {"eligibilityScheduleId", n => { EligibilityScheduleId = n.GetStringValue(); } }, + {"group", n => { Group = n.GetObjectValue(Microsoft.Graph.Models.Group.CreateFromDiscriminatorValue); } }, + {"groupId", n => { GroupId = n.GetStringValue(); } }, + {"memberType", n => { MemberType = n.GetEnumValue(); } }, + {"principal", n => { Principal = n.GetObjectValue(DirectoryObject.CreateFromDiscriminatorValue); } }, + {"principalId", n => { PrincipalId = n.GetStringValue(); } }, + }; + } + /// + /// 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.WriteEnumValue("accessId", AccessId); + writer.WriteStringValue("eligibilityScheduleId", EligibilityScheduleId); + writer.WriteObjectValue("group", Group); + writer.WriteStringValue("groupId", GroupId); + writer.WriteEnumValue("memberType", MemberType); + writer.WriteObjectValue("principal", Principal); + writer.WriteStringValue("principalId", PrincipalId); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse.cs new file mode 100644 index 00000000000..079967c7a80 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse.cs @@ -0,0 +1,49 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse : 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 PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(PrivilegedAccessGroupEligibilityScheduleInstance.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/PrivilegedAccessGroupEligibilityScheduleRequest.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleRequest.cs new file mode 100644 index 00000000000..c794581d826 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleRequest.cs @@ -0,0 +1,142 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class PrivilegedAccessGroupEligibilityScheduleRequest : PrivilegedAccessScheduleRequest, IParsable { + /// The accessId property + public PrivilegedAccessGroupRelationships? AccessId { + get { return BackingStore?.Get("accessId"); } + set { BackingStore?.Set("accessId", value); } + } + /// The group property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.Group? Group { + get { return BackingStore?.Get("group"); } + set { BackingStore?.Set("group", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.Group Group { + get { return BackingStore?.Get("group"); } + set { BackingStore?.Set("group", value); } + } +#endif + /// The groupId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GroupId { + get { return BackingStore?.Get("groupId"); } + set { BackingStore?.Set("groupId", value); } + } +#nullable restore +#else + public string GroupId { + get { return BackingStore?.Get("groupId"); } + set { BackingStore?.Set("groupId", value); } + } +#endif + /// The principal property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public DirectoryObject? Principal { + get { return BackingStore?.Get("principal"); } + set { BackingStore?.Set("principal", value); } + } +#nullable restore +#else + public DirectoryObject Principal { + get { return BackingStore?.Get("principal"); } + set { BackingStore?.Set("principal", value); } + } +#endif + /// The principalId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PrincipalId { + get { return BackingStore?.Get("principalId"); } + set { BackingStore?.Set("principalId", value); } + } +#nullable restore +#else + public string PrincipalId { + get { return BackingStore?.Get("principalId"); } + set { BackingStore?.Set("principalId", value); } + } +#endif + /// The targetSchedule property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public PrivilegedAccessGroupEligibilitySchedule? TargetSchedule { + get { return BackingStore?.Get("targetSchedule"); } + set { BackingStore?.Set("targetSchedule", value); } + } +#nullable restore +#else + public PrivilegedAccessGroupEligibilitySchedule TargetSchedule { + get { return BackingStore?.Get("targetSchedule"); } + set { BackingStore?.Set("targetSchedule", value); } + } +#endif + /// The targetScheduleId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TargetScheduleId { + get { return BackingStore?.Get("targetScheduleId"); } + set { BackingStore?.Set("targetScheduleId", value); } + } +#nullable restore +#else + public string TargetScheduleId { + get { return BackingStore?.Get("targetScheduleId"); } + set { BackingStore?.Set("targetScheduleId", value); } + } +#endif + /// + /// Instantiates a new privilegedAccessGroupEligibilityScheduleRequest and sets the default values. + /// + public PrivilegedAccessGroupEligibilityScheduleRequest() : base() { + OdataType = "#microsoft.graph.privilegedAccessGroupEligibilityScheduleRequest"; + } + /// + /// 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 PrivilegedAccessGroupEligibilityScheduleRequest CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PrivilegedAccessGroupEligibilityScheduleRequest(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"accessId", n => { AccessId = n.GetEnumValue(); } }, + {"group", n => { Group = n.GetObjectValue(Microsoft.Graph.Models.Group.CreateFromDiscriminatorValue); } }, + {"groupId", n => { GroupId = n.GetStringValue(); } }, + {"principal", n => { Principal = n.GetObjectValue(DirectoryObject.CreateFromDiscriminatorValue); } }, + {"principalId", n => { PrincipalId = n.GetStringValue(); } }, + {"targetSchedule", n => { TargetSchedule = n.GetObjectValue(PrivilegedAccessGroupEligibilitySchedule.CreateFromDiscriminatorValue); } }, + {"targetScheduleId", n => { TargetScheduleId = n.GetStringValue(); } }, + }; + } + /// + /// 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.WriteEnumValue("accessId", AccessId); + writer.WriteObjectValue("group", Group); + writer.WriteStringValue("groupId", GroupId); + writer.WriteObjectValue("principal", Principal); + writer.WriteStringValue("principalId", PrincipalId); + writer.WriteObjectValue("targetSchedule", TargetSchedule); + writer.WriteStringValue("targetScheduleId", TargetScheduleId); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse.cs new file mode 100644 index 00000000000..fd98ecde21d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse.cs @@ -0,0 +1,49 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse : 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 PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(PrivilegedAccessGroupEligibilityScheduleRequest.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/PrivilegedAccessGroupMemberType.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupMemberType.cs new file mode 100644 index 00000000000..265630416dd --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupMemberType.cs @@ -0,0 +1,13 @@ +// +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum PrivilegedAccessGroupMemberType { + [EnumMember(Value = "direct")] + Direct, + [EnumMember(Value = "group")] + Group, + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupRelationships.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupRelationships.cs new file mode 100644 index 00000000000..d8046e29d1f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupRelationships.cs @@ -0,0 +1,13 @@ +// +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum PrivilegedAccessGroupRelationships { + [EnumMember(Value = "owner")] + Owner, + [EnumMember(Value = "member")] + Member, + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessRoot.cs similarity index 59% rename from src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsResponse.cs rename to src/Microsoft.Graph/Generated/Models/PrivilegedAccessRoot.cs index e46309dfe9a..4ef1a23add2 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessRoot.cs @@ -1,40 +1,39 @@ // -using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; using System.Linq; using System; -namespace Microsoft.Graph.DirectoryNamespace.DeletedItems.Item.GetMemberGroups { - public class GetMemberGroupsResponse : BaseCollectionPaginationCountResponse, IParsable { - /// The value property +namespace Microsoft.Graph.Models { + public class PrivilegedAccessRoot : Entity, IParsable { + /// The group 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); } + public PrivilegedAccessGroup? Group { + get { return BackingStore?.Get("group"); } + set { BackingStore?.Set("group", value); } } #nullable restore #else - public List Value { - get { return BackingStore?.Get>("value"); } - set { BackingStore?.Set("value", value); } + public PrivilegedAccessGroup Group { + get { return BackingStore?.Get("group"); } + set { BackingStore?.Set("group", 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 GetMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new PrivilegedAccessRoot CreateFromDiscriminatorValue(IParseNode parseNode) { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new GetMemberGroupsResponse(); + return new PrivilegedAccessRoot(); } /// /// The deserialization information for the current model /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { - {"value", n => { Value = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"group", n => { Group = n.GetObjectValue(PrivilegedAccessGroup.CreateFromDiscriminatorValue); } }, }; } /// @@ -44,7 +43,7 @@ public List Value { public new void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfPrimitiveValues("value", Value); + writer.WriteObjectValue("group", Group); } } } diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessSchedule.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessSchedule.cs new file mode 100644 index 00000000000..11eb912fe81 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessSchedule.cs @@ -0,0 +1,100 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class PrivilegedAccessSchedule : Entity, IParsable { + /// The createdDateTime property + public DateTimeOffset? CreatedDateTime { + get { return BackingStore?.Get("createdDateTime"); } + set { BackingStore?.Set("createdDateTime", value); } + } + /// The createdUsing property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedUsing { + get { return BackingStore?.Get("createdUsing"); } + set { BackingStore?.Set("createdUsing", value); } + } +#nullable restore +#else + public string CreatedUsing { + get { return BackingStore?.Get("createdUsing"); } + set { BackingStore?.Set("createdUsing", value); } + } +#endif + /// The modifiedDateTime property + public DateTimeOffset? ModifiedDateTime { + get { return BackingStore?.Get("modifiedDateTime"); } + set { BackingStore?.Set("modifiedDateTime", value); } + } + /// The scheduleInfo property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestSchedule? ScheduleInfo { + get { return BackingStore?.Get("scheduleInfo"); } + set { BackingStore?.Set("scheduleInfo", value); } + } +#nullable restore +#else + public RequestSchedule ScheduleInfo { + get { return BackingStore?.Get("scheduleInfo"); } + set { BackingStore?.Set("scheduleInfo", value); } + } +#endif + /// The status property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Status { + get { return BackingStore?.Get("status"); } + set { BackingStore?.Set("status", value); } + } +#nullable restore +#else + public string Status { + get { return BackingStore?.Get("status"); } + set { BackingStore?.Set("status", 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 PrivilegedAccessSchedule CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); + return mappingValue switch { + "#microsoft.graph.privilegedAccessGroupAssignmentSchedule" => new PrivilegedAccessGroupAssignmentSchedule(), + "#microsoft.graph.privilegedAccessGroupEligibilitySchedule" => new PrivilegedAccessGroupEligibilitySchedule(), + _ => new PrivilegedAccessSchedule(), + }; + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + {"createdUsing", n => { CreatedUsing = n.GetStringValue(); } }, + {"modifiedDateTime", n => { ModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + {"scheduleInfo", n => { ScheduleInfo = n.GetObjectValue(RequestSchedule.CreateFromDiscriminatorValue); } }, + {"status", n => { Status = n.GetStringValue(); } }, + }; + } + /// + /// 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.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); + writer.WriteStringValue("createdUsing", CreatedUsing); + writer.WriteDateTimeOffsetValue("modifiedDateTime", ModifiedDateTime); + writer.WriteObjectValue("scheduleInfo", ScheduleInfo); + writer.WriteStringValue("status", Status); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessScheduleInstance.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessScheduleInstance.cs new file mode 100644 index 00000000000..3c94c46f38b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessScheduleInstance.cs @@ -0,0 +1,52 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class PrivilegedAccessScheduleInstance : Entity, IParsable { + /// The endDateTime property + public DateTimeOffset? EndDateTime { + get { return BackingStore?.Get("endDateTime"); } + set { BackingStore?.Set("endDateTime", value); } + } + /// The startDateTime property + public DateTimeOffset? StartDateTime { + get { return BackingStore?.Get("startDateTime"); } + set { BackingStore?.Set("startDateTime", value); } + } + /// + /// 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 PrivilegedAccessScheduleInstance CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); + return mappingValue switch { + "#microsoft.graph.privilegedAccessGroupAssignmentScheduleInstance" => new PrivilegedAccessGroupAssignmentScheduleInstance(), + "#microsoft.graph.privilegedAccessGroupEligibilityScheduleInstance" => new PrivilegedAccessGroupEligibilityScheduleInstance(), + _ => new PrivilegedAccessScheduleInstance(), + }; + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"endDateTime", n => { EndDateTime = n.GetDateTimeOffsetValue(); } }, + {"startDateTime", n => { StartDateTime = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// 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.WriteDateTimeOffsetValue("endDateTime", EndDateTime); + writer.WriteDateTimeOffsetValue("startDateTime", StartDateTime); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessScheduleRequest.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessScheduleRequest.cs new file mode 100644 index 00000000000..0b9e01a9c86 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessScheduleRequest.cs @@ -0,0 +1,100 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class PrivilegedAccessScheduleRequest : Request, IParsable { + /// The action property + public ScheduleRequestActions? Action { + get { return BackingStore?.Get("action"); } + set { BackingStore?.Set("action", value); } + } + /// The isValidationOnly property + public bool? IsValidationOnly { + get { return BackingStore?.Get("isValidationOnly"); } + set { BackingStore?.Set("isValidationOnly", value); } + } + /// The justification property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Justification { + get { return BackingStore?.Get("justification"); } + set { BackingStore?.Set("justification", value); } + } +#nullable restore +#else + public string Justification { + get { return BackingStore?.Get("justification"); } + set { BackingStore?.Set("justification", value); } + } +#endif + /// The scheduleInfo property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestSchedule? ScheduleInfo { + get { return BackingStore?.Get("scheduleInfo"); } + set { BackingStore?.Set("scheduleInfo", value); } + } +#nullable restore +#else + public RequestSchedule ScheduleInfo { + get { return BackingStore?.Get("scheduleInfo"); } + set { BackingStore?.Set("scheduleInfo", value); } + } +#endif + /// The ticketInfo property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.TicketInfo? TicketInfo { + get { return BackingStore?.Get("ticketInfo"); } + set { BackingStore?.Set("ticketInfo", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.TicketInfo TicketInfo { + get { return BackingStore?.Get("ticketInfo"); } + set { BackingStore?.Set("ticketInfo", 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 PrivilegedAccessScheduleRequest CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); + return mappingValue switch { + "#microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest" => new PrivilegedAccessGroupAssignmentScheduleRequest(), + "#microsoft.graph.privilegedAccessGroupEligibilityScheduleRequest" => new PrivilegedAccessGroupEligibilityScheduleRequest(), + _ => new PrivilegedAccessScheduleRequest(), + }; + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"action", n => { Action = n.GetEnumValue(); } }, + {"isValidationOnly", n => { IsValidationOnly = n.GetBoolValue(); } }, + {"justification", n => { Justification = n.GetStringValue(); } }, + {"scheduleInfo", n => { ScheduleInfo = n.GetObjectValue(RequestSchedule.CreateFromDiscriminatorValue); } }, + {"ticketInfo", n => { TicketInfo = n.GetObjectValue(Microsoft.Graph.Models.TicketInfo.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// 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.WriteEnumValue("action", Action); + writer.WriteBoolValue("isValidationOnly", IsValidationOnly); + writer.WriteStringValue("justification", Justification); + writer.WriteObjectValue("scheduleInfo", ScheduleInfo); + writer.WriteObjectValue("ticketInfo", TicketInfo); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/RbacApplication.cs b/src/Microsoft.Graph/Generated/Models/RbacApplication.cs index eb3d08baf95..4b5c3f965d7 100644 --- a/src/Microsoft.Graph/Generated/Models/RbacApplication.cs +++ b/src/Microsoft.Graph/Generated/Models/RbacApplication.cs @@ -146,10 +146,10 @@ public List RoleEligibilitySchedules { public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { {"resourceNamespaces", n => { ResourceNamespaces = n.GetCollectionOfObjectValues(UnifiedRbacResourceNamespace.CreateFromDiscriminatorValue)?.ToList(); } }, - {"roleAssignments", n => { RoleAssignments = n.GetCollectionOfObjectValues(UnifiedRoleAssignment.CreateFromDiscriminatorValue)?.ToList(); } }, {"roleAssignmentScheduleInstances", n => { RoleAssignmentScheduleInstances = n.GetCollectionOfObjectValues(UnifiedRoleAssignmentScheduleInstance.CreateFromDiscriminatorValue)?.ToList(); } }, {"roleAssignmentScheduleRequests", n => { RoleAssignmentScheduleRequests = n.GetCollectionOfObjectValues(UnifiedRoleAssignmentScheduleRequest.CreateFromDiscriminatorValue)?.ToList(); } }, {"roleAssignmentSchedules", n => { RoleAssignmentSchedules = n.GetCollectionOfObjectValues(UnifiedRoleAssignmentSchedule.CreateFromDiscriminatorValue)?.ToList(); } }, + {"roleAssignments", n => { RoleAssignments = n.GetCollectionOfObjectValues(UnifiedRoleAssignment.CreateFromDiscriminatorValue)?.ToList(); } }, {"roleDefinitions", n => { RoleDefinitions = n.GetCollectionOfObjectValues(UnifiedRoleDefinition.CreateFromDiscriminatorValue)?.ToList(); } }, {"roleEligibilityScheduleInstances", n => { RoleEligibilityScheduleInstances = n.GetCollectionOfObjectValues(UnifiedRoleEligibilityScheduleInstance.CreateFromDiscriminatorValue)?.ToList(); } }, {"roleEligibilityScheduleRequests", n => { RoleEligibilityScheduleRequests = n.GetCollectionOfObjectValues(UnifiedRoleEligibilityScheduleRequest.CreateFromDiscriminatorValue)?.ToList(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/Request.cs b/src/Microsoft.Graph/Generated/Models/Request.cs index cdb79abfaae..c2e6b23940e 100644 --- a/src/Microsoft.Graph/Generated/Models/Request.cs +++ b/src/Microsoft.Graph/Generated/Models/Request.cs @@ -80,6 +80,9 @@ public string Status { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { + "#microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest" => new PrivilegedAccessGroupAssignmentScheduleRequest(), + "#microsoft.graph.privilegedAccessGroupEligibilityScheduleRequest" => new PrivilegedAccessGroupEligibilityScheduleRequest(), + "#microsoft.graph.privilegedAccessScheduleRequest" => new PrivilegedAccessScheduleRequest(), "#microsoft.graph.unifiedRoleAssignmentScheduleRequest" => new UnifiedRoleAssignmentScheduleRequest(), "#microsoft.graph.unifiedRoleEligibilityScheduleRequest" => new UnifiedRoleEligibilityScheduleRequest(), "#microsoft.graph.userConsentRequest" => new UserConsentRequest(), diff --git a/src/Microsoft.Graph/Generated/Models/ResellerDelegatedAdminRelationship.cs b/src/Microsoft.Graph/Generated/Models/ResellerDelegatedAdminRelationship.cs new file mode 100644 index 00000000000..447575c0e11 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/ResellerDelegatedAdminRelationship.cs @@ -0,0 +1,56 @@ +// +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class ResellerDelegatedAdminRelationship : DelegatedAdminRelationship, IParsable { + /// The tenant ID of the indirect provider partner who created the relationship for the indirect reseller partner. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IndirectProviderTenantId { + get { return BackingStore?.Get("indirectProviderTenantId"); } + set { BackingStore?.Set("indirectProviderTenantId", value); } + } +#nullable restore +#else + public string IndirectProviderTenantId { + get { return BackingStore?.Get("indirectProviderTenantId"); } + set { BackingStore?.Set("indirectProviderTenantId", value); } + } +#endif + /// Indicates the indirect reseller partner consent status. true indicates that the partner has yet to review the relationship; false indicates that the partner has already provided consent by approving or rejecting the relationship. + public bool? IsPartnerConsentPending { + get { return BackingStore?.Get("isPartnerConsentPending"); } + set { BackingStore?.Set("isPartnerConsentPending", value); } + } + /// + /// 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 ResellerDelegatedAdminRelationship CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ResellerDelegatedAdminRelationship(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"indirectProviderTenantId", n => { IndirectProviderTenantId = n.GetStringValue(); } }, + {"isPartnerConsentPending", n => { IsPartnerConsentPending = n.GetBoolValue(); } }, + }; + } + /// + /// 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.WriteStringValue("indirectProviderTenantId", IndirectProviderTenantId); + writer.WriteBoolValue("isPartnerConsentPending", IsPartnerConsentPending); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/ResourceVisualization.cs b/src/Microsoft.Graph/Generated/Models/ResourceVisualization.cs index d58cc8d1787..d75377f2da1 100644 --- a/src/Microsoft.Graph/Generated/Models/ResourceVisualization.cs +++ b/src/Microsoft.Graph/Generated/Models/ResourceVisualization.cs @@ -56,7 +56,7 @@ public string ContainerWebUrl { set { BackingStore?.Set("containerWebUrl", value); } } #endif - /// The item's media type. Can be used for filtering for a specific type of file based on supported IANA Media Mime Types. Note that not all Media Mime Types are supported. + /// The item's media type. Can be used for filtering for a specific type of file based on supported IANA Media Mime Types. Not all Media Mime Types are supported. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? MediaType { @@ -126,7 +126,7 @@ public string Title { set { BackingStore?.Set("title", value); } } #endif - /// The item's media type. Can be used for filtering for a specific file based on a specific type. See below for supported types. + /// The item's media type. Can be used for filtering for a specific file based on a specific type. See the section Type property values for supported types. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Type { diff --git a/src/Microsoft.Graph/Generated/Models/Schedule.cs b/src/Microsoft.Graph/Generated/Models/Schedule.cs index 7d4b3149d87..36130704e78 100644 --- a/src/Microsoft.Graph/Generated/Models/Schedule.cs +++ b/src/Microsoft.Graph/Generated/Models/Schedule.cs @@ -238,8 +238,8 @@ public List WorkforceIntegrationIds { {"timeOffReasons", n => { TimeOffReasons = n.GetCollectionOfObjectValues(TimeOffReason.CreateFromDiscriminatorValue)?.ToList(); } }, {"timeOffRequests", n => { TimeOffRequests = n.GetCollectionOfObjectValues(TimeOffRequest.CreateFromDiscriminatorValue)?.ToList(); } }, {"timeOffRequestsEnabled", n => { TimeOffRequestsEnabled = n.GetBoolValue(); } }, - {"timesOff", n => { TimesOff = n.GetCollectionOfObjectValues(TimeOff.CreateFromDiscriminatorValue)?.ToList(); } }, {"timeZone", n => { TimeZone = n.GetStringValue(); } }, + {"timesOff", n => { TimesOff = n.GetCollectionOfObjectValues(TimeOff.CreateFromDiscriminatorValue)?.ToList(); } }, {"workforceIntegrationIds", n => { WorkforceIntegrationIds = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, }; } diff --git a/src/Microsoft.Graph/Generated/Models/ScheduleRequestActions.cs b/src/Microsoft.Graph/Generated/Models/ScheduleRequestActions.cs new file mode 100644 index 00000000000..e286dba9b4f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/ScheduleRequestActions.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum ScheduleRequestActions { + [EnumMember(Value = "adminAssign")] + AdminAssign, + [EnumMember(Value = "adminUpdate")] + AdminUpdate, + [EnumMember(Value = "adminRemove")] + AdminRemove, + [EnumMember(Value = "selfActivate")] + SelfActivate, + [EnumMember(Value = "selfDeactivate")] + SelfDeactivate, + [EnumMember(Value = "adminExtend")] + AdminExtend, + [EnumMember(Value = "adminRenew")] + AdminRenew, + [EnumMember(Value = "selfExtend")] + SelfExtend, + [EnumMember(Value = "selfRenew")] + SelfRenew, + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoverySearch.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoverySearch.cs index dad7f410130..27a0f82cd3a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoverySearch.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoverySearch.cs @@ -100,8 +100,8 @@ public EdiscoverySearch() : base() { /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { - {"additionalSources", n => { AdditionalSources = n.GetCollectionOfObjectValues(DataSource.CreateFromDiscriminatorValue)?.ToList(); } }, {"addToReviewSetOperation", n => { AddToReviewSetOperation = n.GetObjectValue(EdiscoveryAddToReviewSetOperation.CreateFromDiscriminatorValue); } }, + {"additionalSources", n => { AdditionalSources = n.GetCollectionOfObjectValues(DataSource.CreateFromDiscriminatorValue)?.ToList(); } }, {"custodianSources", n => { CustodianSources = n.GetCollectionOfObjectValues(DataSource.CreateFromDiscriminatorValue)?.ToList(); } }, {"dataSourceScopes", n => { DataSourceScopes = n.GetEnumValue(); } }, {"lastEstimateStatisticsOperation", n => { LastEstimateStatisticsOperation = n.GetObjectValue(EdiscoveryEstimateOperation.CreateFromDiscriminatorValue); } }, diff --git a/src/Microsoft.Graph/Generated/Models/Security/Incident.cs b/src/Microsoft.Graph/Generated/Models/Security/Incident.cs index 94f067b0803..b2f9563a7f4 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Incident.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Incident.cs @@ -71,6 +71,20 @@ public List CustomTags { get { return BackingStore?.Get>("customTags"); } set { BackingStore?.Set("customTags", value); } } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { + get { return BackingStore?.Get("description"); } + set { BackingStore?.Set("description", value); } + } +#nullable restore +#else + public string Description { + get { return BackingStore?.Get("description"); } + set { BackingStore?.Set("description", value); } + } #endif /// Specifies the determination of the incident. Possible values are: unknown, apt, malware, securityPersonnel, securityTesting, unwantedSoftware, other, multiStagedAttack, compromisedUser, phishing, maliciousUserActivity, clean, insufficientData, confirmedUserActivity, lineOfBusinessApplication, unknownFutureValue. public AlertDetermination? Determination { @@ -148,6 +162,20 @@ public IncidentStatus? Status { get { return BackingStore?.Get("status"); } set { BackingStore?.Set("status", value); } } + /// The systemTags property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SystemTags { + get { return BackingStore?.Get?>("systemTags"); } + set { BackingStore?.Set("systemTags", value); } + } +#nullable restore +#else + public List SystemTags { + get { return BackingStore?.Get>("systemTags"); } + set { BackingStore?.Set("systemTags", value); } + } +#endif /// The Azure Active Directory tenant in which the alert was created. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -181,6 +209,7 @@ public string TenantId { {"comments", n => { Comments = n.GetCollectionOfObjectValues(AlertComment.CreateFromDiscriminatorValue)?.ToList(); } }, {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, {"customTags", n => { CustomTags = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"description", n => { Description = n.GetStringValue(); } }, {"determination", n => { Determination = n.GetEnumValue(); } }, {"displayName", n => { DisplayName = n.GetStringValue(); } }, {"incidentWebUrl", n => { IncidentWebUrl = n.GetStringValue(); } }, @@ -189,6 +218,7 @@ public string TenantId { {"redirectIncidentId", n => { RedirectIncidentId = n.GetStringValue(); } }, {"severity", n => { Severity = n.GetEnumValue(); } }, {"status", n => { Status = n.GetEnumValue(); } }, + {"systemTags", n => { SystemTags = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, {"tenantId", n => { TenantId = n.GetStringValue(); } }, }; } @@ -205,6 +235,7 @@ public string TenantId { writer.WriteCollectionOfObjectValues("comments", Comments); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteCollectionOfPrimitiveValues("customTags", CustomTags); + writer.WriteStringValue("description", Description); writer.WriteEnumValue("determination", Determination); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("incidentWebUrl", IncidentWebUrl); @@ -213,6 +244,7 @@ public string TenantId { writer.WriteStringValue("redirectIncidentId", RedirectIncidentId); writer.WriteEnumValue("severity", Severity); writer.WriteEnumValue("status", Status); + writer.WriteCollectionOfPrimitiveValues("systemTags", SystemTags); writer.WriteStringValue("tenantId", TenantId); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/IpEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/IpEvidence.cs index 6495ba520f9..499f3e0931a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/IpEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/IpEvidence.cs @@ -6,7 +6,7 @@ using System; namespace Microsoft.Graph.Models.Security { public class IpEvidence : AlertEvidence, IParsable { - /// The two-letter country code according to ISO 3166 format, for example: US, UK, CA, etc..). + /// The two-letter country code according to ISO 3166 format, for example: US, UK, CA, etc. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? CountryLetterCode { diff --git a/src/Microsoft.Graph/Generated/Models/Security/Security.cs b/src/Microsoft.Graph/Generated/Models/Security/Security.cs index e02ef542dce..5b4b093a934 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Security.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Security.cs @@ -182,8 +182,8 @@ public TriggerTypesRoot TriggerTypes { {"secureScores", n => { SecureScores = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.SecureScore.CreateFromDiscriminatorValue)?.ToList(); } }, {"subjectRightsRequests", n => { SubjectRightsRequests = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.SubjectRightsRequest.CreateFromDiscriminatorValue)?.ToList(); } }, {"threatIntelligence", n => { ThreatIntelligence = n.GetObjectValue(Microsoft.Graph.Models.Security.ThreatIntelligence.CreateFromDiscriminatorValue); } }, - {"triggers", n => { Triggers = n.GetObjectValue(TriggersRoot.CreateFromDiscriminatorValue); } }, {"triggerTypes", n => { TriggerTypes = n.GetObjectValue(TriggerTypesRoot.CreateFromDiscriminatorValue); } }, + {"triggers", n => { Triggers = n.GetObjectValue(TriggersRoot.CreateFromDiscriminatorValue); } }, }; } /// diff --git a/src/Microsoft.Graph/Generated/Models/Security/ThreatIntelligence.cs b/src/Microsoft.Graph/Generated/Models/Security/ThreatIntelligence.cs index 7f3b45b5247..ab20bef1612 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ThreatIntelligence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ThreatIntelligence.cs @@ -163,10 +163,10 @@ public List Vulnerabilities { {"articles", n => { Articles = n.GetCollectionOfObjectValues
(Article.CreateFromDiscriminatorValue)?.ToList(); } }, {"hostComponents", n => { HostComponents = n.GetCollectionOfObjectValues(HostComponent.CreateFromDiscriminatorValue)?.ToList(); } }, {"hostCookies", n => { HostCookies = n.GetCollectionOfObjectValues(HostCookie.CreateFromDiscriminatorValue)?.ToList(); } }, - {"hosts", n => { Hosts = n.GetCollectionOfObjectValues(Host.CreateFromDiscriminatorValue)?.ToList(); } }, {"hostTrackers", n => { HostTrackers = n.GetCollectionOfObjectValues(HostTracker.CreateFromDiscriminatorValue)?.ToList(); } }, - {"intelligenceProfileIndicators", n => { IntelligenceProfileIndicators = n.GetCollectionOfObjectValues(IntelligenceProfileIndicator.CreateFromDiscriminatorValue)?.ToList(); } }, + {"hosts", n => { Hosts = n.GetCollectionOfObjectValues(Host.CreateFromDiscriminatorValue)?.ToList(); } }, {"intelProfiles", n => { IntelProfiles = n.GetCollectionOfObjectValues(IntelligenceProfile.CreateFromDiscriminatorValue)?.ToList(); } }, + {"intelligenceProfileIndicators", n => { IntelligenceProfileIndicators = n.GetCollectionOfObjectValues(IntelligenceProfileIndicator.CreateFromDiscriminatorValue)?.ToList(); } }, {"passiveDnsRecords", n => { PassiveDnsRecords = n.GetCollectionOfObjectValues(PassiveDnsRecord.CreateFromDiscriminatorValue)?.ToList(); } }, {"vulnerabilities", n => { Vulnerabilities = n.GetCollectionOfObjectValues(Vulnerability.CreateFromDiscriminatorValue)?.ToList(); } }, }; diff --git a/src/Microsoft.Graph/Generated/Models/ServicePrincipal.cs b/src/Microsoft.Graph/Generated/Models/ServicePrincipal.cs index 6423b00f5cc..ca8124eda69 100644 --- a/src/Microsoft.Graph/Generated/Models/ServicePrincipal.cs +++ b/src/Microsoft.Graph/Generated/Models/ServicePrincipal.cs @@ -709,13 +709,13 @@ public ServicePrincipal() : base() { {"appDescription", n => { AppDescription = n.GetStringValue(); } }, {"appDisplayName", n => { AppDisplayName = n.GetStringValue(); } }, {"appId", n => { AppId = n.GetStringValue(); } }, - {"applicationTemplateId", n => { ApplicationTemplateId = n.GetStringValue(); } }, {"appManagementPolicies", n => { AppManagementPolicies = n.GetCollectionOfObjectValues(AppManagementPolicy.CreateFromDiscriminatorValue)?.ToList(); } }, {"appOwnerOrganizationId", n => { AppOwnerOrganizationId = n.GetGuidValue(); } }, {"appRoleAssignedTo", n => { AppRoleAssignedTo = n.GetCollectionOfObjectValues(AppRoleAssignment.CreateFromDiscriminatorValue)?.ToList(); } }, {"appRoleAssignmentRequired", n => { AppRoleAssignmentRequired = n.GetBoolValue(); } }, {"appRoleAssignments", n => { AppRoleAssignments = n.GetCollectionOfObjectValues(AppRoleAssignment.CreateFromDiscriminatorValue)?.ToList(); } }, {"appRoles", n => { AppRoles = n.GetCollectionOfObjectValues(AppRole.CreateFromDiscriminatorValue)?.ToList(); } }, + {"applicationTemplateId", n => { ApplicationTemplateId = n.GetStringValue(); } }, {"claimsMappingPolicies", n => { ClaimsMappingPolicies = n.GetCollectionOfObjectValues(ClaimsMappingPolicy.CreateFromDiscriminatorValue)?.ToList(); } }, {"createdObjects", n => { CreatedObjects = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, {"customSecurityAttributes", n => { CustomSecurityAttributes = n.GetObjectValue(CustomSecurityAttributeValue.CreateFromDiscriminatorValue); } }, @@ -725,8 +725,8 @@ public ServicePrincipal() : base() { {"displayName", n => { DisplayName = n.GetStringValue(); } }, {"endpoints", n => { Endpoints = n.GetCollectionOfObjectValues(Endpoint.CreateFromDiscriminatorValue)?.ToList(); } }, {"federatedIdentityCredentials", n => { FederatedIdentityCredentials = n.GetCollectionOfObjectValues(FederatedIdentityCredential.CreateFromDiscriminatorValue)?.ToList(); } }, - {"homepage", n => { Homepage = n.GetStringValue(); } }, {"homeRealmDiscoveryPolicies", n => { HomeRealmDiscoveryPolicies = n.GetCollectionOfObjectValues(HomeRealmDiscoveryPolicy.CreateFromDiscriminatorValue)?.ToList(); } }, + {"homepage", n => { Homepage = n.GetStringValue(); } }, {"info", n => { Info = n.GetObjectValue(InformationalUrl.CreateFromDiscriminatorValue); } }, {"keyCredentials", n => { KeyCredentials = n.GetCollectionOfObjectValues(KeyCredential.CreateFromDiscriminatorValue)?.ToList(); } }, {"loginUrl", n => { LoginUrl = n.GetStringValue(); } }, diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/Models/ServiceProvisioningErrorCollectionResponse.cs similarity index 62% rename from src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs rename to src/Microsoft.Graph/Generated/Models/ServiceProvisioningErrorCollectionResponse.cs index f928ddcc820..68950fb7037 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceProvisioningErrorCollectionResponse.cs @@ -1,23 +1,22 @@ // -using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; using System.Linq; using System; -namespace Microsoft.Graph.DirectoryNamespace.DeletedItems.Item.CheckMemberGroups { - public class CheckMemberGroupsResponse : BaseCollectionPaginationCountResponse, IParsable { +namespace Microsoft.Graph.Models { + public class ServiceProvisioningErrorCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { - get { return BackingStore?.Get?>("value"); } + public List? Value { + get { return BackingStore?.Get?>("value"); } set { BackingStore?.Set("value", value); } } #nullable restore #else - public List Value { - get { return BackingStore?.Get>("value"); } + public List Value { + get { return BackingStore?.Get>("value"); } set { BackingStore?.Set("value", value); } } #endif @@ -25,16 +24,16 @@ public List Value { /// 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 CheckMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new ServiceProvisioningErrorCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new CheckMemberGroupsResponse(); + return new ServiceProvisioningErrorCollectionResponse(); } /// /// The deserialization information for the current model /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { - {"value", n => { Value = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"value", n => { Value = n.GetCollectionOfObjectValues(ServiceProvisioningError.CreateFromDiscriminatorValue)?.ToList(); } }, }; } /// @@ -44,7 +43,7 @@ public List Value { public new void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfPrimitiveValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); } } } diff --git a/src/Microsoft.Graph/Generated/Models/SharedPCConfiguration.cs b/src/Microsoft.Graph/Generated/Models/SharedPCConfiguration.cs index c0521ac014e..e2b4c8e19d7 100644 --- a/src/Microsoft.Graph/Generated/Models/SharedPCConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/SharedPCConfiguration.cs @@ -117,8 +117,8 @@ public SharedPCConfiguration() : base() { public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { {"accountManagerPolicy", n => { AccountManagerPolicy = n.GetObjectValue(SharedPCAccountManagerPolicy.CreateFromDiscriminatorValue); } }, - {"allowedAccounts", n => { AllowedAccounts = n.GetEnumValue(); } }, {"allowLocalStorage", n => { AllowLocalStorage = n.GetBoolValue(); } }, + {"allowedAccounts", n => { AllowedAccounts = n.GetEnumValue(); } }, {"disableAccountManager", n => { DisableAccountManager = n.GetBoolValue(); } }, {"disableEduPolicies", n => { DisableEduPolicies = n.GetBoolValue(); } }, {"disablePowerPolicies", n => { DisablePowerPolicies = n.GetBoolValue(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/SignIn.cs b/src/Microsoft.Graph/Generated/Models/SignIn.cs index 4cc5e62d99a..4f2ebd74d16 100644 --- a/src/Microsoft.Graph/Generated/Models/SignIn.cs +++ b/src/Microsoft.Graph/Generated/Models/SignIn.cs @@ -6,7 +6,7 @@ using System; namespace Microsoft.Graph.Models { public class SignIn : Entity, IParsable { - /// App name displayed in the Azure portal. Supports $filter (eq, startsWith). + /// App name displayed in the Microsoft Entra admin center. Supports $filter (eq, startsWith). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? AppDisplayName { diff --git a/src/Microsoft.Graph/Generated/Models/SubjectRightsRequest.cs b/src/Microsoft.Graph/Generated/Models/SubjectRightsRequest.cs index a0d7156fd1f..1dba83f709f 100644 --- a/src/Microsoft.Graph/Generated/Models/SubjectRightsRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/SubjectRightsRequest.cs @@ -209,18 +209,18 @@ public DateTimeOffset? LastModifiedDateTime { get { return BackingStore?.Get("lastModifiedDateTime"); } set { BackingStore?.Set("lastModifiedDateTime", value); } } - /// The mailboxlocations property + /// The mailboxLocations property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SubjectRightsRequestMailboxLocation? Mailboxlocations { - get { return BackingStore?.Get("mailboxlocations"); } - set { BackingStore?.Set("mailboxlocations", value); } + public SubjectRightsRequestMailboxLocation? MailboxLocations { + get { return BackingStore?.Get("mailboxLocations"); } + set { BackingStore?.Set("mailboxLocations", value); } } #nullable restore #else - public SubjectRightsRequestMailboxLocation Mailboxlocations { - get { return BackingStore?.Get("mailboxlocations"); } - set { BackingStore?.Set("mailboxlocations", value); } + public SubjectRightsRequestMailboxLocation MailboxLocations { + get { return BackingStore?.Get("mailboxLocations"); } + set { BackingStore?.Set("mailboxLocations", value); } } #endif /// List of notes associated with the request. @@ -256,18 +256,18 @@ public List Regulations { set { BackingStore?.Set("regulations", value); } } #endif - /// The sitelocations property + /// The siteLocations property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SubjectRightsRequestSiteLocation? Sitelocations { - get { return BackingStore?.Get("sitelocations"); } - set { BackingStore?.Set("sitelocations", value); } + public SubjectRightsRequestSiteLocation? SiteLocations { + get { return BackingStore?.Get("siteLocations"); } + set { BackingStore?.Set("siteLocations", value); } } #nullable restore #else - public SubjectRightsRequestSiteLocation Sitelocations { - get { return BackingStore?.Get("sitelocations"); } - set { BackingStore?.Set("sitelocations", value); } + public SubjectRightsRequestSiteLocation SiteLocations { + get { return BackingStore?.Get("siteLocations"); } + set { BackingStore?.Set("siteLocations", value); } } #endif /// Information about the different stages for the request. @@ -340,11 +340,11 @@ public SubjectRightsRequestType? Type { {"internalDueDateTime", n => { InternalDueDateTime = n.GetDateTimeOffsetValue(); } }, {"lastModifiedBy", n => { LastModifiedBy = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, - {"mailboxlocations", n => { Mailboxlocations = n.GetObjectValue(SubjectRightsRequestMailboxLocation.CreateFromDiscriminatorValue); } }, + {"mailboxLocations", n => { MailboxLocations = n.GetObjectValue(SubjectRightsRequestMailboxLocation.CreateFromDiscriminatorValue); } }, {"notes", n => { Notes = n.GetCollectionOfObjectValues(AuthoredNote.CreateFromDiscriminatorValue)?.ToList(); } }, {"pauseAfterEstimate", n => { PauseAfterEstimate = n.GetBoolValue(); } }, {"regulations", n => { Regulations = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"sitelocations", n => { Sitelocations = n.GetObjectValue(SubjectRightsRequestSiteLocation.CreateFromDiscriminatorValue); } }, + {"siteLocations", n => { SiteLocations = n.GetObjectValue(SubjectRightsRequestSiteLocation.CreateFromDiscriminatorValue); } }, {"stages", n => { Stages = n.GetCollectionOfObjectValues(SubjectRightsRequestStageDetail.CreateFromDiscriminatorValue)?.ToList(); } }, {"status", n => { Status = n.GetEnumValue(); } }, {"team", n => { Team = n.GetObjectValue(Microsoft.Graph.Models.Team.CreateFromDiscriminatorValue); } }, @@ -377,11 +377,11 @@ public SubjectRightsRequestType? Type { writer.WriteDateTimeOffsetValue("internalDueDateTime", InternalDueDateTime); writer.WriteObjectValue("lastModifiedBy", LastModifiedBy); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); - writer.WriteObjectValue("mailboxlocations", Mailboxlocations); + writer.WriteObjectValue("mailboxLocations", MailboxLocations); writer.WriteCollectionOfObjectValues("notes", Notes); writer.WriteBoolValue("pauseAfterEstimate", PauseAfterEstimate); writer.WriteCollectionOfPrimitiveValues("regulations", Regulations); - writer.WriteObjectValue("sitelocations", Sitelocations); + writer.WriteObjectValue("siteLocations", SiteLocations); writer.WriteCollectionOfObjectValues("stages", Stages); writer.WriteEnumValue("status", Status); writer.WriteObjectValue("team", Team); diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationJobRestartCriteria.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationJobRestartCriteria.cs index 5bbcee1e296..f660e86400e 100644 --- a/src/Microsoft.Graph/Generated/Models/SynchronizationJobRestartCriteria.cs +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationJobRestartCriteria.cs @@ -28,7 +28,7 @@ public string OdataType { set { BackingStore?.Set("@odata.type", value); } } #endif - /// Comma-separated combination of the following values: None, ConnectorDataStore, Escrows, Watermark, QuarantineState, Full, ForceDeletes. The property can also be empty. None: Starts a paused or quarantined provisioning job. DO NOT USE. Use the Start synchronizationJob API instead.ConnectorDataStore - Clears the underlying cache for all users. DO NOT USE. Contact Microsoft Support for guidance.Escrows - Provisioning failures are marked as escrows and retried. Clearing escrows will stop the service from retrying failures.Watermark - Removing the watermark causes the service to re-evaluate all the users again, rather than just processing changes.QuarantineState - Temporarily lifts the quarantine.Use Full if you want all of the options.ForceDeletes - Forces the system to delete the pending deleted users when using the accidental deletions prevention feature and the deletion threshold is exceeded. Leaving this property empty emulates the Restart provisioning option in the Azure portal. It is similar to setting the resetScope to include QuarantineState, Watermark, and Escrows. This option meets most customer needs. + /// Comma-separated combination of the following values: None, ConnectorDataStore, Escrows, Watermark, QuarantineState, Full, ForceDeletes. The property can also be empty. None: Starts a paused or quarantined provisioning job. DO NOT USE. Use the Start synchronizationJob API instead.ConnectorDataStore - Clears the underlying cache for all users. DO NOT USE. Contact Microsoft Support for guidance.Escrows - Provisioning failures are marked as escrows and retried. Clearing escrows will stop the service from retrying failures.Watermark - Removing the watermark causes the service to re-evaluate all the users again, rather than just processing changes.QuarantineState - Temporarily lifts the quarantine.Use Full if you want all of the options.ForceDeletes - Forces the system to delete the pending deleted users when using the accidental deletions prevention feature and the deletion threshold is exceeded. Leaving this property empty emulates the Restart provisioning option in the Microsoft Entra admin center. It is similar to setting the resetScope to include QuarantineState, Watermark, and Escrows. This option meets most customer needs. public SynchronizationJobRestartScope? ResetScope { get { return BackingStore?.Get("resetScope"); } set { BackingStore?.Set("resetScope", value); } diff --git a/src/Microsoft.Graph/Generated/Models/Team.cs b/src/Microsoft.Graph/Generated/Models/Team.cs index fa45a842104..9c9649b91bd 100644 --- a/src/Microsoft.Graph/Generated/Models/Team.cs +++ b/src/Microsoft.Graph/Generated/Models/Team.cs @@ -388,8 +388,8 @@ public string WebUrl { {"installedApps", n => { InstalledApps = n.GetCollectionOfObjectValues(TeamsAppInstallation.CreateFromDiscriminatorValue)?.ToList(); } }, {"internalId", n => { InternalId = n.GetStringValue(); } }, {"isArchived", n => { IsArchived = n.GetBoolValue(); } }, - {"members", n => { Members = n.GetCollectionOfObjectValues(ConversationMember.CreateFromDiscriminatorValue)?.ToList(); } }, {"memberSettings", n => { MemberSettings = n.GetObjectValue(TeamMemberSettings.CreateFromDiscriminatorValue); } }, + {"members", n => { Members = n.GetCollectionOfObjectValues(ConversationMember.CreateFromDiscriminatorValue)?.ToList(); } }, {"messagingSettings", n => { MessagingSettings = n.GetObjectValue(TeamMessagingSettings.CreateFromDiscriminatorValue); } }, {"operations", n => { Operations = n.GetCollectionOfObjectValues(TeamsAsyncOperation.CreateFromDiscriminatorValue)?.ToList(); } }, {"permissionGrants", n => { PermissionGrants = n.GetCollectionOfObjectValues(ResourceSpecificPermissionGrant.CreateFromDiscriminatorValue)?.ToList(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/TodoTask.cs b/src/Microsoft.Graph/Generated/Models/TodoTask.cs index 23b2605b307..512b9546267 100644 --- a/src/Microsoft.Graph/Generated/Models/TodoTask.cs +++ b/src/Microsoft.Graph/Generated/Models/TodoTask.cs @@ -236,8 +236,8 @@ public string Title { /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { - {"attachments", n => { Attachments = n.GetCollectionOfObjectValues(AttachmentBase.CreateFromDiscriminatorValue)?.ToList(); } }, {"attachmentSessions", n => { AttachmentSessions = n.GetCollectionOfObjectValues(AttachmentSession.CreateFromDiscriminatorValue)?.ToList(); } }, + {"attachments", n => { Attachments = n.GetCollectionOfObjectValues(AttachmentBase.CreateFromDiscriminatorValue)?.ToList(); } }, {"body", n => { Body = n.GetObjectValue(ItemBody.CreateFromDiscriminatorValue); } }, {"bodyLastModifiedDateTime", n => { BodyLastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, {"categories", n => { Categories = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyAuthenticationContextRule.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyAuthenticationContextRule.cs index f988fb27b81..f1b4bd96ee7 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyAuthenticationContextRule.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyAuthenticationContextRule.cs @@ -20,7 +20,7 @@ public string ClaimValue { set { BackingStore?.Set("claimValue", value); } } #endif - /// Whether this rule is enabled. + /// Determines whether this rule is enabled. public bool? IsEnabled { get { return BackingStore?.Get("isEnabled"); } set { BackingStore?.Set("isEnabled", value); } diff --git a/src/Microsoft.Graph/Generated/Models/User.cs b/src/Microsoft.Graph/Generated/Models/User.cs index 1071c53c0bb..08d72a3df71 100644 --- a/src/Microsoft.Graph/Generated/Models/User.cs +++ b/src/Microsoft.Graph/Generated/Models/User.cs @@ -1354,7 +1354,7 @@ public List ProxyAddresses { set { BackingStore?.Set("proxyAddresses", value); } } #endif - /// Devices that are registered for the user. Read-only. Nullable. Supports $expand. + /// Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? RegisteredDevices { @@ -1649,8 +1649,8 @@ public User() : base() { {"businessPhones", n => { BusinessPhones = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, {"calendar", n => { Calendar = n.GetObjectValue(Microsoft.Graph.Models.Calendar.CreateFromDiscriminatorValue); } }, {"calendarGroups", n => { CalendarGroups = n.GetCollectionOfObjectValues(CalendarGroup.CreateFromDiscriminatorValue)?.ToList(); } }, - {"calendars", n => { Calendars = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.Calendar.CreateFromDiscriminatorValue)?.ToList(); } }, {"calendarView", n => { CalendarView = n.GetCollectionOfObjectValues(Event.CreateFromDiscriminatorValue)?.ToList(); } }, + {"calendars", n => { Calendars = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.Calendar.CreateFromDiscriminatorValue)?.ToList(); } }, {"chats", n => { Chats = n.GetCollectionOfObjectValues(Chat.CreateFromDiscriminatorValue)?.ToList(); } }, {"city", n => { City = n.GetStringValue(); } }, {"companyName", n => { CompanyName = n.GetStringValue(); } }, @@ -1696,9 +1696,9 @@ public User() : base() { {"licenseAssignmentStates", n => { LicenseAssignmentStates = n.GetCollectionOfObjectValues(LicenseAssignmentState.CreateFromDiscriminatorValue)?.ToList(); } }, {"licenseDetails", n => { LicenseDetails = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.LicenseDetails.CreateFromDiscriminatorValue)?.ToList(); } }, {"mail", n => { Mail = n.GetStringValue(); } }, - {"mailboxSettings", n => { MailboxSettings = n.GetObjectValue(Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue); } }, {"mailFolders", n => { MailFolders = n.GetCollectionOfObjectValues(MailFolder.CreateFromDiscriminatorValue)?.ToList(); } }, {"mailNickname", n => { MailNickname = n.GetStringValue(); } }, + {"mailboxSettings", n => { MailboxSettings = n.GetObjectValue(Microsoft.Graph.Models.MailboxSettings.CreateFromDiscriminatorValue); } }, {"managedAppRegistrations", n => { ManagedAppRegistrations = n.GetCollectionOfObjectValues(ManagedAppRegistration.CreateFromDiscriminatorValue)?.ToList(); } }, {"managedDevices", n => { ManagedDevices = n.GetCollectionOfObjectValues(ManagedDevice.CreateFromDiscriminatorValue)?.ToList(); } }, {"manager", n => { Manager = n.GetObjectValue(DirectoryObject.CreateFromDiscriminatorValue); } }, @@ -1708,8 +1708,6 @@ public User() : base() { {"mySite", n => { MySite = n.GetStringValue(); } }, {"oauth2PermissionGrants", n => { Oauth2PermissionGrants = n.GetCollectionOfObjectValues(OAuth2PermissionGrant.CreateFromDiscriminatorValue)?.ToList(); } }, {"officeLocation", n => { OfficeLocation = n.GetStringValue(); } }, - {"onenote", n => { Onenote = n.GetObjectValue(Microsoft.Graph.Models.Onenote.CreateFromDiscriminatorValue); } }, - {"onlineMeetings", n => { OnlineMeetings = n.GetCollectionOfObjectValues(OnlineMeeting.CreateFromDiscriminatorValue)?.ToList(); } }, {"onPremisesDistinguishedName", n => { OnPremisesDistinguishedName = n.GetStringValue(); } }, {"onPremisesDomainName", n => { OnPremisesDomainName = n.GetStringValue(); } }, {"onPremisesExtensionAttributes", n => { OnPremisesExtensionAttributes = n.GetObjectValue(Microsoft.Graph.Models.OnPremisesExtensionAttributes.CreateFromDiscriminatorValue); } }, @@ -1720,6 +1718,8 @@ public User() : base() { {"onPremisesSecurityIdentifier", n => { OnPremisesSecurityIdentifier = n.GetStringValue(); } }, {"onPremisesSyncEnabled", n => { OnPremisesSyncEnabled = n.GetBoolValue(); } }, {"onPremisesUserPrincipalName", n => { OnPremisesUserPrincipalName = n.GetStringValue(); } }, + {"onenote", n => { Onenote = n.GetObjectValue(Microsoft.Graph.Models.Onenote.CreateFromDiscriminatorValue); } }, + {"onlineMeetings", n => { OnlineMeetings = n.GetCollectionOfObjectValues(OnlineMeeting.CreateFromDiscriminatorValue)?.ToList(); } }, {"otherMails", n => { OtherMails = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, {"outlook", n => { Outlook = n.GetObjectValue(OutlookUser.CreateFromDiscriminatorValue); } }, {"ownedDevices", n => { OwnedDevices = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/WebApplication.cs b/src/Microsoft.Graph/Generated/Models/WebApplication.cs index d12ea1dea11..e3c3723f96c 100644 --- a/src/Microsoft.Graph/Generated/Models/WebApplication.cs +++ b/src/Microsoft.Graph/Generated/Models/WebApplication.cs @@ -122,8 +122,8 @@ public IDictionary> GetFieldDeserializers() { {"implicitGrantSettings", n => { ImplicitGrantSettings = n.GetObjectValue(Microsoft.Graph.Models.ImplicitGrantSettings.CreateFromDiscriminatorValue); } }, {"logoutUrl", n => { LogoutUrl = n.GetStringValue(); } }, {"@odata.type", n => { OdataType = n.GetStringValue(); } }, - {"redirectUris", n => { RedirectUris = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, {"redirectUriSettings", n => { RedirectUriSettings = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.RedirectUriSettings.CreateFromDiscriminatorValue)?.ToList(); } }, + {"redirectUris", n => { RedirectUris = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, }; } /// diff --git a/src/Microsoft.Graph/Generated/Models/Windows10EndpointProtectionConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Windows10EndpointProtectionConfiguration.cs index f8909ef3093..ab00354e19d 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10EndpointProtectionConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10EndpointProtectionConfiguration.cs @@ -289,6 +289,7 @@ public Windows10EndpointProtectionConfiguration() : base() { /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { + {"appLockerApplicationControl", n => { AppLockerApplicationControl = n.GetEnumValue(); } }, {"applicationGuardAllowPersistence", n => { ApplicationGuardAllowPersistence = n.GetBoolValue(); } }, {"applicationGuardAllowPrintToLocalPrinters", n => { ApplicationGuardAllowPrintToLocalPrinters = n.GetBoolValue(); } }, {"applicationGuardAllowPrintToNetworkPrinters", n => { ApplicationGuardAllowPrintToNetworkPrinters = n.GetBoolValue(); } }, @@ -299,7 +300,6 @@ public Windows10EndpointProtectionConfiguration() : base() { {"applicationGuardBlockNonEnterpriseContent", n => { ApplicationGuardBlockNonEnterpriseContent = n.GetBoolValue(); } }, {"applicationGuardEnabled", n => { ApplicationGuardEnabled = n.GetBoolValue(); } }, {"applicationGuardForceAuditing", n => { ApplicationGuardForceAuditing = n.GetBoolValue(); } }, - {"appLockerApplicationControl", n => { AppLockerApplicationControl = n.GetEnumValue(); } }, {"bitLockerDisableWarningForOtherDiskEncryption", n => { BitLockerDisableWarningForOtherDiskEncryption = n.GetBoolValue(); } }, {"bitLockerEnableStorageCardEncryptionOnMobile", n => { BitLockerEnableStorageCardEncryptionOnMobile = n.GetBoolValue(); } }, {"bitLockerEncryptDevice", n => { BitLockerEncryptDevice = n.GetBoolValue(); } }, @@ -312,11 +312,11 @@ public Windows10EndpointProtectionConfiguration() : base() { {"defenderSecurityCenterBlockExploitProtectionOverride", n => { DefenderSecurityCenterBlockExploitProtectionOverride = n.GetBoolValue(); } }, {"firewallBlockStatefulFTP", n => { FirewallBlockStatefulFTP = n.GetBoolValue(); } }, {"firewallCertificateRevocationListCheckMethod", n => { FirewallCertificateRevocationListCheckMethod = n.GetEnumValue(); } }, - {"firewallIdleTimeoutForSecurityAssociationInSeconds", n => { FirewallIdleTimeoutForSecurityAssociationInSeconds = n.GetIntValue(); } }, {"firewallIPSecExemptionsAllowDHCP", n => { FirewallIPSecExemptionsAllowDHCP = n.GetBoolValue(); } }, {"firewallIPSecExemptionsAllowICMP", n => { FirewallIPSecExemptionsAllowICMP = n.GetBoolValue(); } }, {"firewallIPSecExemptionsAllowNeighborDiscovery", n => { FirewallIPSecExemptionsAllowNeighborDiscovery = n.GetBoolValue(); } }, {"firewallIPSecExemptionsAllowRouterDiscovery", n => { FirewallIPSecExemptionsAllowRouterDiscovery = n.GetBoolValue(); } }, + {"firewallIdleTimeoutForSecurityAssociationInSeconds", n => { FirewallIdleTimeoutForSecurityAssociationInSeconds = n.GetIntValue(); } }, {"firewallMergeKeyingModuleSettings", n => { FirewallMergeKeyingModuleSettings = n.GetBoolValue(); } }, {"firewallPacketQueueingMethod", n => { FirewallPacketQueueingMethod = n.GetEnumValue(); } }, {"firewallPreSharedKeyEncodingMethod", n => { FirewallPreSharedKeyEncodingMethod = n.GetEnumValue(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/Windows10GeneralConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Windows10GeneralConfiguration.cs index 6bacc5ffe2d..416c93889b6 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10GeneralConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10GeneralConfiguration.cs @@ -1221,8 +1221,8 @@ public Windows10GeneralConfiguration() : base() { {"bluetoothAllowedServices", n => { BluetoothAllowedServices = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, {"bluetoothBlockAdvertising", n => { BluetoothBlockAdvertising = n.GetBoolValue(); } }, {"bluetoothBlockDiscoverableMode", n => { BluetoothBlockDiscoverableMode = n.GetBoolValue(); } }, - {"bluetoothBlocked", n => { BluetoothBlocked = n.GetBoolValue(); } }, {"bluetoothBlockPrePairing", n => { BluetoothBlockPrePairing = n.GetBoolValue(); } }, + {"bluetoothBlocked", n => { BluetoothBlocked = n.GetBoolValue(); } }, {"cameraBlocked", n => { CameraBlocked = n.GetBoolValue(); } }, {"cellularBlockDataWhenRoaming", n => { CellularBlockDataWhenRoaming = n.GetBoolValue(); } }, {"cellularBlockVpn", n => { CellularBlockVpn = n.GetBoolValue(); } }, @@ -1267,7 +1267,6 @@ public Windows10GeneralConfiguration() : base() { {"edgeBlockAutofill", n => { EdgeBlockAutofill = n.GetBoolValue(); } }, {"edgeBlockCompatibilityList", n => { EdgeBlockCompatibilityList = n.GetBoolValue(); } }, {"edgeBlockDeveloperTools", n => { EdgeBlockDeveloperTools = n.GetBoolValue(); } }, - {"edgeBlocked", n => { EdgeBlocked = n.GetBoolValue(); } }, {"edgeBlockExtensions", n => { EdgeBlockExtensions = n.GetBoolValue(); } }, {"edgeBlockInPrivateBrowsing", n => { EdgeBlockInPrivateBrowsing = n.GetBoolValue(); } }, {"edgeBlockJavaScript", n => { EdgeBlockJavaScript = n.GetBoolValue(); } }, @@ -1277,6 +1276,7 @@ public Windows10GeneralConfiguration() : base() { {"edgeBlockSearchSuggestions", n => { EdgeBlockSearchSuggestions = n.GetBoolValue(); } }, {"edgeBlockSendingDoNotTrackHeader", n => { EdgeBlockSendingDoNotTrackHeader = n.GetBoolValue(); } }, {"edgeBlockSendingIntranetTrafficToInternetExplorer", n => { EdgeBlockSendingIntranetTrafficToInternetExplorer = n.GetBoolValue(); } }, + {"edgeBlocked", n => { EdgeBlocked = n.GetBoolValue(); } }, {"edgeClearBrowsingDataOnExit", n => { EdgeClearBrowsingDataOnExit = n.GetBoolValue(); } }, {"edgeCookiePolicy", n => { EdgeCookiePolicy = n.GetEnumValue(); } }, {"edgeDisableFirstRunPage", n => { EdgeDisableFirstRunPage = n.GetBoolValue(); } }, @@ -1305,8 +1305,8 @@ public Windows10GeneralConfiguration() : base() { {"lockScreenBlockToastNotifications", n => { LockScreenBlockToastNotifications = n.GetBoolValue(); } }, {"lockScreenTimeoutInSeconds", n => { LockScreenTimeoutInSeconds = n.GetIntValue(); } }, {"logonBlockFastUserSwitching", n => { LogonBlockFastUserSwitching = n.GetBoolValue(); } }, - {"microsoftAccountBlocked", n => { MicrosoftAccountBlocked = n.GetBoolValue(); } }, {"microsoftAccountBlockSettingsSync", n => { MicrosoftAccountBlockSettingsSync = n.GetBoolValue(); } }, + {"microsoftAccountBlocked", n => { MicrosoftAccountBlocked = n.GetBoolValue(); } }, {"networkProxyApplySettingsDeviceWide", n => { NetworkProxyApplySettingsDeviceWide = n.GetBoolValue(); } }, {"networkProxyAutomaticConfigurationUrl", n => { NetworkProxyAutomaticConfigurationUrl = n.GetStringValue(); } }, {"networkProxyDisableAutoDetect", n => { NetworkProxyDisableAutoDetect = n.GetBoolValue(); } }, @@ -1319,9 +1319,9 @@ public Windows10GeneralConfiguration() : base() { {"passwordMinimumLength", n => { PasswordMinimumLength = n.GetIntValue(); } }, {"passwordMinutesOfInactivityBeforeScreenTimeout", n => { PasswordMinutesOfInactivityBeforeScreenTimeout = n.GetIntValue(); } }, {"passwordPreviousPasswordBlockCount", n => { PasswordPreviousPasswordBlockCount = n.GetIntValue(); } }, + {"passwordRequireWhenResumeFromIdleState", n => { PasswordRequireWhenResumeFromIdleState = n.GetBoolValue(); } }, {"passwordRequired", n => { PasswordRequired = n.GetBoolValue(); } }, {"passwordRequiredType", n => { PasswordRequiredType = n.GetEnumValue(); } }, - {"passwordRequireWhenResumeFromIdleState", n => { PasswordRequireWhenResumeFromIdleState = n.GetBoolValue(); } }, {"passwordSignInFailureCountBeforeFactoryReset", n => { PasswordSignInFailureCountBeforeFactoryReset = n.GetIntValue(); } }, {"personalizationDesktopImageUrl", n => { PersonalizationDesktopImageUrl = n.GetStringValue(); } }, {"personalizationLockScreenImageUrl", n => { PersonalizationLockScreenImageUrl = n.GetStringValue(); } }, @@ -1398,16 +1398,16 @@ public Windows10GeneralConfiguration() : base() { {"voiceRecordingBlocked", n => { VoiceRecordingBlocked = n.GetBoolValue(); } }, {"webRtcBlockLocalhostIpAddress", n => { WebRtcBlockLocalhostIpAddress = n.GetBoolValue(); } }, {"wiFiBlockAutomaticConnectHotspots", n => { WiFiBlockAutomaticConnectHotspots = n.GetBoolValue(); } }, - {"wiFiBlocked", n => { WiFiBlocked = n.GetBoolValue(); } }, {"wiFiBlockManualConfiguration", n => { WiFiBlockManualConfiguration = n.GetBoolValue(); } }, + {"wiFiBlocked", n => { WiFiBlocked = n.GetBoolValue(); } }, {"wiFiScanInterval", n => { WiFiScanInterval = n.GetIntValue(); } }, {"windowsSpotlightBlockConsumerSpecificFeatures", n => { WindowsSpotlightBlockConsumerSpecificFeatures = n.GetBoolValue(); } }, - {"windowsSpotlightBlocked", n => { WindowsSpotlightBlocked = n.GetBoolValue(); } }, {"windowsSpotlightBlockOnActionCenter", n => { WindowsSpotlightBlockOnActionCenter = n.GetBoolValue(); } }, {"windowsSpotlightBlockTailoredExperiences", n => { WindowsSpotlightBlockTailoredExperiences = n.GetBoolValue(); } }, {"windowsSpotlightBlockThirdPartyNotifications", n => { WindowsSpotlightBlockThirdPartyNotifications = n.GetBoolValue(); } }, {"windowsSpotlightBlockWelcomeExperience", n => { WindowsSpotlightBlockWelcomeExperience = n.GetBoolValue(); } }, {"windowsSpotlightBlockWindowsTips", n => { WindowsSpotlightBlockWindowsTips = n.GetBoolValue(); } }, + {"windowsSpotlightBlocked", n => { WindowsSpotlightBlocked = n.GetBoolValue(); } }, {"windowsSpotlightConfigureOnLockScreen", n => { WindowsSpotlightConfigureOnLockScreen = n.GetEnumValue(); } }, {"windowsStoreBlockAutoUpdate", n => { WindowsStoreBlockAutoUpdate = n.GetBoolValue(); } }, {"windowsStoreBlocked", n => { WindowsStoreBlocked = n.GetBoolValue(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/Windows10MobileCompliancePolicy.cs b/src/Microsoft.Graph/Generated/Models/Windows10MobileCompliancePolicy.cs index 3cdc4aad4db..0564ff2292e 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10MobileCompliancePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10MobileCompliancePolicy.cs @@ -137,9 +137,9 @@ public Windows10MobileCompliancePolicy() : base() { {"passwordMinimumLength", n => { PasswordMinimumLength = n.GetIntValue(); } }, {"passwordMinutesOfInactivityBeforeLock", n => { PasswordMinutesOfInactivityBeforeLock = n.GetIntValue(); } }, {"passwordPreviousPasswordBlockCount", n => { PasswordPreviousPasswordBlockCount = n.GetIntValue(); } }, + {"passwordRequireToUnlockFromIdle", n => { PasswordRequireToUnlockFromIdle = n.GetBoolValue(); } }, {"passwordRequired", n => { PasswordRequired = n.GetBoolValue(); } }, {"passwordRequiredType", n => { PasswordRequiredType = n.GetEnumValue(); } }, - {"passwordRequireToUnlockFromIdle", n => { PasswordRequireToUnlockFromIdle = n.GetBoolValue(); } }, {"secureBootEnabled", n => { SecureBootEnabled = n.GetBoolValue(); } }, {"storageRequireEncryption", n => { StorageRequireEncryption = n.GetBoolValue(); } }, }; diff --git a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtection.cs b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtection.cs index 6deb23ff578..85bcc8ea398 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtection.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtection.cs @@ -298,9 +298,9 @@ public WindowsInformationProtection() : base() { {"dataRecoveryCertificate", n => { DataRecoveryCertificate = n.GetObjectValue(WindowsInformationProtectionDataRecoveryCertificate.CreateFromDiscriminatorValue); } }, {"enforcementLevel", n => { EnforcementLevel = n.GetEnumValue(); } }, {"enterpriseDomain", n => { EnterpriseDomain = n.GetStringValue(); } }, - {"enterpriseInternalProxyServers", n => { EnterpriseInternalProxyServers = n.GetCollectionOfObjectValues(WindowsInformationProtectionResourceCollection.CreateFromDiscriminatorValue)?.ToList(); } }, {"enterpriseIPRanges", n => { EnterpriseIPRanges = n.GetCollectionOfObjectValues(WindowsInformationProtectionIPRangeCollection.CreateFromDiscriminatorValue)?.ToList(); } }, {"enterpriseIPRangesAreAuthoritative", n => { EnterpriseIPRangesAreAuthoritative = n.GetBoolValue(); } }, + {"enterpriseInternalProxyServers", n => { EnterpriseInternalProxyServers = n.GetCollectionOfObjectValues(WindowsInformationProtectionResourceCollection.CreateFromDiscriminatorValue)?.ToList(); } }, {"enterpriseNetworkDomainNames", n => { EnterpriseNetworkDomainNames = n.GetCollectionOfObjectValues(WindowsInformationProtectionResourceCollection.CreateFromDiscriminatorValue)?.ToList(); } }, {"enterpriseProtectedDomainNames", n => { EnterpriseProtectedDomainNames = n.GetCollectionOfObjectValues(WindowsInformationProtectionResourceCollection.CreateFromDiscriminatorValue)?.ToList(); } }, {"enterpriseProxiedDomains", n => { EnterpriseProxiedDomains = n.GetCollectionOfObjectValues(WindowsInformationProtectionProxiedDomainCollection.CreateFromDiscriminatorValue)?.ToList(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/WindowsPhone81GeneralConfiguration.cs b/src/Microsoft.Graph/Generated/Models/WindowsPhone81GeneralConfiguration.cs index 1cb7bd2b820..3dc3e535d2e 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsPhone81GeneralConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsPhone81GeneralConfiguration.cs @@ -208,8 +208,8 @@ public WindowsPhone81GeneralConfiguration() : base() { {"storageRequireEncryption", n => { StorageRequireEncryption = n.GetBoolValue(); } }, {"webBrowserBlocked", n => { WebBrowserBlocked = n.GetBoolValue(); } }, {"wifiBlockAutomaticConnectHotspots", n => { WifiBlockAutomaticConnectHotspots = n.GetBoolValue(); } }, - {"wifiBlocked", n => { WifiBlocked = n.GetBoolValue(); } }, {"wifiBlockHotspotReporting", n => { WifiBlockHotspotReporting = n.GetBoolValue(); } }, + {"wifiBlocked", n => { WifiBlocked = n.GetBoolValue(); } }, {"windowsStoreBlocked", n => { WindowsStoreBlocked = n.GetBoolValue(); } }, }; } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdateForBusinessConfiguration.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdateForBusinessConfiguration.cs index 848edcd556e..75e468c78e3 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdateForBusinessConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdateForBusinessConfiguration.cs @@ -219,8 +219,8 @@ public WindowsUpdateForBusinessConfiguration() : base() { public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { {"allowWindows11Upgrade", n => { AllowWindows11Upgrade = n.GetBoolValue(); } }, - {"automaticUpdateMode", n => { AutomaticUpdateMode = n.GetEnumValue(); } }, {"autoRestartNotificationDismissal", n => { AutoRestartNotificationDismissal = n.GetEnumValue(); } }, + {"automaticUpdateMode", n => { AutomaticUpdateMode = n.GetEnumValue(); } }, {"businessReadyUpdatesOnly", n => { BusinessReadyUpdatesOnly = n.GetEnumValue(); } }, {"deadlineForFeatureUpdatesInDays", n => { DeadlineForFeatureUpdatesInDays = n.GetIntValue(); } }, {"deadlineForQualityUpdatesInDays", n => { DeadlineForQualityUpdatesInDays = n.GetIntValue(); } }, @@ -231,9 +231,9 @@ public WindowsUpdateForBusinessConfiguration() : base() { {"engagedRestartSnoozeScheduleInDays", n => { EngagedRestartSnoozeScheduleInDays = n.GetIntValue(); } }, {"engagedRestartTransitionScheduleInDays", n => { EngagedRestartTransitionScheduleInDays = n.GetIntValue(); } }, {"featureUpdatesDeferralPeriodInDays", n => { FeatureUpdatesDeferralPeriodInDays = n.GetIntValue(); } }, - {"featureUpdatesPaused", n => { FeatureUpdatesPaused = n.GetBoolValue(); } }, {"featureUpdatesPauseExpiryDateTime", n => { FeatureUpdatesPauseExpiryDateTime = n.GetDateTimeOffsetValue(); } }, {"featureUpdatesPauseStartDate", n => { FeatureUpdatesPauseStartDate = n.GetDateValue(); } }, + {"featureUpdatesPaused", n => { FeatureUpdatesPaused = n.GetBoolValue(); } }, {"featureUpdatesRollbackStartDateTime", n => { FeatureUpdatesRollbackStartDateTime = n.GetDateTimeOffsetValue(); } }, {"featureUpdatesRollbackWindowInDays", n => { FeatureUpdatesRollbackWindowInDays = n.GetIntValue(); } }, {"featureUpdatesWillBeRolledBack", n => { FeatureUpdatesWillBeRolledBack = n.GetBoolValue(); } }, @@ -242,9 +242,9 @@ public WindowsUpdateForBusinessConfiguration() : base() { {"postponeRebootUntilAfterDeadline", n => { PostponeRebootUntilAfterDeadline = n.GetBoolValue(); } }, {"prereleaseFeatures", n => { PrereleaseFeatures = n.GetEnumValue(); } }, {"qualityUpdatesDeferralPeriodInDays", n => { QualityUpdatesDeferralPeriodInDays = n.GetIntValue(); } }, - {"qualityUpdatesPaused", n => { QualityUpdatesPaused = n.GetBoolValue(); } }, {"qualityUpdatesPauseExpiryDateTime", n => { QualityUpdatesPauseExpiryDateTime = n.GetDateTimeOffsetValue(); } }, {"qualityUpdatesPauseStartDate", n => { QualityUpdatesPauseStartDate = n.GetDateValue(); } }, + {"qualityUpdatesPaused", n => { QualityUpdatesPaused = n.GetBoolValue(); } }, {"qualityUpdatesRollbackStartDateTime", n => { QualityUpdatesRollbackStartDateTime = n.GetDateTimeOffsetValue(); } }, {"qualityUpdatesWillBeRolledBack", n => { QualityUpdatesWillBeRolledBack = n.GetBoolValue(); } }, {"scheduleImminentRestartWarningInMinutes", n => { ScheduleImminentRestartWarningInMinutes = n.GetIntValue(); } }, diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookRange.cs b/src/Microsoft.Graph/Generated/Models/WorkbookRange.cs index 0ba29504d01..b1aa033a35e 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookRange.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookRange.cs @@ -244,8 +244,8 @@ public WorkbookWorksheet Worksheet { {"rowIndex", n => { RowIndex = n.GetIntValue(); } }, {"sort", n => { Sort = n.GetObjectValue(WorkbookRangeSort.CreateFromDiscriminatorValue); } }, {"text", n => { Text = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, - {"values", n => { Values = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, {"valueTypes", n => { ValueTypes = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, + {"values", n => { Values = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, {"worksheet", n => { Worksheet = n.GetObjectValue(WorkbookWorksheet.CreateFromDiscriminatorValue); } }, }; } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookRangeView.cs b/src/Microsoft.Graph/Generated/Models/WorkbookRangeView.cs index c3114b125f4..d57806f2d41 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookRangeView.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookRangeView.cs @@ -105,7 +105,7 @@ public List Rows { set { BackingStore?.Set("rows", value); } } #endif - /// Text values of the specified range. The Text value will not depend on the cell width. The # sign substitution that happens in Excel UI will not affect the text value returned by the API. Read-only. + /// Text values of the specified range. The Text value won't depend on the cell width. The # sign substitution that happens in Excel UI won't affect the text value returned by the API. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public Json? Text { @@ -119,7 +119,7 @@ public Json Text { set { BackingStore?.Set("text", value); } } #endif - /// Represents the raw values of the specified range view. The data returned could be of type string, number, or a boolean. Cell that contain an error will return the error string. + /// Represents the raw values of the specified range view. The data returned could be of type string, number, or a boolean. Cell that contains an error returns the error string. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public Json? Values { @@ -170,8 +170,8 @@ public Json ValueTypes { {"rowCount", n => { RowCount = n.GetIntValue(); } }, {"rows", n => { Rows = n.GetCollectionOfObjectValues(WorkbookRangeView.CreateFromDiscriminatorValue)?.ToList(); } }, {"text", n => { Text = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, - {"values", n => { Values = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, {"valueTypes", n => { ValueTypes = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, + {"values", n => { Values = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, }; } /// diff --git a/src/Microsoft.Graph/Generated/Organization/Item/OrganizationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/OrganizationItemRequestBuilder.cs index 8221852fdd4..ecdc0360708 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/OrganizationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/OrganizationItemRequestBuilder.cs @@ -113,8 +113,8 @@ public async Task DeleteAsync(Action(requestInfo, Microsoft.Graph.Models.Organization.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the properties of a organization object. - /// Find more info here + /// Update the properties of the currently authenticated organization. In this case, organization is defined as a collection of exactly one record, and so its ID must be specified in the request. The ID is also known as the tenantId of the organization. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -185,7 +185,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the properties of a organization object. + /// Update the properties of the currently authenticated organization. In this case, organization is defined as a collection of exactly one record, and so its ID must be specified in the request. The ID is also known as the tenantId of the organization. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/GraphRoomListRequestBuilder.cs b/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/GraphRoomListRequestBuilder.cs index a5cf9970558..ba9e83f2a76 100644 --- a/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/GraphRoomListRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/GraphRoomListRequestBuilder.cs @@ -1,6 +1,7 @@ // using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; +using Microsoft.Graph.Places.Item.GraphRoomList.Rooms; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Places.Item.GraphRoomList { /// Casts the previous resource to roomList. ///
public class GraphRoomListRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the rooms property of the microsoft.graph.roomList entity. + public RoomsRequestBuilder Rooms { get => + new RoomsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GraphRoomListRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/Rooms/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/Rooms/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..8a187f941ea --- /dev/null +++ b/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/Rooms/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Places.Item.GraphRoomList.Rooms.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}/places/{place%2Did}/graph.roomList/rooms/$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}/places/{place%2Did}/graph.roomList/rooms/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Places/Item/GraphRoomList/Rooms/Item/RoomItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/Rooms/Item/RoomItemRequestBuilder.cs new file mode 100644 index 00000000000..a879801e3be --- /dev/null +++ b/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/Rooms/Item/RoomItemRequestBuilder.cs @@ -0,0 +1,251 @@ +// +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.Places.Item.GraphRoomList.Rooms.Item { + /// + /// Provides operations to manage the rooms property of the microsoft.graph.roomList entity. + /// + public class RoomItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RoomItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RoomItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/places/{place%2Did}/graph.roomList/rooms/{room%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new RoomItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RoomItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/places/{place%2Did}/graph.roomList/rooms/{room%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property rooms for places + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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).ConfigureAwait(false); + } + /// + /// Get rooms from places + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, Room.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update the navigation property rooms in places + /// + /// 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(Room body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Room 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, Room.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete navigation property rooms for places + /// + /// Configuration 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 RoomItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get rooms from places + /// + /// Configuration 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 RoomItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property rooms in places + /// + /// 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(Room body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Room 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 RoomItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public RoomItemRequestBuilder WithUrl(string rawUrl) { + return new RoomItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RoomItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new RoomItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public RoomItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get rooms from places + /// + public class RoomItemRequestBuilderGetQueryParameters { + /// 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 RoomItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public RoomItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new RoomItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new RoomItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public RoomItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RoomItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new RoomItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public RoomItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/Rooms/RoomsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/Rooms/RoomsRequestBuilder.cs new file mode 100644 index 00000000000..a1c297b2d24 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/Rooms/RoomsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Places.Item.GraphRoomList.Rooms.Count; +using Microsoft.Graph.Places.Item.GraphRoomList.Rooms.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.Places.Item.GraphRoomList.Rooms { + /// + /// Provides operations to manage the rooms property of the microsoft.graph.roomList entity. + /// + public class RoomsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the rooms property of the microsoft.graph.roomList entity. + /// The unique identifier of room + public RoomItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("room%2Did", position); + return new RoomItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new RoomsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RoomsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/places/{place%2Did}/graph.roomList/rooms{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new RoomsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RoomsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/places/{place%2Did}/graph.roomList/rooms{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get rooms from places + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, RoomCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create new navigation property to rooms for places + /// + /// 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(Room body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Room 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, Room.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get rooms from places + /// + /// Configuration 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 RoomsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to rooms for places + /// + /// 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(Room body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Room 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 RoomsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public RoomsRequestBuilder WithUrl(string rawUrl) { + return new RoomsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get rooms from places + /// + public class RoomsRequestBuilderGetQueryParameters { + /// 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 RoomsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public RoomsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new RoomsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new roomsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public RoomsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RoomsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new roomsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public RoomsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/Item/CombinationConfigurations/Item/AuthenticationCombinationConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/Item/CombinationConfigurations/Item/AuthenticationCombinationConfigurationItemRequestBuilder.cs index f0eec7feb4c..6a6ea3f90b8 100644 --- a/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/Item/CombinationConfigurations/Item/AuthenticationCombinationConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/Item/CombinationConfigurations/Item/AuthenticationCombinationConfigurationItemRequestBuilder.cs @@ -69,7 +69,7 @@ public async Task GetAsync(Action(requestInfo, AuthenticationCombinationConfiguration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the properties of an authenticationCombinationConfiguration object. In use, only fido2combinationConfigurations may be updated as they are the only type of authenticationCombinationConfiguration that may be created. + /// Update the properties of an authenticationCombinationConfiguration object. In use, only fido2combinationConfigurations may be updated as they're the only type of authenticationCombinationConfiguration that may be created. /// Find more info here /// /// The request body @@ -141,7 +141,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the properties of an authenticationCombinationConfiguration object. In use, only fido2combinationConfigurations may be updated as they are the only type of authenticationCombinationConfiguration that may be created. + /// Update the properties of an authenticationCombinationConfiguration object. In use, only fido2combinationConfigurations may be updated as they're the only type of authenticationCombinationConfiguration that may be created. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/TaskTriggers/Item/Definition/DefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/TaskTriggers/Item/Definition/DefinitionRequestBuilder.cs index dde73bf9e2b..4c44e2d9c73 100644 --- a/src/Microsoft.Graph/Generated/Print/Printers/Item/TaskTriggers/Item/Definition/DefinitionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/TaskTriggers/Item/Definition/DefinitionRequestBuilder.cs @@ -29,7 +29,7 @@ public DefinitionRequestBuilder(Dictionary pathParameters, IRequ public DefinitionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/printers/{printer%2Did}/taskTriggers/{printTaskTrigger%2Did}/definition{?%24select,%24expand}", rawUrl) { } /// - /// An abstract definition that will be used to create a printTask when triggered by a print event. Read-only. + /// An abstract definition that is used to create a printTask when triggered by a print event. Read-only. /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -48,7 +48,7 @@ public async Task GetAsync(Action(requestInfo, PrintTaskDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// An abstract definition that will be used to create a printTask when triggered by a print event. Read-only. + /// An abstract definition that is used to create a printTask when triggered by a print event. Read-only. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -81,7 +81,7 @@ public DefinitionRequestBuilder WithUrl(string rawUrl) { return new DefinitionRequestBuilder(rawUrl, RequestAdapter); } /// - /// An abstract definition that will be used to create a printTask when triggered by a print event. Read-only. + /// An abstract definition that is used to create a printTask when triggered by a print event. Read-only. /// public class DefinitionRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedGroups/Item/GroupItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedGroups/Item/GroupItemRequestBuilder.cs index 17f74ed6ab9..21b68978807 100644 --- a/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedGroups/Item/GroupItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedGroups/Item/GroupItemRequestBuilder.cs @@ -1,5 +1,6 @@ // using Microsoft.Graph.Print.Shares.Item.AllowedGroups.Item.Ref; +using Microsoft.Graph.Print.Shares.Item.AllowedGroups.Item.ServiceProvisioningErrors; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; using System.IO; @@ -15,6 +16,10 @@ public class GroupItemRequestBuilder : BaseRequestBuilder { public RefRequestBuilder Ref { get => new RefRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GroupItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedGroups/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedGroups/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..2a9971a2655 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedGroups/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.AllowedGroups.Item.ServiceProvisioningErrors.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}/allowedGroups/{group%2Did}/serviceProvisioningErrors/$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}/allowedGroups/{group%2Did}/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/AllowedGroups/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedGroups/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..cfe797cb199 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedGroups/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Print.Shares.Item.AllowedGroups.Item.ServiceProvisioningErrors.Count; +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.AllowedGroups.Item.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \print\shares\{printerShare-id}\allowedGroups\{group-id}\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/allowedGroups/{group%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/allowedGroups/{group%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedUsers/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedUsers/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..9ef0d2bb680 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedUsers/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.AllowedUsers.Item.ServiceProvisioningErrors.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}/allowedUsers/{user%2Did}/serviceProvisioningErrors/$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}/allowedUsers/{user%2Did}/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/AllowedUsers/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedUsers/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..a811d8758f8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedUsers/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Print.Shares.Item.AllowedUsers.Item.ServiceProvisioningErrors.Count; +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.AllowedUsers.Item.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \print\shares\{printerShare-id}\allowedUsers\{user-id}\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/allowedUsers/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/allowedUsers/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedUsers/Item/UserItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedUsers/Item/UserItemRequestBuilder.cs index 8f9e8973350..98f71dcffbf 100644 --- a/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedUsers/Item/UserItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedUsers/Item/UserItemRequestBuilder.cs @@ -1,6 +1,7 @@ // using Microsoft.Graph.Print.Shares.Item.AllowedUsers.Item.MailboxSettings; using Microsoft.Graph.Print.Shares.Item.AllowedUsers.Item.Ref; +using Microsoft.Graph.Print.Shares.Item.AllowedUsers.Item.ServiceProvisioningErrors; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; using System.IO; @@ -20,6 +21,10 @@ public class UserItemRequestBuilder : BaseRequestBuilder { public RefRequestBuilder Ref { get => new RefRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new UserItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Approvers/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Approvers/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..52276018873 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Approvers/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,129 @@ +// +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.Privacy.SubjectRightsRequests.Item.Approvers.Item.ServiceProvisioningErrors.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}/privacy/subjectRightsRequests/{subjectRightsRequest%2Did}/approvers/{user%2Did}/serviceProvisioningErrors/$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}/privacy/subjectRightsRequests/{subjectRightsRequest%2Did}/approvers/{user%2Did}/serviceProvisioningErrors/$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. + [Obsolete("The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20")] +#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).ConfigureAwait(false); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20")] +#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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + [Obsolete("The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20")] + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Privacy/SubjectRightsRequests/Item/Approvers/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Approvers/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..df9fd78cfc1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Approvers/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,175 @@ +// +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Privacy.SubjectRightsRequests.Item.Approvers.Item.ServiceProvisioningErrors.Count; +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.Privacy.SubjectRightsRequests.Item.Approvers.Item.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \privacy\subjectRightsRequests\{subjectRightsRequest-id}\approvers\{user-id}\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + [Obsolete("The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20")] + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/privacy/subjectRightsRequests/{subjectRightsRequest%2Did}/approvers/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/privacy/subjectRightsRequests/{subjectRightsRequest%2Did}/approvers/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20")] +#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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20")] +#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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + [Obsolete("The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20")] + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Approvers/Item/UserItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Approvers/Item/UserItemRequestBuilder.cs index 3c29a401fed..d4d4aac0e38 100644 --- a/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Approvers/Item/UserItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Approvers/Item/UserItemRequestBuilder.cs @@ -2,6 +2,7 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Privacy.SubjectRightsRequests.Item.Approvers.Item.MailboxSettings; +using Microsoft.Graph.Privacy.SubjectRightsRequests.Item.Approvers.Item.ServiceProvisioningErrors; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -20,6 +21,11 @@ public class UserItemRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + [Obsolete("The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20")] + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new UserItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Collaborators/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Collaborators/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..dc30076fb2b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Collaborators/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,129 @@ +// +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.Privacy.SubjectRightsRequests.Item.Collaborators.Item.ServiceProvisioningErrors.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}/privacy/subjectRightsRequests/{subjectRightsRequest%2Did}/collaborators/{user%2Did}/serviceProvisioningErrors/$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}/privacy/subjectRightsRequests/{subjectRightsRequest%2Did}/collaborators/{user%2Did}/serviceProvisioningErrors/$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. + [Obsolete("The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20")] +#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).ConfigureAwait(false); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20")] +#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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + [Obsolete("The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20")] + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Privacy/SubjectRightsRequests/Item/Collaborators/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Collaborators/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..7a66314b4e8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Collaborators/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,175 @@ +// +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Privacy.SubjectRightsRequests.Item.Collaborators.Item.ServiceProvisioningErrors.Count; +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.Privacy.SubjectRightsRequests.Item.Collaborators.Item.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \privacy\subjectRightsRequests\{subjectRightsRequest-id}\collaborators\{user-id}\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + [Obsolete("The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20")] + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/privacy/subjectRightsRequests/{subjectRightsRequest%2Did}/collaborators/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/privacy/subjectRightsRequests/{subjectRightsRequest%2Did}/collaborators/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20")] +#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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20")] +#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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + [Obsolete("The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20")] + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Collaborators/Item/UserItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Collaborators/Item/UserItemRequestBuilder.cs index 77f9ac9ef31..6fb21f84993 100644 --- a/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Collaborators/Item/UserItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Collaborators/Item/UserItemRequestBuilder.cs @@ -2,6 +2,7 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Privacy.SubjectRightsRequests.Item.Collaborators.Item.MailboxSettings; +using Microsoft.Graph.Privacy.SubjectRightsRequests.Item.Collaborators.Item.ServiceProvisioningErrors; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -20,6 +21,11 @@ public class UserItemRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + [Obsolete("The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20")] + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new UserItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/UnifiedGroupSources/Item/Group/GroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/UnifiedGroupSources/Item/Group/GroupRequestBuilder.cs index 26f739c3a96..56e93413d3a 100644 --- a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/UnifiedGroupSources/Item/Group/GroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/UnifiedGroupSources/Item/Group/GroupRequestBuilder.cs @@ -1,6 +1,7 @@ // using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; +using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.UnifiedGroupSources.Item.Group.ServiceProvisioningErrors; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.Un /// Provides operations to manage the group property of the microsoft.graph.security.unifiedGroupSource entity. /// public class GroupRequestBuilder : BaseRequestBuilder { + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GroupRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/UnifiedGroupSources/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/UnifiedGroupSources/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..69e1016dc86 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/UnifiedGroupSources/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Custodians.Item.UnifiedGroupSources.Item.Group.ServiceProvisioningErrors.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}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/unifiedGroupSources/{unifiedGroupSource%2Did}/group/serviceProvisioningErrors/$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}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/unifiedGroupSources/{unifiedGroupSource%2Did}/group/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Security/Cases/EdiscoveryCases/Item/Custodians/Item/UnifiedGroupSources/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/UnifiedGroupSources/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..361928b5345 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/Cases/EdiscoveryCases/Item/Custodians/Item/UnifiedGroupSources/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.Custodians.Item.UnifiedGroupSources.Item.Group.ServiceProvisioningErrors.Count; +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.Custodians.Item.UnifiedGroupSources.Item.Group.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \security\cases\ediscoveryCases\{ediscoveryCase-id}\custodians\{ediscoveryCustodian-id}\unifiedGroupSources\{unifiedGroupSource-id}\group\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/unifiedGroupSources/{unifiedGroupSource%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/unifiedGroupSources/{unifiedGroupSource%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/SubjectRightsRequests/Item/Approvers/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/SubjectRightsRequests/Item/Approvers/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..d4ece9fd546 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/SubjectRightsRequests/Item/Approvers/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.SubjectRightsRequests.Item.Approvers.Item.ServiceProvisioningErrors.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}/security/subjectRightsRequests/{subjectRightsRequest%2Did}/approvers/{user%2Did}/serviceProvisioningErrors/$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}/security/subjectRightsRequests/{subjectRightsRequest%2Did}/approvers/{user%2Did}/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Security/SubjectRightsRequests/Item/Approvers/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/SubjectRightsRequests/Item/Approvers/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..6e08b665167 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/SubjectRightsRequests/Item/Approvers/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Security.SubjectRightsRequests.Item.Approvers.Item.ServiceProvisioningErrors.Count; +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.SubjectRightsRequests.Item.Approvers.Item.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \security\subjectRightsRequests\{subjectRightsRequest-id}\approvers\{user-id}\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/subjectRightsRequests/{subjectRightsRequest%2Did}/approvers/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/subjectRightsRequests/{subjectRightsRequest%2Did}/approvers/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/SubjectRightsRequests/Item/Approvers/Item/UserItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/SubjectRightsRequests/Item/Approvers/Item/UserItemRequestBuilder.cs index 8dc6bdc846a..a61915e00f6 100644 --- a/src/Microsoft.Graph/Generated/Security/SubjectRightsRequests/Item/Approvers/Item/UserItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/SubjectRightsRequests/Item/Approvers/Item/UserItemRequestBuilder.cs @@ -2,6 +2,7 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Security.SubjectRightsRequests.Item.Approvers.Item.MailboxSettings; +using Microsoft.Graph.Security.SubjectRightsRequests.Item.Approvers.Item.ServiceProvisioningErrors; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -19,6 +20,10 @@ public class UserItemRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new UserItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Security/SubjectRightsRequests/Item/Collaborators/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/SubjectRightsRequests/Item/Collaborators/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..1d1bb1d0733 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/SubjectRightsRequests/Item/Collaborators/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.SubjectRightsRequests.Item.Collaborators.Item.ServiceProvisioningErrors.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}/security/subjectRightsRequests/{subjectRightsRequest%2Did}/collaborators/{user%2Did}/serviceProvisioningErrors/$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}/security/subjectRightsRequests/{subjectRightsRequest%2Did}/collaborators/{user%2Did}/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Security/SubjectRightsRequests/Item/Collaborators/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/SubjectRightsRequests/Item/Collaborators/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..f5a5badfe84 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/SubjectRightsRequests/Item/Collaborators/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Security.SubjectRightsRequests.Item.Collaborators.Item.ServiceProvisioningErrors.Count; +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.SubjectRightsRequests.Item.Collaborators.Item.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \security\subjectRightsRequests\{subjectRightsRequest-id}\collaborators\{user-id}\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/subjectRightsRequests/{subjectRightsRequest%2Did}/collaborators/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/subjectRightsRequests/{subjectRightsRequest%2Did}/collaborators/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/SubjectRightsRequests/Item/Collaborators/Item/UserItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/SubjectRightsRequests/Item/Collaborators/Item/UserItemRequestBuilder.cs index 61466c54619..58fe40befe3 100644 --- a/src/Microsoft.Graph/Generated/Security/SubjectRightsRequests/Item/Collaborators/Item/UserItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/SubjectRightsRequests/Item/Collaborators/Item/UserItemRequestBuilder.cs @@ -2,6 +2,7 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Security.SubjectRightsRequests.Item.Collaborators.Item.MailboxSettings; +using Microsoft.Graph.Security.SubjectRightsRequests.Item.Collaborators.Item.ServiceProvisioningErrors; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -19,6 +20,10 @@ public class UserItemRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new UserItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Shares/Item/CreatedByUser/CreatedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/CreatedByUser/CreatedByUserRequestBuilder.cs index 328a0a9d420..a856d14b11b 100644 --- a/src/Microsoft.Graph/Generated/Shares/Item/CreatedByUser/CreatedByUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Shares/Item/CreatedByUser/CreatedByUserRequestBuilder.cs @@ -2,6 +2,7 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Shares.Item.CreatedByUser.MailboxSettings; +using Microsoft.Graph.Shares.Item.CreatedByUser.ServiceProvisioningErrors; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -19,6 +20,10 @@ public class CreatedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Shares/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..57aebe151cf --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Shares.Item.CreatedByUser.ServiceProvisioningErrors.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}/shares/{sharedDriveItem%2Did}/createdByUser/serviceProvisioningErrors/$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}/shares/{sharedDriveItem%2Did}/createdByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Shares/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..0a5f978b81a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Shares.Item.CreatedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \shares\{sharedDriveItem-id}\createdByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + 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 index 62d5cf153c4..fafd5f1a2c9 100644 --- a/src/Microsoft.Graph/Generated/Shares/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Shares/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs @@ -2,6 +2,7 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Shares.Item.LastModifiedByUser.MailboxSettings; +using Microsoft.Graph.Shares.Item.LastModifiedByUser.ServiceProvisioningErrors; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -19,6 +20,10 @@ public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Shares/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..9ffa6f89af8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Shares.Item.LastModifiedByUser.ServiceProvisioningErrors.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}/shares/{sharedDriveItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$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}/shares/{sharedDriveItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Shares/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..d0f87ca402d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Shares.Item.LastModifiedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \shares\{sharedDriveItem-id}\lastModifiedByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + 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 index 1ecaeae119d..f5e371c6668 100644 --- a/src/Microsoft.Graph/Generated/Shares/Item/List/CreatedByUser/CreatedByUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Shares/Item/List/CreatedByUser/CreatedByUserRequestBuilder.cs @@ -2,6 +2,7 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Shares.Item.List.CreatedByUser.MailboxSettings; +using Microsoft.Graph.Shares.Item.List.CreatedByUser.ServiceProvisioningErrors; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -19,6 +20,10 @@ public class CreatedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Shares/Item/List/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/List/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..c20054ed52c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/List/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Shares.Item.List.CreatedByUser.ServiceProvisioningErrors.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}/shares/{sharedDriveItem%2Did}/list/createdByUser/serviceProvisioningErrors/$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}/shares/{sharedDriveItem%2Did}/list/createdByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Shares/Item/List/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/List/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..5d12f8524ab --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/List/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Shares.Item.List.CreatedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \shares\{sharedDriveItem-id}\list\createdByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + 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 index 01cc55a65f4..0b96b87a64f 100644 --- 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 @@ -2,6 +2,7 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Shares.Item.List.Items.Item.CreatedByUser.MailboxSettings; +using Microsoft.Graph.Shares.Item.List.Items.Item.CreatedByUser.ServiceProvisioningErrors; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -19,6 +20,10 @@ public class CreatedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..021ee6f3736 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Shares.Item.List.Items.Item.CreatedByUser.ServiceProvisioningErrors.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}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors/$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}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Shares/Item/List/Items/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..9e7670e3d26 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Shares.Item.List.Items.Item.CreatedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \shares\{sharedDriveItem-id}\list\items\{listItem-id}\createdByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + 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 index 42ee65eb3de..36d34c8a075 100644 --- 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 @@ -2,6 +2,7 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Shares.Item.List.Items.Item.LastModifiedByUser.MailboxSettings; +using Microsoft.Graph.Shares.Item.List.Items.Item.LastModifiedByUser.ServiceProvisioningErrors; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -19,6 +20,10 @@ public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..c4a2ea73b41 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Shares.Item.List.Items.Item.LastModifiedByUser.ServiceProvisioningErrors.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}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$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}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Shares/Item/List/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..db9cacc9a71 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/List/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Shares.Item.List.Items.Item.LastModifiedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \shares\{sharedDriveItem-id}\list\items\{listItem-id}\lastModifiedByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Shares/Item/List/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/List/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs index b452802ab2f..34449f84c82 100644 --- a/src/Microsoft.Graph/Generated/Shares/Item/List/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Shares/Item/List/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs @@ -2,6 +2,7 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Shares.Item.List.LastModifiedByUser.MailboxSettings; +using Microsoft.Graph.Shares.Item.List.LastModifiedByUser.ServiceProvisioningErrors; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -19,6 +20,10 @@ public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Shares/Item/List/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/List/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..096e70e9b4e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/List/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Shares.Item.List.LastModifiedByUser.ServiceProvisioningErrors.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}/shares/{sharedDriveItem%2Did}/list/lastModifiedByUser/serviceProvisioningErrors/$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}/shares/{sharedDriveItem%2Did}/list/lastModifiedByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Shares/Item/List/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Shares/Item/List/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..698964685ae --- /dev/null +++ b/src/Microsoft.Graph/Generated/Shares/Item/List/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Shares.Item.List.LastModifiedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \shares\{sharedDriveItem-id}\list\lastModifiedByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Sites/Item/CreatedByUser/CreatedByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/CreatedByUser/CreatedByUserRequestBuilder.cs index 917241fbb7f..98c1b95fe03 100644 --- a/src/Microsoft.Graph/Generated/Sites/Item/CreatedByUser/CreatedByUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Sites/Item/CreatedByUser/CreatedByUserRequestBuilder.cs @@ -2,6 +2,7 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Sites.Item.CreatedByUser.MailboxSettings; +using Microsoft.Graph.Sites.Item.CreatedByUser.ServiceProvisioningErrors; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -19,6 +20,10 @@ public class CreatedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Sites/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..02d03522eaf --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Sites.Item.CreatedByUser.ServiceProvisioningErrors.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}/sites/{site%2Did}/createdByUser/serviceProvisioningErrors/$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}/sites/{site%2Did}/createdByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Sites/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..10fd3b37dc0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Sites.Item.CreatedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \sites\{site-id}\createdByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + 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 index 7db1b4634e8..8aa2d38e383 100644 --- a/src/Microsoft.Graph/Generated/Sites/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Sites/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs @@ -2,6 +2,7 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Sites.Item.LastModifiedByUser.MailboxSettings; +using Microsoft.Graph.Sites.Item.LastModifiedByUser.ServiceProvisioningErrors; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -19,6 +20,10 @@ public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Sites/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..c1bfe0b3bde --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Sites.Item.LastModifiedByUser.ServiceProvisioningErrors.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}/sites/{site%2Did}/lastModifiedByUser/serviceProvisioningErrors/$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}/sites/{site%2Did}/lastModifiedByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Sites/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..cf2ae6f8ef0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Sites.Item.LastModifiedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \sites\{site-id}\lastModifiedByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + 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 index aa336f832bd..5d74c63e72d 100644 --- a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/CreatedByUser/CreatedByUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/CreatedByUser/CreatedByUserRequestBuilder.cs @@ -2,6 +2,7 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Sites.Item.Lists.Item.CreatedByUser.MailboxSettings; +using Microsoft.Graph.Sites.Item.Lists.Item.CreatedByUser.ServiceProvisioningErrors; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -19,6 +20,10 @@ public class CreatedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..92c59e842a7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Sites.Item.Lists.Item.CreatedByUser.ServiceProvisioningErrors.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}/sites/{site%2Did}/lists/{list%2Did}/createdByUser/serviceProvisioningErrors/$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}/sites/{site%2Did}/lists/{list%2Did}/createdByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Sites/Item/Lists/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..c5dc67ff2f5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Sites.Item.Lists.Item.CreatedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \sites\{site-id}\lists\{list-id}\createdByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + 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 index 7a66268c80d..49c317802a7 100644 --- 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 @@ -2,6 +2,7 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Sites.Item.Lists.Item.Items.Item.CreatedByUser.MailboxSettings; +using Microsoft.Graph.Sites.Item.Lists.Item.Items.Item.CreatedByUser.ServiceProvisioningErrors; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -19,6 +20,10 @@ public class CreatedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new CreatedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..93a38b45b15 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/CreatedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Sites.Item.Lists.Item.Items.Item.CreatedByUser.ServiceProvisioningErrors.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}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors/$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}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Sites/Item/Lists/Item/Items/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..16a97550c3b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/CreatedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Sites.Item.Lists.Item.Items.Item.CreatedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \sites\{site-id}\lists\{list-id}\items\{listItem-id}\createdByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + 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 index 022d98a6643..d75edb4efad 100644 --- 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 @@ -2,6 +2,7 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Sites.Item.Lists.Item.Items.Item.LastModifiedByUser.MailboxSettings; +using Microsoft.Graph.Sites.Item.Lists.Item.Items.Item.LastModifiedByUser.ServiceProvisioningErrors; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -19,6 +20,10 @@ public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..9069c48c6b5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Sites.Item.Lists.Item.Items.Item.LastModifiedByUser.ServiceProvisioningErrors.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}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$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}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..5ed9a5f3586 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Sites.Item.Lists.Item.Items.Item.LastModifiedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \sites\{site-id}\lists\{list-id}\items\{listItem-id}\lastModifiedByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} 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 index 548e84cab88..e26e08c6b48 100644 --- a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/LastModifiedByUser/LastModifiedByUserRequestBuilder.cs @@ -2,6 +2,7 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Sites.Item.Lists.Item.LastModifiedByUser.MailboxSettings; +using Microsoft.Graph.Sites.Item.Lists.Item.LastModifiedByUser.ServiceProvisioningErrors; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -19,6 +20,10 @@ public class LastModifiedByUserRequestBuilder : BaseRequestBuilder { public MailboxSettingsRequestBuilder MailboxSettings { get => new MailboxSettingsRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..993fd794a0e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/LastModifiedByUser/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Sites.Item.Lists.Item.LastModifiedByUser.ServiceProvisioningErrors.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}/sites/{site%2Did}/lists/{list%2Did}/lastModifiedByUser/serviceProvisioningErrors/$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}/sites/{site%2Did}/lists/{list%2Did}/lastModifiedByUser/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Sites/Item/Lists/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..37aa1b823f5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/LastModifiedByUser/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Sites.Item.Lists.Item.LastModifiedByUser.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \sites\{site-id}\lists\{list-id}\lastModifiedByUser\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + 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 0b73086bae3..5e67a17452e 100644 --- a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/ListItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/ListItemRequestBuilder.cs @@ -88,8 +88,8 @@ public async Task DeleteAsync(Action - /// Get a list of rich long-running operations associated with a list. - /// Find more info here + /// Returns the metadata for a [list][]. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -153,7 +153,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Get a list of rich long-running operations associated with a list. + /// Returns the metadata for a [list][]. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -230,7 +230,7 @@ public ListItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Get a list of rich long-running operations associated with a list. + /// Returns the metadata for a [list][]. /// public class ListItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/SubscribedSkus/SubscribedSkusRequestBuilder.cs b/src/Microsoft.Graph/Generated/SubscribedSkus/SubscribedSkusRequestBuilder.cs index 8a2f8ae38a7..25993851db4 100644 --- a/src/Microsoft.Graph/Generated/SubscribedSkus/SubscribedSkusRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/SubscribedSkus/SubscribedSkusRequestBuilder.cs @@ -37,7 +37,7 @@ public SubscribedSkusRequestBuilder(Dictionary pathParameters, I public SubscribedSkusRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/subscribedSkus{?%24search,%24orderby,%24select}", rawUrl) { } /// - /// Get the list of commercial subscriptions that an organization has acquired. For the mapping of license names as displayed on the Azure portal or the Microsoft 365 admin center against their Microsoft Graph skuId and skuPartNumber properties, see Product names and service plan identifiers for licensing. + /// Get the list of commercial subscriptions that an organization has acquired. For the mapping of license names as displayed on the Microsoft Entra admin center or the Microsoft 365 admin center against their Microsoft Graph skuId and skuPartNumber properties, see Product names and service plan identifiers for licensing. /// Find more info here /// /// Cancellation token to use when cancelling requests @@ -78,7 +78,7 @@ public async Task PostAsync(SubscribedSku body, Action(requestInfo, SubscribedSku.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Get the list of commercial subscriptions that an organization has acquired. For the mapping of license names as displayed on the Azure portal or the Microsoft 365 admin center against their Microsoft Graph skuId and skuPartNumber properties, see Product names and service plan identifiers for licensing. + /// Get the list of commercial subscriptions that an organization has acquired. For the mapping of license names as displayed on the Microsoft Entra admin center or the Microsoft 365 admin center against their Microsoft Graph skuId and skuPartNumber properties, see Product names and service plan identifiers for licensing. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -139,7 +139,7 @@ public SubscribedSkusRequestBuilder WithUrl(string rawUrl) { return new SubscribedSkusRequestBuilder(rawUrl, RequestAdapter); } /// - /// Get the list of commercial subscriptions that an organization has acquired. For the mapping of license names as displayed on the Azure portal or the Microsoft 365 admin center against their Microsoft Graph skuId and skuPartNumber properties, see Product names and service plan identifiers for licensing. + /// Get the list of commercial subscriptions that an organization has acquired. For the mapping of license names as displayed on the Microsoft Entra admin center or the Microsoft 365 admin center against their Microsoft Graph skuId and skuPartNumber properties, see Product names and service plan identifiers for licensing. /// public class SubscribedSkusRequestBuilderGetQueryParameters { /// Order items by property values diff --git a/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Members/Item/ConversationMemberItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Members/Item/ConversationMemberItemRequestBuilder.cs index d01e7e139db..bbef5782c82 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Members/Item/ConversationMemberItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Members/Item/ConversationMemberItemRequestBuilder.cs @@ -69,8 +69,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMember.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the role of a conversationMember in a team or channel. - /// Find more info here + /// Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -141,7 +141,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the role of a conversationMember in a team or channel. + /// Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Members/MembersRequestBuilder.cs index 7a3baad1f02..815739b04f1 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Members/MembersRequestBuilder.cs @@ -67,8 +67,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMemberCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Add a conversationMember to a channel. - /// Find more info here + /// Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Add a conversationMember to a channel. + /// Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs index b4375cc973b..876f6200560 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs @@ -67,8 +67,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Send a new chatMessage in the specified channel. - /// Find more info here + /// Send a new chatMessage in the specified channel or a chat. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel. + /// Send a new chatMessage in the specified channel or a chat. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teams/Item/Group/GroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/Group/GroupRequestBuilder.cs index 0a0a7bb2035..fdd302c3593 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/Group/GroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/Group/GroupRequestBuilder.cs @@ -1,6 +1,7 @@ // using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; +using Microsoft.Graph.Teams.Item.Group.ServiceProvisioningErrors; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Teams.Item.Group { /// Provides operations to manage the group property of the microsoft.graph.team entity. /// public class GroupRequestBuilder : BaseRequestBuilder { + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GroupRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Teams/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..92b8124e245 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Teams/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Teams.Item.Group.ServiceProvisioningErrors.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}/teams/{team%2Did}/group/serviceProvisioningErrors/$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}/teams/{team%2Did}/group/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Teams/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..917b359a7ed --- /dev/null +++ b/src/Microsoft.Graph/Generated/Teams/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Teams.Item.Group.ServiceProvisioningErrors.Count; +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.Group.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \teams\{team-id}\group\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Members/Item/ConversationMemberItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Members/Item/ConversationMemberItemRequestBuilder.cs index 7f8f521cd1e..3da80d5b005 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Members/Item/ConversationMemberItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Members/Item/ConversationMemberItemRequestBuilder.cs @@ -69,8 +69,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMember.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the role of a conversationMember in a team or channel. - /// Find more info here + /// Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -141,7 +141,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the role of a conversationMember in a team or channel. + /// Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Members/MembersRequestBuilder.cs index a769caa4906..6c8e9743846 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Members/MembersRequestBuilder.cs @@ -67,8 +67,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMemberCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Add a conversationMember to a channel. - /// Find more info here + /// Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Add a conversationMember to a channel. + /// Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs index 6eadd2d244c..03577cc75df 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs @@ -67,8 +67,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Send a new chatMessage in the specified channel. - /// Find more info here + /// Send a new chatMessage in the specified channel or a chat. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel. + /// Send a new chatMessage in the specified channel or a chat. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Members/Item/ConversationMemberItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Members/Item/ConversationMemberItemRequestBuilder.cs index d4536b0835d..b1d33d50963 100644 --- a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Members/Item/ConversationMemberItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Members/Item/ConversationMemberItemRequestBuilder.cs @@ -69,8 +69,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMember.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the role of a conversationMember in a team or channel. - /// Find more info here + /// Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -141,7 +141,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the role of a conversationMember in a team or channel. + /// Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Members/MembersRequestBuilder.cs index 9e254a5421a..ace36e78afa 100644 --- a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Members/MembersRequestBuilder.cs @@ -67,8 +67,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMemberCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Add a conversationMember to a channel. - /// Find more info here + /// Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Add a conversationMember to a channel. + /// Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs index a7a02fe1ab4..e847e681f3b 100644 --- a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs @@ -67,8 +67,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Send a new chatMessage in the specified channel. - /// Find more info here + /// Send a new chatMessage in the specified channel or a chat. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel. + /// Send a new chatMessage in the specified channel or a chat. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Members/Item/ConversationMemberItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Members/Item/ConversationMemberItemRequestBuilder.cs index f90292dd2b1..8c8a023ef58 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Members/Item/ConversationMemberItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Members/Item/ConversationMemberItemRequestBuilder.cs @@ -69,8 +69,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMember.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the role of a conversationMember in a team or channel. - /// Find more info here + /// Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -141,7 +141,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the role of a conversationMember in a team or channel. + /// Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Members/MembersRequestBuilder.cs index 71cb6440f89..d8a73b221db 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Members/MembersRequestBuilder.cs @@ -67,8 +67,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMemberCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Add a conversationMember to a channel. - /// Find more info here + /// Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Add a conversationMember to a channel. + /// Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs index 35915bdcadc..9af38519c0d 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs @@ -67,8 +67,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Send a new chatMessage in the specified channel. - /// Find more info here + /// Send a new chatMessage in the specified channel or a chat. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel. + /// Send a new chatMessage in the specified channel or a chat. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Group/GroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Group/GroupRequestBuilder.cs index 8cfcd4525ee..a5fe3afabbd 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Group/GroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Group/GroupRequestBuilder.cs @@ -1,6 +1,7 @@ // using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; +using Microsoft.Graph.Users.Item.JoinedTeams.Item.Group.ServiceProvisioningErrors; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Users.Item.JoinedTeams.Item.Group { /// Provides operations to manage the group property of the microsoft.graph.team entity. /// public class GroupRequestBuilder : BaseRequestBuilder { + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new GroupRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..695f3df3367 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Group/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Users.Item.JoinedTeams.Item.Group.ServiceProvisioningErrors.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}/users/{user%2Did}/joinedTeams/{team%2Did}/group/serviceProvisioningErrors/$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}/users/{user%2Did}/joinedTeams/{team%2Did}/group/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Users/Item/JoinedTeams/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..a978d955881 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Group/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Users.Item.JoinedTeams.Item.Group.ServiceProvisioningErrors.Count; +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.Group.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \users\{user-id}\joinedTeams\{team-id}\group\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Members/Item/ConversationMemberItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Members/Item/ConversationMemberItemRequestBuilder.cs index a14b302c80c..1cc31e53e55 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Members/Item/ConversationMemberItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Members/Item/ConversationMemberItemRequestBuilder.cs @@ -69,8 +69,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMember.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the role of a conversationMember in a team or channel. - /// Find more info here + /// Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -141,7 +141,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the role of a conversationMember in a team or channel. + /// Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Members/MembersRequestBuilder.cs index 48ba55eb335..3b5a235feb8 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Members/MembersRequestBuilder.cs @@ -67,8 +67,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMemberCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Add a conversationMember to a channel. - /// Find more info here + /// Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Add a conversationMember to a channel. + /// Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs index 3b1bfbac32c..fc1d1a1b9e3 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs @@ -67,8 +67,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Send a new chatMessage in the specified channel. - /// Find more info here + /// Send a new chatMessage in the specified channel or a chat. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel. + /// Send a new chatMessage in the specified channel or a chat. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs index 317cc474252..a1aaf8b21b8 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs @@ -67,8 +67,8 @@ public async Task GetAsync(Action(requestInfo, AttachmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or you canadd an attachment to a message that is being created and sent on the fly. This operation limits the size of the attachment you can add to under 3 MB. - /// Find more info here + /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or you canadd an attachment to a message that is being created and sent on the fly. This operation limits the size of the attachment you can add to under 3 MB. + /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs index f43ec569458..383a7451e75 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs @@ -67,8 +67,8 @@ public async Task GetAsync(Action(requestInfo, AttachmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or you canadd an attachment to a message that is being created and sent on the fly. This operation limits the size of the attachment you can add to under 3 MB. - /// Find more info here + /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or you canadd an attachment to a message that is being created and sent on the fly. This operation limits the size of the attachment you can add to under 3 MB. + /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs index 48667fee716..ad3171982db 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs @@ -67,8 +67,8 @@ public async Task GetAsync(Action(requestInfo, AttachmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or you canadd an attachment to a message that is being created and sent on the fly. This operation limits the size of the attachment you can add to under 3 MB. - /// Find more info here + /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or you canadd an attachment to a message that is being created and sent on the fly. This operation limits the size of the attachment you can add to under 3 MB. + /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/MessageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/MessageItemRequestBuilder.cs index 5e7ebead962..4f4ede9bb10 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/MessageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/MessageItemRequestBuilder.cs @@ -89,8 +89,8 @@ public MessageItemRequestBuilder(Dictionary pathParameters, IReq public MessageItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/messages/{message%2Did}{?includeHiddenMessages*,%24select,%24expand}", rawUrl) { } /// - /// Delete eventMessage. - /// Find more info here + /// Delete a message in the specified user's mailbox, or delete a relationship of the message. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -129,8 +129,8 @@ public async Task DeleteAsync(Action(requestInfo, Microsoft.Graph.Models.Message.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the properties of a message object. - /// Find more info here + /// Update the properties of an eventMessage object. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -151,7 +151,7 @@ public async Task DeleteAsync(Action(requestInfo, Microsoft.Graph.Models.Message.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Delete eventMessage. + /// Delete a message in the specified user's mailbox, or delete a relationship of the message. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -201,7 +201,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the properties of a message object. + /// Update the properties of an eventMessage object. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/Value/ContentRequestBuilder.cs index f39225de88e..5d1950382a2 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/Value/ContentRequestBuilder.cs @@ -29,7 +29,7 @@ public ContentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba } /// /// Get media content for the navigation property messages from users - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Messages/MessagesRequestBuilder.cs index fe1db6f93f0..cdde2c80d66 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Messages/MessagesRequestBuilder.cs @@ -48,7 +48,7 @@ public MessagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b } /// /// The messages in a mailbox or folder. Read-only. Nullable. - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/Outlook/MasterCategories/Item/OutlookCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Outlook/MasterCategories/Item/OutlookCategoryItemRequestBuilder.cs index 6c6dad738f9..909cf6f9a88 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Outlook/MasterCategories/Item/OutlookCategoryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Outlook/MasterCategories/Item/OutlookCategoryItemRequestBuilder.cs @@ -69,7 +69,7 @@ public async Task GetAsync(Action(requestInfo, OutlookCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the writable property, color, of the specified outlookCategory object. You cannot modify the displayName propertyonce you have created the category. + /// Update the writable property, color, of the specified outlookCategory object. You can't modify the displayName propertyonce you have created the category. /// Find more info here /// /// The request body @@ -141,7 +141,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the writable property, color, of the specified outlookCategory object. You cannot modify the displayName propertyonce you have created the category. + /// Update the writable property, color, of the specified outlookCategory object. You can't modify the displayName propertyonce you have created the category. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/RegisteredDevices/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/RegisteredDevices/Item/DirectoryObjectItemRequestBuilder.cs index 344e07f415a..af81352db1a 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/RegisteredDevices/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/RegisteredDevices/Item/DirectoryObjectItemRequestBuilder.cs @@ -44,7 +44,7 @@ public DirectoryObjectItemRequestBuilder(Dictionary pathParamete public DirectoryObjectItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/registeredDevices/{directoryObject%2Did}{?%24select,%24expand}", rawUrl) { } /// - /// Devices that are registered for the user. Read-only. Nullable. Supports $expand. + /// Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -63,7 +63,7 @@ public async Task GetAsync(Action(requestInfo, DirectoryObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Devices that are registered for the user. Read-only. Nullable. Supports $expand. + /// Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. /// /// 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 DirectoryObjectItemRequestBuilder WithUrl(string rawUrl) { return new DirectoryObjectItemRequestBuilder(rawUrl, RequestAdapter); } /// - /// Devices that are registered for the user. Read-only. Nullable. Supports $expand. + /// Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. /// public class DirectoryObjectItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Users/Item/RegisteredDevices/RegisteredDevicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/RegisteredDevices/RegisteredDevicesRequestBuilder.cs index 7b084293643..44e15ac4991 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/RegisteredDevices/RegisteredDevicesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/RegisteredDevices/RegisteredDevicesRequestBuilder.cs @@ -57,7 +57,7 @@ public RegisteredDevicesRequestBuilder(Dictionary pathParameters public RegisteredDevicesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/registeredDevices{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// Devices that are registered for the user. Read-only. Nullable. Supports $expand. + /// Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. /// Find more info here /// /// Cancellation token to use when cancelling requests @@ -77,7 +77,7 @@ public async Task GetAsync(Action(requestInfo, DirectoryObjectCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Devices that are registered for the user. Read-only. Nullable. Supports $expand. + /// Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -110,7 +110,7 @@ public RegisteredDevicesRequestBuilder WithUrl(string rawUrl) { return new RegisteredDevicesRequestBuilder(rawUrl, RequestAdapter); } /// - /// Devices that are registered for the user. Read-only. Nullable. Supports $expand. + /// Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. /// public class RegisteredDevicesRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Users/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..83b4e0273b9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/ServiceProvisioningErrors/Count/CountRequestBuilder.cs @@ -0,0 +1,126 @@ +// +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.Users.Item.ServiceProvisioningErrors.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}/users/{user%2Did}/serviceProvisioningErrors/$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}/users/{user%2Did}/serviceProvisioningErrors/$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).ConfigureAwait(false); + } + /// + /// 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; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder WithUrl(string rawUrl) { + return new CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/Users/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs new file mode 100644 index 00000000000..69c1acdf6ce --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Users.Item.ServiceProvisioningErrors.Count; +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.ServiceProvisioningErrors { + /// + /// Builds and executes requests for operations under \users\{user-id}\serviceProvisioningErrors + /// + public class ServiceProvisioningErrorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ServiceProvisioningErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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, ServiceProvisioningErrorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get serviceProvisioningErrors property value + /// + /// Configuration 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// The raw URL to use for the request builder. + public ServiceProvisioningErrorsRequestBuilder WithUrl(string rawUrl) { + return new ServiceProvisioningErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get serviceProvisioningErrors property value + /// + public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { + /// 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 ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ServiceProvisioningErrorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ServiceProvisioningErrorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new serviceProvisioningErrorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/UserItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/UserItemRequestBuilder.cs index 4659f1ae1e8..dab1ca55e7a 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/UserItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/UserItemRequestBuilder.cs @@ -66,6 +66,7 @@ using Microsoft.Graph.Users.Item.RevokeSignInSessions; using Microsoft.Graph.Users.Item.ScopedRoleMemberOf; using Microsoft.Graph.Users.Item.SendMail; +using Microsoft.Graph.Users.Item.ServiceProvisioningErrors; using Microsoft.Graph.Users.Item.Settings; using Microsoft.Graph.Users.Item.Teamwork; using Microsoft.Graph.Users.Item.Todo; @@ -337,6 +338,10 @@ public class UserItemRequestBuilder : BaseRequestBuilder { public SendMailRequestBuilder SendMail { get => new SendMailRequestBuilder(PathParameters, RequestAdapter); } + /// The serviceProvisioningErrors property + public ServiceProvisioningErrorsRequestBuilder ServiceProvisioningErrors { get => + new ServiceProvisioningErrorsRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the settings property of the microsoft.graph.user entity. public SettingsRequestBuilder Settings { get => new SettingsRequestBuilder(PathParameters, RequestAdapter); @@ -376,8 +381,8 @@ public UserItemRequestBuilder(Dictionary pathParameters, IReques public UserItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}{?%24select,%24expand}", rawUrl) { } /// - /// Deletes a user. - /// Find more info here + /// Delete user. When deleted, user resources are moved to a temporary container and can be restored within 30 days. After that time, they are permanently deleted. To learn more, see deletedItems. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -406,8 +411,8 @@ public ExportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder ExportDevic return new ExportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder(PathParameters, RequestAdapter, skip, top); } /// - /// Retrieve the properties and relationships of user object. - /// Find more info here + /// Read properties and relationships of the user object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -458,7 +463,7 @@ public ReminderViewWithStartDateTimeWithEndDateTimeRequestBuilder ReminderViewWi return new ReminderViewWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// - /// Deletes a user. + /// Delete user. When deleted, user resources are moved to a temporary container and can be restored within 30 days. After that time, they are permanently deleted. To learn more, see deletedItems. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -482,7 +487,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Retrieve the properties and relationships of user object. + /// Read properties and relationships of the user object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -559,7 +564,7 @@ public UserItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Retrieve the properties and relationships of user object. + /// Read properties and relationships of the user object. /// public class UserItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Users/UsersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/UsersRequestBuilder.cs index d9e03b04697..2b8563bcecd 100644 --- a/src/Microsoft.Graph/Generated/Users/UsersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/UsersRequestBuilder.cs @@ -62,8 +62,8 @@ public UsersRequestBuilder(Dictionary pathParameters, IRequestAd public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users{?%24top,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// Retrieve a list of user objects. - /// Find more info here + /// List properties and relationships of the user objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -82,8 +82,8 @@ public async Task GetAsync(Action(requestInfo, UserCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Create a new user.The request body contains the user to create. At a minimum, you must specify the required properties for the user. You can optionally specify any other writable properties. - /// Find more info here + /// Create a new user object. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -104,7 +104,7 @@ public async Task GetAsync(Action(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve a list of user objects. + /// List properties and relationships of the user objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -130,7 +130,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new user.The request body contains the user to create. At a minimum, you must specify the required properties for the user. You can optionally specify any other writable properties. + /// Create a new user object. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. @@ -165,7 +165,7 @@ public UsersRequestBuilder WithUrl(string rawUrl) { return new UsersRequestBuilder(rawUrl, RequestAdapter); } /// - /// Retrieve a list of user objects. + /// List properties and relationships of the user objects. /// public class UsersRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/kiota-lock.json b/src/Microsoft.Graph/Generated/kiota-lock.json index 40c07e4826c..35804fa79c4 100644 --- a/src/Microsoft.Graph/Generated/kiota-lock.json +++ b/src/Microsoft.Graph/Generated/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "B1FAB0B1196D62E40988BB0FF390FCC63760941731E6B1FBE61CC79525D05B947BBCE4EEF2413BE999BFBD094F04E3329406ED49061CD609231079D0EA158EA4", + "descriptionHash": "6912B7BC44681E4EEAD9B7F6821CE572E00BB2A4E728526CF5C04C6A8835A858DF59219E0A9D7A5CF7229688398E39A11B4BC3E6CB854D6E5696330409C7CFF4", "descriptionLocation": "/mnt/vss/_work/1/s/msgraph-metadata/clean_v10_openapi/openapi.yaml", "lockFileVersion": "1.0.0", "kiotaVersion": "1.7.0",