diff --git a/CHANGELOG.md b/CHANGELOG.md index ec3e87c6b55..72f25122a07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project does adheres to [Semantic Versioning](https://semver.org/spec/v ## [Unreleased] +## [5.17.0] - 2023-07-05 + +- Fixes missing odata cast path for `roomList` in places API. +- Latest metadata updates from 4th July 2023. + ## [5.16.0] - 2023-06-27 - Fixes missing `Model` query parameter for Channels.GetAllMessages (https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/1979) diff --git a/src/Microsoft.Graph/Generated/Chats/Item/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs b/src/Microsoft.Graph/Generated/Chats/Item/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs new file mode 100644 index 00000000000..407691c9f74 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Chats/Item/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs @@ -0,0 +1,64 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Chats.Item.InstalledApps.Item.Upgrade { + public class UpgradePostRequestBody : 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 consentedPermissionSet property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public TeamsAppPermissionSet? ConsentedPermissionSet { + get { return BackingStore?.Get("consentedPermissionSet"); } + set { BackingStore?.Set("consentedPermissionSet", value); } + } +#nullable restore +#else + public TeamsAppPermissionSet ConsentedPermissionSet { + get { return BackingStore?.Get("consentedPermissionSet"); } + set { BackingStore?.Set("consentedPermissionSet", value); } + } +#endif + /// + /// Instantiates a new upgradePostRequestBody and sets the default values. + /// + public UpgradePostRequestBody() { + 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 UpgradePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UpgradePostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"consentedPermissionSet", n => { ConsentedPermissionSet = n.GetObjectValue(TeamsAppPermissionSet.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("consentedPermissionSet", ConsentedPermissionSet); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Chats/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs index 1557cc4715e..404d95f31f1 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs @@ -30,16 +30,18 @@ public UpgradeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Upgrade an app installation within a chat. /// 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(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(UpgradePostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(UpgradePostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - var requestInfo = ToPostRequestInformation(requestConfiguration); + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { {"4XX", ODataError.CreateFromDiscriminatorValue}, {"5XX", ODataError.CreateFromDiscriminatorValue}, @@ -49,19 +51,22 @@ public async Task PostAsync(Action /// Upgrade an app installation within a chat. /// + /// 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(Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(UpgradePostRequestBody body, Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(UpgradePostRequestBody 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 UpgradeRequestBuilderPostRequestConfiguration(); requestConfiguration.Invoke(requestConfig); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Members/Item/ConversationMemberItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Members/Item/ConversationMemberItemRequestBuilder.cs index 62ed3992c86..6fc7c92d902 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Members/Item/ConversationMemberItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Members/Item/ConversationMemberItemRequestBuilder.cs @@ -48,8 +48,8 @@ public async Task DeleteAsync(Action - /// Retrieve a conversationMember from a chat. - /// Find more info here + /// Retrieve a conversationMember from a chat or channel. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -113,7 +113,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Retrieve a conversationMember from a chat. + /// Retrieve a conversationMember from a chat or channel. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -183,7 +183,7 @@ public ConversationMemberItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Retrieve a conversationMember from a chat. + /// Retrieve a conversationMember from a chat or channel. /// public class ConversationMemberItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index 7a42f5bd1c2..2a100a57b67 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Send a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new reply to a chatMessage in a specified channel. + /// Send a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/MessagesRequestBuilder.cs index 0bb1445adca..ebb8e2f76bf 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/MessagesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Invite/InviteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Invite/InviteRequestBuilder.cs index 0e35b3e8091..d76918f2c7f 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Invite/InviteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Invite/InviteRequestBuilder.cs @@ -28,8 +28,8 @@ public InviteRequestBuilder(Dictionary pathParameters, IRequestA public InviteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/communications/calls/{call%2Did}/participants/invite", rawUrl) { } /// - /// Invite participants to the active call. For more information about how to handle operations, see commsOperation. - /// Find more info here + /// Delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -50,7 +50,7 @@ public async Task PostAsync(InvitePostRequestBody b return await RequestAdapter.SendAsync(requestInfo, InviteParticipantsOperation.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Invite participants to the active call. For more information about how to handle operations, see commsOperation. + /// Delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementRequestBuilder.cs index 9e3954c1c52..754dcac8b60 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementRequestBuilder.cs @@ -104,7 +104,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. @@ -124,7 +124,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/ManagedAppPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/Item/ManagedAppPolicyItemRequestBuilder.cs index 8092b8c23a2..ac99544798c 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/Item/ManagedAppPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/Item/ManagedAppPolicyItemRequestBuilder.cs @@ -52,8 +52,8 @@ public async Task DeleteAsync(Action - /// Read properties and relationships of the managedAppProtection object. - /// Find more info here + /// Read properties and relationships of the windowsInformationProtection object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -117,7 +117,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Read properties and relationships of the managedAppProtection object. + /// Read properties and relationships of the windowsInformationProtection object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -187,7 +187,7 @@ public ManagedAppPolicyItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Read properties and relationships of the managedAppProtection object. + /// Read properties and relationships of the windowsInformationProtection object. /// public class ManagedAppPolicyItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/ManagedAppPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/ManagedAppPoliciesRequestBuilder.cs index 2665d1f34ca..2ccc8b64879 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/ManagedAppPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/ManagedAppPoliciesRequestBuilder.cs @@ -40,8 +40,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 targetedManagedAppProtection objects. - /// Find more info here + /// List properties and relationships of the managedAppConfiguration objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -81,7 +81,7 @@ public async Task PostAsync(ManagedAppPolicy body, Action(requestInfo, ManagedAppPolicy.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// List properties and relationships of the targetedManagedAppProtection objects. + /// List properties and relationships of the managedAppConfiguration objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(ManagedAppPolicy body, Action return requestInfo; } /// - /// List properties and relationships of the targetedManagedAppProtection objects. + /// List properties and relationships of the managedAppConfiguration objects. /// public class ManagedAppPoliciesRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/ManagedAppRegistrationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/ManagedAppRegistrationItemRequestBuilder.cs index f8a60f4ea79..421c5a33f69 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/ManagedAppRegistrationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/ManagedAppRegistrationItemRequestBuilder.cs @@ -62,8 +62,8 @@ public async Task DeleteAsync(Action - /// Read properties and relationships of the managedAppRegistration object. - /// Find more info here + /// Read properties and relationships of the iosManagedAppRegistration object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -127,7 +127,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Read properties and relationships of the managedAppRegistration object. + /// Read properties and relationships of the iosManagedAppRegistration object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -197,7 +197,7 @@ public ManagedAppRegistrationItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Read properties and relationships of the managedAppRegistration object. + /// Read properties and relationships of the iosManagedAppRegistration object. /// public class ManagedAppRegistrationItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/ManagedAppRegistrationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/ManagedAppRegistrationsRequestBuilder.cs index 4d3c2b578cc..8735492ec38 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/ManagedAppRegistrationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/ManagedAppRegistrationsRequestBuilder.cs @@ -45,8 +45,8 @@ public ManagedAppRegistrationsRequestBuilder(Dictionary pathPara public ManagedAppRegistrationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// List properties and relationships of the androidManagedAppRegistration objects. - /// Find more info here + /// List properties and relationships of the managedAppRegistration objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -87,7 +87,7 @@ public async Task PostAsync(ManagedAppRegistration body, return await RequestAdapter.SendAsync(requestInfo, ManagedAppRegistration.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// List properties and relationships of the androidManagedAppRegistration objects. + /// List properties and relationships of the managedAppRegistration objects. /// /// 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 ToPostRequestInformation(ManagedAppRegistration body, return requestInfo; } /// - /// List properties and relationships of the androidManagedAppRegistration objects. + /// List properties and relationships of the managedAppRegistration objects. /// public class ManagedAppRegistrationsRequestBuilderGetQueryParameters { /// Include count of items 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 ca9b4602ede..33fec5dc429 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 @@ -48,8 +48,8 @@ public async Task DeleteAsync(Action - /// Read properties and relationships of the managedEBookAssignment object. - /// Find more info here + /// Read properties and relationships of the iosVppEBookAssignment object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -114,7 +114,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Read properties and relationships of the managedEBookAssignment object. + /// Read properties and relationships of the iosVppEBookAssignment object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -184,7 +184,7 @@ public ManagedEBookAssignmentItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Read properties and relationships of the managedEBookAssignment object. + /// Read properties and relationships of the iosVppEBookAssignment object. /// public class ManagedEBookAssignmentItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/MobileAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/MobileAppItemRequestBuilder.cs index 97c7a2c5d24..d378393f788 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/MobileAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/MobileAppItemRequestBuilder.cs @@ -53,8 +53,8 @@ public MobileAppItemRequestBuilder(Dictionary pathParameters, IR public MobileAppItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}{?%24select,%24expand}", rawUrl) { } /// - /// Deletes a iosStoreApp. - /// Find more info here + /// Deletes a macOSLobApp. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -73,8 +73,8 @@ public async Task DeleteAsync(Action - /// Read properties and relationships of the windowsWebApp object. - /// Find more info here + /// Read properties and relationships of the managedIOSLobApp object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -93,8 +93,8 @@ public async Task GetAsync(Action(requestInfo, MobileApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Update the properties of a windowsMicrosoftEdgeApp object. - /// Find more info here + /// Update the properties of a androidStoreApp object. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +115,7 @@ public async Task PatchAsync(MobileApp body, Action(requestInfo, MobileApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Deletes a iosStoreApp. + /// Deletes a macOSLobApp. /// /// 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 RequestInformation ToDeleteRequestInformation(Action - /// Read properties and relationships of the windowsWebApp object. + /// Read properties and relationships of the managedIOSLobApp object. /// /// 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 RequestInformation ToGetRequestInformation(Action - /// Update the properties of a windowsMicrosoftEdgeApp object. + /// Update the properties of a androidStoreApp object. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. @@ -209,7 +209,7 @@ public MobileAppItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Read properties and relationships of the windowsWebApp object. + /// Read properties and relationships of the managedIOSLobApp 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 174307ad040..cceaa91e837 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/MobileAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/MobileAppsRequestBuilder.cs @@ -50,8 +50,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 iosVppApp objects. - /// Find more info here + /// List properties and relationships of the windowsMobileMSI objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -92,7 +92,7 @@ public async Task PostAsync(MobileApp body, Action(requestInfo, MobileApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// List properties and relationships of the iosVppApp objects. + /// List properties and relationships of the windowsMobileMSI objects. /// /// 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 ToPostRequestInformation(MobileApp body, Action - /// List properties and relationships of the iosVppApp objects. + /// List properties and relationships of the windowsMobileMSI 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 5ba8212bd75..04256084466 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/DeviceCompliancePoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/DeviceCompliancePoliciesRequestBuilder.cs @@ -40,8 +40,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 androidCompliancePolicy objects. - /// Find more info here + /// List properties and relationships of the windows10MobileCompliancePolicy objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -60,8 +60,8 @@ public async Task GetAsync(Action(requestInfo, DeviceCompliancePolicyCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new windows10CompliancePolicy object. - /// Find more info here + /// Create a new iosCompliancePolicy object. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -82,7 +82,7 @@ public async Task PostAsync(DeviceCompliancePolicy body, return await RequestAdapter.SendAsync(requestInfo, DeviceCompliancePolicy.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// List properties and relationships of the androidCompliancePolicy objects. + /// List properties and relationships of the windows10MobileCompliancePolicy objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -108,7 +108,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new windows10CompliancePolicy object. + /// Create a new iosCompliancePolicy object. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(DeviceCompliancePolicy body, return requestInfo; } /// - /// List properties and relationships of the androidCompliancePolicy objects. + /// List properties and relationships of the windows10MobileCompliancePolicy 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 766319c2daa..3b352a85572 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceCompliancePolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceCompliancePolicyItemRequestBuilder.cs @@ -73,8 +73,8 @@ public DeviceCompliancePolicyItemRequestBuilder(Dictionary pathP public DeviceCompliancePolicyItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}{?%24select,%24expand}", rawUrl) { } /// - /// Deletes a windowsPhone81CompliancePolicy. - /// 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. @@ -93,8 +93,8 @@ public async Task DeleteAsync(Action - /// Read properties and relationships of the windows10CompliancePolicy object. - /// Find more info here + /// Read properties and relationships of the androidCompliancePolicy 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 async Task GetAsync(Action(requestInfo, DeviceCompliancePolicy.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Update the properties of a macOSCompliancePolicy object. - /// Find more info here + /// Update the properties of a windows10CompliancePolicy object. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -135,7 +135,7 @@ public async Task PatchAsync(DeviceCompliancePolicy body return await RequestAdapter.SendAsync(requestInfo, DeviceCompliancePolicy.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Deletes a windowsPhone81CompliancePolicy. + /// Deletes a windows81CompliancePolicy. /// /// 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 windows10CompliancePolicy object. + /// Read properties and relationships of the androidCompliancePolicy 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 macOSCompliancePolicy object. + /// Update the properties of a windows10CompliancePolicy object. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. @@ -229,7 +229,7 @@ public DeviceCompliancePolicyItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Read properties and relationships of the windows10CompliancePolicy object. + /// Read properties and relationships of the androidCompliancePolicy 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 5b96b8a5216..c42f002a6c5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/DeviceConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/DeviceConfigurationsRequestBuilder.cs @@ -40,8 +40,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 androidGeneralDeviceConfiguration objects. - /// Find more info here + /// List properties and relationships of the sharedPCConfiguration objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -60,8 +60,8 @@ public async Task GetAsync(Action(requestInfo, DeviceConfigurationCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new windows81GeneralConfiguration object. - /// Find more info here + /// Create a new iosDeviceFeaturesConfiguration object. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -82,7 +82,7 @@ public async Task PostAsync(DeviceConfiguration body, Actio return await RequestAdapter.SendAsync(requestInfo, DeviceConfiguration.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// List properties and relationships of the androidGeneralDeviceConfiguration objects. + /// List properties and relationships of the sharedPCConfiguration objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -108,7 +108,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new windows81GeneralConfiguration object. + /// Create a new iosDeviceFeaturesConfiguration object. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(DeviceConfiguration body, Act return requestInfo; } /// - /// List properties and relationships of the androidGeneralDeviceConfiguration objects. + /// List properties and relationships of the sharedPCConfiguration 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 822111c52a7..38159b4f418 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceConfigurationItemRequestBuilder.cs @@ -64,8 +64,8 @@ public DeviceConfigurationItemRequestBuilder(Dictionary pathPara public DeviceConfigurationItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}{?%24select,%24expand}", rawUrl) { } /// - /// Deletes a androidWorkProfileGeneralDeviceConfiguration. - /// Find more info here + /// Deletes a editionUpgradeConfiguration. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -84,8 +84,8 @@ public async Task DeleteAsync(Action - /// Read properties and relationships of the sharedPCConfiguration object. - /// Find more info here + /// Read properties and relationships of the androidGeneralDeviceConfiguration object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -112,8 +112,8 @@ public GetOmaSettingPlainTextValueWithSecretReferenceValueIdRequestBuilder GetOm return new GetOmaSettingPlainTextValueWithSecretReferenceValueIdRequestBuilder(PathParameters, RequestAdapter, secretReferenceValueId); } /// - /// Update the properties of a androidCustomConfiguration object. - /// Find more info here + /// Update the properties of a sharedPCConfiguration object. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -134,7 +134,7 @@ public async Task PatchAsync(DeviceConfiguration body, Acti return await RequestAdapter.SendAsync(requestInfo, DeviceConfiguration.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Deletes a androidWorkProfileGeneralDeviceConfiguration. + /// Deletes a editionUpgradeConfiguration. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -158,7 +158,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Read properties and relationships of the sharedPCConfiguration object. + /// Read properties and relationships of the androidGeneralDeviceConfiguration object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -184,7 +184,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the properties of a androidCustomConfiguration object. + /// Update the properties of a sharedPCConfiguration object. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. @@ -228,7 +228,7 @@ public DeviceConfigurationItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Read properties and relationships of the sharedPCConfiguration object. + /// Read properties and relationships of the androidGeneralDeviceConfiguration 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 26575e857cc..bd7d950a8b1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/DeviceEnrollmentConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/DeviceEnrollmentConfigurationsRequestBuilder.cs @@ -40,8 +40,8 @@ public DeviceEnrollmentConfigurationsRequestBuilder(Dictionary p public DeviceEnrollmentConfigurationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/deviceEnrollmentConfigurations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// List properties and relationships of the deviceEnrollmentLimitConfiguration objects. - /// Find more info here + /// List properties and relationships of the deviceEnrollmentConfiguration objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -60,8 +60,8 @@ public async Task GetAsync(Acti return await RequestAdapter.SendAsync(requestInfo, DeviceEnrollmentConfigurationCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// 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 @@ -82,7 +82,7 @@ public async Task PostAsync(DeviceEnrollmentConfi return await RequestAdapter.SendAsync(requestInfo, DeviceEnrollmentConfiguration.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// List properties and relationships of the deviceEnrollmentLimitConfiguration objects. + /// List properties and relationships of the deviceEnrollmentConfiguration objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -108,7 +108,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. @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(DeviceEnrollmentConfiguration return requestInfo; } /// - /// List properties and relationships of the deviceEnrollmentLimitConfiguration objects. + /// List properties and relationships of the deviceEnrollmentConfiguration objects. /// public class DeviceEnrollmentConfigurationsRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/DeviceEnrollmentConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/DeviceEnrollmentConfigurationItemRequestBuilder.cs index 80577af92aa..e30a329cb80 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/DeviceEnrollmentConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/DeviceEnrollmentConfigurationItemRequestBuilder.cs @@ -63,8 +63,8 @@ public async Task DeleteAsync(Action - /// Read properties and relationships of the deviceEnrollmentWindowsHelloForBusinessConfiguration object. - /// Find more info here + /// Read properties and relationships of the deviceEnrollmentLimitConfiguration object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -129,7 +129,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Read properties and relationships of the deviceEnrollmentWindowsHelloForBusinessConfiguration object. + /// Read properties and relationships of the deviceEnrollmentLimitConfiguration object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -199,7 +199,7 @@ public DeviceEnrollmentConfigurationItemRequestBuilderDeleteRequestConfiguration } } /// - /// Read properties and relationships of the deviceEnrollmentWindowsHelloForBusinessConfiguration object. + /// Read properties and relationships of the deviceEnrollmentLimitConfiguration 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 1b622f6c0a4..a6adbf941f8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementRequestBuilder.cs @@ -17,6 +17,7 @@ using Microsoft.Graph.DeviceManagement.IosUpdateStatuses; using Microsoft.Graph.DeviceManagement.ManagedDeviceOverview; using Microsoft.Graph.DeviceManagement.ManagedDevices; +using Microsoft.Graph.DeviceManagement.MobileAppTroubleshootingEvents; using Microsoft.Graph.DeviceManagement.MobileThreatDefenseConnectors; using Microsoft.Graph.DeviceManagement.NotificationMessageTemplates; using Microsoft.Graph.DeviceManagement.RemoteAssistancePartners; @@ -28,10 +29,34 @@ using Microsoft.Graph.DeviceManagement.TelecomExpenseManagementPartners; using Microsoft.Graph.DeviceManagement.TermsAndConditions; using Microsoft.Graph.DeviceManagement.TroubleshootingEvents; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthApplicationPerformance; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthDeviceModelPerformance; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthDevicePerformance; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthDevicePerformanceDetails; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthOSVersionPerformance; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthOverview; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsBaselines; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsCategories; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsDevicePerformance; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsDeviceScores; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsDeviceStartupHistory; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsDeviceStartupProcesses; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsMetricHistory; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsModelScores; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsOverview; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsScoreHistory; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsSummarizeWorkFromAnywhereDevices; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsWorkFromAnywhereMetrics; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsWorkFromAnywhereModelPerformance; using Microsoft.Graph.DeviceManagement.VerifyWindowsEnrollmentAutoDiscoveryWithDomainName; using Microsoft.Graph.DeviceManagement.WindowsAutopilotDeviceIdentities; using Microsoft.Graph.DeviceManagement.WindowsInformationProtectionAppLearningSummaries; using Microsoft.Graph.DeviceManagement.WindowsInformationProtectionNetworkLearningSummaries; +using Microsoft.Graph.DeviceManagement.WindowsMalwareInformation; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -119,6 +144,10 @@ public class DeviceManagementRequestBuilder : BaseRequestBuilder { public ManagedDevicesRequestBuilder ManagedDevices { get => new ManagedDevicesRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the mobileAppTroubleshootingEvents property of the microsoft.graph.deviceManagement entity. + public MobileAppTroubleshootingEventsRequestBuilder MobileAppTroubleshootingEvents { get => + new MobileAppTroubleshootingEventsRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the mobileThreatDefenseConnectors property of the microsoft.graph.deviceManagement entity. public MobileThreatDefenseConnectorsRequestBuilder MobileThreatDefenseConnectors { get => new MobileThreatDefenseConnectorsRequestBuilder(PathParameters, RequestAdapter); @@ -163,6 +192,98 @@ public class DeviceManagementRequestBuilder : BaseRequestBuilder { public TroubleshootingEventsRequestBuilder TroubleshootingEvents { get => new TroubleshootingEventsRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the userExperienceAnalyticsAppHealthApplicationPerformance property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilder UserExperienceAnalyticsAppHealthApplicationPerformance { get => + new UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilder UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails { get => + new UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilder UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId { get => + new UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilder UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion { get => + new UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsAppHealthDeviceModelPerformance property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilder UserExperienceAnalyticsAppHealthDeviceModelPerformance { get => + new UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsAppHealthDevicePerformance property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilder UserExperienceAnalyticsAppHealthDevicePerformance { get => + new UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsAppHealthDevicePerformanceDetails property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilder UserExperienceAnalyticsAppHealthDevicePerformanceDetails { get => + new UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsAppHealthOSVersionPerformance property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilder UserExperienceAnalyticsAppHealthOSVersionPerformance { get => + new UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsAppHealthOverview property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsAppHealthOverviewRequestBuilder UserExperienceAnalyticsAppHealthOverview { get => + new UserExperienceAnalyticsAppHealthOverviewRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsBaselines property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsBaselinesRequestBuilder UserExperienceAnalyticsBaselines { get => + new UserExperienceAnalyticsBaselinesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsCategories property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsCategoriesRequestBuilder UserExperienceAnalyticsCategories { get => + new UserExperienceAnalyticsCategoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsDevicePerformance property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsDevicePerformanceRequestBuilder UserExperienceAnalyticsDevicePerformance { get => + new UserExperienceAnalyticsDevicePerformanceRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsDeviceScores property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsDeviceScoresRequestBuilder UserExperienceAnalyticsDeviceScores { get => + new UserExperienceAnalyticsDeviceScoresRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsDeviceStartupHistory property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsDeviceStartupHistoryRequestBuilder UserExperienceAnalyticsDeviceStartupHistory { get => + new UserExperienceAnalyticsDeviceStartupHistoryRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsDeviceStartupProcesses property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsDeviceStartupProcessesRequestBuilder UserExperienceAnalyticsDeviceStartupProcesses { get => + new UserExperienceAnalyticsDeviceStartupProcessesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsMetricHistory property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsMetricHistoryRequestBuilder UserExperienceAnalyticsMetricHistory { get => + new UserExperienceAnalyticsMetricHistoryRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsModelScores property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsModelScoresRequestBuilder UserExperienceAnalyticsModelScores { get => + new UserExperienceAnalyticsModelScoresRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsOverview property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsOverviewRequestBuilder UserExperienceAnalyticsOverview { get => + new UserExperienceAnalyticsOverviewRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsScoreHistory property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsScoreHistoryRequestBuilder UserExperienceAnalyticsScoreHistory { get => + new UserExperienceAnalyticsScoreHistoryRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the userExperienceAnalyticsSummarizeWorkFromAnywhereDevices method. + public UserExperienceAnalyticsSummarizeWorkFromAnywhereDevicesRequestBuilder UserExperienceAnalyticsSummarizeWorkFromAnywhereDevices { get => + new UserExperienceAnalyticsSummarizeWorkFromAnywhereDevicesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilder UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric { get => + new UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsWorkFromAnywhereMetrics property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilder UserExperienceAnalyticsWorkFromAnywhereMetrics { get => + new UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsWorkFromAnywhereModelPerformance property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilder UserExperienceAnalyticsWorkFromAnywhereModelPerformance { get => + new UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the windowsAutopilotDeviceIdentities property of the microsoft.graph.deviceManagement entity. public WindowsAutopilotDeviceIdentitiesRequestBuilder WindowsAutopilotDeviceIdentities { get => new WindowsAutopilotDeviceIdentitiesRequestBuilder(PathParameters, RequestAdapter); @@ -175,6 +296,10 @@ public class DeviceManagementRequestBuilder : BaseRequestBuilder { public WindowsInformationProtectionNetworkLearningSummariesRequestBuilder WindowsInformationProtectionNetworkLearningSummaries { get => new WindowsInformationProtectionNetworkLearningSummariesRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the windowsMalwareInformation property of the microsoft.graph.deviceManagement entity. + public WindowsMalwareInformationRequestBuilder WindowsMalwareInformation { get => + new WindowsMalwareInformationRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new DeviceManagementRequestBuilder and sets the default values. /// @@ -191,7 +316,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. @@ -219,7 +344,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/ManagedDevices/Item/LogCollectionRequests/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..a8061262c9f --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.ManagedDevices.Item.LogCollectionRequests.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}/deviceManagement/managedDevices/{managedDevice%2Did}/logCollectionRequests/$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}/deviceManagement/managedDevices/{managedDevice%2Did}/logCollectionRequests/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlRequestBuilder.cs new file mode 100644 index 00000000000..387b9c60072 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlRequestBuilder.cs @@ -0,0 +1,90 @@ +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.DeviceManagement.ManagedDevices.Item.LogCollectionRequests.Item.CreateDownloadUrl { + /// + /// Provides operations to call the createDownloadUrl method. + /// + public class CreateDownloadUrlRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CreateDownloadUrlRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CreateDownloadUrlRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/logCollectionRequests/{deviceLogCollectionResponse%2Did}/createDownloadUrl", pathParameters) { + } + /// + /// Instantiates a new CreateDownloadUrlRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CreateDownloadUrlRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/logCollectionRequests/{deviceLogCollectionResponse%2Did}/createDownloadUrl", rawUrl) { + } + /// + /// Invoke action createDownloadUrl + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, CreateDownloadUrlResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke action createDownloadUrl + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new CreateDownloadUrlRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CreateDownloadUrlRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new createDownloadUrlRequestBuilderPostRequestConfiguration and sets the default values. + /// + public CreateDownloadUrlRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs new file mode 100644 index 00000000000..0b8338cc1de --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs @@ -0,0 +1,63 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.DeviceManagement.ManagedDevices.Item.LogCollectionRequests.Item.CreateDownloadUrl { + public class CreateDownloadUrlResponse : 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 value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public string Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Instantiates a new createDownloadUrlResponse and sets the default values. + /// + public CreateDownloadUrlResponse() { + 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 CreateDownloadUrlResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CreateDownloadUrlResponse(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"value", n => { Value = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/Item/DeviceLogCollectionResponseItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/Item/DeviceLogCollectionResponseItemRequestBuilder.cs new file mode 100644 index 00000000000..4b180218907 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/Item/DeviceLogCollectionResponseItemRequestBuilder.cs @@ -0,0 +1,248 @@ +using Microsoft.Graph.DeviceManagement.ManagedDevices.Item.LogCollectionRequests.Item.CreateDownloadUrl; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.ManagedDevices.Item.LogCollectionRequests.Item { + /// + /// Provides operations to manage the logCollectionRequests property of the microsoft.graph.managedDevice entity. + /// + public class DeviceLogCollectionResponseItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the createDownloadUrl method. + public CreateDownloadUrlRequestBuilder CreateDownloadUrl { get => + new CreateDownloadUrlRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new DeviceLogCollectionResponseItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DeviceLogCollectionResponseItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/logCollectionRequests/{deviceLogCollectionResponse%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DeviceLogCollectionResponseItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DeviceLogCollectionResponseItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/logCollectionRequests/{deviceLogCollectionResponse%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property logCollectionRequests for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// List of log collection requests + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DeviceLogCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property logCollectionRequests in deviceManagement + /// + /// 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(DeviceLogCollectionResponse body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(DeviceLogCollectionResponse 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, DeviceLogCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property logCollectionRequests for deviceManagement + /// + /// Configuration 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 DeviceLogCollectionResponseItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// List of log collection requests + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DeviceLogCollectionResponseItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property logCollectionRequests in deviceManagement + /// + /// 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(DeviceLogCollectionResponse body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(DeviceLogCollectionResponse 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 DeviceLogCollectionResponseItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DeviceLogCollectionResponseItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new DeviceLogCollectionResponseItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public DeviceLogCollectionResponseItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// List of log collection requests + /// + public class DeviceLogCollectionResponseItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 DeviceLogCollectionResponseItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DeviceLogCollectionResponseItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DeviceLogCollectionResponseItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new DeviceLogCollectionResponseItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DeviceLogCollectionResponseItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DeviceLogCollectionResponseItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new DeviceLogCollectionResponseItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public DeviceLogCollectionResponseItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/LogCollectionRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/LogCollectionRequestsRequestBuilder.cs new file mode 100644 index 00000000000..af8358ced19 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/LogCollectionRequestsRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceManagement.ManagedDevices.Item.LogCollectionRequests.Count; +using Microsoft.Graph.DeviceManagement.ManagedDevices.Item.LogCollectionRequests.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.DeviceManagement.ManagedDevices.Item.LogCollectionRequests { + /// + /// Provides operations to manage the logCollectionRequests property of the microsoft.graph.managedDevice entity. + /// + public class LogCollectionRequestsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the logCollectionRequests property of the microsoft.graph.managedDevice entity. + public DeviceLogCollectionResponseItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("deviceLogCollectionResponse%2Did", position); + return new DeviceLogCollectionResponseItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new LogCollectionRequestsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LogCollectionRequestsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/logCollectionRequests{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new LogCollectionRequestsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LogCollectionRequestsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/logCollectionRequests{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List of log collection requests + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DeviceLogCollectionResponseCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to logCollectionRequests for deviceManagement + /// + /// 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(DeviceLogCollectionResponse body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(DeviceLogCollectionResponse 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, DeviceLogCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// List of log collection requests + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new LogCollectionRequestsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to logCollectionRequests for deviceManagement + /// + /// 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(DeviceLogCollectionResponse body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(DeviceLogCollectionResponse 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 LogCollectionRequestsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// List of log collection requests + /// + public class LogCollectionRequestsRequestBuilderGetQueryParameters { + /// 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 LogCollectionRequestsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LogCollectionRequestsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LogCollectionRequestsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new logCollectionRequestsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LogCollectionRequestsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class LogCollectionRequestsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new logCollectionRequestsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public LogCollectionRequestsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ManagedDeviceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ManagedDeviceItemRequestBuilder.cs index ae839fc441d..ad5e2c11e47 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ManagedDeviceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ManagedDeviceItemRequestBuilder.cs @@ -6,6 +6,7 @@ using Microsoft.Graph.DeviceManagement.ManagedDevices.Item.DeviceConfigurationStates; using Microsoft.Graph.DeviceManagement.ManagedDevices.Item.DisableLostMode; using Microsoft.Graph.DeviceManagement.ManagedDevices.Item.LocateDevice; +using Microsoft.Graph.DeviceManagement.ManagedDevices.Item.LogCollectionRequests; using Microsoft.Graph.DeviceManagement.ManagedDevices.Item.LogoutSharedAppleDeviceActiveUser; using Microsoft.Graph.DeviceManagement.ManagedDevices.Item.RebootNow; using Microsoft.Graph.DeviceManagement.ManagedDevices.Item.RecoverPasscode; @@ -19,6 +20,7 @@ using Microsoft.Graph.DeviceManagement.ManagedDevices.Item.Users; using Microsoft.Graph.DeviceManagement.ManagedDevices.Item.WindowsDefenderScan; using Microsoft.Graph.DeviceManagement.ManagedDevices.Item.WindowsDefenderUpdateSignatures; +using Microsoft.Graph.DeviceManagement.ManagedDevices.Item.WindowsProtectionState; using Microsoft.Graph.DeviceManagement.ManagedDevices.Item.Wipe; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; @@ -67,6 +69,10 @@ public class ManagedDeviceItemRequestBuilder : BaseRequestBuilder { public LocateDeviceRequestBuilder LocateDevice { get => new LocateDeviceRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the logCollectionRequests property of the microsoft.graph.managedDevice entity. + public LogCollectionRequestsRequestBuilder LogCollectionRequests { get => + new LogCollectionRequestsRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to call the logoutSharedAppleDeviceActiveUser method. public LogoutSharedAppleDeviceActiveUserRequestBuilder LogoutSharedAppleDeviceActiveUser { get => new LogoutSharedAppleDeviceActiveUserRequestBuilder(PathParameters, RequestAdapter); @@ -119,6 +125,10 @@ public class ManagedDeviceItemRequestBuilder : BaseRequestBuilder { public WindowsDefenderUpdateSignaturesRequestBuilder WindowsDefenderUpdateSignatures { get => new WindowsDefenderUpdateSignaturesRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the windowsProtectionState property of the microsoft.graph.managedDevice entity. + public WindowsProtectionStateRequestBuilder WindowsProtectionState { get => + new WindowsProtectionStateRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to call the wipe method. public WipeRequestBuilder Wipe { get => new WipeRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..6415d968acc --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.ManagedDevices.Item.WindowsProtectionState.DetectedMalwareState.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}/deviceManagement/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState/$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}/deviceManagement/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/DetectedMalwareStateRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/DetectedMalwareStateRequestBuilder.cs new file mode 100644 index 00000000000..21b576327dc --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/DetectedMalwareStateRequestBuilder.cs @@ -0,0 +1,237 @@ +using Microsoft.Graph.DeviceManagement.ManagedDevices.Item.WindowsProtectionState.DetectedMalwareState.Count; +using Microsoft.Graph.DeviceManagement.ManagedDevices.Item.WindowsProtectionState.DetectedMalwareState.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.DeviceManagement.ManagedDevices.Item.WindowsProtectionState.DetectedMalwareState { + /// + /// Provides operations to manage the detectedMalwareState property of the microsoft.graph.windowsProtectionState entity. + /// + public class DetectedMalwareStateRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the detectedMalwareState property of the microsoft.graph.windowsProtectionState entity. + public WindowsDeviceMalwareStateItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("windowsDeviceMalwareState%2Did", position); + return new WindowsDeviceMalwareStateItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new DetectedMalwareStateRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DetectedMalwareStateRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DetectedMalwareStateRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DetectedMalwareStateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List properties and relationships of the windowsDeviceMalwareState 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, WindowsDeviceMalwareStateCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create a new windowsDeviceMalwareState 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(WindowsDeviceMalwareState body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(WindowsDeviceMalwareState 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, WindowsDeviceMalwareState.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// List properties and relationships of the windowsDeviceMalwareState 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 DetectedMalwareStateRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create a new windowsDeviceMalwareState 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(WindowsDeviceMalwareState body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(WindowsDeviceMalwareState 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 DetectedMalwareStateRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// List properties and relationships of the windowsDeviceMalwareState objects. + /// + public class DetectedMalwareStateRequestBuilderGetQueryParameters { + /// 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 DetectedMalwareStateRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DetectedMalwareStateRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DetectedMalwareStateRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new detectedMalwareStateRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DetectedMalwareStateRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DetectedMalwareStateRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new detectedMalwareStateRequestBuilderPostRequestConfiguration and sets the default values. + /// + public DetectedMalwareStateRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Item/WindowsDeviceMalwareStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Item/WindowsDeviceMalwareStateItemRequestBuilder.cs new file mode 100644 index 00000000000..f97e301ff27 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Item/WindowsDeviceMalwareStateItemRequestBuilder.cs @@ -0,0 +1,246 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.ManagedDevices.Item.WindowsProtectionState.DetectedMalwareState.Item { + /// + /// Provides operations to manage the detectedMalwareState property of the microsoft.graph.windowsProtectionState entity. + /// + public class WindowsDeviceMalwareStateItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new WindowsDeviceMalwareStateItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WindowsDeviceMalwareStateItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState/{windowsDeviceMalwareState%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new WindowsDeviceMalwareStateItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WindowsDeviceMalwareStateItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState/{windowsDeviceMalwareState%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Deletes a windowsDeviceMalwareState. + /// 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); + } + /// + /// Read properties and relationships of the windowsDeviceMalwareState 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, WindowsDeviceMalwareState.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the properties of a windowsDeviceMalwareState 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(WindowsDeviceMalwareState body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(WindowsDeviceMalwareState 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, WindowsDeviceMalwareState.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Deletes a windowsDeviceMalwareState. + /// + /// Configuration 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 WindowsDeviceMalwareStateItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the windowsDeviceMalwareState 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 WindowsDeviceMalwareStateItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a windowsDeviceMalwareState 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(WindowsDeviceMalwareState body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(WindowsDeviceMalwareState 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 WindowsDeviceMalwareStateItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsDeviceMalwareStateItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new WindowsDeviceMalwareStateItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public WindowsDeviceMalwareStateItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the windowsDeviceMalwareState object. + /// + public class WindowsDeviceMalwareStateItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 WindowsDeviceMalwareStateItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public WindowsDeviceMalwareStateItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new WindowsDeviceMalwareStateItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new WindowsDeviceMalwareStateItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public WindowsDeviceMalwareStateItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsDeviceMalwareStateItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new WindowsDeviceMalwareStateItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public WindowsDeviceMalwareStateItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsProtectionState/WindowsProtectionStateRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsProtectionState/WindowsProtectionStateRequestBuilder.cs new file mode 100644 index 00000000000..860996c05a6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsProtectionState/WindowsProtectionStateRequestBuilder.cs @@ -0,0 +1,250 @@ +using Microsoft.Graph.DeviceManagement.ManagedDevices.Item.WindowsProtectionState.DetectedMalwareState; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.ManagedDevices.Item.WindowsProtectionState { + /// + /// Provides operations to manage the windowsProtectionState property of the microsoft.graph.managedDevice entity. + /// + public class WindowsProtectionStateRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the detectedMalwareState property of the microsoft.graph.windowsProtectionState entity. + public DetectedMalwareStateRequestBuilder DetectedMalwareState { get => + new DetectedMalwareStateRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new WindowsProtectionStateRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WindowsProtectionStateRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/windowsProtectionState{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new WindowsProtectionStateRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WindowsProtectionStateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/windowsProtectionState{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property windowsProtectionState for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// Read properties and relationships of the windowsProtectionState 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, Microsoft.Graph.Models.WindowsProtectionState.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the properties of a windowsProtectionState 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(Microsoft.Graph.Models.WindowsProtectionState body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.WindowsProtectionState 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.WindowsProtectionState.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property windowsProtectionState for deviceManagement + /// + /// Configuration 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 WindowsProtectionStateRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the windowsProtectionState 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 WindowsProtectionStateRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a windowsProtectionState 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(Microsoft.Graph.Models.WindowsProtectionState body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.WindowsProtectionState 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 WindowsProtectionStateRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsProtectionStateRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new windowsProtectionStateRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public WindowsProtectionStateRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the windowsProtectionState object. + /// + public class WindowsProtectionStateRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 WindowsProtectionStateRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public WindowsProtectionStateRequestBuilderGetQueryParameters QueryParameters { get; set; } = new WindowsProtectionStateRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new windowsProtectionStateRequestBuilderGetRequestConfiguration and sets the default values. + /// + public WindowsProtectionStateRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsProtectionStateRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new windowsProtectionStateRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public WindowsProtectionStateRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..644a75ec1aa --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.MobileAppTroubleshootingEvents.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}/deviceManagement/mobileAppTroubleshootingEvents/$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}/deviceManagement/mobileAppTroubleshootingEvents/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/AppLogCollectionRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/AppLogCollectionRequestsRequestBuilder.cs new file mode 100644 index 00000000000..6b88215aeb5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/AppLogCollectionRequestsRequestBuilder.cs @@ -0,0 +1,237 @@ +using Microsoft.Graph.DeviceManagement.MobileAppTroubleshootingEvents.Item.AppLogCollectionRequests.Count; +using Microsoft.Graph.DeviceManagement.MobileAppTroubleshootingEvents.Item.AppLogCollectionRequests.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.DeviceManagement.MobileAppTroubleshootingEvents.Item.AppLogCollectionRequests { + /// + /// Provides operations to manage the appLogCollectionRequests property of the microsoft.graph.mobileAppTroubleshootingEvent entity. + /// + public class AppLogCollectionRequestsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the appLogCollectionRequests property of the microsoft.graph.mobileAppTroubleshootingEvent entity. + public AppLogCollectionRequestItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("appLogCollectionRequest%2Did", position); + return new AppLogCollectionRequestItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new AppLogCollectionRequestsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AppLogCollectionRequestsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/mobileAppTroubleshootingEvents/{mobileAppTroubleshootingEvent%2Did}/appLogCollectionRequests{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AppLogCollectionRequestsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AppLogCollectionRequestsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/mobileAppTroubleshootingEvents/{mobileAppTroubleshootingEvent%2Did}/appLogCollectionRequests{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List properties and relationships of the appLogCollectionRequest 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, AppLogCollectionRequestCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create a new appLogCollectionRequest 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(AppLogCollectionRequest body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(AppLogCollectionRequest 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, AppLogCollectionRequest.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// List properties and relationships of the appLogCollectionRequest 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 AppLogCollectionRequestsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create a new appLogCollectionRequest 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(AppLogCollectionRequest body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(AppLogCollectionRequest 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 AppLogCollectionRequestsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// List properties and relationships of the appLogCollectionRequest objects. + /// + public class AppLogCollectionRequestsRequestBuilderGetQueryParameters { + /// 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 AppLogCollectionRequestsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AppLogCollectionRequestsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AppLogCollectionRequestsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new appLogCollectionRequestsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AppLogCollectionRequestsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AppLogCollectionRequestsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new appLogCollectionRequestsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public AppLogCollectionRequestsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..e186f3eefc4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.MobileAppTroubleshootingEvents.Item.AppLogCollectionRequests.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}/deviceManagement/mobileAppTroubleshootingEvents/{mobileAppTroubleshootingEvent%2Did}/appLogCollectionRequests/$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}/deviceManagement/mobileAppTroubleshootingEvents/{mobileAppTroubleshootingEvent%2Did}/appLogCollectionRequests/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/Item/AppLogCollectionRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/Item/AppLogCollectionRequestItemRequestBuilder.cs new file mode 100644 index 00000000000..962c83e1a6f --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/Item/AppLogCollectionRequestItemRequestBuilder.cs @@ -0,0 +1,251 @@ +using Microsoft.Graph.DeviceManagement.MobileAppTroubleshootingEvents.Item.AppLogCollectionRequests.Item.CreateDownloadUrl; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.MobileAppTroubleshootingEvents.Item.AppLogCollectionRequests.Item { + /// + /// Provides operations to manage the appLogCollectionRequests property of the microsoft.graph.mobileAppTroubleshootingEvent entity. + /// + public class AppLogCollectionRequestItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the createDownloadUrl method. + public CreateDownloadUrlRequestBuilder CreateDownloadUrl { get => + new CreateDownloadUrlRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new AppLogCollectionRequestItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AppLogCollectionRequestItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/mobileAppTroubleshootingEvents/{mobileAppTroubleshootingEvent%2Did}/appLogCollectionRequests/{appLogCollectionRequest%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AppLogCollectionRequestItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AppLogCollectionRequestItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/mobileAppTroubleshootingEvents/{mobileAppTroubleshootingEvent%2Did}/appLogCollectionRequests/{appLogCollectionRequest%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Deletes a appLogCollectionRequest. + /// 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); + } + /// + /// Read properties and relationships of the appLogCollectionRequest 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, AppLogCollectionRequest.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the properties of a appLogCollectionRequest 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(AppLogCollectionRequest body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(AppLogCollectionRequest 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, AppLogCollectionRequest.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Deletes a appLogCollectionRequest. + /// + /// Configuration 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 AppLogCollectionRequestItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the appLogCollectionRequest 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 AppLogCollectionRequestItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a appLogCollectionRequest 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(AppLogCollectionRequest body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(AppLogCollectionRequest 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 AppLogCollectionRequestItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AppLogCollectionRequestItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new AppLogCollectionRequestItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public AppLogCollectionRequestItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the appLogCollectionRequest object. + /// + public class AppLogCollectionRequestItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 AppLogCollectionRequestItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AppLogCollectionRequestItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AppLogCollectionRequestItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new AppLogCollectionRequestItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AppLogCollectionRequestItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AppLogCollectionRequestItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new AppLogCollectionRequestItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public AppLogCollectionRequestItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlRequestBuilder.cs new file mode 100644 index 00000000000..1970925c798 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlRequestBuilder.cs @@ -0,0 +1,92 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.MobileAppTroubleshootingEvents.Item.AppLogCollectionRequests.Item.CreateDownloadUrl { + /// + /// Provides operations to call the createDownloadUrl method. + /// + public class CreateDownloadUrlRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CreateDownloadUrlRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CreateDownloadUrlRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/mobileAppTroubleshootingEvents/{mobileAppTroubleshootingEvent%2Did}/appLogCollectionRequests/{appLogCollectionRequest%2Did}/createDownloadUrl", pathParameters) { + } + /// + /// Instantiates a new CreateDownloadUrlRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CreateDownloadUrlRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/mobileAppTroubleshootingEvents/{mobileAppTroubleshootingEvent%2Did}/appLogCollectionRequests/{appLogCollectionRequest%2Did}/createDownloadUrl", rawUrl) { + } + /// + /// Not yet documented + /// 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 PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, AppLogCollectionDownloadDetails.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Not yet documented + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new CreateDownloadUrlRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CreateDownloadUrlRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new createDownloadUrlRequestBuilderPostRequestConfiguration and sets the default values. + /// + public CreateDownloadUrlRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/MobileAppTroubleshootingEventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/MobileAppTroubleshootingEventItemRequestBuilder.cs new file mode 100644 index 00000000000..d953bb1d011 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/MobileAppTroubleshootingEventItemRequestBuilder.cs @@ -0,0 +1,251 @@ +using Microsoft.Graph.DeviceManagement.MobileAppTroubleshootingEvents.Item.AppLogCollectionRequests; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.MobileAppTroubleshootingEvents.Item { + /// + /// Provides operations to manage the mobileAppTroubleshootingEvents property of the microsoft.graph.deviceManagement entity. + /// + public class MobileAppTroubleshootingEventItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the appLogCollectionRequests property of the microsoft.graph.mobileAppTroubleshootingEvent entity. + public AppLogCollectionRequestsRequestBuilder AppLogCollectionRequests { get => + new AppLogCollectionRequestsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new MobileAppTroubleshootingEventItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppTroubleshootingEventItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/mobileAppTroubleshootingEvents/{mobileAppTroubleshootingEvent%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppTroubleshootingEventItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppTroubleshootingEventItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/mobileAppTroubleshootingEvents/{mobileAppTroubleshootingEvent%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Deletes a mobileAppTroubleshootingEvent. + /// 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); + } + /// + /// Read properties and relationships of the mobileAppTroubleshootingEvent 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, MobileAppTroubleshootingEvent.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the properties of a mobileAppTroubleshootingEvent 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(MobileAppTroubleshootingEvent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MobileAppTroubleshootingEvent 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, MobileAppTroubleshootingEvent.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Deletes a mobileAppTroubleshootingEvent. + /// + /// Configuration 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 MobileAppTroubleshootingEventItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the mobileAppTroubleshootingEvent 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 MobileAppTroubleshootingEventItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a mobileAppTroubleshootingEvent 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(MobileAppTroubleshootingEvent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MobileAppTroubleshootingEvent 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 MobileAppTroubleshootingEventItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppTroubleshootingEventItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppTroubleshootingEventItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MobileAppTroubleshootingEventItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the mobileAppTroubleshootingEvent object. + /// + public class MobileAppTroubleshootingEventItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 MobileAppTroubleshootingEventItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppTroubleshootingEventItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppTroubleshootingEventItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MobileAppTroubleshootingEventItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppTroubleshootingEventItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppTroubleshootingEventItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MobileAppTroubleshootingEventItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MobileAppTroubleshootingEventItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/MobileAppTroubleshootingEventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/MobileAppTroubleshootingEventsRequestBuilder.cs new file mode 100644 index 00000000000..fb6c3c2a226 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/MobileAppTroubleshootingEventsRequestBuilder.cs @@ -0,0 +1,237 @@ +using Microsoft.Graph.DeviceManagement.MobileAppTroubleshootingEvents.Count; +using Microsoft.Graph.DeviceManagement.MobileAppTroubleshootingEvents.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.DeviceManagement.MobileAppTroubleshootingEvents { + /// + /// Provides operations to manage the mobileAppTroubleshootingEvents property of the microsoft.graph.deviceManagement entity. + /// + public class MobileAppTroubleshootingEventsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the mobileAppTroubleshootingEvents property of the microsoft.graph.deviceManagement entity. + public MobileAppTroubleshootingEventItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("mobileAppTroubleshootingEvent%2Did", position); + return new MobileAppTroubleshootingEventItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new MobileAppTroubleshootingEventsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MobileAppTroubleshootingEventsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/mobileAppTroubleshootingEvents{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MobileAppTroubleshootingEventsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MobileAppTroubleshootingEventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/mobileAppTroubleshootingEvents{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List properties and relationships of the mobileAppTroubleshootingEvent 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, MobileAppTroubleshootingEventCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create a new mobileAppTroubleshootingEvent 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(MobileAppTroubleshootingEvent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MobileAppTroubleshootingEvent 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, MobileAppTroubleshootingEvent.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// List properties and relationships of the mobileAppTroubleshootingEvent 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 MobileAppTroubleshootingEventsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create a new mobileAppTroubleshootingEvent 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(MobileAppTroubleshootingEvent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MobileAppTroubleshootingEvent 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 MobileAppTroubleshootingEventsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// List properties and relationships of the mobileAppTroubleshootingEvent objects. + /// + public class MobileAppTroubleshootingEventsRequestBuilderGetQueryParameters { + /// 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 MobileAppTroubleshootingEventsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MobileAppTroubleshootingEventsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MobileAppTroubleshootingEventsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new mobileAppTroubleshootingEventsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MobileAppTroubleshootingEventsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MobileAppTroubleshootingEventsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new mobileAppTroubleshootingEventsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public MobileAppTroubleshootingEventsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/Item/RoleDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/Item/RoleDefinitionItemRequestBuilder.cs index aa4b88c62ab..10f4def687c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/Item/RoleDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/Item/RoleDefinitionItemRequestBuilder.cs @@ -33,8 +33,8 @@ public RoleDefinitionItemRequestBuilder(Dictionary pathParameter public RoleDefinitionItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/roleDefinitions/{roleDefinition%2Did}{?%24select,%24expand}", rawUrl) { } /// - /// Deletes a deviceAndAppManagementRoleDefinition. - /// Find more info here + /// Deletes a roleDefinition. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -53,8 +53,8 @@ public async Task DeleteAsync(Action - /// Read properties and relationships of the roleDefinition object. - /// Find more info here + /// Read properties and relationships of the deviceAndAppManagementRoleDefinition object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -73,8 +73,8 @@ public async Task DeleteAsync(Action(requestInfo, Microsoft.Graph.Models.RoleDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// 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 @@ -95,7 +95,7 @@ public async Task DeleteAsync(Action(requestInfo, Microsoft.Graph.Models.RoleDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Deletes a deviceAndAppManagementRoleDefinition. + /// Deletes a roleDefinition. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -119,7 +119,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Read properties and relationships of the roleDefinition object. + /// Read properties and relationships of the deviceAndAppManagementRoleDefinition object. /// /// 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 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. @@ -189,7 +189,7 @@ public RoleDefinitionItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Read properties and relationships of the roleDefinition object. + /// Read properties and relationships of the deviceAndAppManagementRoleDefinition object. /// public class RoleDefinitionItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformance/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformance/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..2a0f22f5b37 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformance/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthApplicationPerformance.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}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformance/$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}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformance/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformance/Item/UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformance/Item/UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilder.cs new file mode 100644 index 00000000000..7f80992a87e --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformance/Item/UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthApplicationPerformance.Item { + /// + /// Provides operations to manage the userExperienceAnalyticsAppHealthApplicationPerformance property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformance/{userExperienceAnalyticsAppHealthApplicationPerformance%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformance/{userExperienceAnalyticsAppHealthApplicationPerformance%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property userExperienceAnalyticsAppHealthApplicationPerformance for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// User experience analytics appHealth Application Performance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = 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.UserExperienceAnalyticsAppHealthApplicationPerformance.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property userExperienceAnalyticsAppHealthApplicationPerformance in deviceManagement + /// + /// 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.UserExperienceAnalyticsAppHealthApplicationPerformance body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthApplicationPerformance 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.UserExperienceAnalyticsAppHealthApplicationPerformance.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property userExperienceAnalyticsAppHealthApplicationPerformance for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics appHealth Application Performance + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property userExperienceAnalyticsAppHealthApplicationPerformance in deviceManagement + /// + /// 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.UserExperienceAnalyticsAppHealthApplicationPerformance body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthApplicationPerformance 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 UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// User experience analytics appHealth Application Performance + /// + public class UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformance/UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformance/UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilder.cs new file mode 100644 index 00000000000..56ae5d2c5d6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformance/UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthApplicationPerformance.Count; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthApplicationPerformance.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.DeviceManagement.UserExperienceAnalyticsAppHealthApplicationPerformance { + /// + /// Provides operations to manage the userExperienceAnalyticsAppHealthApplicationPerformance property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsAppHealthApplicationPerformance property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("userExperienceAnalyticsAppHealthApplicationPerformance%2Did", position); + return new UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformance{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformance{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// User experience analytics appHealth Application Performance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsAppHealthApplicationPerformanceCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to userExperienceAnalyticsAppHealthApplicationPerformance for deviceManagement + /// + /// 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.UserExperienceAnalyticsAppHealthApplicationPerformance body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthApplicationPerformance 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.UserExperienceAnalyticsAppHealthApplicationPerformance.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// User experience analytics appHealth Application Performance + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to userExperienceAnalyticsAppHealthApplicationPerformance for deviceManagement + /// + /// 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.UserExperienceAnalyticsAppHealthApplicationPerformance body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthApplicationPerformance 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 UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics appHealth Application Performance + /// + public class UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilderGetQueryParameters { + /// 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 UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new userExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilderPostRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..e59ef4a1ccf --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails.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}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/$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}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/Item/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/Item/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilder.cs new file mode 100644 index 00000000000..74b5d5bfee9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/Item/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails.Item { + /// + /// Provides operations to manage the userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/{userExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/{userExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// User experience analytics appHealth Application Performance by App Version details + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails in deviceManagement + /// + /// 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(UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails 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, UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics appHealth Application Performance by App Version details + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails in deviceManagement + /// + /// 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(UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails 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 UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// User experience analytics appHealth Application Performance by App Version details + /// + public class UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilder.cs new file mode 100644 index 00000000000..bcc2a4bed6a --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails.Count; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails.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.DeviceManagement.UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails { + /// + /// Provides operations to manage the userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("userExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails%2Did", position); + return new UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// User experience analytics appHealth Application Performance by App Version details + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails for deviceManagement + /// + /// 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(UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails 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, UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// User experience analytics appHealth Application Performance by App Version details + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails for deviceManagement + /// + /// 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(UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails 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 UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics appHealth Application Performance by App Version details + /// + public class UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilderGetQueryParameters { + /// 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 UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..c32b03f02c3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId.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}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/$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}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/Item/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/Item/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilder.cs new file mode 100644 index 00000000000..f6629db1d46 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/Item/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId.Item { + /// + /// Provides operations to manage the userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/{userExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/{userExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// User experience analytics appHealth Application Performance by App Version Device Id + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId in deviceManagement + /// + /// 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(UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId 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, UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics appHealth Application Performance by App Version Device Id + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId in deviceManagement + /// + /// 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(UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId 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 UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// User experience analytics appHealth Application Performance by App Version Device Id + /// + public class UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilder.cs new file mode 100644 index 00000000000..a31d48bab2d --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId.Count; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId.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.DeviceManagement.UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId { + /// + /// Provides operations to manage the userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("userExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId%2Did", position); + return new UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// User experience analytics appHealth Application Performance by App Version Device Id + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId for deviceManagement + /// + /// 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(UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId 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, UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// User experience analytics appHealth Application Performance by App Version Device Id + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId for deviceManagement + /// + /// 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(UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId 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 UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics appHealth Application Performance by App Version Device Id + /// + public class UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilderGetQueryParameters { + /// 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 UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilderPostRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..6d1ab4fc3b3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion.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}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/$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}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/Item/UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/Item/UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilder.cs new file mode 100644 index 00000000000..15d8e48dd70 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/Item/UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion.Item { + /// + /// Provides operations to manage the userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/{userExperienceAnalyticsAppHealthAppPerformanceByOSVersion%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/{userExperienceAnalyticsAppHealthAppPerformanceByOSVersion%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// User experience analytics appHealth Application Performance by OS 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, UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion in deviceManagement + /// + /// 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(UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion 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, UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics appHealth Application Performance by OS 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 UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion in deviceManagement + /// + /// 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(UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion 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 UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// User experience analytics appHealth Application Performance by OS Version + /// + public class UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilder.cs new file mode 100644 index 00000000000..ace5e0e5b14 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion.Count; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion.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.DeviceManagement.UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion { + /// + /// Provides operations to manage the userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("userExperienceAnalyticsAppHealthAppPerformanceByOSVersion%2Did", position); + return new UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// User experience analytics appHealth Application Performance by OS 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, UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion for deviceManagement + /// + /// 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(UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion 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, UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// User experience analytics appHealth Application Performance by OS 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 UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion for deviceManagement + /// + /// 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(UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion 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 UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics appHealth Application Performance by OS Version + /// + public class UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilderGetQueryParameters { + /// 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 UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilderPostRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDeviceModelPerformance/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDeviceModelPerformance/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..621efbfc50f --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDeviceModelPerformance/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthDeviceModelPerformance.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}/deviceManagement/userExperienceAnalyticsAppHealthDeviceModelPerformance/$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}/deviceManagement/userExperienceAnalyticsAppHealthDeviceModelPerformance/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDeviceModelPerformance/Item/UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDeviceModelPerformance/Item/UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilder.cs new file mode 100644 index 00000000000..6663b54dc30 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDeviceModelPerformance/Item/UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthDeviceModelPerformance.Item { + /// + /// Provides operations to manage the userExperienceAnalyticsAppHealthDeviceModelPerformance property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDeviceModelPerformance/{userExperienceAnalyticsAppHealthDeviceModelPerformance%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDeviceModelPerformance/{userExperienceAnalyticsAppHealthDeviceModelPerformance%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property userExperienceAnalyticsAppHealthDeviceModelPerformance for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// User experience analytics appHealth Model Performance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = 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.UserExperienceAnalyticsAppHealthDeviceModelPerformance.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property userExperienceAnalyticsAppHealthDeviceModelPerformance in deviceManagement + /// + /// 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.UserExperienceAnalyticsAppHealthDeviceModelPerformance body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthDeviceModelPerformance 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.UserExperienceAnalyticsAppHealthDeviceModelPerformance.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property userExperienceAnalyticsAppHealthDeviceModelPerformance for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics appHealth Model Performance + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property userExperienceAnalyticsAppHealthDeviceModelPerformance in deviceManagement + /// + /// 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.UserExperienceAnalyticsAppHealthDeviceModelPerformance body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthDeviceModelPerformance 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 UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// User experience analytics appHealth Model Performance + /// + public class UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDeviceModelPerformance/UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDeviceModelPerformance/UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilder.cs new file mode 100644 index 00000000000..72e35204217 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDeviceModelPerformance/UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthDeviceModelPerformance.Count; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthDeviceModelPerformance.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.DeviceManagement.UserExperienceAnalyticsAppHealthDeviceModelPerformance { + /// + /// Provides operations to manage the userExperienceAnalyticsAppHealthDeviceModelPerformance property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsAppHealthDeviceModelPerformance property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("userExperienceAnalyticsAppHealthDeviceModelPerformance%2Did", position); + return new UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDeviceModelPerformance{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDeviceModelPerformance{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// User experience analytics appHealth Model Performance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsAppHealthDeviceModelPerformanceCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to userExperienceAnalyticsAppHealthDeviceModelPerformance for deviceManagement + /// + /// 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.UserExperienceAnalyticsAppHealthDeviceModelPerformance body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthDeviceModelPerformance 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.UserExperienceAnalyticsAppHealthDeviceModelPerformance.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// User experience analytics appHealth Model Performance + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to userExperienceAnalyticsAppHealthDeviceModelPerformance for deviceManagement + /// + /// 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.UserExperienceAnalyticsAppHealthDeviceModelPerformance body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthDeviceModelPerformance 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 UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics appHealth Model Performance + /// + public class UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilderGetQueryParameters { + /// 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 UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new userExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilderPostRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformance/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformance/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..7e4d4bd80bc --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformance/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthDevicePerformance.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}/deviceManagement/userExperienceAnalyticsAppHealthDevicePerformance/$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}/deviceManagement/userExperienceAnalyticsAppHealthDevicePerformance/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformance/Item/UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformance/Item/UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilder.cs new file mode 100644 index 00000000000..a66527af9fa --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformance/Item/UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthDevicePerformance.Item { + /// + /// Provides operations to manage the userExperienceAnalyticsAppHealthDevicePerformance property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDevicePerformance/{userExperienceAnalyticsAppHealthDevicePerformance%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDevicePerformance/{userExperienceAnalyticsAppHealthDevicePerformance%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property userExperienceAnalyticsAppHealthDevicePerformance for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// User experience analytics appHealth Device Performance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = 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.UserExperienceAnalyticsAppHealthDevicePerformance.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property userExperienceAnalyticsAppHealthDevicePerformance in deviceManagement + /// + /// 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.UserExperienceAnalyticsAppHealthDevicePerformance body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthDevicePerformance 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.UserExperienceAnalyticsAppHealthDevicePerformance.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property userExperienceAnalyticsAppHealthDevicePerformance for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics appHealth Device Performance + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property userExperienceAnalyticsAppHealthDevicePerformance in deviceManagement + /// + /// 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.UserExperienceAnalyticsAppHealthDevicePerformance body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthDevicePerformance 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 UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// User experience analytics appHealth Device Performance + /// + public class UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformance/UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformance/UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilder.cs new file mode 100644 index 00000000000..2a691b8aaa7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformance/UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthDevicePerformance.Count; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthDevicePerformance.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.DeviceManagement.UserExperienceAnalyticsAppHealthDevicePerformance { + /// + /// Provides operations to manage the userExperienceAnalyticsAppHealthDevicePerformance property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsAppHealthDevicePerformance property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("userExperienceAnalyticsAppHealthDevicePerformance%2Did", position); + return new UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDevicePerformance{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDevicePerformance{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// User experience analytics appHealth Device Performance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsAppHealthDevicePerformanceCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to userExperienceAnalyticsAppHealthDevicePerformance for deviceManagement + /// + /// 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.UserExperienceAnalyticsAppHealthDevicePerformance body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthDevicePerformance 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.UserExperienceAnalyticsAppHealthDevicePerformance.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// User experience analytics appHealth Device Performance + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to userExperienceAnalyticsAppHealthDevicePerformance for deviceManagement + /// + /// 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.UserExperienceAnalyticsAppHealthDevicePerformance body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthDevicePerformance 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 UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics appHealth Device Performance + /// + public class UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilderGetQueryParameters { + /// 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 UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new userExperienceAnalyticsAppHealthDevicePerformanceRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsAppHealthDevicePerformanceRequestBuilderPostRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformanceDetails/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformanceDetails/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..2baa3934e3d --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformanceDetails/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthDevicePerformanceDetails.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}/deviceManagement/userExperienceAnalyticsAppHealthDevicePerformanceDetails/$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}/deviceManagement/userExperienceAnalyticsAppHealthDevicePerformanceDetails/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformanceDetails/Item/UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformanceDetails/Item/UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilder.cs new file mode 100644 index 00000000000..c232e6283b8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformanceDetails/Item/UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthDevicePerformanceDetails.Item { + /// + /// Provides operations to manage the userExperienceAnalyticsAppHealthDevicePerformanceDetails property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDevicePerformanceDetails/{userExperienceAnalyticsAppHealthDevicePerformanceDetails%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDevicePerformanceDetails/{userExperienceAnalyticsAppHealthDevicePerformanceDetails%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property userExperienceAnalyticsAppHealthDevicePerformanceDetails for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// User experience analytics device performance details + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = 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.UserExperienceAnalyticsAppHealthDevicePerformanceDetails.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property userExperienceAnalyticsAppHealthDevicePerformanceDetails in deviceManagement + /// + /// 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.UserExperienceAnalyticsAppHealthDevicePerformanceDetails body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthDevicePerformanceDetails 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.UserExperienceAnalyticsAppHealthDevicePerformanceDetails.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property userExperienceAnalyticsAppHealthDevicePerformanceDetails for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics device performance details + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property userExperienceAnalyticsAppHealthDevicePerformanceDetails in deviceManagement + /// + /// 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.UserExperienceAnalyticsAppHealthDevicePerformanceDetails body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthDevicePerformanceDetails 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 UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// User experience analytics device performance details + /// + public class UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformanceDetails/UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformanceDetails/UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilder.cs new file mode 100644 index 00000000000..ab39601a054 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformanceDetails/UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthDevicePerformanceDetails.Count; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthDevicePerformanceDetails.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.DeviceManagement.UserExperienceAnalyticsAppHealthDevicePerformanceDetails { + /// + /// Provides operations to manage the userExperienceAnalyticsAppHealthDevicePerformanceDetails property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsAppHealthDevicePerformanceDetails property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("userExperienceAnalyticsAppHealthDevicePerformanceDetails%2Did", position); + return new UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDevicePerformanceDetails{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDevicePerformanceDetails{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// User experience analytics device performance details + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsAppHealthDevicePerformanceDetailsCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to userExperienceAnalyticsAppHealthDevicePerformanceDetails for deviceManagement + /// + /// 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.UserExperienceAnalyticsAppHealthDevicePerformanceDetails body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthDevicePerformanceDetails 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.UserExperienceAnalyticsAppHealthDevicePerformanceDetails.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// User experience analytics device performance details + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to userExperienceAnalyticsAppHealthDevicePerformanceDetails for deviceManagement + /// + /// 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.UserExperienceAnalyticsAppHealthDevicePerformanceDetails body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthDevicePerformanceDetails 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 UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics device performance details + /// + public class UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilderGetQueryParameters { + /// 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 UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new userExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOSVersionPerformance/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOSVersionPerformance/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..6cba23063c3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOSVersionPerformance/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthOSVersionPerformance.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}/deviceManagement/userExperienceAnalyticsAppHealthOSVersionPerformance/$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}/deviceManagement/userExperienceAnalyticsAppHealthOSVersionPerformance/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOSVersionPerformance/Item/UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOSVersionPerformance/Item/UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilder.cs new file mode 100644 index 00000000000..413b8caf73a --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOSVersionPerformance/Item/UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthOSVersionPerformance.Item { + /// + /// Provides operations to manage the userExperienceAnalyticsAppHealthOSVersionPerformance property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthOSVersionPerformance/{userExperienceAnalyticsAppHealthOSVersionPerformance%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthOSVersionPerformance/{userExperienceAnalyticsAppHealthOSVersionPerformance%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property userExperienceAnalyticsAppHealthOSVersionPerformance for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// User experience analytics appHealth OS version Performance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = 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.UserExperienceAnalyticsAppHealthOSVersionPerformance.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property userExperienceAnalyticsAppHealthOSVersionPerformance in deviceManagement + /// + /// 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.UserExperienceAnalyticsAppHealthOSVersionPerformance body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthOSVersionPerformance 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.UserExperienceAnalyticsAppHealthOSVersionPerformance.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property userExperienceAnalyticsAppHealthOSVersionPerformance for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics appHealth OS version Performance + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property userExperienceAnalyticsAppHealthOSVersionPerformance in deviceManagement + /// + /// 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.UserExperienceAnalyticsAppHealthOSVersionPerformance body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthOSVersionPerformance 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 UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// User experience analytics appHealth OS version Performance + /// + public class UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOSVersionPerformance/UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOSVersionPerformance/UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilder.cs new file mode 100644 index 00000000000..23050d5205e --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOSVersionPerformance/UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthOSVersionPerformance.Count; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthOSVersionPerformance.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.DeviceManagement.UserExperienceAnalyticsAppHealthOSVersionPerformance { + /// + /// Provides operations to manage the userExperienceAnalyticsAppHealthOSVersionPerformance property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsAppHealthOSVersionPerformance property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("userExperienceAnalyticsAppHealthOSVersionPerformance%2Did", position); + return new UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthOSVersionPerformance{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthOSVersionPerformance{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// User experience analytics appHealth OS version Performance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsAppHealthOSVersionPerformanceCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to userExperienceAnalyticsAppHealthOSVersionPerformance for deviceManagement + /// + /// 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.UserExperienceAnalyticsAppHealthOSVersionPerformance body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthOSVersionPerformance 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.UserExperienceAnalyticsAppHealthOSVersionPerformance.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// User experience analytics appHealth OS version Performance + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to userExperienceAnalyticsAppHealthOSVersionPerformance for deviceManagement + /// + /// 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.UserExperienceAnalyticsAppHealthOSVersionPerformance body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthOSVersionPerformance 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 UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics appHealth OS version Performance + /// + public class UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilderGetQueryParameters { + /// 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 UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new userExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilderPostRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOverview/MetricValues/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOverview/MetricValues/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..039ada0b4cd --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOverview/MetricValues/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthOverview.MetricValues.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}/deviceManagement/userExperienceAnalyticsAppHealthOverview/metricValues/$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}/deviceManagement/userExperienceAnalyticsAppHealthOverview/metricValues/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOverview/MetricValues/Item/UserExperienceAnalyticsMetricItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOverview/MetricValues/Item/UserExperienceAnalyticsMetricItemRequestBuilder.cs new file mode 100644 index 00000000000..8e9b84b6615 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOverview/MetricValues/Item/UserExperienceAnalyticsMetricItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthOverview.MetricValues.Item { + /// + /// Provides operations to manage the metricValues property of the microsoft.graph.userExperienceAnalyticsCategory entity. + /// + public class UserExperienceAnalyticsMetricItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UserExperienceAnalyticsMetricItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsMetricItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthOverview/metricValues/{userExperienceAnalyticsMetric%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsMetricItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsMetricItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthOverview/metricValues/{userExperienceAnalyticsMetric%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property metricValues for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// The metric values for the user experience analytics category. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsMetric.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property metricValues in deviceManagement + /// + /// 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(UserExperienceAnalyticsMetric body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(UserExperienceAnalyticsMetric 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, UserExperienceAnalyticsMetric.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property metricValues for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsMetricItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The metric values for the user experience analytics category. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsMetricItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property metricValues in deviceManagement + /// + /// 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(UserExperienceAnalyticsMetric body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(UserExperienceAnalyticsMetric 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 UserExperienceAnalyticsMetricItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsMetricItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsMetricItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsMetricItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The metric values for the user experience analytics category. Read-only. + /// + public class UserExperienceAnalyticsMetricItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsMetricItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsMetricItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsMetricItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new UserExperienceAnalyticsMetricItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsMetricItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsMetricItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsMetricItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsMetricItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOverview/MetricValues/MetricValuesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOverview/MetricValues/MetricValuesRequestBuilder.cs new file mode 100644 index 00000000000..a514f5360e7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOverview/MetricValues/MetricValuesRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthOverview.MetricValues.Count; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthOverview.MetricValues.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.DeviceManagement.UserExperienceAnalyticsAppHealthOverview.MetricValues { + /// + /// Provides operations to manage the metricValues property of the microsoft.graph.userExperienceAnalyticsCategory entity. + /// + public class MetricValuesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the metricValues property of the microsoft.graph.userExperienceAnalyticsCategory entity. + public UserExperienceAnalyticsMetricItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("userExperienceAnalyticsMetric%2Did", position); + return new UserExperienceAnalyticsMetricItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new MetricValuesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MetricValuesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthOverview/metricValues{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MetricValuesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MetricValuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthOverview/metricValues{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The metric values for the user experience analytics category. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsMetricCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to metricValues for deviceManagement + /// + /// 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(UserExperienceAnalyticsMetric body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(UserExperienceAnalyticsMetric 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, UserExperienceAnalyticsMetric.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The metric values for the user experience analytics category. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MetricValuesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to metricValues for deviceManagement + /// + /// 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(UserExperienceAnalyticsMetric body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(UserExperienceAnalyticsMetric 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 MetricValuesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The metric values for the user experience analytics category. Read-only. + /// + public class MetricValuesRequestBuilderGetQueryParameters { + /// 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 MetricValuesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MetricValuesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MetricValuesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new metricValuesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MetricValuesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MetricValuesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new metricValuesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public MetricValuesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOverview/UserExperienceAnalyticsAppHealthOverviewRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOverview/UserExperienceAnalyticsAppHealthOverviewRequestBuilder.cs new file mode 100644 index 00000000000..bdb99cbd3a4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOverview/UserExperienceAnalyticsAppHealthOverviewRequestBuilder.cs @@ -0,0 +1,248 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthOverview.MetricValues; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsAppHealthOverview { + /// + /// Provides operations to manage the userExperienceAnalyticsAppHealthOverview property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsAppHealthOverviewRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the metricValues property of the microsoft.graph.userExperienceAnalyticsCategory entity. + public MetricValuesRequestBuilder MetricValues { get => + new MetricValuesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthOverviewRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthOverviewRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthOverview{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsAppHealthOverviewRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsAppHealthOverviewRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthOverview{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property userExperienceAnalyticsAppHealthOverview for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// User experience analytics appHealth overview + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property userExperienceAnalyticsAppHealthOverview in deviceManagement + /// + /// 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(UserExperienceAnalyticsCategory body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(UserExperienceAnalyticsCategory 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, UserExperienceAnalyticsCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property userExperienceAnalyticsAppHealthOverview for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsAppHealthOverviewRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics appHealth overview + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsAppHealthOverviewRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property userExperienceAnalyticsAppHealthOverview in deviceManagement + /// + /// 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(UserExperienceAnalyticsCategory body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(UserExperienceAnalyticsCategory 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 UserExperienceAnalyticsAppHealthOverviewRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthOverviewRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsAppHealthOverviewRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthOverviewRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// User experience analytics appHealth overview + /// + public class UserExperienceAnalyticsAppHealthOverviewRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsAppHealthOverviewRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsAppHealthOverviewRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsAppHealthOverviewRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new userExperienceAnalyticsAppHealthOverviewRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthOverviewRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsAppHealthOverviewRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsAppHealthOverviewRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsAppHealthOverviewRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..12ae398bfa5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsBaselines.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}/deviceManagement/userExperienceAnalyticsBaselines/$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}/deviceManagement/userExperienceAnalyticsBaselines/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/AppHealthMetrics/AppHealthMetricsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/AppHealthMetrics/AppHealthMetricsRequestBuilder.cs new file mode 100644 index 00000000000..424bbe50751 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/AppHealthMetrics/AppHealthMetricsRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsBaselines.Item.AppHealthMetrics { + /// + /// Provides operations to manage the appHealthMetrics property of the microsoft.graph.userExperienceAnalyticsBaseline entity. + /// + public class AppHealthMetricsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new AppHealthMetricsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AppHealthMetricsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/appHealthMetrics{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AppHealthMetricsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AppHealthMetricsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/appHealthMetrics{?%24select,%24expand}", rawUrl) { + } + /// + /// The scores and insights for the application health metrics. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The scores and insights for the application health metrics. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new AppHealthMetricsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The scores and insights for the application health metrics. + /// + public class AppHealthMetricsRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 AppHealthMetricsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AppHealthMetricsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AppHealthMetricsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new appHealthMetricsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AppHealthMetricsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/BatteryHealthMetrics/BatteryHealthMetricsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/BatteryHealthMetrics/BatteryHealthMetricsRequestBuilder.cs new file mode 100644 index 00000000000..7fbaebbc9e5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/BatteryHealthMetrics/BatteryHealthMetricsRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsBaselines.Item.BatteryHealthMetrics { + /// + /// Provides operations to manage the batteryHealthMetrics property of the microsoft.graph.userExperienceAnalyticsBaseline entity. + /// + public class BatteryHealthMetricsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new BatteryHealthMetricsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BatteryHealthMetricsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/batteryHealthMetrics{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new BatteryHealthMetricsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BatteryHealthMetricsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/batteryHealthMetrics{?%24select,%24expand}", rawUrl) { + } + /// + /// The scores and insights for the battery health metrics. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The scores and insights for the battery health metrics. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new BatteryHealthMetricsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The scores and insights for the battery health metrics. + /// + public class BatteryHealthMetricsRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 BatteryHealthMetricsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public BatteryHealthMetricsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new BatteryHealthMetricsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new batteryHealthMetricsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public BatteryHealthMetricsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/BestPracticesMetrics/BestPracticesMetricsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/BestPracticesMetrics/BestPracticesMetricsRequestBuilder.cs new file mode 100644 index 00000000000..58a5d9e1bc6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/BestPracticesMetrics/BestPracticesMetricsRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsBaselines.Item.BestPracticesMetrics { + /// + /// Provides operations to manage the bestPracticesMetrics property of the microsoft.graph.userExperienceAnalyticsBaseline entity. + /// + public class BestPracticesMetricsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new BestPracticesMetricsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BestPracticesMetricsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/bestPracticesMetrics{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new BestPracticesMetricsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BestPracticesMetricsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/bestPracticesMetrics{?%24select,%24expand}", rawUrl) { + } + /// + /// The scores and insights for the best practices metrics. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The scores and insights for the best practices metrics. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new BestPracticesMetricsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The scores and insights for the best practices metrics. + /// + public class BestPracticesMetricsRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 BestPracticesMetricsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public BestPracticesMetricsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new BestPracticesMetricsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new bestPracticesMetricsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public BestPracticesMetricsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/DeviceBootPerformanceMetrics/DeviceBootPerformanceMetricsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/DeviceBootPerformanceMetrics/DeviceBootPerformanceMetricsRequestBuilder.cs new file mode 100644 index 00000000000..5bb7828b875 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/DeviceBootPerformanceMetrics/DeviceBootPerformanceMetricsRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsBaselines.Item.DeviceBootPerformanceMetrics { + /// + /// Provides operations to manage the deviceBootPerformanceMetrics property of the microsoft.graph.userExperienceAnalyticsBaseline entity. + /// + public class DeviceBootPerformanceMetricsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new DeviceBootPerformanceMetricsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DeviceBootPerformanceMetricsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/deviceBootPerformanceMetrics{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DeviceBootPerformanceMetricsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DeviceBootPerformanceMetricsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/deviceBootPerformanceMetrics{?%24select,%24expand}", rawUrl) { + } + /// + /// The scores and insights for the device boot performance metrics. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The scores and insights for the device boot performance metrics. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DeviceBootPerformanceMetricsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The scores and insights for the device boot performance metrics. + /// + public class DeviceBootPerformanceMetricsRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 DeviceBootPerformanceMetricsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DeviceBootPerformanceMetricsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DeviceBootPerformanceMetricsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new deviceBootPerformanceMetricsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DeviceBootPerformanceMetricsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/RebootAnalyticsMetrics/RebootAnalyticsMetricsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/RebootAnalyticsMetrics/RebootAnalyticsMetricsRequestBuilder.cs new file mode 100644 index 00000000000..0cfc1ab669d --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/RebootAnalyticsMetrics/RebootAnalyticsMetricsRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsBaselines.Item.RebootAnalyticsMetrics { + /// + /// Provides operations to manage the rebootAnalyticsMetrics property of the microsoft.graph.userExperienceAnalyticsBaseline entity. + /// + public class RebootAnalyticsMetricsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RebootAnalyticsMetricsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RebootAnalyticsMetricsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/rebootAnalyticsMetrics{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new RebootAnalyticsMetricsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RebootAnalyticsMetricsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/rebootAnalyticsMetrics{?%24select,%24expand}", rawUrl) { + } + /// + /// The scores and insights for the reboot analytics metrics. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The scores and insights for the reboot analytics metrics. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new RebootAnalyticsMetricsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The scores and insights for the reboot analytics metrics. + /// + public class RebootAnalyticsMetricsRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 RebootAnalyticsMetricsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public RebootAnalyticsMetricsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new RebootAnalyticsMetricsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new rebootAnalyticsMetricsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public RebootAnalyticsMetricsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/ResourcePerformanceMetrics/ResourcePerformanceMetricsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/ResourcePerformanceMetrics/ResourcePerformanceMetricsRequestBuilder.cs new file mode 100644 index 00000000000..b0a04637e3a --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/ResourcePerformanceMetrics/ResourcePerformanceMetricsRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsBaselines.Item.ResourcePerformanceMetrics { + /// + /// Provides operations to manage the resourcePerformanceMetrics property of the microsoft.graph.userExperienceAnalyticsBaseline entity. + /// + public class ResourcePerformanceMetricsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new ResourcePerformanceMetricsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ResourcePerformanceMetricsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/resourcePerformanceMetrics{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ResourcePerformanceMetricsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ResourcePerformanceMetricsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/resourcePerformanceMetrics{?%24select,%24expand}", rawUrl) { + } + /// + /// The scores and insights for the resource performance metrics. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The scores and insights for the resource performance metrics. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new ResourcePerformanceMetricsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The scores and insights for the resource performance metrics. + /// + public class ResourcePerformanceMetricsRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 ResourcePerformanceMetricsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ResourcePerformanceMetricsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ResourcePerformanceMetricsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new resourcePerformanceMetricsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ResourcePerformanceMetricsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/UserExperienceAnalyticsBaselineItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/UserExperienceAnalyticsBaselineItemRequestBuilder.cs new file mode 100644 index 00000000000..65c35f9c5a4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/UserExperienceAnalyticsBaselineItemRequestBuilder.cs @@ -0,0 +1,278 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsBaselines.Item.AppHealthMetrics; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsBaselines.Item.BatteryHealthMetrics; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsBaselines.Item.BestPracticesMetrics; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsBaselines.Item.DeviceBootPerformanceMetrics; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsBaselines.Item.RebootAnalyticsMetrics; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsBaselines.Item.ResourcePerformanceMetrics; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsBaselines.Item.WorkFromAnywhereMetrics; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsBaselines.Item { + /// + /// Provides operations to manage the userExperienceAnalyticsBaselines property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsBaselineItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the appHealthMetrics property of the microsoft.graph.userExperienceAnalyticsBaseline entity. + public AppHealthMetricsRequestBuilder AppHealthMetrics { get => + new AppHealthMetricsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the batteryHealthMetrics property of the microsoft.graph.userExperienceAnalyticsBaseline entity. + public BatteryHealthMetricsRequestBuilder BatteryHealthMetrics { get => + new BatteryHealthMetricsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the bestPracticesMetrics property of the microsoft.graph.userExperienceAnalyticsBaseline entity. + public BestPracticesMetricsRequestBuilder BestPracticesMetrics { get => + new BestPracticesMetricsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the deviceBootPerformanceMetrics property of the microsoft.graph.userExperienceAnalyticsBaseline entity. + public DeviceBootPerformanceMetricsRequestBuilder DeviceBootPerformanceMetrics { get => + new DeviceBootPerformanceMetricsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the rebootAnalyticsMetrics property of the microsoft.graph.userExperienceAnalyticsBaseline entity. + public RebootAnalyticsMetricsRequestBuilder RebootAnalyticsMetrics { get => + new RebootAnalyticsMetricsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the resourcePerformanceMetrics property of the microsoft.graph.userExperienceAnalyticsBaseline entity. + public ResourcePerformanceMetricsRequestBuilder ResourcePerformanceMetrics { get => + new ResourcePerformanceMetricsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the workFromAnywhereMetrics property of the microsoft.graph.userExperienceAnalyticsBaseline entity. + public WorkFromAnywhereMetricsRequestBuilder WorkFromAnywhereMetrics { get => + new WorkFromAnywhereMetricsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new UserExperienceAnalyticsBaselineItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsBaselineItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsBaselineItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsBaselineItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property userExperienceAnalyticsBaselines for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// User experience analytics baselines + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsBaseline.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property userExperienceAnalyticsBaselines in deviceManagement + /// + /// 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(UserExperienceAnalyticsBaseline body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(UserExperienceAnalyticsBaseline 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, UserExperienceAnalyticsBaseline.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property userExperienceAnalyticsBaselines for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsBaselineItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics baselines + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsBaselineItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property userExperienceAnalyticsBaselines in deviceManagement + /// + /// 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(UserExperienceAnalyticsBaseline body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(UserExperienceAnalyticsBaseline 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 UserExperienceAnalyticsBaselineItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsBaselineItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsBaselineItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsBaselineItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// User experience analytics baselines + /// + public class UserExperienceAnalyticsBaselineItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsBaselineItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsBaselineItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsBaselineItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new UserExperienceAnalyticsBaselineItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsBaselineItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsBaselineItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsBaselineItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsBaselineItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/WorkFromAnywhereMetrics/WorkFromAnywhereMetricsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/WorkFromAnywhereMetrics/WorkFromAnywhereMetricsRequestBuilder.cs new file mode 100644 index 00000000000..1053ddacec1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/WorkFromAnywhereMetrics/WorkFromAnywhereMetricsRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsBaselines.Item.WorkFromAnywhereMetrics { + /// + /// Provides operations to manage the workFromAnywhereMetrics property of the microsoft.graph.userExperienceAnalyticsBaseline entity. + /// + public class WorkFromAnywhereMetricsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new WorkFromAnywhereMetricsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WorkFromAnywhereMetricsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/workFromAnywhereMetrics{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new WorkFromAnywhereMetricsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WorkFromAnywhereMetricsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/workFromAnywhereMetrics{?%24select,%24expand}", rawUrl) { + } + /// + /// The scores and insights for the work from anywhere metrics. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The scores and insights for the work from anywhere metrics. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new WorkFromAnywhereMetricsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The scores and insights for the work from anywhere metrics. + /// + public class WorkFromAnywhereMetricsRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 WorkFromAnywhereMetricsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public WorkFromAnywhereMetricsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new WorkFromAnywhereMetricsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new workFromAnywhereMetricsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public WorkFromAnywhereMetricsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/UserExperienceAnalyticsBaselinesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/UserExperienceAnalyticsBaselinesRequestBuilder.cs new file mode 100644 index 00000000000..deeceaf7220 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/UserExperienceAnalyticsBaselinesRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsBaselines.Count; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsBaselines.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.DeviceManagement.UserExperienceAnalyticsBaselines { + /// + /// Provides operations to manage the userExperienceAnalyticsBaselines property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsBaselinesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsBaselines property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsBaselineItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("userExperienceAnalyticsBaseline%2Did", position); + return new UserExperienceAnalyticsBaselineItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new UserExperienceAnalyticsBaselinesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsBaselinesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsBaselinesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsBaselinesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// User experience analytics baselines + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsBaselineCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to userExperienceAnalyticsBaselines for deviceManagement + /// + /// 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(UserExperienceAnalyticsBaseline body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(UserExperienceAnalyticsBaseline 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, UserExperienceAnalyticsBaseline.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// User experience analytics baselines + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsBaselinesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to userExperienceAnalyticsBaselines for deviceManagement + /// + /// 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(UserExperienceAnalyticsBaseline body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(UserExperienceAnalyticsBaseline 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 UserExperienceAnalyticsBaselinesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics baselines + /// + public class UserExperienceAnalyticsBaselinesRequestBuilderGetQueryParameters { + /// 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 UserExperienceAnalyticsBaselinesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsBaselinesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsBaselinesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new userExperienceAnalyticsBaselinesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsBaselinesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsBaselinesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsBaselinesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsBaselinesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..dbc68acf3ea --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsCategories.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}/deviceManagement/userExperienceAnalyticsCategories/$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}/deviceManagement/userExperienceAnalyticsCategories/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Item/MetricValues/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Item/MetricValues/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..26613d0236c --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Item/MetricValues/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsCategories.Item.MetricValues.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}/deviceManagement/userExperienceAnalyticsCategories/{userExperienceAnalyticsCategory%2Did}/metricValues/$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}/deviceManagement/userExperienceAnalyticsCategories/{userExperienceAnalyticsCategory%2Did}/metricValues/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Item/MetricValues/Item/UserExperienceAnalyticsMetricItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Item/MetricValues/Item/UserExperienceAnalyticsMetricItemRequestBuilder.cs new file mode 100644 index 00000000000..9a2c8e3c11e --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Item/MetricValues/Item/UserExperienceAnalyticsMetricItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsCategories.Item.MetricValues.Item { + /// + /// Provides operations to manage the metricValues property of the microsoft.graph.userExperienceAnalyticsCategory entity. + /// + public class UserExperienceAnalyticsMetricItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UserExperienceAnalyticsMetricItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsMetricItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsCategories/{userExperienceAnalyticsCategory%2Did}/metricValues/{userExperienceAnalyticsMetric%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsMetricItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsMetricItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsCategories/{userExperienceAnalyticsCategory%2Did}/metricValues/{userExperienceAnalyticsMetric%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property metricValues for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// The metric values for the user experience analytics category. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsMetric.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property metricValues in deviceManagement + /// + /// 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(UserExperienceAnalyticsMetric body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(UserExperienceAnalyticsMetric 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, UserExperienceAnalyticsMetric.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property metricValues for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsMetricItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The metric values for the user experience analytics category. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsMetricItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property metricValues in deviceManagement + /// + /// 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(UserExperienceAnalyticsMetric body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(UserExperienceAnalyticsMetric 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 UserExperienceAnalyticsMetricItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsMetricItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsMetricItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsMetricItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The metric values for the user experience analytics category. Read-only. + /// + public class UserExperienceAnalyticsMetricItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsMetricItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsMetricItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsMetricItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new UserExperienceAnalyticsMetricItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsMetricItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsMetricItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsMetricItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsMetricItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Item/MetricValues/MetricValuesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Item/MetricValues/MetricValuesRequestBuilder.cs new file mode 100644 index 00000000000..f3bf75c4ac4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Item/MetricValues/MetricValuesRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsCategories.Item.MetricValues.Count; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsCategories.Item.MetricValues.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.DeviceManagement.UserExperienceAnalyticsCategories.Item.MetricValues { + /// + /// Provides operations to manage the metricValues property of the microsoft.graph.userExperienceAnalyticsCategory entity. + /// + public class MetricValuesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the metricValues property of the microsoft.graph.userExperienceAnalyticsCategory entity. + public UserExperienceAnalyticsMetricItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("userExperienceAnalyticsMetric%2Did", position); + return new UserExperienceAnalyticsMetricItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new MetricValuesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MetricValuesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsCategories/{userExperienceAnalyticsCategory%2Did}/metricValues{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MetricValuesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MetricValuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsCategories/{userExperienceAnalyticsCategory%2Did}/metricValues{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The metric values for the user experience analytics category. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsMetricCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to metricValues for deviceManagement + /// + /// 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(UserExperienceAnalyticsMetric body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(UserExperienceAnalyticsMetric 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, UserExperienceAnalyticsMetric.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The metric values for the user experience analytics category. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MetricValuesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to metricValues for deviceManagement + /// + /// 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(UserExperienceAnalyticsMetric body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(UserExperienceAnalyticsMetric 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 MetricValuesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The metric values for the user experience analytics category. Read-only. + /// + public class MetricValuesRequestBuilderGetQueryParameters { + /// 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 MetricValuesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MetricValuesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MetricValuesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new metricValuesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MetricValuesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MetricValuesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new metricValuesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public MetricValuesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Item/UserExperienceAnalyticsCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Item/UserExperienceAnalyticsCategoryItemRequestBuilder.cs new file mode 100644 index 00000000000..47f8d8d18b3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Item/UserExperienceAnalyticsCategoryItemRequestBuilder.cs @@ -0,0 +1,248 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsCategories.Item.MetricValues; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsCategories.Item { + /// + /// Provides operations to manage the userExperienceAnalyticsCategories property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsCategoryItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the metricValues property of the microsoft.graph.userExperienceAnalyticsCategory entity. + public MetricValuesRequestBuilder MetricValues { get => + new MetricValuesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new UserExperienceAnalyticsCategoryItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsCategoryItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsCategories/{userExperienceAnalyticsCategory%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsCategoryItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsCategoryItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsCategories/{userExperienceAnalyticsCategory%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property userExperienceAnalyticsCategories for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// User experience analytics categories + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property userExperienceAnalyticsCategories in deviceManagement + /// + /// 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(UserExperienceAnalyticsCategory body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(UserExperienceAnalyticsCategory 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, UserExperienceAnalyticsCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property userExperienceAnalyticsCategories for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsCategoryItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics categories + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsCategoryItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property userExperienceAnalyticsCategories in deviceManagement + /// + /// 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(UserExperienceAnalyticsCategory body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(UserExperienceAnalyticsCategory 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 UserExperienceAnalyticsCategoryItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsCategoryItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsCategoryItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsCategoryItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// User experience analytics categories + /// + public class UserExperienceAnalyticsCategoryItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsCategoryItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsCategoryItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsCategoryItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new UserExperienceAnalyticsCategoryItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsCategoryItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsCategoryItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsCategoryItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsCategoryItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/UserExperienceAnalyticsCategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/UserExperienceAnalyticsCategoriesRequestBuilder.cs new file mode 100644 index 00000000000..6d5389e8764 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/UserExperienceAnalyticsCategoriesRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsCategories.Count; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsCategories.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.DeviceManagement.UserExperienceAnalyticsCategories { + /// + /// Provides operations to manage the userExperienceAnalyticsCategories property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsCategoriesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsCategories property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsCategoryItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("userExperienceAnalyticsCategory%2Did", position); + return new UserExperienceAnalyticsCategoryItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new UserExperienceAnalyticsCategoriesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsCategoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsCategories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsCategoriesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsCategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsCategories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// User experience analytics categories + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsCategoryCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to userExperienceAnalyticsCategories for deviceManagement + /// + /// 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(UserExperienceAnalyticsCategory body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(UserExperienceAnalyticsCategory 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, UserExperienceAnalyticsCategory.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// User experience analytics categories + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsCategoriesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to userExperienceAnalyticsCategories for deviceManagement + /// + /// 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(UserExperienceAnalyticsCategory body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(UserExperienceAnalyticsCategory 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 UserExperienceAnalyticsCategoriesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics categories + /// + public class UserExperienceAnalyticsCategoriesRequestBuilderGetQueryParameters { + /// 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 UserExperienceAnalyticsCategoriesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsCategoriesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsCategoriesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new userExperienceAnalyticsCategoriesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsCategoriesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsCategoriesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsCategoriesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsCategoriesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..ca786b9df48 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsDevicePerformance.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}/deviceManagement/userExperienceAnalyticsDevicePerformance/$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}/deviceManagement/userExperienceAnalyticsDevicePerformance/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/Item/UserExperienceAnalyticsDevicePerformanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/Item/UserExperienceAnalyticsDevicePerformanceItemRequestBuilder.cs new file mode 100644 index 00000000000..64e051e7c34 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/Item/UserExperienceAnalyticsDevicePerformanceItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsDevicePerformance.Item { + /// + /// Provides operations to manage the userExperienceAnalyticsDevicePerformance property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsDevicePerformanceItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UserExperienceAnalyticsDevicePerformanceItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsDevicePerformanceItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDevicePerformance/{userExperienceAnalyticsDevicePerformance%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsDevicePerformanceItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsDevicePerformanceItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDevicePerformance/{userExperienceAnalyticsDevicePerformance%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property userExperienceAnalyticsDevicePerformance for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// User experience analytics device performance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = 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.UserExperienceAnalyticsDevicePerformance.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property userExperienceAnalyticsDevicePerformance in deviceManagement + /// + /// 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.UserExperienceAnalyticsDevicePerformance body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.UserExperienceAnalyticsDevicePerformance 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.UserExperienceAnalyticsDevicePerformance.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property userExperienceAnalyticsDevicePerformance for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsDevicePerformanceItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics device performance + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsDevicePerformanceItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property userExperienceAnalyticsDevicePerformance in deviceManagement + /// + /// 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.UserExperienceAnalyticsDevicePerformance body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsDevicePerformance 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 UserExperienceAnalyticsDevicePerformanceItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsDevicePerformanceItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsDevicePerformanceItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsDevicePerformanceItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// User experience analytics device performance + /// + public class UserExperienceAnalyticsDevicePerformanceItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsDevicePerformanceItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsDevicePerformanceItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsDevicePerformanceItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new UserExperienceAnalyticsDevicePerformanceItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsDevicePerformanceItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsDevicePerformanceItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsDevicePerformanceItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsDevicePerformanceItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/SummarizeDevicePerformanceDevicesWithSummarizeBy/SummarizeDevicePerformanceDevicesWithSummarizeByRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/SummarizeDevicePerformanceDevicesWithSummarizeBy/SummarizeDevicePerformanceDevicesWithSummarizeByRequestBuilder.cs new file mode 100644 index 00000000000..cd09e367ae5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/SummarizeDevicePerformanceDevicesWithSummarizeBy/SummarizeDevicePerformanceDevicesWithSummarizeByRequestBuilder.cs @@ -0,0 +1,149 @@ +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.DeviceManagement.UserExperienceAnalyticsDevicePerformance.SummarizeDevicePerformanceDevicesWithSummarizeBy { + /// + /// Provides operations to call the summarizeDevicePerformanceDevices method. + /// + public class SummarizeDevicePerformanceDevicesWithSummarizeByRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new SummarizeDevicePerformanceDevicesWithSummarizeByRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + /// Usage: summarizeBy='{summarizeBy}' + public SummarizeDevicePerformanceDevicesWithSummarizeByRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter, string summarizeBy = "") : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDevicePerformance/summarizeDevicePerformanceDevices(summarizeBy='{summarizeBy}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", pathParameters) { + if (!string.IsNullOrWhiteSpace(summarizeBy)) PathParameters.Add("summarizeBy", summarizeBy); + } + /// + /// Instantiates a new SummarizeDevicePerformanceDevicesWithSummarizeByRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SummarizeDevicePerformanceDevicesWithSummarizeByRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDevicePerformance/summarizeDevicePerformanceDevices(summarizeBy='{summarizeBy}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", rawUrl) { + } + /// + /// Invoke function summarizeDevicePerformanceDevices + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SummarizeDevicePerformanceDevicesWithSummarizeByResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke function summarizeDevicePerformanceDevices + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new SummarizeDevicePerformanceDevicesWithSummarizeByRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Invoke function summarizeDevicePerformanceDevices + /// + public class SummarizeDevicePerformanceDevicesWithSummarizeByRequestBuilderGetQueryParameters { + /// 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 SummarizeDevicePerformanceDevicesWithSummarizeByRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public SummarizeDevicePerformanceDevicesWithSummarizeByRequestBuilderGetQueryParameters QueryParameters { get; set; } = new SummarizeDevicePerformanceDevicesWithSummarizeByRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new summarizeDevicePerformanceDevicesWithSummarizeByRequestBuilderGetRequestConfiguration and sets the default values. + /// + public SummarizeDevicePerformanceDevicesWithSummarizeByRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/SummarizeDevicePerformanceDevicesWithSummarizeBy/SummarizeDevicePerformanceDevicesWithSummarizeByResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/SummarizeDevicePerformanceDevicesWithSummarizeBy/SummarizeDevicePerformanceDevicesWithSummarizeByResponse.cs new file mode 100644 index 00000000000..edb597b3f75 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/SummarizeDevicePerformanceDevicesWithSummarizeBy/SummarizeDevicePerformanceDevicesWithSummarizeByResponse.cs @@ -0,0 +1,49 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsDevicePerformance.SummarizeDevicePerformanceDevicesWithSummarizeBy { + public class SummarizeDevicePerformanceDevicesWithSummarizeByResponse : 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 SummarizeDevicePerformanceDevicesWithSummarizeByResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new SummarizeDevicePerformanceDevicesWithSummarizeByResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.UserExperienceAnalyticsDevicePerformance.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/DeviceManagement/UserExperienceAnalyticsDevicePerformance/UserExperienceAnalyticsDevicePerformanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/UserExperienceAnalyticsDevicePerformanceRequestBuilder.cs new file mode 100644 index 00000000000..aae2765da52 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/UserExperienceAnalyticsDevicePerformanceRequestBuilder.cs @@ -0,0 +1,244 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsDevicePerformance.Count; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsDevicePerformance.Item; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsDevicePerformance.SummarizeDevicePerformanceDevicesWithSummarizeBy; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsDevicePerformance { + /// + /// Provides operations to manage the userExperienceAnalyticsDevicePerformance property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsDevicePerformanceRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsDevicePerformance property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsDevicePerformanceItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("userExperienceAnalyticsDevicePerformance%2Did", position); + return new UserExperienceAnalyticsDevicePerformanceItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new UserExperienceAnalyticsDevicePerformanceRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsDevicePerformanceRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDevicePerformance{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsDevicePerformanceRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsDevicePerformanceRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDevicePerformance{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// User experience analytics device performance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsDevicePerformanceCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to userExperienceAnalyticsDevicePerformance for deviceManagement + /// + /// 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.UserExperienceAnalyticsDevicePerformance body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Microsoft.Graph.Models.UserExperienceAnalyticsDevicePerformance 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.UserExperienceAnalyticsDevicePerformance.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Provides operations to call the summarizeDevicePerformanceDevices method. + /// + /// Usage: summarizeBy='{summarizeBy}' + public SummarizeDevicePerformanceDevicesWithSummarizeByRequestBuilder SummarizeDevicePerformanceDevicesWithSummarizeBy(string summarizeBy) { + if(string.IsNullOrEmpty(summarizeBy)) throw new ArgumentNullException(nameof(summarizeBy)); + return new SummarizeDevicePerformanceDevicesWithSummarizeByRequestBuilder(PathParameters, RequestAdapter, summarizeBy); + } + /// + /// User experience analytics device performance + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsDevicePerformanceRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to userExperienceAnalyticsDevicePerformance for deviceManagement + /// + /// 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.UserExperienceAnalyticsDevicePerformance body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsDevicePerformance 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 UserExperienceAnalyticsDevicePerformanceRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics device performance + /// + public class UserExperienceAnalyticsDevicePerformanceRequestBuilderGetQueryParameters { + /// 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 UserExperienceAnalyticsDevicePerformanceRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsDevicePerformanceRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsDevicePerformanceRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new userExperienceAnalyticsDevicePerformanceRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsDevicePerformanceRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsDevicePerformanceRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsDevicePerformanceRequestBuilderPostRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsDevicePerformanceRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScores/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScores/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..2fab8a098ea --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScores/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsDeviceScores.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}/deviceManagement/userExperienceAnalyticsDeviceScores/$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}/deviceManagement/userExperienceAnalyticsDeviceScores/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScores/Item/UserExperienceAnalyticsDeviceScoresItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScores/Item/UserExperienceAnalyticsDeviceScoresItemRequestBuilder.cs new file mode 100644 index 00000000000..986752e4cea --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScores/Item/UserExperienceAnalyticsDeviceScoresItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsDeviceScores.Item { + /// + /// Provides operations to manage the userExperienceAnalyticsDeviceScores property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsDeviceScoresItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UserExperienceAnalyticsDeviceScoresItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsDeviceScoresItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceScores/{userExperienceAnalyticsDeviceScores%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsDeviceScoresItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsDeviceScoresItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceScores/{userExperienceAnalyticsDeviceScores%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property userExperienceAnalyticsDeviceScores for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// User experience analytics device scores + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = 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.UserExperienceAnalyticsDeviceScores.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property userExperienceAnalyticsDeviceScores in deviceManagement + /// + /// 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.UserExperienceAnalyticsDeviceScores body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.UserExperienceAnalyticsDeviceScores 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.UserExperienceAnalyticsDeviceScores.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property userExperienceAnalyticsDeviceScores for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsDeviceScoresItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics device scores + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsDeviceScoresItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property userExperienceAnalyticsDeviceScores in deviceManagement + /// + /// 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.UserExperienceAnalyticsDeviceScores body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsDeviceScores 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 UserExperienceAnalyticsDeviceScoresItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsDeviceScoresItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsDeviceScoresItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsDeviceScoresItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// User experience analytics device scores + /// + public class UserExperienceAnalyticsDeviceScoresItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsDeviceScoresItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsDeviceScoresItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsDeviceScoresItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new UserExperienceAnalyticsDeviceScoresItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsDeviceScoresItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsDeviceScoresItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsDeviceScoresItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsDeviceScoresItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScores/UserExperienceAnalyticsDeviceScoresRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScores/UserExperienceAnalyticsDeviceScoresRequestBuilder.cs new file mode 100644 index 00000000000..c9d442906b8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScores/UserExperienceAnalyticsDeviceScoresRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsDeviceScores.Count; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsDeviceScores.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.DeviceManagement.UserExperienceAnalyticsDeviceScores { + /// + /// Provides operations to manage the userExperienceAnalyticsDeviceScores property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsDeviceScoresRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsDeviceScores property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsDeviceScoresItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("userExperienceAnalyticsDeviceScores%2Did", position); + return new UserExperienceAnalyticsDeviceScoresItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new UserExperienceAnalyticsDeviceScoresRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsDeviceScoresRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceScores{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsDeviceScoresRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsDeviceScoresRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceScores{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// User experience analytics device scores + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsDeviceScoresCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to userExperienceAnalyticsDeviceScores for deviceManagement + /// + /// 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.UserExperienceAnalyticsDeviceScores body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Microsoft.Graph.Models.UserExperienceAnalyticsDeviceScores 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.UserExperienceAnalyticsDeviceScores.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// User experience analytics device scores + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsDeviceScoresRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to userExperienceAnalyticsDeviceScores for deviceManagement + /// + /// 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.UserExperienceAnalyticsDeviceScores body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsDeviceScores 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 UserExperienceAnalyticsDeviceScoresRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics device scores + /// + public class UserExperienceAnalyticsDeviceScoresRequestBuilderGetQueryParameters { + /// 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 UserExperienceAnalyticsDeviceScoresRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsDeviceScoresRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsDeviceScoresRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new userExperienceAnalyticsDeviceScoresRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsDeviceScoresRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsDeviceScoresRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsDeviceScoresRequestBuilderPostRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsDeviceScoresRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupHistory/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupHistory/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..a2288064e89 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupHistory/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsDeviceStartupHistory.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}/deviceManagement/userExperienceAnalyticsDeviceStartupHistory/$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}/deviceManagement/userExperienceAnalyticsDeviceStartupHistory/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupHistory/Item/UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupHistory/Item/UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilder.cs new file mode 100644 index 00000000000..2c80615919c --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupHistory/Item/UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsDeviceStartupHistory.Item { + /// + /// Provides operations to manage the userExperienceAnalyticsDeviceStartupHistory property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceStartupHistory/{userExperienceAnalyticsDeviceStartupHistory%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceStartupHistory/{userExperienceAnalyticsDeviceStartupHistory%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property userExperienceAnalyticsDeviceStartupHistory for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// User experience analytics device Startup History + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = 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.UserExperienceAnalyticsDeviceStartupHistory.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property userExperienceAnalyticsDeviceStartupHistory in deviceManagement + /// + /// 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.UserExperienceAnalyticsDeviceStartupHistory body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.UserExperienceAnalyticsDeviceStartupHistory 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.UserExperienceAnalyticsDeviceStartupHistory.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property userExperienceAnalyticsDeviceStartupHistory for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics device Startup History + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property userExperienceAnalyticsDeviceStartupHistory in deviceManagement + /// + /// 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.UserExperienceAnalyticsDeviceStartupHistory body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsDeviceStartupHistory 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 UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// User experience analytics device Startup History + /// + public class UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupHistory/UserExperienceAnalyticsDeviceStartupHistoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupHistory/UserExperienceAnalyticsDeviceStartupHistoryRequestBuilder.cs new file mode 100644 index 00000000000..d6d2742e0a8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupHistory/UserExperienceAnalyticsDeviceStartupHistoryRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsDeviceStartupHistory.Count; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsDeviceStartupHistory.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.DeviceManagement.UserExperienceAnalyticsDeviceStartupHistory { + /// + /// Provides operations to manage the userExperienceAnalyticsDeviceStartupHistory property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsDeviceStartupHistoryRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsDeviceStartupHistory property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("userExperienceAnalyticsDeviceStartupHistory%2Did", position); + return new UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new UserExperienceAnalyticsDeviceStartupHistoryRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsDeviceStartupHistoryRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceStartupHistory{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsDeviceStartupHistoryRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsDeviceStartupHistoryRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceStartupHistory{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// User experience analytics device Startup History + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsDeviceStartupHistoryCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to userExperienceAnalyticsDeviceStartupHistory for deviceManagement + /// + /// 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.UserExperienceAnalyticsDeviceStartupHistory body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Microsoft.Graph.Models.UserExperienceAnalyticsDeviceStartupHistory 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.UserExperienceAnalyticsDeviceStartupHistory.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// User experience analytics device Startup History + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsDeviceStartupHistoryRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to userExperienceAnalyticsDeviceStartupHistory for deviceManagement + /// + /// 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.UserExperienceAnalyticsDeviceStartupHistory body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsDeviceStartupHistory 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 UserExperienceAnalyticsDeviceStartupHistoryRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics device Startup History + /// + public class UserExperienceAnalyticsDeviceStartupHistoryRequestBuilderGetQueryParameters { + /// 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 UserExperienceAnalyticsDeviceStartupHistoryRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsDeviceStartupHistoryRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsDeviceStartupHistoryRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new userExperienceAnalyticsDeviceStartupHistoryRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsDeviceStartupHistoryRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsDeviceStartupHistoryRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsDeviceStartupHistoryRequestBuilderPostRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsDeviceStartupHistoryRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcesses/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcesses/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..44681c2275c --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcesses/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsDeviceStartupProcesses.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}/deviceManagement/userExperienceAnalyticsDeviceStartupProcesses/$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}/deviceManagement/userExperienceAnalyticsDeviceStartupProcesses/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcesses/Item/UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcesses/Item/UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilder.cs new file mode 100644 index 00000000000..27c9c450827 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcesses/Item/UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsDeviceStartupProcesses.Item { + /// + /// Provides operations to manage the userExperienceAnalyticsDeviceStartupProcesses property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceStartupProcesses/{userExperienceAnalyticsDeviceStartupProcess%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceStartupProcesses/{userExperienceAnalyticsDeviceStartupProcess%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property userExperienceAnalyticsDeviceStartupProcesses for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// User experience analytics device Startup Processes + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsDeviceStartupProcess.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property userExperienceAnalyticsDeviceStartupProcesses in deviceManagement + /// + /// 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(UserExperienceAnalyticsDeviceStartupProcess body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(UserExperienceAnalyticsDeviceStartupProcess 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, UserExperienceAnalyticsDeviceStartupProcess.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property userExperienceAnalyticsDeviceStartupProcesses for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics device Startup Processes + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property userExperienceAnalyticsDeviceStartupProcesses in deviceManagement + /// + /// 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(UserExperienceAnalyticsDeviceStartupProcess body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(UserExperienceAnalyticsDeviceStartupProcess 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 UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// User experience analytics device Startup Processes + /// + public class UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcesses/UserExperienceAnalyticsDeviceStartupProcessesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcesses/UserExperienceAnalyticsDeviceStartupProcessesRequestBuilder.cs new file mode 100644 index 00000000000..b8a61f9c002 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcesses/UserExperienceAnalyticsDeviceStartupProcessesRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsDeviceStartupProcesses.Count; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsDeviceStartupProcesses.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.DeviceManagement.UserExperienceAnalyticsDeviceStartupProcesses { + /// + /// Provides operations to manage the userExperienceAnalyticsDeviceStartupProcesses property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsDeviceStartupProcessesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsDeviceStartupProcesses property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("userExperienceAnalyticsDeviceStartupProcess%2Did", position); + return new UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new UserExperienceAnalyticsDeviceStartupProcessesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsDeviceStartupProcessesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceStartupProcesses{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsDeviceStartupProcessesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsDeviceStartupProcessesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceStartupProcesses{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// User experience analytics device Startup Processes + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsDeviceStartupProcessCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to userExperienceAnalyticsDeviceStartupProcesses for deviceManagement + /// + /// 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(UserExperienceAnalyticsDeviceStartupProcess body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(UserExperienceAnalyticsDeviceStartupProcess 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, UserExperienceAnalyticsDeviceStartupProcess.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// User experience analytics device Startup Processes + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsDeviceStartupProcessesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to userExperienceAnalyticsDeviceStartupProcesses for deviceManagement + /// + /// 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(UserExperienceAnalyticsDeviceStartupProcess body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(UserExperienceAnalyticsDeviceStartupProcess 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 UserExperienceAnalyticsDeviceStartupProcessesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics device Startup Processes + /// + public class UserExperienceAnalyticsDeviceStartupProcessesRequestBuilderGetQueryParameters { + /// 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 UserExperienceAnalyticsDeviceStartupProcessesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsDeviceStartupProcessesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsDeviceStartupProcessesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new userExperienceAnalyticsDeviceStartupProcessesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsDeviceStartupProcessesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsDeviceStartupProcessesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsDeviceStartupProcessesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsDeviceStartupProcessesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsMetricHistory/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsMetricHistory/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..bbcf4d484fe --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsMetricHistory/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsMetricHistory.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}/deviceManagement/userExperienceAnalyticsMetricHistory/$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}/deviceManagement/userExperienceAnalyticsMetricHistory/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsMetricHistory/Item/UserExperienceAnalyticsMetricHistoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsMetricHistory/Item/UserExperienceAnalyticsMetricHistoryItemRequestBuilder.cs new file mode 100644 index 00000000000..7282f067aa6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsMetricHistory/Item/UserExperienceAnalyticsMetricHistoryItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsMetricHistory.Item { + /// + /// Provides operations to manage the userExperienceAnalyticsMetricHistory property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsMetricHistoryItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UserExperienceAnalyticsMetricHistoryItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsMetricHistoryItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsMetricHistory/{userExperienceAnalyticsMetricHistory%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsMetricHistoryItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsMetricHistoryItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsMetricHistory/{userExperienceAnalyticsMetricHistory%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property userExperienceAnalyticsMetricHistory for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// User experience analytics metric history + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = 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.UserExperienceAnalyticsMetricHistory.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property userExperienceAnalyticsMetricHistory in deviceManagement + /// + /// 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.UserExperienceAnalyticsMetricHistory body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.UserExperienceAnalyticsMetricHistory 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.UserExperienceAnalyticsMetricHistory.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property userExperienceAnalyticsMetricHistory for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsMetricHistoryItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics metric history + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsMetricHistoryItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property userExperienceAnalyticsMetricHistory in deviceManagement + /// + /// 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.UserExperienceAnalyticsMetricHistory body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsMetricHistory 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 UserExperienceAnalyticsMetricHistoryItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsMetricHistoryItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsMetricHistoryItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsMetricHistoryItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// User experience analytics metric history + /// + public class UserExperienceAnalyticsMetricHistoryItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsMetricHistoryItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsMetricHistoryItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsMetricHistoryItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new UserExperienceAnalyticsMetricHistoryItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsMetricHistoryItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsMetricHistoryItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsMetricHistoryItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsMetricHistoryItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsMetricHistory/UserExperienceAnalyticsMetricHistoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsMetricHistory/UserExperienceAnalyticsMetricHistoryRequestBuilder.cs new file mode 100644 index 00000000000..63fd48ee97c --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsMetricHistory/UserExperienceAnalyticsMetricHistoryRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsMetricHistory.Count; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsMetricHistory.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.DeviceManagement.UserExperienceAnalyticsMetricHistory { + /// + /// Provides operations to manage the userExperienceAnalyticsMetricHistory property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsMetricHistoryRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsMetricHistory property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsMetricHistoryItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("userExperienceAnalyticsMetricHistory%2Did", position); + return new UserExperienceAnalyticsMetricHistoryItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new UserExperienceAnalyticsMetricHistoryRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsMetricHistoryRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsMetricHistory{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsMetricHistoryRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsMetricHistoryRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsMetricHistory{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// User experience analytics metric history + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsMetricHistoryCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to userExperienceAnalyticsMetricHistory for deviceManagement + /// + /// 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.UserExperienceAnalyticsMetricHistory body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Microsoft.Graph.Models.UserExperienceAnalyticsMetricHistory 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.UserExperienceAnalyticsMetricHistory.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// User experience analytics metric history + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsMetricHistoryRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to userExperienceAnalyticsMetricHistory for deviceManagement + /// + /// 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.UserExperienceAnalyticsMetricHistory body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsMetricHistory 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 UserExperienceAnalyticsMetricHistoryRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics metric history + /// + public class UserExperienceAnalyticsMetricHistoryRequestBuilderGetQueryParameters { + /// 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 UserExperienceAnalyticsMetricHistoryRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsMetricHistoryRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsMetricHistoryRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new userExperienceAnalyticsMetricHistoryRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsMetricHistoryRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsMetricHistoryRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsMetricHistoryRequestBuilderPostRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsMetricHistoryRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsModelScores/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsModelScores/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..3c37b1dd680 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsModelScores/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsModelScores.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}/deviceManagement/userExperienceAnalyticsModelScores/$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}/deviceManagement/userExperienceAnalyticsModelScores/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsModelScores/Item/UserExperienceAnalyticsModelScoresItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsModelScores/Item/UserExperienceAnalyticsModelScoresItemRequestBuilder.cs new file mode 100644 index 00000000000..2f09bd407a8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsModelScores/Item/UserExperienceAnalyticsModelScoresItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsModelScores.Item { + /// + /// Provides operations to manage the userExperienceAnalyticsModelScores property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsModelScoresItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UserExperienceAnalyticsModelScoresItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsModelScoresItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsModelScores/{userExperienceAnalyticsModelScores%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsModelScoresItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsModelScoresItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsModelScores/{userExperienceAnalyticsModelScores%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property userExperienceAnalyticsModelScores for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// User experience analytics model scores + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = 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.UserExperienceAnalyticsModelScores.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property userExperienceAnalyticsModelScores in deviceManagement + /// + /// 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.UserExperienceAnalyticsModelScores body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.UserExperienceAnalyticsModelScores 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.UserExperienceAnalyticsModelScores.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property userExperienceAnalyticsModelScores for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsModelScoresItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics model scores + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsModelScoresItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property userExperienceAnalyticsModelScores in deviceManagement + /// + /// 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.UserExperienceAnalyticsModelScores body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsModelScores 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 UserExperienceAnalyticsModelScoresItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsModelScoresItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsModelScoresItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsModelScoresItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// User experience analytics model scores + /// + public class UserExperienceAnalyticsModelScoresItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsModelScoresItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsModelScoresItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsModelScoresItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new UserExperienceAnalyticsModelScoresItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsModelScoresItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsModelScoresItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsModelScoresItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsModelScoresItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsModelScores/UserExperienceAnalyticsModelScoresRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsModelScores/UserExperienceAnalyticsModelScoresRequestBuilder.cs new file mode 100644 index 00000000000..9201a7670c6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsModelScores/UserExperienceAnalyticsModelScoresRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsModelScores.Count; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsModelScores.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.DeviceManagement.UserExperienceAnalyticsModelScores { + /// + /// Provides operations to manage the userExperienceAnalyticsModelScores property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsModelScoresRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsModelScores property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsModelScoresItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("userExperienceAnalyticsModelScores%2Did", position); + return new UserExperienceAnalyticsModelScoresItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new UserExperienceAnalyticsModelScoresRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsModelScoresRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsModelScores{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsModelScoresRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsModelScoresRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsModelScores{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// User experience analytics model scores + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsModelScoresCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to userExperienceAnalyticsModelScores for deviceManagement + /// + /// 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.UserExperienceAnalyticsModelScores body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Microsoft.Graph.Models.UserExperienceAnalyticsModelScores 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.UserExperienceAnalyticsModelScores.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// User experience analytics model scores + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsModelScoresRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to userExperienceAnalyticsModelScores for deviceManagement + /// + /// 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.UserExperienceAnalyticsModelScores body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsModelScores 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 UserExperienceAnalyticsModelScoresRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics model scores + /// + public class UserExperienceAnalyticsModelScoresRequestBuilderGetQueryParameters { + /// 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 UserExperienceAnalyticsModelScoresRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsModelScoresRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsModelScoresRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new userExperienceAnalyticsModelScoresRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsModelScoresRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsModelScoresRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsModelScoresRequestBuilderPostRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsModelScoresRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsOverview/UserExperienceAnalyticsOverviewRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsOverview/UserExperienceAnalyticsOverviewRequestBuilder.cs new file mode 100644 index 00000000000..9d335371454 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsOverview/UserExperienceAnalyticsOverviewRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsOverview { + /// + /// Provides operations to manage the userExperienceAnalyticsOverview property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsOverviewRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UserExperienceAnalyticsOverviewRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsOverviewRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsOverview{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsOverviewRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsOverviewRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsOverview{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property userExperienceAnalyticsOverview for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// User experience analytics overview + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = 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.UserExperienceAnalyticsOverview.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property userExperienceAnalyticsOverview in deviceManagement + /// + /// 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.UserExperienceAnalyticsOverview body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.UserExperienceAnalyticsOverview 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.UserExperienceAnalyticsOverview.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property userExperienceAnalyticsOverview for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsOverviewRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics overview + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsOverviewRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property userExperienceAnalyticsOverview in deviceManagement + /// + /// 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.UserExperienceAnalyticsOverview body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsOverview 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 UserExperienceAnalyticsOverviewRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsOverviewRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsOverviewRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsOverviewRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// User experience analytics overview + /// + public class UserExperienceAnalyticsOverviewRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsOverviewRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsOverviewRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsOverviewRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new userExperienceAnalyticsOverviewRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsOverviewRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsOverviewRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsOverviewRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsOverviewRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsScoreHistory/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsScoreHistory/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..32d98a6c223 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsScoreHistory/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsScoreHistory.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}/deviceManagement/userExperienceAnalyticsScoreHistory/$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}/deviceManagement/userExperienceAnalyticsScoreHistory/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsScoreHistory/Item/UserExperienceAnalyticsScoreHistoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsScoreHistory/Item/UserExperienceAnalyticsScoreHistoryItemRequestBuilder.cs new file mode 100644 index 00000000000..971b3c19db9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsScoreHistory/Item/UserExperienceAnalyticsScoreHistoryItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsScoreHistory.Item { + /// + /// Provides operations to manage the userExperienceAnalyticsScoreHistory property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsScoreHistoryItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UserExperienceAnalyticsScoreHistoryItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsScoreHistoryItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsScoreHistory/{userExperienceAnalyticsScoreHistory%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsScoreHistoryItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsScoreHistoryItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsScoreHistory/{userExperienceAnalyticsScoreHistory%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property userExperienceAnalyticsScoreHistory for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// User experience analytics device Startup Score History + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = 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.UserExperienceAnalyticsScoreHistory.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property userExperienceAnalyticsScoreHistory in deviceManagement + /// + /// 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.UserExperienceAnalyticsScoreHistory body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.UserExperienceAnalyticsScoreHistory 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.UserExperienceAnalyticsScoreHistory.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property userExperienceAnalyticsScoreHistory for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsScoreHistoryItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics device Startup Score History + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsScoreHistoryItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property userExperienceAnalyticsScoreHistory in deviceManagement + /// + /// 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.UserExperienceAnalyticsScoreHistory body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsScoreHistory 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 UserExperienceAnalyticsScoreHistoryItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsScoreHistoryItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsScoreHistoryItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsScoreHistoryItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// User experience analytics device Startup Score History + /// + public class UserExperienceAnalyticsScoreHistoryItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsScoreHistoryItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsScoreHistoryItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsScoreHistoryItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new UserExperienceAnalyticsScoreHistoryItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsScoreHistoryItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsScoreHistoryItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsScoreHistoryItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsScoreHistoryItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsScoreHistory/UserExperienceAnalyticsScoreHistoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsScoreHistory/UserExperienceAnalyticsScoreHistoryRequestBuilder.cs new file mode 100644 index 00000000000..6a7e34fb690 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsScoreHistory/UserExperienceAnalyticsScoreHistoryRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsScoreHistory.Count; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsScoreHistory.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.DeviceManagement.UserExperienceAnalyticsScoreHistory { + /// + /// Provides operations to manage the userExperienceAnalyticsScoreHistory property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsScoreHistoryRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsScoreHistory property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsScoreHistoryItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("userExperienceAnalyticsScoreHistory%2Did", position); + return new UserExperienceAnalyticsScoreHistoryItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new UserExperienceAnalyticsScoreHistoryRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsScoreHistoryRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsScoreHistory{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsScoreHistoryRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsScoreHistoryRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsScoreHistory{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// User experience analytics device Startup Score History + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsScoreHistoryCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to userExperienceAnalyticsScoreHistory for deviceManagement + /// + /// 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.UserExperienceAnalyticsScoreHistory body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Microsoft.Graph.Models.UserExperienceAnalyticsScoreHistory 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.UserExperienceAnalyticsScoreHistory.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// User experience analytics device Startup Score History + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsScoreHistoryRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to userExperienceAnalyticsScoreHistory for deviceManagement + /// + /// 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.UserExperienceAnalyticsScoreHistory body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsScoreHistory 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 UserExperienceAnalyticsScoreHistoryRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics device Startup Score History + /// + public class UserExperienceAnalyticsScoreHistoryRequestBuilderGetQueryParameters { + /// 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 UserExperienceAnalyticsScoreHistoryRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsScoreHistoryRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsScoreHistoryRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new userExperienceAnalyticsScoreHistoryRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsScoreHistoryRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsScoreHistoryRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsScoreHistoryRequestBuilderPostRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsScoreHistoryRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsSummarizeWorkFromAnywhereDevices/UserExperienceAnalyticsSummarizeWorkFromAnywhereDevicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsSummarizeWorkFromAnywhereDevices/UserExperienceAnalyticsSummarizeWorkFromAnywhereDevicesRequestBuilder.cs new file mode 100644 index 00000000000..3df994bc53a --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsSummarizeWorkFromAnywhereDevices/UserExperienceAnalyticsSummarizeWorkFromAnywhereDevicesRequestBuilder.cs @@ -0,0 +1,91 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsSummarizeWorkFromAnywhereDevices { + /// + /// Provides operations to call the userExperienceAnalyticsSummarizeWorkFromAnywhereDevices method. + /// + public class UserExperienceAnalyticsSummarizeWorkFromAnywhereDevicesRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UserExperienceAnalyticsSummarizeWorkFromAnywhereDevicesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsSummarizeWorkFromAnywhereDevicesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsSummarizeWorkFromAnywhereDevices()", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsSummarizeWorkFromAnywhereDevicesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsSummarizeWorkFromAnywhereDevicesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsSummarizeWorkFromAnywhereDevices()", rawUrl) { + } + /// + /// Invoke function userExperienceAnalyticsSummarizeWorkFromAnywhereDevices + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsWorkFromAnywhereDevicesSummary.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke function userExperienceAnalyticsSummarizeWorkFromAnywhereDevices + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsSummarizeWorkFromAnywhereDevicesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsSummarizeWorkFromAnywhereDevicesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsSummarizeWorkFromAnywhereDevicesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsSummarizeWorkFromAnywhereDevicesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric/UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric/UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilder.cs new file mode 100644 index 00000000000..387d4c21ddf --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric/UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric { + /// + /// Provides operations to manage the userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// User experience analytics work from anywhere hardware readiness metrics. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = 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.UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric in deviceManagement + /// + /// 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.UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric 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.UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics work from anywhere hardware readiness metrics. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric in deviceManagement + /// + /// 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.UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric 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 UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// User experience analytics work from anywhere hardware readiness metrics. + /// + public class UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..b07fab9a2be --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsWorkFromAnywhereMetrics.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}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereMetrics/$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}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereMetrics/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Item/MetricDevices/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Item/MetricDevices/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..0f98c3f02b5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Item/MetricDevices/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsWorkFromAnywhereMetrics.Item.MetricDevices.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}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereMetrics/{userExperienceAnalyticsWorkFromAnywhereMetric%2Did}/metricDevices/$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}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereMetrics/{userExperienceAnalyticsWorkFromAnywhereMetric%2Did}/metricDevices/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Item/MetricDevices/Item/UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Item/MetricDevices/Item/UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilder.cs new file mode 100644 index 00000000000..ff1546b25c9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Item/MetricDevices/Item/UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsWorkFromAnywhereMetrics.Item.MetricDevices.Item { + /// + /// Provides operations to manage the metricDevices property of the microsoft.graph.userExperienceAnalyticsWorkFromAnywhereMetric entity. + /// + public class UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereMetrics/{userExperienceAnalyticsWorkFromAnywhereMetric%2Did}/metricDevices/{userExperienceAnalyticsWorkFromAnywhereDevice%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereMetrics/{userExperienceAnalyticsWorkFromAnywhereMetric%2Did}/metricDevices/{userExperienceAnalyticsWorkFromAnywhereDevice%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property metricDevices for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// The work from anywhere metric devices. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsWorkFromAnywhereDevice.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property metricDevices in deviceManagement + /// + /// 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(UserExperienceAnalyticsWorkFromAnywhereDevice body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(UserExperienceAnalyticsWorkFromAnywhereDevice 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, UserExperienceAnalyticsWorkFromAnywhereDevice.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property metricDevices for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The work from anywhere metric devices. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property metricDevices in deviceManagement + /// + /// 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(UserExperienceAnalyticsWorkFromAnywhereDevice body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(UserExperienceAnalyticsWorkFromAnywhereDevice 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 UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The work from anywhere metric devices. Read-only. + /// + public class UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Item/MetricDevices/MetricDevicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Item/MetricDevices/MetricDevicesRequestBuilder.cs new file mode 100644 index 00000000000..511d05e5b89 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Item/MetricDevices/MetricDevicesRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsWorkFromAnywhereMetrics.Item.MetricDevices.Count; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsWorkFromAnywhereMetrics.Item.MetricDevices.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.DeviceManagement.UserExperienceAnalyticsWorkFromAnywhereMetrics.Item.MetricDevices { + /// + /// Provides operations to manage the metricDevices property of the microsoft.graph.userExperienceAnalyticsWorkFromAnywhereMetric entity. + /// + public class MetricDevicesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the metricDevices property of the microsoft.graph.userExperienceAnalyticsWorkFromAnywhereMetric entity. + public UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("userExperienceAnalyticsWorkFromAnywhereDevice%2Did", position); + return new UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new MetricDevicesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MetricDevicesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereMetrics/{userExperienceAnalyticsWorkFromAnywhereMetric%2Did}/metricDevices{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MetricDevicesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MetricDevicesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereMetrics/{userExperienceAnalyticsWorkFromAnywhereMetric%2Did}/metricDevices{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The work from anywhere metric devices. Read-only. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsWorkFromAnywhereDeviceCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to metricDevices for deviceManagement + /// + /// 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(UserExperienceAnalyticsWorkFromAnywhereDevice body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(UserExperienceAnalyticsWorkFromAnywhereDevice 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, UserExperienceAnalyticsWorkFromAnywhereDevice.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The work from anywhere metric devices. Read-only. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new MetricDevicesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to metricDevices for deviceManagement + /// + /// 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(UserExperienceAnalyticsWorkFromAnywhereDevice body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(UserExperienceAnalyticsWorkFromAnywhereDevice 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 MetricDevicesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The work from anywhere metric devices. Read-only. + /// + public class MetricDevicesRequestBuilderGetQueryParameters { + /// 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 MetricDevicesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MetricDevicesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MetricDevicesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new metricDevicesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MetricDevicesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MetricDevicesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new metricDevicesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public MetricDevicesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Item/UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Item/UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilder.cs new file mode 100644 index 00000000000..53d51202081 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Item/UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilder.cs @@ -0,0 +1,248 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsWorkFromAnywhereMetrics.Item.MetricDevices; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsWorkFromAnywhereMetrics.Item { + /// + /// Provides operations to manage the userExperienceAnalyticsWorkFromAnywhereMetrics property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the metricDevices property of the microsoft.graph.userExperienceAnalyticsWorkFromAnywhereMetric entity. + public MetricDevicesRequestBuilder MetricDevices { get => + new MetricDevicesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereMetrics/{userExperienceAnalyticsWorkFromAnywhereMetric%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereMetrics/{userExperienceAnalyticsWorkFromAnywhereMetric%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property userExperienceAnalyticsWorkFromAnywhereMetrics for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// User experience analytics work from anywhere metrics. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsWorkFromAnywhereMetric.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property userExperienceAnalyticsWorkFromAnywhereMetrics in deviceManagement + /// + /// 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(UserExperienceAnalyticsWorkFromAnywhereMetric body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(UserExperienceAnalyticsWorkFromAnywhereMetric 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, UserExperienceAnalyticsWorkFromAnywhereMetric.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property userExperienceAnalyticsWorkFromAnywhereMetrics for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics work from anywhere metrics. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property userExperienceAnalyticsWorkFromAnywhereMetrics in deviceManagement + /// + /// 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(UserExperienceAnalyticsWorkFromAnywhereMetric body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(UserExperienceAnalyticsWorkFromAnywhereMetric 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 UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// User experience analytics work from anywhere metrics. + /// + public class UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilder.cs new file mode 100644 index 00000000000..4e98b09cba2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsWorkFromAnywhereMetrics.Count; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsWorkFromAnywhereMetrics.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.DeviceManagement.UserExperienceAnalyticsWorkFromAnywhereMetrics { + /// + /// Provides operations to manage the userExperienceAnalyticsWorkFromAnywhereMetrics property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsWorkFromAnywhereMetrics property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("userExperienceAnalyticsWorkFromAnywhereMetric%2Did", position); + return new UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereMetrics{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereMetrics{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// User experience analytics work from anywhere metrics. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsWorkFromAnywhereMetricCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to userExperienceAnalyticsWorkFromAnywhereMetrics for deviceManagement + /// + /// 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(UserExperienceAnalyticsWorkFromAnywhereMetric body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(UserExperienceAnalyticsWorkFromAnywhereMetric 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, UserExperienceAnalyticsWorkFromAnywhereMetric.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// User experience analytics work from anywhere metrics. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to userExperienceAnalyticsWorkFromAnywhereMetrics for deviceManagement + /// + /// 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(UserExperienceAnalyticsWorkFromAnywhereMetric body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(UserExperienceAnalyticsWorkFromAnywhereMetric 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 UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// User experience analytics work from anywhere metrics. + /// + public class UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilderGetQueryParameters { + /// 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 UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new userExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereModelPerformance/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereModelPerformance/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..737c087fe79 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereModelPerformance/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsWorkFromAnywhereModelPerformance.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}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereModelPerformance/$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}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereModelPerformance/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereModelPerformance/Item/UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereModelPerformance/Item/UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilder.cs new file mode 100644 index 00000000000..d303a324889 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereModelPerformance/Item/UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsWorkFromAnywhereModelPerformance.Item { + /// + /// Provides operations to manage the userExperienceAnalyticsWorkFromAnywhereModelPerformance property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereModelPerformance/{userExperienceAnalyticsWorkFromAnywhereModelPerformance%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereModelPerformance/{userExperienceAnalyticsWorkFromAnywhereModelPerformance%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property userExperienceAnalyticsWorkFromAnywhereModelPerformance for deviceManagement + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// The user experience analytics work from anywhere model performance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = 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.UserExperienceAnalyticsWorkFromAnywhereModelPerformance.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property userExperienceAnalyticsWorkFromAnywhereModelPerformance in deviceManagement + /// + /// 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.UserExperienceAnalyticsWorkFromAnywhereModelPerformance body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.UserExperienceAnalyticsWorkFromAnywhereModelPerformance 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.UserExperienceAnalyticsWorkFromAnywhereModelPerformance.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property userExperienceAnalyticsWorkFromAnywhereModelPerformance for deviceManagement + /// + /// Configuration 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 UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The user experience analytics work from anywhere model performance + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property userExperienceAnalyticsWorkFromAnywhereModelPerformance in deviceManagement + /// + /// 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.UserExperienceAnalyticsWorkFromAnywhereModelPerformance body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsWorkFromAnywhereModelPerformance 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 UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The user experience analytics work from anywhere model performance + /// + public class UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereModelPerformance/UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereModelPerformance/UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilder.cs new file mode 100644 index 00000000000..e2469f98151 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereModelPerformance/UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsWorkFromAnywhereModelPerformance.Count; +using Microsoft.Graph.DeviceManagement.UserExperienceAnalyticsWorkFromAnywhereModelPerformance.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.DeviceManagement.UserExperienceAnalyticsWorkFromAnywhereModelPerformance { + /// + /// Provides operations to manage the userExperienceAnalyticsWorkFromAnywhereModelPerformance property of the microsoft.graph.deviceManagement entity. + /// + public class UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userExperienceAnalyticsWorkFromAnywhereModelPerformance property of the microsoft.graph.deviceManagement entity. + public UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("userExperienceAnalyticsWorkFromAnywhereModelPerformance%2Did", position); + return new UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereModelPerformance{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereModelPerformance{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// The user experience analytics work from anywhere model performance + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserExperienceAnalyticsWorkFromAnywhereModelPerformanceCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to userExperienceAnalyticsWorkFromAnywhereModelPerformance for deviceManagement + /// + /// 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.UserExperienceAnalyticsWorkFromAnywhereModelPerformance body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Microsoft.Graph.Models.UserExperienceAnalyticsWorkFromAnywhereModelPerformance 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.UserExperienceAnalyticsWorkFromAnywhereModelPerformance.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The user experience analytics work from anywhere model performance + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to userExperienceAnalyticsWorkFromAnywhereModelPerformance for deviceManagement + /// + /// 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.UserExperienceAnalyticsWorkFromAnywhereModelPerformance body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Microsoft.Graph.Models.UserExperienceAnalyticsWorkFromAnywhereModelPerformance 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 UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The user experience analytics work from anywhere model performance + /// + public class UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilderGetQueryParameters { + /// 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 UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new userExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilderPostRequestConfiguration and sets the default values. + /// + public UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..dc5e6fd544e --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.WindowsMalwareInformation.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}/deviceManagement/windowsMalwareInformation/$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}/deviceManagement/windowsMalwareInformation/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Item/DeviceMalwareStates/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Item/DeviceMalwareStates/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..057b2f00745 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Item/DeviceMalwareStates/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.WindowsMalwareInformation.Item.DeviceMalwareStates.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}/deviceManagement/windowsMalwareInformation/{windowsMalwareInformation%2Did}/deviceMalwareStates/$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}/deviceManagement/windowsMalwareInformation/{windowsMalwareInformation%2Did}/deviceMalwareStates/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Item/DeviceMalwareStates/DeviceMalwareStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Item/DeviceMalwareStates/DeviceMalwareStatesRequestBuilder.cs new file mode 100644 index 00000000000..c9b7f31c636 --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Item/DeviceMalwareStates/DeviceMalwareStatesRequestBuilder.cs @@ -0,0 +1,237 @@ +using Microsoft.Graph.DeviceManagement.WindowsMalwareInformation.Item.DeviceMalwareStates.Count; +using Microsoft.Graph.DeviceManagement.WindowsMalwareInformation.Item.DeviceMalwareStates.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.DeviceManagement.WindowsMalwareInformation.Item.DeviceMalwareStates { + /// + /// Provides operations to manage the deviceMalwareStates property of the microsoft.graph.windowsMalwareInformation entity. + /// + public class DeviceMalwareStatesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the deviceMalwareStates property of the microsoft.graph.windowsMalwareInformation entity. + public MalwareStateForWindowsDeviceItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("malwareStateForWindowsDevice%2Did", position); + return new MalwareStateForWindowsDeviceItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new DeviceMalwareStatesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DeviceMalwareStatesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/windowsMalwareInformation/{windowsMalwareInformation%2Did}/deviceMalwareStates{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DeviceMalwareStatesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DeviceMalwareStatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/windowsMalwareInformation/{windowsMalwareInformation%2Did}/deviceMalwareStates{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List properties and relationships of the malwareStateForWindowsDevice 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, MalwareStateForWindowsDeviceCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create a new malwareStateForWindowsDevice 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(MalwareStateForWindowsDevice body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(MalwareStateForWindowsDevice 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, MalwareStateForWindowsDevice.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// List properties and relationships of the malwareStateForWindowsDevice 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 DeviceMalwareStatesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create a new malwareStateForWindowsDevice 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(MalwareStateForWindowsDevice body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(MalwareStateForWindowsDevice 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 DeviceMalwareStatesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// List properties and relationships of the malwareStateForWindowsDevice objects. + /// + public class DeviceMalwareStatesRequestBuilderGetQueryParameters { + /// 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 DeviceMalwareStatesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DeviceMalwareStatesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DeviceMalwareStatesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new deviceMalwareStatesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DeviceMalwareStatesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DeviceMalwareStatesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new deviceMalwareStatesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public DeviceMalwareStatesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Item/DeviceMalwareStates/Item/MalwareStateForWindowsDeviceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Item/DeviceMalwareStates/Item/MalwareStateForWindowsDeviceItemRequestBuilder.cs new file mode 100644 index 00000000000..22c7ea0487e --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Item/DeviceMalwareStates/Item/MalwareStateForWindowsDeviceItemRequestBuilder.cs @@ -0,0 +1,246 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.WindowsMalwareInformation.Item.DeviceMalwareStates.Item { + /// + /// Provides operations to manage the deviceMalwareStates property of the microsoft.graph.windowsMalwareInformation entity. + /// + public class MalwareStateForWindowsDeviceItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new MalwareStateForWindowsDeviceItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MalwareStateForWindowsDeviceItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/windowsMalwareInformation/{windowsMalwareInformation%2Did}/deviceMalwareStates/{malwareStateForWindowsDevice%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new MalwareStateForWindowsDeviceItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MalwareStateForWindowsDeviceItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/windowsMalwareInformation/{windowsMalwareInformation%2Did}/deviceMalwareStates/{malwareStateForWindowsDevice%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Deletes a malwareStateForWindowsDevice. + /// 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); + } + /// + /// Read properties and relationships of the malwareStateForWindowsDevice 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, MalwareStateForWindowsDevice.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the properties of a malwareStateForWindowsDevice 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(MalwareStateForWindowsDevice body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(MalwareStateForWindowsDevice 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, MalwareStateForWindowsDevice.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Deletes a malwareStateForWindowsDevice. + /// + /// Configuration 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 MalwareStateForWindowsDeviceItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the malwareStateForWindowsDevice 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 MalwareStateForWindowsDeviceItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a malwareStateForWindowsDevice 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(MalwareStateForWindowsDevice body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(MalwareStateForWindowsDevice 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 MalwareStateForWindowsDeviceItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MalwareStateForWindowsDeviceItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MalwareStateForWindowsDeviceItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public MalwareStateForWindowsDeviceItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the malwareStateForWindowsDevice object. + /// + public class MalwareStateForWindowsDeviceItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 MalwareStateForWindowsDeviceItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public MalwareStateForWindowsDeviceItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new MalwareStateForWindowsDeviceItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new MalwareStateForWindowsDeviceItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public MalwareStateForWindowsDeviceItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class MalwareStateForWindowsDeviceItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new MalwareStateForWindowsDeviceItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public MalwareStateForWindowsDeviceItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Item/WindowsMalwareInformationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Item/WindowsMalwareInformationItemRequestBuilder.cs new file mode 100644 index 00000000000..e447038b5ac --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Item/WindowsMalwareInformationItemRequestBuilder.cs @@ -0,0 +1,251 @@ +using Microsoft.Graph.DeviceManagement.WindowsMalwareInformation.Item.DeviceMalwareStates; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.DeviceManagement.WindowsMalwareInformation.Item { + /// + /// Provides operations to manage the windowsMalwareInformation property of the microsoft.graph.deviceManagement entity. + /// + public class WindowsMalwareInformationItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the deviceMalwareStates property of the microsoft.graph.windowsMalwareInformation entity. + public DeviceMalwareStatesRequestBuilder DeviceMalwareStates { get => + new DeviceMalwareStatesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new WindowsMalwareInformationItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WindowsMalwareInformationItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/windowsMalwareInformation/{windowsMalwareInformation%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new WindowsMalwareInformationItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WindowsMalwareInformationItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/windowsMalwareInformation/{windowsMalwareInformation%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Deletes a windowsMalwareInformation. + /// 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); + } + /// + /// Read properties and relationships of the windowsMalwareInformation 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, Microsoft.Graph.Models.WindowsMalwareInformation.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the properties of a windowsMalwareInformation 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(Microsoft.Graph.Models.WindowsMalwareInformation body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.WindowsMalwareInformation 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.WindowsMalwareInformation.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Deletes a windowsMalwareInformation. + /// + /// Configuration 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 WindowsMalwareInformationItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the windowsMalwareInformation 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 WindowsMalwareInformationItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a windowsMalwareInformation 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(Microsoft.Graph.Models.WindowsMalwareInformation body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.WindowsMalwareInformation 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 WindowsMalwareInformationItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsMalwareInformationItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new WindowsMalwareInformationItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public WindowsMalwareInformationItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the windowsMalwareInformation object. + /// + public class WindowsMalwareInformationItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 WindowsMalwareInformationItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public WindowsMalwareInformationItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new WindowsMalwareInformationItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new WindowsMalwareInformationItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public WindowsMalwareInformationItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsMalwareInformationItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new WindowsMalwareInformationItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public WindowsMalwareInformationItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/WindowsMalwareInformationRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/WindowsMalwareInformationRequestBuilder.cs new file mode 100644 index 00000000000..e11d262fadf --- /dev/null +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/WindowsMalwareInformationRequestBuilder.cs @@ -0,0 +1,237 @@ +using Microsoft.Graph.DeviceManagement.WindowsMalwareInformation.Count; +using Microsoft.Graph.DeviceManagement.WindowsMalwareInformation.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.DeviceManagement.WindowsMalwareInformation { + /// + /// Provides operations to manage the windowsMalwareInformation property of the microsoft.graph.deviceManagement entity. + /// + public class WindowsMalwareInformationRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the windowsMalwareInformation property of the microsoft.graph.deviceManagement entity. + public WindowsMalwareInformationItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("windowsMalwareInformation%2Did", position); + return new WindowsMalwareInformationItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new WindowsMalwareInformationRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WindowsMalwareInformationRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/windowsMalwareInformation{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new WindowsMalwareInformationRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WindowsMalwareInformationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deviceManagement/windowsMalwareInformation{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List properties and relationships of the windowsMalwareInformation 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, WindowsMalwareInformationCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create a new windowsMalwareInformation 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(Microsoft.Graph.Models.WindowsMalwareInformation body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Microsoft.Graph.Models.WindowsMalwareInformation 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.WindowsMalwareInformation.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// List properties and relationships of the windowsMalwareInformation 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 WindowsMalwareInformationRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create a new windowsMalwareInformation 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(Microsoft.Graph.Models.WindowsMalwareInformation body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Microsoft.Graph.Models.WindowsMalwareInformation 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 WindowsMalwareInformationRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// List properties and relationships of the windowsMalwareInformation objects. + /// + public class WindowsMalwareInformationRequestBuilderGetQueryParameters { + /// 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 WindowsMalwareInformationRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public WindowsMalwareInformationRequestBuilderGetQueryParameters QueryParameters { get; set; } = new WindowsMalwareInformationRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new windowsMalwareInformationRequestBuilderGetRequestConfiguration and sets the default values. + /// + public WindowsMalwareInformationRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsMalwareInformationRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new windowsMalwareInformationRequestBuilderPostRequestConfiguration and sets the default values. + /// + public WindowsMalwareInformationRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/DriveItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/DriveItemItemRequestBuilder.cs index b76239f40c2..8d60f1c4b8e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/DriveItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/DriveItemItemRequestBuilder.cs @@ -220,8 +220,8 @@ public GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalReques return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.DriveItem.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Update the metadata for a driveItem by ID or path. You can also use update to move an item to another parent by updating the item's **parentReference** property. - /// Find more info here + /// To move a DriveItem to a new parent item, your app requests to update the **parentReference** of the DriveItem to move. This is a special case of the Update method.Your app can combine moving an item to a new container and updating other properties of the item into a single request. Items cannot be moved between Drives using this request. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -300,7 +300,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the metadata for a driveItem by ID or path. You can also use update to move an item to another parent by updating the item's **parentReference** property. + /// To move a DriveItem to a new parent item, your app requests to update the **parentReference** of the DriveItem to move. This is a special case of the Update method.Your app can combine moving an item to a new container and updating other properties of the item into a single request. Items cannot be moved between Drives using this request. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. 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 d0c94daf406..46f08e18b67 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 @@ -28,8 +28,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) { } /// - /// Retrieve the properties and relationships of range object. - /// Find more info here + /// 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 /// /// 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, WorkbookRange.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Retrieve the properties and relationships of range object. + /// Returns the range object that is associated with the name. Throws an exception if the named item's type is not a range. /// /// 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/Tables/TablesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/TablesRequestBuilder.cs index da9fd8cc043..09bf716c6bd 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 @@ -47,7 +47,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/Charts/ChartsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ChartsRequestBuilder.cs index 2c263c8c347..bb0ea90511b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ChartsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ChartsRequestBuilder.cs @@ -48,7 +48,7 @@ public ChartsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas } /// /// Retrieve a list of chart 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 e79554ef4ea..c57256d145a 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 @@ -28,8 +28,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) { } /// - /// Retrieve the properties and relationships of range object. - /// Find more info here + /// 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 /// /// 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, WorkbookRange.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Retrieve the properties and relationships of range object. + /// Returns the range object that is associated with the name. Throws an exception if the named item's type is not a range. /// /// 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/EmployeeExperience/EmployeeExperienceRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/EmployeeExperienceRequestBuilder.cs index d2141bed6c9..9c822549da9 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/EmployeeExperienceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/EmployeeExperienceRequestBuilder.cs @@ -1,3 +1,4 @@ +using Microsoft.Graph.EmployeeExperience.LearningCourseActivities; using Microsoft.Graph.EmployeeExperience.LearningProviders; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.EmployeeExperience { /// Provides operations to manage the employeeExperience singleton. /// public class EmployeeExperienceRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the learningCourseActivities property of the microsoft.graph.employeeExperience entity. + public LearningCourseActivitiesRequestBuilder LearningCourseActivities { get => + new LearningCourseActivitiesRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the learningProviders property of the microsoft.graph.employeeExperience entity. public LearningProvidersRequestBuilder LearningProviders { get => new LearningProvidersRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningCourseActivities/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningCourseActivities/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..762ce02b82d --- /dev/null +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningCourseActivities/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.EmployeeExperience.LearningCourseActivities.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}/employeeExperience/learningCourseActivities/$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}/employeeExperience/learningCourseActivities/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningCourseActivities/Item/LearningCourseActivityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningCourseActivities/Item/LearningCourseActivityItemRequestBuilder.cs new file mode 100644 index 00000000000..75450e69b4c --- /dev/null +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningCourseActivities/Item/LearningCourseActivityItemRequestBuilder.cs @@ -0,0 +1,244 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.EmployeeExperience.LearningCourseActivities.Item { + /// + /// Provides operations to manage the learningCourseActivities property of the microsoft.graph.employeeExperience entity. + /// + public class LearningCourseActivityItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new LearningCourseActivityItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LearningCourseActivityItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/employeeExperience/learningCourseActivities/{learningCourseActivity%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new LearningCourseActivityItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LearningCourseActivityItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/employeeExperience/learningCourseActivities/{learningCourseActivity%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property learningCourseActivities for employeeExperience + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the specified learningCourseActivity object using either an ID or an **externalCourseActivityId** of the learning provider, or a **courseActivityId** of a user. + /// 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, LearningCourseActivity.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property learningCourseActivities in employeeExperience + /// + /// 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(LearningCourseActivity body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(LearningCourseActivity 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, LearningCourseActivity.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property learningCourseActivities for employeeExperience + /// + /// Configuration 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 LearningCourseActivityItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the specified learningCourseActivity object using either an ID or an **externalCourseActivityId** of the learning provider, or a **courseActivityId** of a user. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new LearningCourseActivityItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property learningCourseActivities in employeeExperience + /// + /// 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(LearningCourseActivity body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(LearningCourseActivity 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 LearningCourseActivityItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class LearningCourseActivityItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new LearningCourseActivityItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public LearningCourseActivityItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get the specified learningCourseActivity object using either an ID or an **externalCourseActivityId** of the learning provider, or a **courseActivityId** of a user. + /// + public class LearningCourseActivityItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 LearningCourseActivityItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LearningCourseActivityItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LearningCourseActivityItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new LearningCourseActivityItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LearningCourseActivityItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class LearningCourseActivityItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new LearningCourseActivityItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public LearningCourseActivityItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningCourseActivities/LearningCourseActivitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningCourseActivities/LearningCourseActivitiesRequestBuilder.cs new file mode 100644 index 00000000000..7ffb61a4884 --- /dev/null +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningCourseActivities/LearningCourseActivitiesRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.EmployeeExperience.LearningCourseActivities.Count; +using Microsoft.Graph.EmployeeExperience.LearningCourseActivities.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.EmployeeExperience.LearningCourseActivities { + /// + /// Provides operations to manage the learningCourseActivities property of the microsoft.graph.employeeExperience entity. + /// + public class LearningCourseActivitiesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the learningCourseActivities property of the microsoft.graph.employeeExperience entity. + public LearningCourseActivityItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("learningCourseActivity%2Did", position); + return new LearningCourseActivityItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new LearningCourseActivitiesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LearningCourseActivitiesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/employeeExperience/learningCourseActivities{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new LearningCourseActivitiesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LearningCourseActivitiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/employeeExperience/learningCourseActivities{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get the specified learningCourseActivity object using either an ID or an **externalCourseActivityId** of the learning provider, or a **courseActivityId** of a user. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, LearningCourseActivityCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to learningCourseActivities for employeeExperience + /// + /// 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(LearningCourseActivity body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(LearningCourseActivity 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, LearningCourseActivity.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the specified learningCourseActivity object using either an ID or an **externalCourseActivityId** of the learning provider, or a **courseActivityId** of a user. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new LearningCourseActivitiesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to learningCourseActivities for employeeExperience + /// + /// 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(LearningCourseActivity body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(LearningCourseActivity 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 LearningCourseActivitiesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the specified learningCourseActivity object using either an ID or an **externalCourseActivityId** of the learning provider, or a **courseActivityId** of a user. + /// + public class LearningCourseActivitiesRequestBuilderGetQueryParameters { + /// 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 LearningCourseActivitiesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LearningCourseActivitiesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LearningCourseActivitiesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new learningCourseActivitiesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LearningCourseActivitiesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class LearningCourseActivitiesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new learningCourseActivitiesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public LearningCourseActivitiesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningCourseActivities/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningCourseActivities/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..a37052e2fbc --- /dev/null +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningCourseActivities/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.EmployeeExperience.LearningProviders.Item.LearningCourseActivities.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}/employeeExperience/learningProviders/{learningProvider%2Did}/learningCourseActivities/$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}/employeeExperience/learningProviders/{learningProvider%2Did}/learningCourseActivities/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningCourseActivities/Item/LearningCourseActivityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningCourseActivities/Item/LearningCourseActivityItemRequestBuilder.cs new file mode 100644 index 00000000000..f62e611b7c7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningCourseActivities/Item/LearningCourseActivityItemRequestBuilder.cs @@ -0,0 +1,245 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.EmployeeExperience.LearningProviders.Item.LearningCourseActivities.Item { + /// + /// Provides operations to manage the learningCourseActivities property of the microsoft.graph.learningProvider entity. + /// + public class LearningCourseActivityItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new LearningCourseActivityItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LearningCourseActivityItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/employeeExperience/learningProviders/{learningProvider%2Did}/learningCourseActivities/{learningCourseActivity%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new LearningCourseActivityItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LearningCourseActivityItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/employeeExperience/learningProviders/{learningProvider%2Did}/learningCourseActivities/{learningCourseActivity%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete a learningCourseActivity object by using the course activity ID of either an assignment or a self-initiated activity. + /// 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); + } + /// + /// Get learningCourseActivities from employeeExperience + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, LearningCourseActivity.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the properties of a learningCourseActivity 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(LearningCourseActivity body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(LearningCourseActivity 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, LearningCourseActivity.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete a learningCourseActivity object by using the course activity ID of either an assignment or a self-initiated activity. + /// + /// Configuration 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 LearningCourseActivityItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get learningCourseActivities from employeeExperience + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new LearningCourseActivityItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a learningCourseActivity 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(LearningCourseActivity body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(LearningCourseActivity 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 LearningCourseActivityItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class LearningCourseActivityItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new LearningCourseActivityItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public LearningCourseActivityItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get learningCourseActivities from employeeExperience + /// + public class LearningCourseActivityItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 LearningCourseActivityItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LearningCourseActivityItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LearningCourseActivityItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new LearningCourseActivityItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LearningCourseActivityItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class LearningCourseActivityItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new LearningCourseActivityItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public LearningCourseActivityItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningCourseActivities/LearningCourseActivitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningCourseActivities/LearningCourseActivitiesRequestBuilder.cs new file mode 100644 index 00000000000..aaede525538 --- /dev/null +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningCourseActivities/LearningCourseActivitiesRequestBuilder.cs @@ -0,0 +1,236 @@ +using Microsoft.Graph.EmployeeExperience.LearningProviders.Item.LearningCourseActivities.Count; +using Microsoft.Graph.EmployeeExperience.LearningProviders.Item.LearningCourseActivities.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.EmployeeExperience.LearningProviders.Item.LearningCourseActivities { + /// + /// Provides operations to manage the learningCourseActivities property of the microsoft.graph.learningProvider entity. + /// + public class LearningCourseActivitiesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the learningCourseActivities property of the microsoft.graph.learningProvider entity. + public LearningCourseActivityItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("learningCourseActivity%2Did", position); + return new LearningCourseActivityItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new LearningCourseActivitiesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LearningCourseActivitiesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/employeeExperience/learningProviders/{learningProvider%2Did}/learningCourseActivities{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new LearningCourseActivitiesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LearningCourseActivitiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/employeeExperience/learningProviders/{learningProvider%2Did}/learningCourseActivities{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get learningCourseActivities from employeeExperience + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, LearningCourseActivityCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create a new learningCourseActivity object. A learning course activity can be one of two types: - Assignment- Self-initiated Use this method to create either type of activity. + /// 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(LearningCourseActivity body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(LearningCourseActivity 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, LearningCourseActivity.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get learningCourseActivities from employeeExperience + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new LearningCourseActivitiesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create a new learningCourseActivity object. A learning course activity can be one of two types: - Assignment- Self-initiated Use this method to create either type of activity. + /// + /// 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(LearningCourseActivity body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(LearningCourseActivity 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 LearningCourseActivitiesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get learningCourseActivities from employeeExperience + /// + public class LearningCourseActivitiesRequestBuilderGetQueryParameters { + /// 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 LearningCourseActivitiesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LearningCourseActivitiesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LearningCourseActivitiesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new learningCourseActivitiesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LearningCourseActivitiesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class LearningCourseActivitiesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new learningCourseActivitiesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public LearningCourseActivitiesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningProviderItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningProviderItemRequestBuilder.cs index 48bd9b86066..dd4c12b395c 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningProviderItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningProviderItemRequestBuilder.cs @@ -1,4 +1,5 @@ using Microsoft.Graph.EmployeeExperience.LearningProviders.Item.LearningContents; +using Microsoft.Graph.EmployeeExperience.LearningProviders.Item.LearningCourseActivities; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -18,6 +19,10 @@ public class LearningProviderItemRequestBuilder : BaseRequestBuilder { public LearningContentsRequestBuilder LearningContents { get => new LearningContentsRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the learningCourseActivities property of the microsoft.graph.learningProvider entity. + public LearningCourseActivitiesRequestBuilder LearningCourseActivities { get => + new LearningCourseActivitiesRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new LearningProviderItemRequestBuilder 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 dc36c517f8a..bfbc04d53c7 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/ConversationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/ConversationItemRequestBuilder.cs @@ -34,7 +34,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 86b96feed2a..bb87bc2df55 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 @@ -40,8 +40,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 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 + /// 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 /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -60,7 +60,7 @@ public async Task GetAsync(Action(requestInfo, PostCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// 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. + /// 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. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -86,7 +86,7 @@ public RequestInformation ToGetRequestInformation(Action - /// 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. + /// 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. /// public class PostsRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/Content/ContentRequestBuilder.cs index ed1250e3a52..0819141fb67 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/Content/ContentRequestBuilder.cs @@ -29,6 +29,7 @@ public ContentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba } /// /// The page's HTML content. + /// 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/Onenote/Pages/PagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/PagesRequestBuilder.cs index 4ffe78a3b3c..04746b23110 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/PagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/PagesRequestBuilder.cs @@ -40,7 +40,8 @@ public PagesRequestBuilder(Dictionary pathParameters, IRequestAd public PagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/onenote/pages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// Retrieve the properties and relationships of a page object. **Getting page information** Access a page's metadata by page identifier: **Getting page content** You can use the page's `content` endpoint to get the HTML content of a page: The `includeIDs=true` query option is used to update pages. + /// Retrieve a list of page objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -59,7 +60,8 @@ public async Task GetAsync(Action(requestInfo, OnenotePageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create new navigation property to pages for groups + /// Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the `sectionName` query parameter. Example: `../onenote/pages?sectionName=My%20section` The `POST /onenote/pages` operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -80,7 +82,7 @@ public async Task PostAsync(OnenotePage body, Action(requestInfo, OnenotePage.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Retrieve the properties and relationships of a page object. **Getting page information** Access a page's metadata by page identifier: **Getting page content** You can use the page's `content` endpoint to get the HTML content of a page: The `includeIDs=true` query option is used to update pages. + /// Retrieve a list of page objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -106,7 +108,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create new navigation property to pages for groups + /// Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the `sectionName` query parameter. Example: `../onenote/pages?sectionName=My%20section` The `POST /onenote/pages` operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. @@ -134,7 +136,7 @@ public RequestInformation ToPostRequestInformation(OnenotePage body, Action - /// Retrieve the properties and relationships of a page object. **Getting page information** Access a page's metadata by page identifier: **Getting page content** You can use the page's `content` endpoint to get the HTML content of a page: The `includeIDs=true` query option is used to update pages. + /// Retrieve a list of page objects. /// public class PagesRequestBuilderGetQueryParameters { /// Include count of items 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 5520af1acde..1cf69201c6f 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 @@ -87,8 +87,8 @@ public async Task DeleteAsync(Action - /// Returns the metadata for a [list][]. - /// Find more info here + /// Get a list of rich long-running operations associated with 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. @@ -152,7 +152,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Returns the metadata for a [list][]. + /// Get a list of rich long-running operations associated with a list. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -222,7 +222,7 @@ public ListItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Returns the metadata for a [list][]. + /// Get a list of rich long-running operations associated with a list. /// public class ListItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/Content/ContentRequestBuilder.cs index 1db27849ae4..b4ba7a2f492 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/Content/ContentRequestBuilder.cs @@ -29,6 +29,7 @@ public ContentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba } /// /// The page's HTML content. + /// 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/Sites/Item/Onenote/Pages/PagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/PagesRequestBuilder.cs index a78d3f5673a..45f65384803 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/PagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/PagesRequestBuilder.cs @@ -40,7 +40,8 @@ public PagesRequestBuilder(Dictionary pathParameters, IRequestAd public PagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/onenote/pages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// Retrieve the properties and relationships of a page object. **Getting page information** Access a page's metadata by page identifier: **Getting page content** You can use the page's `content` endpoint to get the HTML content of a page: The `includeIDs=true` query option is used to update pages. + /// Retrieve a list of page objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -59,7 +60,8 @@ public async Task GetAsync(Action(requestInfo, OnenotePageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create new navigation property to pages for groups + /// Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the `sectionName` query parameter. Example: `../onenote/pages?sectionName=My%20section` The `POST /onenote/pages` operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -80,7 +82,7 @@ public async Task PostAsync(OnenotePage body, Action(requestInfo, OnenotePage.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Retrieve the properties and relationships of a page object. **Getting page information** Access a page's metadata by page identifier: **Getting page content** You can use the page's `content` endpoint to get the HTML content of a page: The `includeIDs=true` query option is used to update pages. + /// Retrieve a list of page objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -106,7 +108,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create new navigation property to pages for groups + /// Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the `sectionName` query parameter. Example: `../onenote/pages?sectionName=My%20section` The `POST /onenote/pages` operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. @@ -134,7 +136,7 @@ public RequestInformation ToPostRequestInformation(OnenotePage body, Action - /// Retrieve the properties and relationships of a page object. **Getting page information** Access a page's metadata by page identifier: **Getting page content** You can use the page's `content` endpoint to get the HTML content of a page: The `includeIDs=true` query option is used to update pages. + /// Retrieve a list of page objects. /// public class PagesRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index f8be8f7f9bf..83d43dad462 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Send a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new reply to a chatMessage in a specified channel. + /// Send a new reply to a chatMessage in a specified channel. /// /// 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 e9e9ce473f2..ab8cf078c9d 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 @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// 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/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs new file mode 100644 index 00000000000..d718c3a2fae --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs @@ -0,0 +1,64 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Groups.Item.Team.InstalledApps.Item.Upgrade { + public class UpgradePostRequestBody : 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 consentedPermissionSet property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public TeamsAppPermissionSet? ConsentedPermissionSet { + get { return BackingStore?.Get("consentedPermissionSet"); } + set { BackingStore?.Set("consentedPermissionSet", value); } + } +#nullable restore +#else + public TeamsAppPermissionSet ConsentedPermissionSet { + get { return BackingStore?.Get("consentedPermissionSet"); } + set { BackingStore?.Set("consentedPermissionSet", value); } + } +#endif + /// + /// Instantiates a new upgradePostRequestBody and sets the default values. + /// + public UpgradePostRequestBody() { + 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 UpgradePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UpgradePostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"consentedPermissionSet", n => { ConsentedPermissionSet = n.GetObjectValue(TeamsAppPermissionSet.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("consentedPermissionSet", ConsentedPermissionSet); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs index 6870428ca0e..c064c83aabc 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs @@ -30,16 +30,18 @@ public UpgradeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Upgrade an app installation within a chat. /// 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(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(UpgradePostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(UpgradePostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - var requestInfo = ToPostRequestInformation(requestConfiguration); + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { {"4XX", ODataError.CreateFromDiscriminatorValue}, {"5XX", ODataError.CreateFromDiscriminatorValue}, @@ -49,19 +51,22 @@ public async Task PostAsync(Action /// Upgrade an app installation within a chat. /// + /// 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(Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(UpgradePostRequestBody body, Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(UpgradePostRequestBody 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 UpgradeRequestBuilderPostRequestConfiguration(); requestConfiguration.Invoke(requestConfig); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Photo/PhotoRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Photo/PhotoRequestBuilder.cs index 1b022434ef7..a631d7db614 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Photo/PhotoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Photo/PhotoRequestBuilder.cs @@ -52,7 +52,8 @@ public async Task DeleteAsync(Action - /// The profile photo for the team. + /// Get the specified profilePhoto or its metadata (**profilePhoto** properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -116,7 +117,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// The profile photo for the team. + /// Get the specified profilePhoto or its metadata (**profilePhoto** properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -186,7 +187,7 @@ public PhotoRequestBuilderDeleteRequestConfiguration() { } } /// - /// The profile photo for the team. + /// Get the specified profilePhoto or its metadata (**profilePhoto** properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. /// public class PhotoRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Photo/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Photo/Value/ContentRequestBuilder.cs index 3a5ab92ea22..1d83f620191 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Photo/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Photo/Value/ContentRequestBuilder.cs @@ -28,6 +28,7 @@ public ContentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba } /// /// Get media content for the navigation property photo from groups + /// 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/Team/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs index a47cb584daa..d7a439251f3 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Send a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new reply to a chatMessage in a specified channel. + /// Send a new reply to a chatMessage in a specified channel. /// /// 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 285aab11558..dda6616e03e 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 @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// 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/Posts/PostsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/PostsRequestBuilder.cs index 85ea5ac3a97..42dbd415bbb 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 @@ -40,8 +40,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 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 + /// 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 /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -60,7 +60,7 @@ public async Task GetAsync(Action(requestInfo, PostCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// 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. + /// 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. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -86,7 +86,7 @@ public RequestInformation ToGetRequestInformation(Action - /// 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. + /// 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. /// public class PostsRequestBuilderGetQueryParameters { /// Include count of items 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 29b263eaf4b..f8814922d6f 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/NamedLocations/Item/NamedLocationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/NamedLocations/Item/NamedLocationItemRequestBuilder.cs @@ -28,8 +28,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 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. @@ -48,8 +48,8 @@ public async Task DeleteAsync(Action - /// Retrieve the properties and relationships of an ipNamedLocation object. - /// Find more info here + /// Retrieve the properties and relationships of a countryNamedLocation object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -68,8 +68,8 @@ public async Task GetAsync(Action(requestInfo, NamedLocation.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// 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 @@ -90,7 +90,7 @@ public async Task PatchAsync(NamedLocation body, Action(requestInfo, NamedLocation.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Delete a countryNamedLocation object. + /// Delete an ipNamedLocation object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -114,7 +114,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Retrieve the properties and relationships of an ipNamedLocation object. + /// Retrieve the properties and relationships of a countryNamedLocation object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -140,7 +140,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. @@ -184,7 +184,7 @@ public NamedLocationItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Retrieve the properties and relationships of an ipNamedLocation object. + /// Retrieve the properties and relationships of a countryNamedLocation object. /// public class NamedLocationItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/DecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/DecisionsRequestBuilder.cs index 3aac52806db..2c3f056657a 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/DecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/DecisionsRequestBuilder.cs @@ -49,7 +49,7 @@ public FilterByCurrentUserWithOnRequestBuilder FilterByCurrentUserWithOn(string return new FilterByCurrentUserWithOnRequestBuilder(PathParameters, RequestAdapter, on); } /// - /// Get the accessReviewInstanceDecisionItem resources from the decisions navigation property on a given accessReviewInstance. A list of zero or more accessReviewInstanceDecisionItem objects are returned, including all of their nested properties. + /// Retrieve the accessReviewInstanceDecisionItem objects for a specific accessReviewInstance. A list of zero or more accessReviewInstanceDecisionItem objects are returned, including all of their nested properties. /// Find more info here /// /// Cancellation token to use when cancelling requests @@ -90,7 +90,7 @@ public async Task PostAsync(AccessReviewInstan return await RequestAdapter.SendAsync(requestInfo, AccessReviewInstanceDecisionItem.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Get the accessReviewInstanceDecisionItem resources from the decisions navigation property on a given accessReviewInstance. A list of zero or more accessReviewInstanceDecisionItem objects are returned, including all of their nested properties. + /// Retrieve the accessReviewInstanceDecisionItem objects for a specific accessReviewInstance. A list of zero or more accessReviewInstanceDecisionItem objects are returned, including all of their nested properties. /// /// 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 RequestInformation ToPostRequestInformation(AccessReviewInstanceDecisionI return requestInfo; } /// - /// Get the accessReviewInstanceDecisionItem resources from the decisions navigation property on a given accessReviewInstance. A list of zero or more accessReviewInstanceDecisionItem objects are returned, including all of their nested properties. + /// Retrieve the accessReviewInstanceDecisionItem objects for a specific accessReviewInstance. A list of zero or more accessReviewInstanceDecisionItem objects are returned, including all of their nested properties. /// public class DecisionsRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs index bb5e9c88410..a6279514703 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs @@ -1,3 +1,4 @@ +using Microsoft.Graph.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.Item.Insights; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,6 +14,10 @@ namespace Microsoft.Graph.IdentityGovernance.AccessReviews.Definitions.Item.Inst /// Provides operations to manage the decisions property of the microsoft.graph.accessReviewInstance entity. /// public class AccessReviewInstanceDecisionItemItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the insights property of the microsoft.graph.accessReviewInstanceDecisionItem entity. + public InsightsRequestBuilder Insights { get => + new InsightsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new AccessReviewInstanceDecisionItemItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Insights/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Insights/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..9beb49e5251 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Insights/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.Item.Insights.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/accessReviews/definitions/{accessReviewScheduleDefinition%2Did}/instances/{accessReviewInstance%2Did}/decisions/{accessReviewInstanceDecisionItem%2Did}/insights/$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/accessReviews/definitions/{accessReviewScheduleDefinition%2Did}/instances/{accessReviewInstance%2Did}/decisions/{accessReviewInstanceDecisionItem%2Did}/insights/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs new file mode 100644 index 00000000000..1a6de3931ed --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.Item.Insights.Count; +using Microsoft.Graph.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.Item.Insights.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.AccessReviews.Definitions.Item.Instances.Item.Decisions.Item.Insights { + /// + /// Provides operations to manage the insights property of the microsoft.graph.accessReviewInstanceDecisionItem entity. + /// + public class InsightsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the insights property of the microsoft.graph.accessReviewInstanceDecisionItem entity. + public GovernanceInsightItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("governanceInsight%2Did", position); + return new GovernanceInsightItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new InsightsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InsightsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/accessReviews/definitions/{accessReviewScheduleDefinition%2Did}/instances/{accessReviewInstance%2Did}/decisions/{accessReviewInstanceDecisionItem%2Did}/insights{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new InsightsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InsightsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/accessReviews/definitions/{accessReviewScheduleDefinition%2Did}/instances/{accessReviewInstance%2Did}/decisions/{accessReviewInstanceDecisionItem%2Did}/insights{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Insights are recommendations to reviewers on whether to approve or deny a decision. There can be multiple insights associated with an accessReviewInstanceDecisionItem. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, GovernanceInsightCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to insights 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(GovernanceInsight body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(GovernanceInsight 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, GovernanceInsight.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Insights are recommendations to reviewers on whether to approve or deny a decision. There can be multiple insights associated with an accessReviewInstanceDecisionItem. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new InsightsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to insights 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(GovernanceInsight body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(GovernanceInsight 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 InsightsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Insights are recommendations to reviewers on whether to approve or deny a decision. There can be multiple insights associated with an accessReviewInstanceDecisionItem. + /// + public class InsightsRequestBuilderGetQueryParameters { + /// 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 InsightsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public InsightsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new InsightsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new insightsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public InsightsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class InsightsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new insightsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public InsightsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs new file mode 100644 index 00000000000..71d3f1da747 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.Item.Insights.Item { + /// + /// Provides operations to manage the insights property of the microsoft.graph.accessReviewInstanceDecisionItem entity. + /// + public class GovernanceInsightItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new GovernanceInsightItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GovernanceInsightItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/accessReviews/definitions/{accessReviewScheduleDefinition%2Did}/instances/{accessReviewInstance%2Did}/decisions/{accessReviewInstanceDecisionItem%2Did}/insights/{governanceInsight%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new GovernanceInsightItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GovernanceInsightItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/accessReviews/definitions/{accessReviewScheduleDefinition%2Did}/instances/{accessReviewInstance%2Did}/decisions/{accessReviewInstanceDecisionItem%2Did}/insights/{governanceInsight%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property insights 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); + } + /// + /// Insights are recommendations to reviewers on whether to approve or deny a decision. There can be multiple insights associated with an accessReviewInstanceDecisionItem. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, GovernanceInsight.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property insights 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(GovernanceInsight body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(GovernanceInsight 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, GovernanceInsight.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property insights 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 GovernanceInsightItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Insights are recommendations to reviewers on whether to approve or deny a decision. There can be multiple insights associated with an accessReviewInstanceDecisionItem. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new GovernanceInsightItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property insights 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(GovernanceInsight body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(GovernanceInsight 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 GovernanceInsightItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GovernanceInsightItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new GovernanceInsightItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public GovernanceInsightItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Insights are recommendations to reviewers on whether to approve or deny a decision. There can be multiple insights associated with an accessReviewInstanceDecisionItem. + /// + public class GovernanceInsightItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 GovernanceInsightItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GovernanceInsightItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GovernanceInsightItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new GovernanceInsightItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GovernanceInsightItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GovernanceInsightItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new GovernanceInsightItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public GovernanceInsightItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs index 3f03c56b80a..417c8b6437d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs @@ -1,3 +1,4 @@ +using Microsoft.Graph.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.Item.Insights; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,6 +14,10 @@ namespace Microsoft.Graph.IdentityGovernance.AccessReviews.Definitions.Item.Inst /// Provides operations to manage the decisions property of the microsoft.graph.accessReviewStage entity. /// public class AccessReviewInstanceDecisionItemItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the insights property of the microsoft.graph.accessReviewInstanceDecisionItem entity. + public InsightsRequestBuilder Insights { get => + new InsightsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new AccessReviewInstanceDecisionItemItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Insights/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Insights/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..89d565d8ced --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Insights/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.Item.Insights.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/accessReviews/definitions/{accessReviewScheduleDefinition%2Did}/instances/{accessReviewInstance%2Did}/stages/{accessReviewStage%2Did}/decisions/{accessReviewInstanceDecisionItem%2Did}/insights/$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/accessReviews/definitions/{accessReviewScheduleDefinition%2Did}/instances/{accessReviewInstance%2Did}/stages/{accessReviewStage%2Did}/decisions/{accessReviewInstanceDecisionItem%2Did}/insights/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs new file mode 100644 index 00000000000..19d954f0897 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.Item.Insights.Count; +using Microsoft.Graph.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.Item.Insights.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.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.Item.Insights { + /// + /// Provides operations to manage the insights property of the microsoft.graph.accessReviewInstanceDecisionItem entity. + /// + public class InsightsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the insights property of the microsoft.graph.accessReviewInstanceDecisionItem entity. + public GovernanceInsightItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("governanceInsight%2Did", position); + return new GovernanceInsightItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new InsightsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InsightsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/accessReviews/definitions/{accessReviewScheduleDefinition%2Did}/instances/{accessReviewInstance%2Did}/stages/{accessReviewStage%2Did}/decisions/{accessReviewInstanceDecisionItem%2Did}/insights{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new InsightsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InsightsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/accessReviews/definitions/{accessReviewScheduleDefinition%2Did}/instances/{accessReviewInstance%2Did}/stages/{accessReviewStage%2Did}/decisions/{accessReviewInstanceDecisionItem%2Did}/insights{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Insights are recommendations to reviewers on whether to approve or deny a decision. There can be multiple insights associated with an accessReviewInstanceDecisionItem. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, GovernanceInsightCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to insights 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(GovernanceInsight body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(GovernanceInsight 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, GovernanceInsight.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Insights are recommendations to reviewers on whether to approve or deny a decision. There can be multiple insights associated with an accessReviewInstanceDecisionItem. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new InsightsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to insights 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(GovernanceInsight body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(GovernanceInsight 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 InsightsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Insights are recommendations to reviewers on whether to approve or deny a decision. There can be multiple insights associated with an accessReviewInstanceDecisionItem. + /// + public class InsightsRequestBuilderGetQueryParameters { + /// 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 InsightsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public InsightsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new InsightsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new insightsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public InsightsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class InsightsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new insightsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public InsightsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs new file mode 100644 index 00000000000..0d9ccf1c4ff --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.Item.Insights.Item { + /// + /// Provides operations to manage the insights property of the microsoft.graph.accessReviewInstanceDecisionItem entity. + /// + public class GovernanceInsightItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new GovernanceInsightItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GovernanceInsightItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/accessReviews/definitions/{accessReviewScheduleDefinition%2Did}/instances/{accessReviewInstance%2Did}/stages/{accessReviewStage%2Did}/decisions/{accessReviewInstanceDecisionItem%2Did}/insights/{governanceInsight%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new GovernanceInsightItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GovernanceInsightItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identityGovernance/accessReviews/definitions/{accessReviewScheduleDefinition%2Did}/instances/{accessReviewInstance%2Did}/stages/{accessReviewStage%2Did}/decisions/{accessReviewInstanceDecisionItem%2Did}/insights/{governanceInsight%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property insights 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); + } + /// + /// Insights are recommendations to reviewers on whether to approve or deny a decision. There can be multiple insights associated with an accessReviewInstanceDecisionItem. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, GovernanceInsight.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property insights 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(GovernanceInsight body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(GovernanceInsight 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, GovernanceInsight.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property insights 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 GovernanceInsightItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Insights are recommendations to reviewers on whether to approve or deny a decision. There can be multiple insights associated with an accessReviewInstanceDecisionItem. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new GovernanceInsightItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property insights 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(GovernanceInsight body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(GovernanceInsight 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 GovernanceInsightItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GovernanceInsightItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new GovernanceInsightItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public GovernanceInsightItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Insights are recommendations to reviewers on whether to approve or deny a decision. There can be multiple insights associated with an accessReviewInstanceDecisionItem. + /// + public class GovernanceInsightItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 GovernanceInsightItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GovernanceInsightItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GovernanceInsightItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new GovernanceInsightItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GovernanceInsightItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GovernanceInsightItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new GovernanceInsightItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public GovernanceInsightItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/AgreementItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/AgreementItemRequestBuilder.cs index f3e0f2acff5..785aef48c9e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/AgreementItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/AgreementItemRequestBuilder.cs @@ -63,8 +63,8 @@ public async Task DeleteAsync(Action - /// Retrieve the properties and relationships of an agreement object. - /// Find more info here + /// Retrieve all localized files related to an agreement. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -129,7 +129,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Retrieve the properties and relationships of an agreement object. + /// Retrieve all localized files related to an agreement. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -199,7 +199,7 @@ public AgreementItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Retrieve the properties and relationships of an agreement object. + /// Retrieve all localized files related to an agreement. /// public class AgreementItemRequestBuilderGetQueryParameters { /// Expand related entities 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 130c1addf51..b5d0b909e95 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Item/History/HistoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Item/History/HistoryRequestBuilder.cs @@ -40,8 +40,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. @@ -81,7 +81,7 @@ public async Task PostAsync(RiskyUserHistoryItem body, Act return await RequestAdapter.SendAsync(requestInfo, RiskyUserHistoryItem.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// 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 @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(RiskyUserHistoryItem body, Ac return requestInfo; } /// - /// 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/Me/Chats/Item/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs new file mode 100644 index 00000000000..4fd90824c74 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs @@ -0,0 +1,64 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Me.Chats.Item.InstalledApps.Item.Upgrade { + public class UpgradePostRequestBody : 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 consentedPermissionSet property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public TeamsAppPermissionSet? ConsentedPermissionSet { + get { return BackingStore?.Get("consentedPermissionSet"); } + set { BackingStore?.Set("consentedPermissionSet", value); } + } +#nullable restore +#else + public TeamsAppPermissionSet ConsentedPermissionSet { + get { return BackingStore?.Get("consentedPermissionSet"); } + set { BackingStore?.Set("consentedPermissionSet", value); } + } +#endif + /// + /// Instantiates a new upgradePostRequestBody and sets the default values. + /// + public UpgradePostRequestBody() { + 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 UpgradePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UpgradePostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"consentedPermissionSet", n => { ConsentedPermissionSet = n.GetObjectValue(TeamsAppPermissionSet.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("consentedPermissionSet", ConsentedPermissionSet); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs index 2b50d12bb03..676a4acfd76 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs @@ -30,16 +30,18 @@ public UpgradeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Upgrade an app installation within a chat. /// 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(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(UpgradePostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(UpgradePostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - var requestInfo = ToPostRequestInformation(requestConfiguration); + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { {"4XX", ODataError.CreateFromDiscriminatorValue}, {"5XX", ODataError.CreateFromDiscriminatorValue}, @@ -49,19 +51,22 @@ public async Task PostAsync(Action /// Upgrade an app installation within a chat. /// + /// 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(Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(UpgradePostRequestBody body, Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(UpgradePostRequestBody 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 UpgradeRequestBuilderPostRequestConfiguration(); requestConfiguration.Invoke(requestConfig); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Item/ConversationMemberItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Item/ConversationMemberItemRequestBuilder.cs index 8f453acab6e..fba5ada22a6 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Item/ConversationMemberItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Item/ConversationMemberItemRequestBuilder.cs @@ -48,8 +48,8 @@ public async Task DeleteAsync(Action - /// Retrieve a conversationMember from a chat. - /// Find more info here + /// Retrieve a conversationMember from a chat or channel. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -113,7 +113,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Retrieve a conversationMember from a chat. + /// Retrieve a conversationMember from a chat or channel. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -183,7 +183,7 @@ public ConversationMemberItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Retrieve a conversationMember from a chat. + /// Retrieve a conversationMember from a chat or channel. /// public class ConversationMemberItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index 0df958d0a00..cdd9baf7324 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Send a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new reply to a chatMessage in a specified channel. + /// Send a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/MessagesRequestBuilder.cs index 6ac50954884..25997044bb3 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/MessagesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/EmployeeExperience/EmployeeExperienceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/EmployeeExperience/EmployeeExperienceRequestBuilder.cs new file mode 100644 index 00000000000..b1686f6773f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/EmployeeExperience/EmployeeExperienceRequestBuilder.cs @@ -0,0 +1,248 @@ +using Microsoft.Graph.Me.EmployeeExperience.LearningCourseActivities; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.EmployeeExperience { + /// + /// Provides operations to manage the employeeExperience property of the microsoft.graph.user entity. + /// + public class EmployeeExperienceRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the learningCourseActivities property of the microsoft.graph.employeeExperienceUser entity. + public LearningCourseActivitiesRequestBuilder LearningCourseActivities { get => + new LearningCourseActivitiesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new EmployeeExperienceRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public EmployeeExperienceRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/employeeExperience{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new EmployeeExperienceRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public EmployeeExperienceRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/employeeExperience{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property employeeExperience for me + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get employeeExperience from me + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, EmployeeExperienceUser.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property employeeExperience in me + /// + /// 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(EmployeeExperienceUser body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(EmployeeExperienceUser 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, EmployeeExperienceUser.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property employeeExperience for me + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation 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 EmployeeExperienceRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get employeeExperience from me + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new EmployeeExperienceRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property employeeExperience in me + /// + /// 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(EmployeeExperienceUser body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(EmployeeExperienceUser 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 EmployeeExperienceRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class EmployeeExperienceRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new employeeExperienceRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public EmployeeExperienceRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get employeeExperience from me + /// + public class EmployeeExperienceRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 EmployeeExperienceRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public EmployeeExperienceRequestBuilderGetQueryParameters QueryParameters { get; set; } = new EmployeeExperienceRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new employeeExperienceRequestBuilderGetRequestConfiguration and sets the default values. + /// + public EmployeeExperienceRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class EmployeeExperienceRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new employeeExperienceRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public EmployeeExperienceRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/EmployeeExperience/LearningCourseActivities/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/EmployeeExperience/LearningCourseActivities/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..b8da7c580da --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/EmployeeExperience/LearningCourseActivities/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Me.EmployeeExperience.LearningCourseActivities.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/employeeExperience/learningCourseActivities/$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/employeeExperience/learningCourseActivities/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/EmployeeExperience/LearningCourseActivities/Item/LearningCourseActivityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/EmployeeExperience/LearningCourseActivities/Item/LearningCourseActivityItemRequestBuilder.cs new file mode 100644 index 00000000000..9a64acc39ba --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/EmployeeExperience/LearningCourseActivities/Item/LearningCourseActivityItemRequestBuilder.cs @@ -0,0 +1,120 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.EmployeeExperience.LearningCourseActivities.Item { + /// + /// Provides operations to manage the learningCourseActivities property of the microsoft.graph.employeeExperienceUser entity. + /// + public class LearningCourseActivityItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new LearningCourseActivityItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LearningCourseActivityItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/employeeExperience/learningCourseActivities/{learningCourseActivity%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new LearningCourseActivityItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LearningCourseActivityItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/employeeExperience/learningCourseActivities/{learningCourseActivity%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Get the specified learningCourseActivity object using either an ID or an **externalCourseActivityId** of the learning provider, or a **courseActivityId** of a user. + /// 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, LearningCourseActivity.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the specified learningCourseActivity object using either an ID or an **externalCourseActivityId** of the learning provider, or a **courseActivityId** of a user. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new LearningCourseActivityItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the specified learningCourseActivity object using either an ID or an **externalCourseActivityId** of the learning provider, or a **courseActivityId** of a user. + /// + public class LearningCourseActivityItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 LearningCourseActivityItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LearningCourseActivityItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LearningCourseActivityItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new LearningCourseActivityItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LearningCourseActivityItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/EmployeeExperience/LearningCourseActivities/LearningCourseActivitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/EmployeeExperience/LearningCourseActivities/LearningCourseActivitiesRequestBuilder.cs new file mode 100644 index 00000000000..9c31325d8c2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/EmployeeExperience/LearningCourseActivities/LearningCourseActivitiesRequestBuilder.cs @@ -0,0 +1,171 @@ +using Microsoft.Graph.Me.EmployeeExperience.LearningCourseActivities.Count; +using Microsoft.Graph.Me.EmployeeExperience.LearningCourseActivities.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.Me.EmployeeExperience.LearningCourseActivities { + /// + /// Provides operations to manage the learningCourseActivities property of the microsoft.graph.employeeExperienceUser entity. + /// + public class LearningCourseActivitiesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the learningCourseActivities property of the microsoft.graph.employeeExperienceUser entity. + public LearningCourseActivityItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("learningCourseActivity%2Did", position); + return new LearningCourseActivityItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new LearningCourseActivitiesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LearningCourseActivitiesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/employeeExperience/learningCourseActivities{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new LearningCourseActivitiesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LearningCourseActivitiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/employeeExperience/learningCourseActivities{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get a list of the learningCourseActivity objects (assigned or self-initiated) for a user. + /// 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, LearningCourseActivityCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get a list of the learningCourseActivity objects (assigned or self-initiated) for a user. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new LearningCourseActivitiesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get a list of the learningCourseActivity objects (assigned or self-initiated) for a user. + /// + public class LearningCourseActivitiesRequestBuilderGetQueryParameters { + /// 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 LearningCourseActivitiesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LearningCourseActivitiesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LearningCourseActivitiesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new learningCourseActivitiesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LearningCourseActivitiesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index 622c20aac16..d75a604db71 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Send a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new reply to a chatMessage in a specified channel. + /// Send a new reply to a chatMessage in a specified channel. /// /// 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 307fa64c935..4b5feeb2361 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 @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// 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/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs new file mode 100644 index 00000000000..1a387494767 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs @@ -0,0 +1,64 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Me.JoinedTeams.Item.InstalledApps.Item.Upgrade { + public class UpgradePostRequestBody : 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 consentedPermissionSet property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public TeamsAppPermissionSet? ConsentedPermissionSet { + get { return BackingStore?.Get("consentedPermissionSet"); } + set { BackingStore?.Set("consentedPermissionSet", value); } + } +#nullable restore +#else + public TeamsAppPermissionSet ConsentedPermissionSet { + get { return BackingStore?.Get("consentedPermissionSet"); } + set { BackingStore?.Set("consentedPermissionSet", value); } + } +#endif + /// + /// Instantiates a new upgradePostRequestBody and sets the default values. + /// + public UpgradePostRequestBody() { + 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 UpgradePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UpgradePostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"consentedPermissionSet", n => { ConsentedPermissionSet = n.GetObjectValue(TeamsAppPermissionSet.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("consentedPermissionSet", ConsentedPermissionSet); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs index a50bfca3036..ece7fc1e51b 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs @@ -30,16 +30,18 @@ public UpgradeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Upgrade an app installation within a chat. /// 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(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(UpgradePostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(UpgradePostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - var requestInfo = ToPostRequestInformation(requestConfiguration); + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { {"4XX", ODataError.CreateFromDiscriminatorValue}, {"5XX", ODataError.CreateFromDiscriminatorValue}, @@ -49,19 +51,22 @@ public async Task PostAsync(Action /// Upgrade an app installation within a chat. /// + /// 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(Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(UpgradePostRequestBody body, Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(UpgradePostRequestBody 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 UpgradeRequestBuilderPostRequestConfiguration(); requestConfiguration.Invoke(requestConfig); diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Photo/PhotoRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Photo/PhotoRequestBuilder.cs index ece0c5158f4..91cf8878747 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Photo/PhotoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Photo/PhotoRequestBuilder.cs @@ -52,7 +52,8 @@ public async Task DeleteAsync(Action - /// The profile photo for the team. + /// Get the specified profilePhoto or its metadata (**profilePhoto** properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -116,7 +117,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// The profile photo for the team. + /// Get the specified profilePhoto or its metadata (**profilePhoto** properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -186,7 +187,7 @@ public PhotoRequestBuilderDeleteRequestConfiguration() { } } /// - /// The profile photo for the team. + /// Get the specified profilePhoto or its metadata (**profilePhoto** properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. /// public class PhotoRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Photo/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Photo/Value/ContentRequestBuilder.cs index 77169ac6b58..2a18630666a 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Photo/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Photo/Value/ContentRequestBuilder.cs @@ -28,6 +28,7 @@ public ContentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba } /// /// Get media content for the navigation property photo from me + /// 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/JoinedTeams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs index e0aff4710c0..82e1d912a4b 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Send a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new reply to a chatMessage in a specified channel. + /// Send a new reply to a chatMessage in a specified channel. /// /// 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 e24b957b421..725a3b30c39 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 @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// 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/ChildFoldersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/ChildFoldersRequestBuilder.cs index 9880f270c19..ad4f59c8e6b 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/ChildFoldersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/ChildFoldersRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, MailFolderCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Use this API to create a new child mailFolder. If you intend a new folder to be hidden, you must set the **isHidden** property to `true` on creation. - /// Find more info here + /// Create a new mailSearchFolder in the specified user's mailbox. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Use this API to create a new child mailFolder. If you intend a new folder to be hidden, you must set the **isHidden** property to `true` on creation. + /// Create a new mailSearchFolder in the specified user's mailbox. /// /// 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 bffc5c47514..50c06a40554 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 @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, AttachmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// 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 + /// 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 can add 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 /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// 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. + /// 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 can add 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. /// /// 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/MailFolderItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/MailFolderItemRequestBuilder.cs index b7a555d604d..8fcd47b847a 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/MailFolderItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/MailFolderItemRequestBuilder.cs @@ -93,8 +93,8 @@ public async Task GetAsync(Action(requestInfo, MailFolder.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Update the properties of mailfolder object. - /// Find more info here + /// Update the writable properties of a mailSearchFolder object. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -165,7 +165,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the properties of mailfolder object. + /// Update the writable properties of a mailSearchFolder object. /// /// 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 04969f540fc..2ff66e7403d 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 @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, AttachmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// 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 + /// 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 can add 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 /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// 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. + /// 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 can add 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. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..abfc546c13f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Me.ManagedDevices.Item.LogCollectionRequests.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/managedDevices/{managedDevice%2Did}/logCollectionRequests/$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/managedDevices/{managedDevice%2Did}/logCollectionRequests/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlRequestBuilder.cs new file mode 100644 index 00000000000..762afc28062 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlRequestBuilder.cs @@ -0,0 +1,90 @@ +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.ManagedDevices.Item.LogCollectionRequests.Item.CreateDownloadUrl { + /// + /// Provides operations to call the createDownloadUrl method. + /// + public class CreateDownloadUrlRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CreateDownloadUrlRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CreateDownloadUrlRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/logCollectionRequests/{deviceLogCollectionResponse%2Did}/createDownloadUrl", pathParameters) { + } + /// + /// Instantiates a new CreateDownloadUrlRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CreateDownloadUrlRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/logCollectionRequests/{deviceLogCollectionResponse%2Did}/createDownloadUrl", rawUrl) { + } + /// + /// Invoke action createDownloadUrl + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, CreateDownloadUrlResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke action createDownloadUrl + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new CreateDownloadUrlRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CreateDownloadUrlRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new createDownloadUrlRequestBuilderPostRequestConfiguration and sets the default values. + /// + public CreateDownloadUrlRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs new file mode 100644 index 00000000000..1edbd81327c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs @@ -0,0 +1,63 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Me.ManagedDevices.Item.LogCollectionRequests.Item.CreateDownloadUrl { + public class CreateDownloadUrlResponse : 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 value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public string Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Instantiates a new createDownloadUrlResponse and sets the default values. + /// + public CreateDownloadUrlResponse() { + 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 CreateDownloadUrlResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CreateDownloadUrlResponse(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"value", n => { Value = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/Item/DeviceLogCollectionResponseItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/Item/DeviceLogCollectionResponseItemRequestBuilder.cs new file mode 100644 index 00000000000..c4718faac18 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/Item/DeviceLogCollectionResponseItemRequestBuilder.cs @@ -0,0 +1,248 @@ +using Microsoft.Graph.Me.ManagedDevices.Item.LogCollectionRequests.Item.CreateDownloadUrl; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ManagedDevices.Item.LogCollectionRequests.Item { + /// + /// Provides operations to manage the logCollectionRequests property of the microsoft.graph.managedDevice entity. + /// + public class DeviceLogCollectionResponseItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the createDownloadUrl method. + public CreateDownloadUrlRequestBuilder CreateDownloadUrl { get => + new CreateDownloadUrlRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new DeviceLogCollectionResponseItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DeviceLogCollectionResponseItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/logCollectionRequests/{deviceLogCollectionResponse%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DeviceLogCollectionResponseItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DeviceLogCollectionResponseItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/logCollectionRequests/{deviceLogCollectionResponse%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property logCollectionRequests for me + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task 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); + } + /// + /// List of log collection requests + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DeviceLogCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property logCollectionRequests in me + /// + /// 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(DeviceLogCollectionResponse body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(DeviceLogCollectionResponse 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, DeviceLogCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property logCollectionRequests for me + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation 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 DeviceLogCollectionResponseItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// List of log collection requests + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DeviceLogCollectionResponseItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property logCollectionRequests in me + /// + /// 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(DeviceLogCollectionResponse body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(DeviceLogCollectionResponse 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 DeviceLogCollectionResponseItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DeviceLogCollectionResponseItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new DeviceLogCollectionResponseItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public DeviceLogCollectionResponseItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// List of log collection requests + /// + public class DeviceLogCollectionResponseItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 DeviceLogCollectionResponseItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DeviceLogCollectionResponseItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DeviceLogCollectionResponseItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new DeviceLogCollectionResponseItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DeviceLogCollectionResponseItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DeviceLogCollectionResponseItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new DeviceLogCollectionResponseItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public DeviceLogCollectionResponseItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/LogCollectionRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/LogCollectionRequestsRequestBuilder.cs new file mode 100644 index 00000000000..7e140dff9f0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/LogCollectionRequestsRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.Me.ManagedDevices.Item.LogCollectionRequests.Count; +using Microsoft.Graph.Me.ManagedDevices.Item.LogCollectionRequests.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.Me.ManagedDevices.Item.LogCollectionRequests { + /// + /// Provides operations to manage the logCollectionRequests property of the microsoft.graph.managedDevice entity. + /// + public class LogCollectionRequestsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the logCollectionRequests property of the microsoft.graph.managedDevice entity. + public DeviceLogCollectionResponseItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("deviceLogCollectionResponse%2Did", position); + return new DeviceLogCollectionResponseItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new LogCollectionRequestsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LogCollectionRequestsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/logCollectionRequests{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new LogCollectionRequestsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LogCollectionRequestsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/logCollectionRequests{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List of log collection requests + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DeviceLogCollectionResponseCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to logCollectionRequests for me + /// + /// 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(DeviceLogCollectionResponse body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(DeviceLogCollectionResponse 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, DeviceLogCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// List of log collection requests + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new LogCollectionRequestsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to logCollectionRequests for me + /// + /// 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(DeviceLogCollectionResponse body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(DeviceLogCollectionResponse 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 LogCollectionRequestsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// List of log collection requests + /// + public class LogCollectionRequestsRequestBuilderGetQueryParameters { + /// 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 LogCollectionRequestsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LogCollectionRequestsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LogCollectionRequestsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new logCollectionRequestsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LogCollectionRequestsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class LogCollectionRequestsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new logCollectionRequestsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public LogCollectionRequestsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ManagedDeviceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ManagedDeviceItemRequestBuilder.cs index d809907dc16..6080f42a7b0 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ManagedDeviceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ManagedDeviceItemRequestBuilder.cs @@ -6,6 +6,7 @@ using Microsoft.Graph.Me.ManagedDevices.Item.DeviceConfigurationStates; using Microsoft.Graph.Me.ManagedDevices.Item.DisableLostMode; using Microsoft.Graph.Me.ManagedDevices.Item.LocateDevice; +using Microsoft.Graph.Me.ManagedDevices.Item.LogCollectionRequests; using Microsoft.Graph.Me.ManagedDevices.Item.LogoutSharedAppleDeviceActiveUser; using Microsoft.Graph.Me.ManagedDevices.Item.RebootNow; using Microsoft.Graph.Me.ManagedDevices.Item.RecoverPasscode; @@ -19,6 +20,7 @@ using Microsoft.Graph.Me.ManagedDevices.Item.Users; using Microsoft.Graph.Me.ManagedDevices.Item.WindowsDefenderScan; using Microsoft.Graph.Me.ManagedDevices.Item.WindowsDefenderUpdateSignatures; +using Microsoft.Graph.Me.ManagedDevices.Item.WindowsProtectionState; using Microsoft.Graph.Me.ManagedDevices.Item.Wipe; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; @@ -67,6 +69,10 @@ public class ManagedDeviceItemRequestBuilder : BaseRequestBuilder { public LocateDeviceRequestBuilder LocateDevice { get => new LocateDeviceRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the logCollectionRequests property of the microsoft.graph.managedDevice entity. + public LogCollectionRequestsRequestBuilder LogCollectionRequests { get => + new LogCollectionRequestsRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to call the logoutSharedAppleDeviceActiveUser method. public LogoutSharedAppleDeviceActiveUserRequestBuilder LogoutSharedAppleDeviceActiveUser { get => new LogoutSharedAppleDeviceActiveUserRequestBuilder(PathParameters, RequestAdapter); @@ -119,6 +125,10 @@ public class ManagedDeviceItemRequestBuilder : BaseRequestBuilder { public WindowsDefenderUpdateSignaturesRequestBuilder WindowsDefenderUpdateSignatures { get => new WindowsDefenderUpdateSignaturesRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the windowsProtectionState property of the microsoft.graph.managedDevice entity. + public WindowsProtectionStateRequestBuilder WindowsProtectionState { get => + new WindowsProtectionStateRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to call the wipe method. public WipeRequestBuilder Wipe { get => new WipeRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..c30521fb05a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Me.ManagedDevices.Item.WindowsProtectionState.DetectedMalwareState.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/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState/$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/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/DetectedMalwareStateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/DetectedMalwareStateRequestBuilder.cs new file mode 100644 index 00000000000..346044c6546 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/DetectedMalwareStateRequestBuilder.cs @@ -0,0 +1,237 @@ +using Microsoft.Graph.Me.ManagedDevices.Item.WindowsProtectionState.DetectedMalwareState.Count; +using Microsoft.Graph.Me.ManagedDevices.Item.WindowsProtectionState.DetectedMalwareState.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.Me.ManagedDevices.Item.WindowsProtectionState.DetectedMalwareState { + /// + /// Provides operations to manage the detectedMalwareState property of the microsoft.graph.windowsProtectionState entity. + /// + public class DetectedMalwareStateRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the detectedMalwareState property of the microsoft.graph.windowsProtectionState entity. + public WindowsDeviceMalwareStateItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("windowsDeviceMalwareState%2Did", position); + return new WindowsDeviceMalwareStateItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new DetectedMalwareStateRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DetectedMalwareStateRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DetectedMalwareStateRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DetectedMalwareStateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List properties and relationships of the windowsDeviceMalwareState 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, WindowsDeviceMalwareStateCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create a new windowsDeviceMalwareState 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(WindowsDeviceMalwareState body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(WindowsDeviceMalwareState 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, WindowsDeviceMalwareState.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// List properties and relationships of the windowsDeviceMalwareState 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 DetectedMalwareStateRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create a new windowsDeviceMalwareState 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(WindowsDeviceMalwareState body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(WindowsDeviceMalwareState 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 DetectedMalwareStateRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// List properties and relationships of the windowsDeviceMalwareState objects. + /// + public class DetectedMalwareStateRequestBuilderGetQueryParameters { + /// 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 DetectedMalwareStateRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DetectedMalwareStateRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DetectedMalwareStateRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new detectedMalwareStateRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DetectedMalwareStateRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DetectedMalwareStateRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new detectedMalwareStateRequestBuilderPostRequestConfiguration and sets the default values. + /// + public DetectedMalwareStateRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Item/WindowsDeviceMalwareStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Item/WindowsDeviceMalwareStateItemRequestBuilder.cs new file mode 100644 index 00000000000..ff193a914dd --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Item/WindowsDeviceMalwareStateItemRequestBuilder.cs @@ -0,0 +1,246 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ManagedDevices.Item.WindowsProtectionState.DetectedMalwareState.Item { + /// + /// Provides operations to manage the detectedMalwareState property of the microsoft.graph.windowsProtectionState entity. + /// + public class WindowsDeviceMalwareStateItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new WindowsDeviceMalwareStateItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WindowsDeviceMalwareStateItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState/{windowsDeviceMalwareState%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new WindowsDeviceMalwareStateItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WindowsDeviceMalwareStateItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState/{windowsDeviceMalwareState%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Deletes a windowsDeviceMalwareState. + /// 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); + } + /// + /// Read properties and relationships of the windowsDeviceMalwareState 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, WindowsDeviceMalwareState.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the properties of a windowsDeviceMalwareState 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(WindowsDeviceMalwareState body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(WindowsDeviceMalwareState 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, WindowsDeviceMalwareState.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Deletes a windowsDeviceMalwareState. + /// + /// Configuration 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 WindowsDeviceMalwareStateItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the windowsDeviceMalwareState 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 WindowsDeviceMalwareStateItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a windowsDeviceMalwareState 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(WindowsDeviceMalwareState body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(WindowsDeviceMalwareState 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 WindowsDeviceMalwareStateItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsDeviceMalwareStateItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new WindowsDeviceMalwareStateItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public WindowsDeviceMalwareStateItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the windowsDeviceMalwareState object. + /// + public class WindowsDeviceMalwareStateItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 WindowsDeviceMalwareStateItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public WindowsDeviceMalwareStateItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new WindowsDeviceMalwareStateItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new WindowsDeviceMalwareStateItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public WindowsDeviceMalwareStateItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsDeviceMalwareStateItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new WindowsDeviceMalwareStateItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public WindowsDeviceMalwareStateItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsProtectionState/WindowsProtectionStateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsProtectionState/WindowsProtectionStateRequestBuilder.cs new file mode 100644 index 00000000000..517d3539c41 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsProtectionState/WindowsProtectionStateRequestBuilder.cs @@ -0,0 +1,250 @@ +using Microsoft.Graph.Me.ManagedDevices.Item.WindowsProtectionState.DetectedMalwareState; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ManagedDevices.Item.WindowsProtectionState { + /// + /// Provides operations to manage the windowsProtectionState property of the microsoft.graph.managedDevice entity. + /// + public class WindowsProtectionStateRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the detectedMalwareState property of the microsoft.graph.windowsProtectionState entity. + public DetectedMalwareStateRequestBuilder DetectedMalwareState { get => + new DetectedMalwareStateRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new WindowsProtectionStateRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WindowsProtectionStateRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/windowsProtectionState{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new WindowsProtectionStateRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WindowsProtectionStateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/windowsProtectionState{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property windowsProtectionState for me + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task 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); + } + /// + /// Read properties and relationships of the windowsProtectionState 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, Microsoft.Graph.Models.WindowsProtectionState.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the properties of a windowsProtectionState 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(Microsoft.Graph.Models.WindowsProtectionState body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.WindowsProtectionState 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.WindowsProtectionState.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property windowsProtectionState for me + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation 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 WindowsProtectionStateRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the windowsProtectionState 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 WindowsProtectionStateRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a windowsProtectionState 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(Microsoft.Graph.Models.WindowsProtectionState body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.WindowsProtectionState 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 WindowsProtectionStateRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsProtectionStateRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new windowsProtectionStateRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public WindowsProtectionStateRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the windowsProtectionState object. + /// + public class WindowsProtectionStateRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 WindowsProtectionStateRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public WindowsProtectionStateRequestBuilderGetQueryParameters QueryParameters { get; set; } = new WindowsProtectionStateRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new windowsProtectionStateRequestBuilderGetRequestConfiguration and sets the default values. + /// + public WindowsProtectionStateRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsProtectionStateRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new windowsProtectionStateRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public WindowsProtectionStateRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/MeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MeRequestBuilder.cs index eb3556b38a8..46e1820d8c6 100644 --- a/src/Microsoft.Graph/Generated/Me/MeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MeRequestBuilder.cs @@ -18,6 +18,7 @@ using Microsoft.Graph.Me.DirectReports; using Microsoft.Graph.Me.Drive; using Microsoft.Graph.Me.Drives; +using Microsoft.Graph.Me.EmployeeExperience; using Microsoft.Graph.Me.Events; using Microsoft.Graph.Me.ExportDeviceAndAppManagementData; using Microsoft.Graph.Me.ExportDeviceAndAppManagementDataWithSkipWithTop; @@ -162,6 +163,10 @@ public class MeRequestBuilder : BaseRequestBuilder { public DrivesRequestBuilder Drives { get => new DrivesRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the employeeExperience property of the microsoft.graph.user entity. + public EmployeeExperienceRequestBuilder EmployeeExperience { get => + new EmployeeExperienceRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the events property of the microsoft.graph.user entity. public EventsRequestBuilder Events { get => new EventsRequestBuilder(PathParameters, RequestAdapter); @@ -375,8 +380,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. @@ -427,7 +432,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 @@ -481,7 +486,7 @@ public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.User return requestInfo; } /// - /// 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 9b87e26e054..d49ada906d3 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/Attachments/AttachmentsRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, AttachmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// 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 + /// 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 can add 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 /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// 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. + /// 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 can add 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. /// /// 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 f6e1b8fe465..e994630ac2d 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/MessageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/MessageItemRequestBuilder.cs @@ -88,8 +88,8 @@ public MessageItemRequestBuilder(Dictionary pathParameters, IReq public MessageItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/messages/{message%2Did}{?includeHiddenMessages*,%24select,%24expand}", rawUrl) { } /// - /// Delete a message in the specified user's mailbox, or delete a relationship of the message. - /// Find more info here + /// Delete eventMessage. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -109,7 +109,7 @@ public async Task DeleteAsync(Action /// 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. @@ -128,8 +128,8 @@ public async Task DeleteAsync(Action(requestInfo, Microsoft.Graph.Models.Message.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// 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 @@ -150,7 +150,7 @@ public async Task DeleteAsync(Action(requestInfo, Microsoft.Graph.Models.Message.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Delete a message in the specified user's mailbox, or delete a relationship of the message. + /// Delete eventMessage. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -200,7 +200,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/Onenote/Pages/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/Content/ContentRequestBuilder.cs index b11dabe8b97..ae975e2fd40 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/Content/ContentRequestBuilder.cs @@ -29,6 +29,7 @@ public ContentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba } /// /// The page's HTML content. + /// 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/Onenote/Pages/PagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Pages/PagesRequestBuilder.cs index 7c119ae34ce..f3064ed5a9c 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Pages/PagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Pages/PagesRequestBuilder.cs @@ -40,7 +40,8 @@ public PagesRequestBuilder(Dictionary pathParameters, IRequestAd public PagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/me/onenote/pages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// Retrieve the properties and relationships of a page object. **Getting page information** Access a page's metadata by page identifier: **Getting page content** You can use the page's `content` endpoint to get the HTML content of a page: The `includeIDs=true` query option is used to update pages. + /// Retrieve a list of page objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -59,7 +60,8 @@ public async Task GetAsync(Action(requestInfo, OnenotePageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create new navigation property to pages for me + /// Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the `sectionName` query parameter. Example: `../onenote/pages?sectionName=My%20section` The `POST /onenote/pages` operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -80,7 +82,7 @@ public async Task PostAsync(OnenotePage body, Action(requestInfo, OnenotePage.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Retrieve the properties and relationships of a page object. **Getting page information** Access a page's metadata by page identifier: **Getting page content** You can use the page's `content` endpoint to get the HTML content of a page: The `includeIDs=true` query option is used to update pages. + /// Retrieve a list of page objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -106,7 +108,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create new navigation property to pages for me + /// Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the `sectionName` query parameter. Example: `../onenote/pages?sectionName=My%20section` The `POST /onenote/pages` operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. @@ -134,7 +136,7 @@ public RequestInformation ToPostRequestInformation(OnenotePage body, Action - /// Retrieve the properties and relationships of a page object. **Getting page information** Access a page's metadata by page identifier: **Getting page content** You can use the page's `content` endpoint to get the HTML content of a page: The `includeIDs=true` query option is used to update pages. + /// Retrieve a list of page objects. /// public class PagesRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Me/Photo/PhotoRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Photo/PhotoRequestBuilder.cs index 802290a772a..9b1ff05d05f 100644 --- a/src/Microsoft.Graph/Generated/Me/Photo/PhotoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Photo/PhotoRequestBuilder.cs @@ -52,7 +52,8 @@ public async Task DeleteAsync(Action - /// The user's profile photo. Read-only. + /// Get the specified profilePhoto or its metadata (**profilePhoto** properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -116,7 +117,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// The user's profile photo. Read-only. + /// Get the specified profilePhoto or its metadata (**profilePhoto** properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -186,7 +187,7 @@ public PhotoRequestBuilderDeleteRequestConfiguration() { } } /// - /// The user's profile photo. Read-only. + /// Get the specified profilePhoto or its metadata (**profilePhoto** properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. /// public class PhotoRequestBuilderGetQueryParameters { /// Select properties to be returned diff --git a/src/Microsoft.Graph/Generated/Me/Photo/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Photo/Value/ContentRequestBuilder.cs index dedeed12511..2d55b72d6e6 100644 --- a/src/Microsoft.Graph/Generated/Me/Photo/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Photo/Value/ContentRequestBuilder.cs @@ -28,6 +28,7 @@ public ContentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba } /// /// Get media content for the navigation property photo from me + /// 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/Models/AccessPackageAutomaticRequestSettings.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAutomaticRequestSettings.cs index 096f92299c5..edb265caa7a 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageAutomaticRequestSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAutomaticRequestSettings.cs @@ -13,7 +13,7 @@ public IDictionary AdditionalData { } /// Stores model information. public IBackingStore BackingStore { get; private set; } - /// The gracePeriodBeforeAccessRemoval property + /// The duration for which access must be retained before the target's access is revoked once they leave the allowed target scope. public TimeSpan? GracePeriodBeforeAccessRemoval { get { return BackingStore?.Get("gracePeriodBeforeAccessRemoval"); } set { BackingStore?.Set("gracePeriodBeforeAccessRemoval", value); } @@ -32,7 +32,7 @@ public string OdataType { set { BackingStore?.Set("@odata.type", value); } } #endif - /// The removeAccessWhenTargetLeavesAllowedTargets property + /// Indicates whether automatic assignment must be removed for targets who move out of the allowed target scope. public bool? RemoveAccessWhenTargetLeavesAllowedTargets { get { return BackingStore?.Get("removeAccessWhenTargetLeavesAllowedTargets"); } set { BackingStore?.Set("removeAccessWhenTargetLeavesAllowedTargets", value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItem.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItem.cs index 710a2af56c9..aea0e34bf9c 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItem.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItem.cs @@ -65,6 +65,20 @@ public string Decision { get { return BackingStore?.Get("decision"); } set { BackingStore?.Set("decision", value); } } +#endif + /// Insights are recommendations to reviewers on whether to approve or deny a decision. There can be multiple insights associated with an accessReviewInstanceDecisionItem. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Insights { + get { return BackingStore?.Get?>("insights"); } + set { BackingStore?.Set("insights", value); } + } +#nullable restore +#else + public List Insights { + get { return BackingStore?.Get>("insights"); } + set { BackingStore?.Set("insights", value); } + } #endif /// Justification left by the reviewer when they made the decision. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -187,6 +201,7 @@ public DateTimeOffset? ReviewedDateTime { {"appliedDateTime", n => { AppliedDateTime = n.GetDateTimeOffsetValue(); } }, {"applyResult", n => { ApplyResult = n.GetStringValue(); } }, {"decision", n => { Decision = n.GetStringValue(); } }, + {"insights", n => { Insights = n.GetCollectionOfObjectValues(GovernanceInsight.CreateFromDiscriminatorValue)?.ToList(); } }, {"justification", n => { Justification = n.GetStringValue(); } }, {"principal", n => { Principal = n.GetObjectValue(Identity.CreateFromDiscriminatorValue); } }, {"principalLink", n => { PrincipalLink = n.GetStringValue(); } }, @@ -209,6 +224,7 @@ public DateTimeOffset? ReviewedDateTime { writer.WriteDateTimeOffsetValue("appliedDateTime", AppliedDateTime); writer.WriteStringValue("applyResult", ApplyResult); writer.WriteStringValue("decision", Decision); + writer.WriteCollectionOfObjectValues("insights", Insights); writer.WriteStringValue("justification", Justification); writer.WriteObjectValue("principal", Principal); writer.WriteStringValue("principalLink", PrincipalLink); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewScheduleSettings.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewScheduleSettings.cs index f0d19932802..87e99c8d11f 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewScheduleSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewScheduleSettings.cs @@ -85,7 +85,7 @@ public string OdataType { set { BackingStore?.Set("@odata.type", value); } } #endif - /// The recommendationInsightSettings property + /// Optional. Describes the types of insights that aid reviewers to make access review decisions. NOTE: If the stageSettings of the accessReviewScheduleDefinition object is defined, its recommendationInsightSettings setting will be used instead of the value of this property. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? RecommendationInsightSettings { @@ -99,7 +99,7 @@ public List RecommendationInsightSetti set { BackingStore?.Set("recommendationInsightSettings", value); } } #endif - /// The recommendationLookBackDuration property + /// Optional field. Indicates the period of inactivity (with respect to the start date of the review instance) that recommendations will be configured from. The recommendation will be to deny if the user is inactive during the look-back duration. For reviews of groups and Azure AD roles, any duration is accepted. For reviews of applications, 30 days is the maximum duration. If not specified, the duration is 30 days. NOTE: If the stageSettings of the accessReviewScheduleDefinition object is defined, its recommendationLookBackDuration setting will be used instead of the value of this property. public TimeSpan? RecommendationLookBackDuration { get { return BackingStore?.Get("recommendationLookBackDuration"); } set { BackingStore?.Set("recommendationLookBackDuration", value); } diff --git a/src/Microsoft.Graph/Generated/Models/AppLogCollectionDownloadDetails.cs b/src/Microsoft.Graph/Generated/Models/AppLogCollectionDownloadDetails.cs new file mode 100644 index 00000000000..e8956bae0c5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AppLogCollectionDownloadDetails.cs @@ -0,0 +1,102 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class AppLogCollectionDownloadDetails : 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); } + } + /// The appLogDecryptionAlgorithm property + public Microsoft.Graph.Models.AppLogDecryptionAlgorithm? AppLogDecryptionAlgorithm { + get { return BackingStore?.Get("appLogDecryptionAlgorithm"); } + set { BackingStore?.Set("appLogDecryptionAlgorithm", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// Decryption key that used to decrypt the log. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DecryptionKey { + get { return BackingStore?.Get("decryptionKey"); } + set { BackingStore?.Set("decryptionKey", value); } + } +#nullable restore +#else + public string DecryptionKey { + get { return BackingStore?.Get("decryptionKey"); } + set { BackingStore?.Set("decryptionKey", value); } + } +#endif + /// Download SAS (Shared Access Signature) Url for completed app log request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DownloadUrl { + get { return BackingStore?.Get("downloadUrl"); } + set { BackingStore?.Set("downloadUrl", value); } + } +#nullable restore +#else + public string DownloadUrl { + get { return BackingStore?.Get("downloadUrl"); } + set { BackingStore?.Set("downloadUrl", 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 + /// + /// Instantiates a new appLogCollectionDownloadDetails and sets the default values. + /// + public AppLogCollectionDownloadDetails() { + 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 AppLogCollectionDownloadDetails CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AppLogCollectionDownloadDetails(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"appLogDecryptionAlgorithm", n => { AppLogDecryptionAlgorithm = n.GetEnumValue(); } }, + {"decryptionKey", n => { DecryptionKey = n.GetStringValue(); } }, + {"downloadUrl", n => { DownloadUrl = n.GetStringValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("appLogDecryptionAlgorithm", AppLogDecryptionAlgorithm); + writer.WriteStringValue("decryptionKey", DecryptionKey); + writer.WriteStringValue("downloadUrl", DownloadUrl); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/AppLogCollectionRequest.cs b/src/Microsoft.Graph/Generated/Models/AppLogCollectionRequest.cs new file mode 100644 index 00000000000..4d8bca2732e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AppLogCollectionRequest.cs @@ -0,0 +1,81 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + /// + /// Entity for AppLogCollectionRequest contains all logs values. + /// + public class AppLogCollectionRequest : Entity, IParsable { + /// Time at which the upload log request reached a completed state if not completed yet NULL will be returned. + public DateTimeOffset? CompletedDateTime { + get { return BackingStore?.Get("completedDateTime"); } + set { BackingStore?.Set("completedDateTime", value); } + } + /// List of log folders. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CustomLogFolders { + get { return BackingStore?.Get?>("customLogFolders"); } + set { BackingStore?.Set("customLogFolders", value); } + } +#nullable restore +#else + public List CustomLogFolders { + get { return BackingStore?.Get>("customLogFolders"); } + set { BackingStore?.Set("customLogFolders", value); } + } +#endif + /// Indicates error message if any during the upload process. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ErrorMessage { + get { return BackingStore?.Get("errorMessage"); } + set { BackingStore?.Set("errorMessage", value); } + } +#nullable restore +#else + public string ErrorMessage { + get { return BackingStore?.Get("errorMessage"); } + set { BackingStore?.Set("errorMessage", value); } + } +#endif + /// AppLogUploadStatus + public AppLogUploadState? Status { + get { return BackingStore?.Get("status"); } + set { BackingStore?.Set("status", 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 AppLogCollectionRequest CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AppLogCollectionRequest(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"completedDateTime", n => { CompletedDateTime = n.GetDateTimeOffsetValue(); } }, + {"customLogFolders", n => { CustomLogFolders = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"errorMessage", n => { ErrorMessage = n.GetStringValue(); } }, + {"status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// 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("completedDateTime", CompletedDateTime); + writer.WriteCollectionOfPrimitiveValues("customLogFolders", CustomLogFolders); + writer.WriteStringValue("errorMessage", ErrorMessage); + writer.WriteEnumValue("status", Status); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/AppLogCollectionRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AppLogCollectionRequestCollectionResponse.cs new file mode 100644 index 00000000000..2166d1ebb61 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AppLogCollectionRequestCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class AppLogCollectionRequestCollectionResponse : 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 AppLogCollectionRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AppLogCollectionRequestCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(AppLogCollectionRequest.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/AppLogDecryptionAlgorithm.cs b/src/Microsoft.Graph/Generated/Models/AppLogDecryptionAlgorithm.cs new file mode 100644 index 00000000000..faaa4441c45 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AppLogDecryptionAlgorithm.cs @@ -0,0 +1,12 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum AppLogDecryptionAlgorithm { + /// decrypting using Aes256. + [EnumMember(Value = "aes256")] + Aes256, + /// Evolvable enumeration sentinel value. Do not use. + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/AppLogUploadState.cs b/src/Microsoft.Graph/Generated/Models/AppLogUploadState.cs new file mode 100644 index 00000000000..44be453113f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AppLogUploadState.cs @@ -0,0 +1,19 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + /// AppLogUploadStatus + public enum AppLogUploadState { + /// Default. Indicates that request is waiting to be processed or under processing. + [EnumMember(Value = "pending")] + Pending, + /// Indicates that request is completed with file uploaded to Azure blob for download. + [EnumMember(Value = "completed")] + Completed, + /// Indicates that request is completed with file uploaded to Azure blob for download. + [EnumMember(Value = "failed")] + Failed, + /// Evolvable enumeration sentinel value. Do not use. + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/AssignedTrainingInfo.cs b/src/Microsoft.Graph/Generated/Models/AssignedTrainingInfo.cs index 0ba03b3bf8c..7707c5b2361 100644 --- a/src/Microsoft.Graph/Generated/Models/AssignedTrainingInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/AssignedTrainingInfo.cs @@ -52,7 +52,7 @@ public string OdataType { } #endif /// - /// Instantiates a new assignedTrainingInfo and sets the default values. + /// Instantiates a new AssignedTrainingInfo and sets the default values. /// public AssignedTrainingInfo() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); diff --git a/src/Microsoft.Graph/Generated/Models/AssignmentType.cs b/src/Microsoft.Graph/Generated/Models/AssignmentType.cs new file mode 100644 index 00000000000..b562dab16ab --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AssignmentType.cs @@ -0,0 +1,12 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum AssignmentType { + [EnumMember(Value = "required")] + Required, + [EnumMember(Value = "recommended")] + Recommended, + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/AttributeMappingParameterSchema.cs b/src/Microsoft.Graph/Generated/Models/AttributeMappingParameterSchema.cs index ce32abaed2c..345f1f6bd8f 100644 --- a/src/Microsoft.Graph/Generated/Models/AttributeMappingParameterSchema.cs +++ b/src/Microsoft.Graph/Generated/Models/AttributeMappingParameterSchema.cs @@ -57,7 +57,7 @@ public AttributeType? Type { set { BackingStore?.Set("type", value); } } /// - /// Instantiates a new attributeMappingParameterSchema and sets the default values. + /// Instantiates a new AttributeMappingParameterSchema and sets the default values. /// public AttributeMappingParameterSchema() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); diff --git a/src/Microsoft.Graph/Generated/Models/AuditResource.cs b/src/Microsoft.Graph/Generated/Models/AuditResource.cs index ff6d2ecf50c..ccc2bfda41b 100644 --- a/src/Microsoft.Graph/Generated/Models/AuditResource.cs +++ b/src/Microsoft.Graph/Generated/Models/AuditResource.cs @@ -87,7 +87,7 @@ public string ResourceId { } #endif /// - /// Instantiates a new auditResource and sets the default values. + /// Instantiates a new AuditResource and sets the default values. /// public AuditResource() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodFeature.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodFeature.cs new file mode 100644 index 00000000000..60cdfb87bb7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodFeature.cs @@ -0,0 +1,18 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum AuthenticationMethodFeature { + [EnumMember(Value = "ssprRegistered")] + SsprRegistered, + [EnumMember(Value = "ssprEnabled")] + SsprEnabled, + [EnumMember(Value = "ssprCapable")] + SsprCapable, + [EnumMember(Value = "passwordlessCapable")] + PasswordlessCapable, + [EnumMember(Value = "mfaCapable")] + MfaCapable, + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodsRoot.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodsRoot.cs new file mode 100644 index 00000000000..eb5ebf6006c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodsRoot.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class AuthenticationMethodsRoot : Entity, IParsable { + /// The userRegistrationDetails property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserRegistrationDetails { + get { return BackingStore?.Get?>("userRegistrationDetails"); } + set { BackingStore?.Set("userRegistrationDetails", value); } + } +#nullable restore +#else + public List UserRegistrationDetails { + get { return BackingStore?.Get>("userRegistrationDetails"); } + set { BackingStore?.Set("userRegistrationDetails", 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 AuthenticationMethodsRoot CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AuthenticationMethodsRoot(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"userRegistrationDetails", n => { UserRegistrationDetails = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.UserRegistrationDetails.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("userRegistrationDetails", UserRegistrationDetails); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/Media.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/Media.cs index daa35045b68..c29ee7e2337 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/Media.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/Media.cs @@ -112,7 +112,7 @@ public List Streams { } #endif /// - /// Instantiates a new media and sets the default values. + /// Instantiates a new Media and sets the default values. /// public Media() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/MediaStream.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/MediaStream.cs index 7baae7da5b0..07ac7c35bce 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/MediaStream.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/MediaStream.cs @@ -187,7 +187,7 @@ public bool? WasMediaBypassed { set { BackingStore?.Set("wasMediaBypassed", value); } } /// - /// Instantiates a new MediaStream and sets the default values. + /// Instantiates a new mediaStream and sets the default values. /// public MediaStream() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); diff --git a/src/Microsoft.Graph/Generated/Models/CallRoute.cs b/src/Microsoft.Graph/Generated/Models/CallRoute.cs index c5d0603456c..4a5398402ce 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRoute.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRoute.cs @@ -61,7 +61,7 @@ public Microsoft.Graph.Models.RoutingType? RoutingType { set { BackingStore?.Set("routingType", value); } } /// - /// Instantiates a new callRoute and sets the default values. + /// Instantiates a new CallRoute and sets the default values. /// public CallRoute() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); diff --git a/src/Microsoft.Graph/Generated/Models/CourseStatus.cs b/src/Microsoft.Graph/Generated/Models/CourseStatus.cs new file mode 100644 index 00000000000..a7b0d4f0f4e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/CourseStatus.cs @@ -0,0 +1,14 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum CourseStatus { + [EnumMember(Value = "notStarted")] + NotStarted, + [EnumMember(Value = "inProgress")] + InProgress, + [EnumMember(Value = "completed")] + Completed, + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/DetectedAppPlatformType.cs b/src/Microsoft.Graph/Generated/Models/DetectedAppPlatformType.cs index 9355d303089..4b624f4a147 100644 --- a/src/Microsoft.Graph/Generated/Models/DetectedAppPlatformType.cs +++ b/src/Microsoft.Graph/Generated/Models/DetectedAppPlatformType.cs @@ -36,5 +36,8 @@ public enum DetectedAppPlatformType { /// Indicates that the platform of the detected application is Android dedicated and fully managed. [EnumMember(Value = "androidDedicatedAndFullyManaged")] AndroidDedicatedAndFullyManaged, + /// Evolvable enumeration sentinel value. Do not use. + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, } } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceLogCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceLogCollectionResponse.cs new file mode 100644 index 00000000000..1b8ad271625 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/DeviceLogCollectionResponse.cs @@ -0,0 +1,109 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + /// + /// Windows Log Collection request entity. + /// + public class DeviceLogCollectionResponse : Entity, IParsable { + /// The User Principal Name (UPN) of the user that enrolled the device. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EnrolledByUser { + get { return BackingStore?.Get("enrolledByUser"); } + set { BackingStore?.Set("enrolledByUser", value); } + } +#nullable restore +#else + public string EnrolledByUser { + get { return BackingStore?.Get("enrolledByUser"); } + set { BackingStore?.Set("enrolledByUser", value); } + } +#endif + /// The DateTime of the expiration of the logs. + public DateTimeOffset? ExpirationDateTimeUTC { + get { return BackingStore?.Get("expirationDateTimeUTC"); } + set { BackingStore?.Set("expirationDateTimeUTC", value); } + } + /// The UPN for who initiated the request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? InitiatedByUserPrincipalName { + get { return BackingStore?.Get("initiatedByUserPrincipalName"); } + set { BackingStore?.Set("initiatedByUserPrincipalName", value); } + } +#nullable restore +#else + public string InitiatedByUserPrincipalName { + get { return BackingStore?.Get("initiatedByUserPrincipalName"); } + set { BackingStore?.Set("initiatedByUserPrincipalName", value); } + } +#endif + /// Indicates Intune device unique identifier. + public Guid? ManagedDeviceId { + get { return BackingStore?.Get("managedDeviceId"); } + set { BackingStore?.Set("managedDeviceId", value); } + } + /// The DateTime the request was received. + public DateTimeOffset? ReceivedDateTimeUTC { + get { return BackingStore?.Get("receivedDateTimeUTC"); } + set { BackingStore?.Set("receivedDateTimeUTC", value); } + } + /// The DateTime of the request. + public DateTimeOffset? RequestedDateTimeUTC { + get { return BackingStore?.Get("requestedDateTimeUTC"); } + set { BackingStore?.Set("requestedDateTimeUTC", value); } + } + /// The size of the logs in KB. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? SizeInKB { + get { return BackingStore?.Get("sizeInKB"); } + set { BackingStore?.Set("sizeInKB", value); } + } + /// AppLogUploadStatus + public AppLogUploadState? Status { + get { return BackingStore?.Get("status"); } + set { BackingStore?.Set("status", 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 DeviceLogCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new DeviceLogCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"enrolledByUser", n => { EnrolledByUser = n.GetStringValue(); } }, + {"expirationDateTimeUTC", n => { ExpirationDateTimeUTC = n.GetDateTimeOffsetValue(); } }, + {"initiatedByUserPrincipalName", n => { InitiatedByUserPrincipalName = n.GetStringValue(); } }, + {"managedDeviceId", n => { ManagedDeviceId = n.GetGuidValue(); } }, + {"receivedDateTimeUTC", n => { ReceivedDateTimeUTC = n.GetDateTimeOffsetValue(); } }, + {"requestedDateTimeUTC", n => { RequestedDateTimeUTC = n.GetDateTimeOffsetValue(); } }, + {"sizeInKB", n => { SizeInKB = n.GetDoubleValue(); } }, + {"status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// 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("enrolledByUser", EnrolledByUser); + writer.WriteDateTimeOffsetValue("expirationDateTimeUTC", ExpirationDateTimeUTC); + writer.WriteStringValue("initiatedByUserPrincipalName", InitiatedByUserPrincipalName); + writer.WriteGuidValue("managedDeviceId", ManagedDeviceId); + writer.WriteDateTimeOffsetValue("receivedDateTimeUTC", ReceivedDateTimeUTC); + writer.WriteDateTimeOffsetValue("requestedDateTimeUTC", RequestedDateTimeUTC); + writer.WriteDoubleValue("sizeInKB", SizeInKB); + writer.WriteEnumValue("status", Status); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/DeviceLogCollectionResponseCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceLogCollectionResponseCollectionResponse.cs new file mode 100644 index 00000000000..c9f152b1eb2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/DeviceLogCollectionResponseCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class DeviceLogCollectionResponseCollectionResponse : 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 DeviceLogCollectionResponseCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new DeviceLogCollectionResponseCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(DeviceLogCollectionResponse.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/DeviceManagement.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagement.cs index 688194b5817..f6680df0571 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagement.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagement.cs @@ -186,6 +186,20 @@ public List DeviceManagementPartners { get { return BackingStore?.Get>("deviceManagementPartners"); } set { BackingStore?.Set("deviceManagementPartners", value); } } +#endif + /// Device protection overview. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.DeviceProtectionOverview? DeviceProtectionOverview { + get { return BackingStore?.Get("deviceProtectionOverview"); } + set { BackingStore?.Set("deviceProtectionOverview", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.DeviceProtectionOverview DeviceProtectionOverview { + get { return BackingStore?.Get("deviceProtectionOverview"); } + set { BackingStore?.Set("deviceProtectionOverview", value); } + } #endif /// The list of Exchange Connectors configured by the tenant. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -275,6 +289,20 @@ public List ManagedDevices { get { return BackingStore?.Get>("managedDevices"); } set { BackingStore?.Set("managedDevices", value); } } +#endif + /// The collection property of MobileAppTroubleshootingEvent. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? MobileAppTroubleshootingEvents { + get { return BackingStore?.Get?>("mobileAppTroubleshootingEvents"); } + set { BackingStore?.Set("mobileAppTroubleshootingEvents", value); } + } +#nullable restore +#else + public List MobileAppTroubleshootingEvents { + get { return BackingStore?.Get>("mobileAppTroubleshootingEvents"); } + set { BackingStore?.Set("mobileAppTroubleshootingEvents", value); } + } #endif /// The list of Mobile threat Defense connectors configured by the tenant. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -448,6 +476,328 @@ public List TroubleshootingEvents { get { return BackingStore?.Get>("troubleshootingEvents"); } set { BackingStore?.Set("troubleshootingEvents", value); } } +#endif + /// User experience analytics appHealth Application Performance +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserExperienceAnalyticsAppHealthApplicationPerformance { + get { return BackingStore?.Get?>("userExperienceAnalyticsAppHealthApplicationPerformance"); } + set { BackingStore?.Set("userExperienceAnalyticsAppHealthApplicationPerformance", value); } + } +#nullable restore +#else + public List UserExperienceAnalyticsAppHealthApplicationPerformance { + get { return BackingStore?.Get>("userExperienceAnalyticsAppHealthApplicationPerformance"); } + set { BackingStore?.Set("userExperienceAnalyticsAppHealthApplicationPerformance", value); } + } +#endif + /// User experience analytics appHealth Application Performance by App Version details +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails { + get { return BackingStore?.Get?>("userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails"); } + set { BackingStore?.Set("userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails", value); } + } +#nullable restore +#else + public List UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails { + get { return BackingStore?.Get>("userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails"); } + set { BackingStore?.Set("userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails", value); } + } +#endif + /// User experience analytics appHealth Application Performance by App Version Device Id +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId { + get { return BackingStore?.Get?>("userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId"); } + set { BackingStore?.Set("userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId", value); } + } +#nullable restore +#else + public List UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId { + get { return BackingStore?.Get>("userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId"); } + set { BackingStore?.Set("userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId", value); } + } +#endif + /// User experience analytics appHealth Application Performance by OS Version +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion { + get { return BackingStore?.Get?>("userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion"); } + set { BackingStore?.Set("userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion", value); } + } +#nullable restore +#else + public List UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion { + get { return BackingStore?.Get>("userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion"); } + set { BackingStore?.Set("userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion", value); } + } +#endif + /// User experience analytics appHealth Model Performance +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserExperienceAnalyticsAppHealthDeviceModelPerformance { + get { return BackingStore?.Get?>("userExperienceAnalyticsAppHealthDeviceModelPerformance"); } + set { BackingStore?.Set("userExperienceAnalyticsAppHealthDeviceModelPerformance", value); } + } +#nullable restore +#else + public List UserExperienceAnalyticsAppHealthDeviceModelPerformance { + get { return BackingStore?.Get>("userExperienceAnalyticsAppHealthDeviceModelPerformance"); } + set { BackingStore?.Set("userExperienceAnalyticsAppHealthDeviceModelPerformance", value); } + } +#endif + /// User experience analytics appHealth Device Performance +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserExperienceAnalyticsAppHealthDevicePerformance { + get { return BackingStore?.Get?>("userExperienceAnalyticsAppHealthDevicePerformance"); } + set { BackingStore?.Set("userExperienceAnalyticsAppHealthDevicePerformance", value); } + } +#nullable restore +#else + public List UserExperienceAnalyticsAppHealthDevicePerformance { + get { return BackingStore?.Get>("userExperienceAnalyticsAppHealthDevicePerformance"); } + set { BackingStore?.Set("userExperienceAnalyticsAppHealthDevicePerformance", value); } + } +#endif + /// User experience analytics device performance details +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserExperienceAnalyticsAppHealthDevicePerformanceDetails { + get { return BackingStore?.Get?>("userExperienceAnalyticsAppHealthDevicePerformanceDetails"); } + set { BackingStore?.Set("userExperienceAnalyticsAppHealthDevicePerformanceDetails", value); } + } +#nullable restore +#else + public List UserExperienceAnalyticsAppHealthDevicePerformanceDetails { + get { return BackingStore?.Get>("userExperienceAnalyticsAppHealthDevicePerformanceDetails"); } + set { BackingStore?.Set("userExperienceAnalyticsAppHealthDevicePerformanceDetails", value); } + } +#endif + /// User experience analytics appHealth OS version Performance +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserExperienceAnalyticsAppHealthOSVersionPerformance { + get { return BackingStore?.Get?>("userExperienceAnalyticsAppHealthOSVersionPerformance"); } + set { BackingStore?.Set("userExperienceAnalyticsAppHealthOSVersionPerformance", value); } + } +#nullable restore +#else + public List UserExperienceAnalyticsAppHealthOSVersionPerformance { + get { return BackingStore?.Get>("userExperienceAnalyticsAppHealthOSVersionPerformance"); } + set { BackingStore?.Set("userExperienceAnalyticsAppHealthOSVersionPerformance", value); } + } +#endif + /// User experience analytics appHealth overview +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UserExperienceAnalyticsCategory? UserExperienceAnalyticsAppHealthOverview { + get { return BackingStore?.Get("userExperienceAnalyticsAppHealthOverview"); } + set { BackingStore?.Set("userExperienceAnalyticsAppHealthOverview", value); } + } +#nullable restore +#else + public UserExperienceAnalyticsCategory UserExperienceAnalyticsAppHealthOverview { + get { return BackingStore?.Get("userExperienceAnalyticsAppHealthOverview"); } + set { BackingStore?.Set("userExperienceAnalyticsAppHealthOverview", value); } + } +#endif + /// User experience analytics baselines +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserExperienceAnalyticsBaselines { + get { return BackingStore?.Get?>("userExperienceAnalyticsBaselines"); } + set { BackingStore?.Set("userExperienceAnalyticsBaselines", value); } + } +#nullable restore +#else + public List UserExperienceAnalyticsBaselines { + get { return BackingStore?.Get>("userExperienceAnalyticsBaselines"); } + set { BackingStore?.Set("userExperienceAnalyticsBaselines", value); } + } +#endif + /// User experience analytics categories +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserExperienceAnalyticsCategories { + get { return BackingStore?.Get?>("userExperienceAnalyticsCategories"); } + set { BackingStore?.Set("userExperienceAnalyticsCategories", value); } + } +#nullable restore +#else + public List UserExperienceAnalyticsCategories { + get { return BackingStore?.Get>("userExperienceAnalyticsCategories"); } + set { BackingStore?.Set("userExperienceAnalyticsCategories", value); } + } +#endif + /// User experience analytics device performance +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserExperienceAnalyticsDevicePerformance { + get { return BackingStore?.Get?>("userExperienceAnalyticsDevicePerformance"); } + set { BackingStore?.Set("userExperienceAnalyticsDevicePerformance", value); } + } +#nullable restore +#else + public List UserExperienceAnalyticsDevicePerformance { + get { return BackingStore?.Get>("userExperienceAnalyticsDevicePerformance"); } + set { BackingStore?.Set("userExperienceAnalyticsDevicePerformance", value); } + } +#endif + /// User experience analytics device scores +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserExperienceAnalyticsDeviceScores { + get { return BackingStore?.Get?>("userExperienceAnalyticsDeviceScores"); } + set { BackingStore?.Set("userExperienceAnalyticsDeviceScores", value); } + } +#nullable restore +#else + public List UserExperienceAnalyticsDeviceScores { + get { return BackingStore?.Get>("userExperienceAnalyticsDeviceScores"); } + set { BackingStore?.Set("userExperienceAnalyticsDeviceScores", value); } + } +#endif + /// User experience analytics device Startup History +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserExperienceAnalyticsDeviceStartupHistory { + get { return BackingStore?.Get?>("userExperienceAnalyticsDeviceStartupHistory"); } + set { BackingStore?.Set("userExperienceAnalyticsDeviceStartupHistory", value); } + } +#nullable restore +#else + public List UserExperienceAnalyticsDeviceStartupHistory { + get { return BackingStore?.Get>("userExperienceAnalyticsDeviceStartupHistory"); } + set { BackingStore?.Set("userExperienceAnalyticsDeviceStartupHistory", value); } + } +#endif + /// User experience analytics device Startup Processes +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserExperienceAnalyticsDeviceStartupProcesses { + get { return BackingStore?.Get?>("userExperienceAnalyticsDeviceStartupProcesses"); } + set { BackingStore?.Set("userExperienceAnalyticsDeviceStartupProcesses", value); } + } +#nullable restore +#else + public List UserExperienceAnalyticsDeviceStartupProcesses { + get { return BackingStore?.Get>("userExperienceAnalyticsDeviceStartupProcesses"); } + set { BackingStore?.Set("userExperienceAnalyticsDeviceStartupProcesses", value); } + } +#endif + /// User experience analytics metric history +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserExperienceAnalyticsMetricHistory { + get { return BackingStore?.Get?>("userExperienceAnalyticsMetricHistory"); } + set { BackingStore?.Set("userExperienceAnalyticsMetricHistory", value); } + } +#nullable restore +#else + public List UserExperienceAnalyticsMetricHistory { + get { return BackingStore?.Get>("userExperienceAnalyticsMetricHistory"); } + set { BackingStore?.Set("userExperienceAnalyticsMetricHistory", value); } + } +#endif + /// User experience analytics model scores +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserExperienceAnalyticsModelScores { + get { return BackingStore?.Get?>("userExperienceAnalyticsModelScores"); } + set { BackingStore?.Set("userExperienceAnalyticsModelScores", value); } + } +#nullable restore +#else + public List UserExperienceAnalyticsModelScores { + get { return BackingStore?.Get>("userExperienceAnalyticsModelScores"); } + set { BackingStore?.Set("userExperienceAnalyticsModelScores", value); } + } +#endif + /// User experience analytics overview +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.UserExperienceAnalyticsOverview? UserExperienceAnalyticsOverview { + get { return BackingStore?.Get("userExperienceAnalyticsOverview"); } + set { BackingStore?.Set("userExperienceAnalyticsOverview", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.UserExperienceAnalyticsOverview UserExperienceAnalyticsOverview { + get { return BackingStore?.Get("userExperienceAnalyticsOverview"); } + set { BackingStore?.Set("userExperienceAnalyticsOverview", value); } + } +#endif + /// User experience analytics device Startup Score History +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserExperienceAnalyticsScoreHistory { + get { return BackingStore?.Get?>("userExperienceAnalyticsScoreHistory"); } + set { BackingStore?.Set("userExperienceAnalyticsScoreHistory", value); } + } +#nullable restore +#else + public List UserExperienceAnalyticsScoreHistory { + get { return BackingStore?.Get>("userExperienceAnalyticsScoreHistory"); } + set { BackingStore?.Set("userExperienceAnalyticsScoreHistory", value); } + } +#endif + /// User experience analytics device settings +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.UserExperienceAnalyticsSettings? UserExperienceAnalyticsSettings { + get { return BackingStore?.Get("userExperienceAnalyticsSettings"); } + set { BackingStore?.Set("userExperienceAnalyticsSettings", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.UserExperienceAnalyticsSettings UserExperienceAnalyticsSettings { + get { return BackingStore?.Get("userExperienceAnalyticsSettings"); } + set { BackingStore?.Set("userExperienceAnalyticsSettings", value); } + } +#endif + /// User experience analytics work from anywhere hardware readiness metrics. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric? UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric { + get { return BackingStore?.Get("userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric"); } + set { BackingStore?.Set("userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric { + get { return BackingStore?.Get("userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric"); } + set { BackingStore?.Set("userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric", value); } + } +#endif + /// User experience analytics work from anywhere metrics. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserExperienceAnalyticsWorkFromAnywhereMetrics { + get { return BackingStore?.Get?>("userExperienceAnalyticsWorkFromAnywhereMetrics"); } + set { BackingStore?.Set("userExperienceAnalyticsWorkFromAnywhereMetrics", value); } + } +#nullable restore +#else + public List UserExperienceAnalyticsWorkFromAnywhereMetrics { + get { return BackingStore?.Get>("userExperienceAnalyticsWorkFromAnywhereMetrics"); } + set { BackingStore?.Set("userExperienceAnalyticsWorkFromAnywhereMetrics", value); } + } +#endif + /// The user experience analytics work from anywhere model performance +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserExperienceAnalyticsWorkFromAnywhereModelPerformance { + get { return BackingStore?.Get?>("userExperienceAnalyticsWorkFromAnywhereModelPerformance"); } + set { BackingStore?.Set("userExperienceAnalyticsWorkFromAnywhereModelPerformance", value); } + } +#nullable restore +#else + public List UserExperienceAnalyticsWorkFromAnywhereModelPerformance { + get { return BackingStore?.Get>("userExperienceAnalyticsWorkFromAnywhereModelPerformance"); } + set { BackingStore?.Set("userExperienceAnalyticsWorkFromAnywhereModelPerformance", value); } + } #endif /// The Windows autopilot device identities contained collection. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -490,6 +840,34 @@ public List WindowsInformati get { return BackingStore?.Get>("windowsInformationProtectionNetworkLearningSummaries"); } set { BackingStore?.Set("windowsInformationProtectionNetworkLearningSummaries", value); } } +#endif + /// The list of affected malware in the tenant. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? WindowsMalwareInformation { + get { return BackingStore?.Get?>("windowsMalwareInformation"); } + set { BackingStore?.Set("windowsMalwareInformation", value); } + } +#nullable restore +#else + public List WindowsMalwareInformation { + get { return BackingStore?.Get>("windowsMalwareInformation"); } + set { BackingStore?.Set("windowsMalwareInformation", value); } + } +#endif + /// Malware overview for windows devices. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.WindowsMalwareOverview? WindowsMalwareOverview { + get { return BackingStore?.Get("windowsMalwareOverview"); } + set { BackingStore?.Set("windowsMalwareOverview", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.WindowsMalwareOverview WindowsMalwareOverview { + get { return BackingStore?.Get("windowsMalwareOverview"); } + set { BackingStore?.Set("windowsMalwareOverview", value); } + } #endif /// /// Creates a new instance of the appropriate class based on discriminator value @@ -517,6 +895,7 @@ public List WindowsInformati {"deviceConfigurations", n => { DeviceConfigurations = n.GetCollectionOfObjectValues(DeviceConfiguration.CreateFromDiscriminatorValue)?.ToList(); } }, {"deviceEnrollmentConfigurations", n => { DeviceEnrollmentConfigurations = n.GetCollectionOfObjectValues(DeviceEnrollmentConfiguration.CreateFromDiscriminatorValue)?.ToList(); } }, {"deviceManagementPartners", n => { DeviceManagementPartners = n.GetCollectionOfObjectValues(DeviceManagementPartner.CreateFromDiscriminatorValue)?.ToList(); } }, + {"deviceProtectionOverview", n => { DeviceProtectionOverview = n.GetObjectValue(Microsoft.Graph.Models.DeviceProtectionOverview.CreateFromDiscriminatorValue); } }, {"exchangeConnectors", n => { ExchangeConnectors = n.GetCollectionOfObjectValues(DeviceManagementExchangeConnector.CreateFromDiscriminatorValue)?.ToList(); } }, {"importedWindowsAutopilotDeviceIdentities", n => { ImportedWindowsAutopilotDeviceIdentities = n.GetCollectionOfObjectValues(ImportedWindowsAutopilotDeviceIdentity.CreateFromDiscriminatorValue)?.ToList(); } }, {"intuneAccountId", n => { IntuneAccountId = n.GetGuidValue(); } }, @@ -524,6 +903,7 @@ public List WindowsInformati {"iosUpdateStatuses", n => { IosUpdateStatuses = n.GetCollectionOfObjectValues(IosUpdateDeviceStatus.CreateFromDiscriminatorValue)?.ToList(); } }, {"managedDeviceOverview", n => { ManagedDeviceOverview = n.GetObjectValue(Microsoft.Graph.Models.ManagedDeviceOverview.CreateFromDiscriminatorValue); } }, {"managedDevices", n => { ManagedDevices = n.GetCollectionOfObjectValues(ManagedDevice.CreateFromDiscriminatorValue)?.ToList(); } }, + {"mobileAppTroubleshootingEvents", n => { MobileAppTroubleshootingEvents = n.GetCollectionOfObjectValues(MobileAppTroubleshootingEvent.CreateFromDiscriminatorValue)?.ToList(); } }, {"mobileThreatDefenseConnectors", n => { MobileThreatDefenseConnectors = n.GetCollectionOfObjectValues(MobileThreatDefenseConnector.CreateFromDiscriminatorValue)?.ToList(); } }, {"notificationMessageTemplates", n => { NotificationMessageTemplates = n.GetCollectionOfObjectValues(NotificationMessageTemplate.CreateFromDiscriminatorValue)?.ToList(); } }, {"remoteAssistancePartners", n => { RemoteAssistancePartners = n.GetCollectionOfObjectValues(RemoteAssistancePartner.CreateFromDiscriminatorValue)?.ToList(); } }, @@ -537,9 +917,34 @@ public List WindowsInformati {"telecomExpenseManagementPartners", n => { TelecomExpenseManagementPartners = n.GetCollectionOfObjectValues(TelecomExpenseManagementPartner.CreateFromDiscriminatorValue)?.ToList(); } }, {"termsAndConditions", n => { TermsAndConditions = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.TermsAndConditions.CreateFromDiscriminatorValue)?.ToList(); } }, {"troubleshootingEvents", n => { TroubleshootingEvents = n.GetCollectionOfObjectValues(DeviceManagementTroubleshootingEvent.CreateFromDiscriminatorValue)?.ToList(); } }, + {"userExperienceAnalyticsAppHealthApplicationPerformance", n => { UserExperienceAnalyticsAppHealthApplicationPerformance = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthApplicationPerformance.CreateFromDiscriminatorValue)?.ToList(); } }, + {"userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails", n => { UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails = n.GetCollectionOfObjectValues(UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails.CreateFromDiscriminatorValue)?.ToList(); } }, + {"userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId", n => { UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId = n.GetCollectionOfObjectValues(UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId.CreateFromDiscriminatorValue)?.ToList(); } }, + {"userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion", n => { UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion = n.GetCollectionOfObjectValues(UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion.CreateFromDiscriminatorValue)?.ToList(); } }, + {"userExperienceAnalyticsAppHealthDeviceModelPerformance", n => { UserExperienceAnalyticsAppHealthDeviceModelPerformance = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthDeviceModelPerformance.CreateFromDiscriminatorValue)?.ToList(); } }, + {"userExperienceAnalyticsAppHealthDevicePerformance", n => { UserExperienceAnalyticsAppHealthDevicePerformance = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthDevicePerformance.CreateFromDiscriminatorValue)?.ToList(); } }, + {"userExperienceAnalyticsAppHealthDevicePerformanceDetails", n => { UserExperienceAnalyticsAppHealthDevicePerformanceDetails = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthDevicePerformanceDetails.CreateFromDiscriminatorValue)?.ToList(); } }, + {"userExperienceAnalyticsAppHealthOSVersionPerformance", n => { UserExperienceAnalyticsAppHealthOSVersionPerformance = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.UserExperienceAnalyticsAppHealthOSVersionPerformance.CreateFromDiscriminatorValue)?.ToList(); } }, + {"userExperienceAnalyticsAppHealthOverview", n => { UserExperienceAnalyticsAppHealthOverview = n.GetObjectValue(UserExperienceAnalyticsCategory.CreateFromDiscriminatorValue); } }, + {"userExperienceAnalyticsBaselines", n => { UserExperienceAnalyticsBaselines = n.GetCollectionOfObjectValues(UserExperienceAnalyticsBaseline.CreateFromDiscriminatorValue)?.ToList(); } }, + {"userExperienceAnalyticsCategories", n => { UserExperienceAnalyticsCategories = n.GetCollectionOfObjectValues(UserExperienceAnalyticsCategory.CreateFromDiscriminatorValue)?.ToList(); } }, + {"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(); } }, + {"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); } }, + {"userExperienceAnalyticsScoreHistory", n => { UserExperienceAnalyticsScoreHistory = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.UserExperienceAnalyticsScoreHistory.CreateFromDiscriminatorValue)?.ToList(); } }, + {"userExperienceAnalyticsSettings", n => { UserExperienceAnalyticsSettings = n.GetObjectValue(Microsoft.Graph.Models.UserExperienceAnalyticsSettings.CreateFromDiscriminatorValue); } }, + {"userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric", n => { UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric = n.GetObjectValue(Microsoft.Graph.Models.UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric.CreateFromDiscriminatorValue); } }, + {"userExperienceAnalyticsWorkFromAnywhereMetrics", n => { UserExperienceAnalyticsWorkFromAnywhereMetrics = n.GetCollectionOfObjectValues(UserExperienceAnalyticsWorkFromAnywhereMetric.CreateFromDiscriminatorValue)?.ToList(); } }, + {"userExperienceAnalyticsWorkFromAnywhereModelPerformance", n => { UserExperienceAnalyticsWorkFromAnywhereModelPerformance = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.UserExperienceAnalyticsWorkFromAnywhereModelPerformance.CreateFromDiscriminatorValue)?.ToList(); } }, {"windowsAutopilotDeviceIdentities", n => { WindowsAutopilotDeviceIdentities = n.GetCollectionOfObjectValues(WindowsAutopilotDeviceIdentity.CreateFromDiscriminatorValue)?.ToList(); } }, {"windowsInformationProtectionAppLearningSummaries", n => { WindowsInformationProtectionAppLearningSummaries = n.GetCollectionOfObjectValues(WindowsInformationProtectionAppLearningSummary.CreateFromDiscriminatorValue)?.ToList(); } }, {"windowsInformationProtectionNetworkLearningSummaries", n => { WindowsInformationProtectionNetworkLearningSummaries = n.GetCollectionOfObjectValues(WindowsInformationProtectionNetworkLearningSummary.CreateFromDiscriminatorValue)?.ToList(); } }, + {"windowsMalwareInformation", n => { WindowsMalwareInformation = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.WindowsMalwareInformation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"windowsMalwareOverview", n => { WindowsMalwareOverview = n.GetObjectValue(Microsoft.Graph.Models.WindowsMalwareOverview.CreateFromDiscriminatorValue); } }, }; } /// @@ -562,6 +967,7 @@ public List WindowsInformati writer.WriteCollectionOfObjectValues("deviceConfigurations", DeviceConfigurations); writer.WriteCollectionOfObjectValues("deviceEnrollmentConfigurations", DeviceEnrollmentConfigurations); writer.WriteCollectionOfObjectValues("deviceManagementPartners", DeviceManagementPartners); + writer.WriteObjectValue("deviceProtectionOverview", DeviceProtectionOverview); writer.WriteCollectionOfObjectValues("exchangeConnectors", ExchangeConnectors); writer.WriteCollectionOfObjectValues("importedWindowsAutopilotDeviceIdentities", ImportedWindowsAutopilotDeviceIdentities); writer.WriteGuidValue("intuneAccountId", IntuneAccountId); @@ -569,6 +975,7 @@ public List WindowsInformati writer.WriteCollectionOfObjectValues("iosUpdateStatuses", IosUpdateStatuses); writer.WriteObjectValue("managedDeviceOverview", ManagedDeviceOverview); writer.WriteCollectionOfObjectValues("managedDevices", ManagedDevices); + writer.WriteCollectionOfObjectValues("mobileAppTroubleshootingEvents", MobileAppTroubleshootingEvents); writer.WriteCollectionOfObjectValues("mobileThreatDefenseConnectors", MobileThreatDefenseConnectors); writer.WriteCollectionOfObjectValues("notificationMessageTemplates", NotificationMessageTemplates); writer.WriteCollectionOfObjectValues("remoteAssistancePartners", RemoteAssistancePartners); @@ -582,9 +989,34 @@ public List WindowsInformati writer.WriteCollectionOfObjectValues("telecomExpenseManagementPartners", TelecomExpenseManagementPartners); writer.WriteCollectionOfObjectValues("termsAndConditions", TermsAndConditions); writer.WriteCollectionOfObjectValues("troubleshootingEvents", TroubleshootingEvents); + writer.WriteCollectionOfObjectValues("userExperienceAnalyticsAppHealthApplicationPerformance", UserExperienceAnalyticsAppHealthApplicationPerformance); + writer.WriteCollectionOfObjectValues("userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails", UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails); + writer.WriteCollectionOfObjectValues("userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId", UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId); + writer.WriteCollectionOfObjectValues("userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion", UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion); + writer.WriteCollectionOfObjectValues("userExperienceAnalyticsAppHealthDeviceModelPerformance", UserExperienceAnalyticsAppHealthDeviceModelPerformance); + writer.WriteCollectionOfObjectValues("userExperienceAnalyticsAppHealthDevicePerformance", UserExperienceAnalyticsAppHealthDevicePerformance); + writer.WriteCollectionOfObjectValues("userExperienceAnalyticsAppHealthDevicePerformanceDetails", UserExperienceAnalyticsAppHealthDevicePerformanceDetails); + writer.WriteCollectionOfObjectValues("userExperienceAnalyticsAppHealthOSVersionPerformance", UserExperienceAnalyticsAppHealthOSVersionPerformance); + writer.WriteObjectValue("userExperienceAnalyticsAppHealthOverview", UserExperienceAnalyticsAppHealthOverview); + writer.WriteCollectionOfObjectValues("userExperienceAnalyticsBaselines", UserExperienceAnalyticsBaselines); + writer.WriteCollectionOfObjectValues("userExperienceAnalyticsCategories", UserExperienceAnalyticsCategories); + writer.WriteCollectionOfObjectValues("userExperienceAnalyticsDevicePerformance", UserExperienceAnalyticsDevicePerformance); + writer.WriteCollectionOfObjectValues("userExperienceAnalyticsDeviceScores", UserExperienceAnalyticsDeviceScores); + writer.WriteCollectionOfObjectValues("userExperienceAnalyticsDeviceStartupHistory", UserExperienceAnalyticsDeviceStartupHistory); + writer.WriteCollectionOfObjectValues("userExperienceAnalyticsDeviceStartupProcesses", UserExperienceAnalyticsDeviceStartupProcesses); + writer.WriteCollectionOfObjectValues("userExperienceAnalyticsMetricHistory", UserExperienceAnalyticsMetricHistory); + writer.WriteCollectionOfObjectValues("userExperienceAnalyticsModelScores", UserExperienceAnalyticsModelScores); + writer.WriteObjectValue("userExperienceAnalyticsOverview", UserExperienceAnalyticsOverview); + writer.WriteCollectionOfObjectValues("userExperienceAnalyticsScoreHistory", UserExperienceAnalyticsScoreHistory); + writer.WriteObjectValue("userExperienceAnalyticsSettings", UserExperienceAnalyticsSettings); + writer.WriteObjectValue("userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric", UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric); + writer.WriteCollectionOfObjectValues("userExperienceAnalyticsWorkFromAnywhereMetrics", UserExperienceAnalyticsWorkFromAnywhereMetrics); + writer.WriteCollectionOfObjectValues("userExperienceAnalyticsWorkFromAnywhereModelPerformance", UserExperienceAnalyticsWorkFromAnywhereModelPerformance); writer.WriteCollectionOfObjectValues("windowsAutopilotDeviceIdentities", WindowsAutopilotDeviceIdentities); writer.WriteCollectionOfObjectValues("windowsInformationProtectionAppLearningSummaries", WindowsInformationProtectionAppLearningSummaries); writer.WriteCollectionOfObjectValues("windowsInformationProtectionNetworkLearningSummaries", WindowsInformationProtectionNetworkLearningSummaries); + writer.WriteCollectionOfObjectValues("windowsMalwareInformation", WindowsMalwareInformation); + writer.WriteObjectValue("windowsMalwareOverview", WindowsMalwareOverview); } } } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceProtectionOverview.cs b/src/Microsoft.Graph/Generated/Models/DeviceProtectionOverview.cs new file mode 100644 index 00000000000..a7b7e9a422d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/DeviceProtectionOverview.cs @@ -0,0 +1,143 @@ +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 { + /// + /// Hardware information of a given device. + /// + public class DeviceProtectionOverview : 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; } + /// Clean device count. + public int? CleanDeviceCount { + get { return BackingStore?.Get("cleanDeviceCount"); } + set { BackingStore?.Set("cleanDeviceCount", value); } + } + /// Critical failures device count. + public int? CriticalFailuresDeviceCount { + get { return BackingStore?.Get("criticalFailuresDeviceCount"); } + set { BackingStore?.Set("criticalFailuresDeviceCount", value); } + } + /// Device with inactive threat agent count + public int? InactiveThreatAgentDeviceCount { + get { return BackingStore?.Get("inactiveThreatAgentDeviceCount"); } + set { BackingStore?.Set("inactiveThreatAgentDeviceCount", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// Pending full scan device count. + public int? PendingFullScanDeviceCount { + get { return BackingStore?.Get("pendingFullScanDeviceCount"); } + set { BackingStore?.Set("pendingFullScanDeviceCount", value); } + } + /// Pending manual steps device count. + public int? PendingManualStepsDeviceCount { + get { return BackingStore?.Get("pendingManualStepsDeviceCount"); } + set { BackingStore?.Set("pendingManualStepsDeviceCount", value); } + } + /// Pending offline scan device count. + public int? PendingOfflineScanDeviceCount { + get { return BackingStore?.Get("pendingOfflineScanDeviceCount"); } + set { BackingStore?.Set("pendingOfflineScanDeviceCount", value); } + } + /// Pending quick scan device count. Valid values -2147483648 to 2147483647 + public int? PendingQuickScanDeviceCount { + get { return BackingStore?.Get("pendingQuickScanDeviceCount"); } + set { BackingStore?.Set("pendingQuickScanDeviceCount", value); } + } + /// Pending restart device count. + public int? PendingRestartDeviceCount { + get { return BackingStore?.Get("pendingRestartDeviceCount"); } + set { BackingStore?.Set("pendingRestartDeviceCount", value); } + } + /// Device with old signature count. + public int? PendingSignatureUpdateDeviceCount { + get { return BackingStore?.Get("pendingSignatureUpdateDeviceCount"); } + set { BackingStore?.Set("pendingSignatureUpdateDeviceCount", value); } + } + /// Total device count. + public int? TotalReportedDeviceCount { + get { return BackingStore?.Get("totalReportedDeviceCount"); } + set { BackingStore?.Set("totalReportedDeviceCount", value); } + } + /// Device with threat agent state as unknown count. + public int? UnknownStateThreatAgentDeviceCount { + get { return BackingStore?.Get("unknownStateThreatAgentDeviceCount"); } + set { BackingStore?.Set("unknownStateThreatAgentDeviceCount", value); } + } + /// + /// Instantiates a new deviceProtectionOverview and sets the default values. + /// + public DeviceProtectionOverview() { + 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 DeviceProtectionOverview CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new DeviceProtectionOverview(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"cleanDeviceCount", n => { CleanDeviceCount = n.GetIntValue(); } }, + {"criticalFailuresDeviceCount", n => { CriticalFailuresDeviceCount = n.GetIntValue(); } }, + {"inactiveThreatAgentDeviceCount", n => { InactiveThreatAgentDeviceCount = n.GetIntValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"pendingFullScanDeviceCount", n => { PendingFullScanDeviceCount = n.GetIntValue(); } }, + {"pendingManualStepsDeviceCount", n => { PendingManualStepsDeviceCount = n.GetIntValue(); } }, + {"pendingOfflineScanDeviceCount", n => { PendingOfflineScanDeviceCount = n.GetIntValue(); } }, + {"pendingQuickScanDeviceCount", n => { PendingQuickScanDeviceCount = n.GetIntValue(); } }, + {"pendingRestartDeviceCount", n => { PendingRestartDeviceCount = n.GetIntValue(); } }, + {"pendingSignatureUpdateDeviceCount", n => { PendingSignatureUpdateDeviceCount = n.GetIntValue(); } }, + {"totalReportedDeviceCount", n => { TotalReportedDeviceCount = n.GetIntValue(); } }, + {"unknownStateThreatAgentDeviceCount", n => { UnknownStateThreatAgentDeviceCount = n.GetIntValue(); } }, + }; + } + /// + /// 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.WriteIntValue("cleanDeviceCount", CleanDeviceCount); + writer.WriteIntValue("criticalFailuresDeviceCount", CriticalFailuresDeviceCount); + writer.WriteIntValue("inactiveThreatAgentDeviceCount", InactiveThreatAgentDeviceCount); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteIntValue("pendingFullScanDeviceCount", PendingFullScanDeviceCount); + writer.WriteIntValue("pendingManualStepsDeviceCount", PendingManualStepsDeviceCount); + writer.WriteIntValue("pendingOfflineScanDeviceCount", PendingOfflineScanDeviceCount); + writer.WriteIntValue("pendingQuickScanDeviceCount", PendingQuickScanDeviceCount); + writer.WriteIntValue("pendingRestartDeviceCount", PendingRestartDeviceCount); + writer.WriteIntValue("pendingSignatureUpdateDeviceCount", PendingSignatureUpdateDeviceCount); + writer.WriteIntValue("totalReportedDeviceCount", TotalReportedDeviceCount); + writer.WriteIntValue("unknownStateThreatAgentDeviceCount", UnknownStateThreatAgentDeviceCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/DiskType.cs b/src/Microsoft.Graph/Generated/Models/DiskType.cs index 554bcedae36..aeaa128dc85 100644 --- a/src/Microsoft.Graph/Generated/Models/DiskType.cs +++ b/src/Microsoft.Graph/Generated/Models/DiskType.cs @@ -2,16 +2,16 @@ using System; namespace Microsoft.Graph.Models { public enum DiskType { - /// Enum member for unknown or default diskType + /// Enum member for unknown or default diskType. [EnumMember(Value = "unknown")] Unknown, - /// Enum member for HDD devices + /// Enum member for HDD devices. [EnumMember(Value = "hdd")] Hdd, - /// Enum member for SSD devices + /// Enum member for SSD devices. [EnumMember(Value = "ssd")] Ssd, - /// Evolvable enum member + /// Evolvable enumeration sentinel value.Do not use. [EnumMember(Value = "unknownFutureValue")] UnknownFutureValue, } diff --git a/src/Microsoft.Graph/Generated/Models/EmployeeExperience.cs b/src/Microsoft.Graph/Generated/Models/EmployeeExperience.cs index 5eb4df0f5f5..f1ccd98e9e3 100644 --- a/src/Microsoft.Graph/Generated/Models/EmployeeExperience.cs +++ b/src/Microsoft.Graph/Generated/Models/EmployeeExperience.cs @@ -13,6 +13,20 @@ public IDictionary AdditionalData { } /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The learningCourseActivities property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? LearningCourseActivities { + get { return BackingStore?.Get?>("learningCourseActivities"); } + set { BackingStore?.Set("learningCourseActivities", value); } + } +#nullable restore +#else + public List LearningCourseActivities { + get { return BackingStore?.Get>("learningCourseActivities"); } + set { BackingStore?.Set("learningCourseActivities", value); } + } +#endif /// A collection of learning providers. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -61,6 +75,7 @@ public static EmployeeExperience CreateFromDiscriminatorValue(IParseNode parseNo /// public IDictionary> GetFieldDeserializers() { return new Dictionary> { + {"learningCourseActivities", n => { LearningCourseActivities = n.GetCollectionOfObjectValues(LearningCourseActivity.CreateFromDiscriminatorValue)?.ToList(); } }, {"learningProviders", n => { LearningProviders = n.GetCollectionOfObjectValues(LearningProvider.CreateFromDiscriminatorValue)?.ToList(); } }, {"@odata.type", n => { OdataType = n.GetStringValue(); } }, }; @@ -71,6 +86,7 @@ public IDictionary> GetFieldDeserializers() { /// Serialization writer to use to serialize this model public void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("learningCourseActivities", LearningCourseActivities); writer.WriteCollectionOfObjectValues("learningProviders", LearningProviders); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/EmployeeExperienceUser.cs b/src/Microsoft.Graph/Generated/Models/EmployeeExperienceUser.cs new file mode 100644 index 00000000000..9b708417c4d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/EmployeeExperienceUser.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class EmployeeExperienceUser : Entity, IParsable { + /// The learningCourseActivities property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? LearningCourseActivities { + get { return BackingStore?.Get?>("learningCourseActivities"); } + set { BackingStore?.Set("learningCourseActivities", value); } + } +#nullable restore +#else + public List LearningCourseActivities { + get { return BackingStore?.Get>("learningCourseActivities"); } + set { BackingStore?.Set("learningCourseActivities", 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 EmployeeExperienceUser CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new EmployeeExperienceUser(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"learningCourseActivities", n => { LearningCourseActivities = n.GetCollectionOfObjectValues(LearningCourseActivity.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("learningCourseActivities", LearningCourseActivities); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Entity.cs b/src/Microsoft.Graph/Generated/Models/Entity.cs index 1b8ef882a28..6ceb0e9a7c9 100644 --- a/src/Microsoft.Graph/Generated/Models/Entity.cs +++ b/src/Microsoft.Graph/Generated/Models/Entity.cs @@ -111,6 +111,7 @@ public static Entity CreateFromDiscriminatorValue(IParseNode parseNode) { "#microsoft.graph.applePushNotificationCertificate" => new ApplePushNotificationCertificate(), "#microsoft.graph.application" => new Application(), "#microsoft.graph.applicationTemplate" => new ApplicationTemplate(), + "#microsoft.graph.appLogCollectionRequest" => new AppLogCollectionRequest(), "#microsoft.graph.appManagementPolicy" => new AppManagementPolicy(), "#microsoft.graph.appRoleAssignment" => new AppRoleAssignment(), "#microsoft.graph.approval" => new Approval(), @@ -135,6 +136,7 @@ public static Entity CreateFromDiscriminatorValue(IParseNode parseNode) { "#microsoft.graph.authenticationMethodConfiguration" => new AuthenticationMethodConfiguration(), "#microsoft.graph.authenticationMethodModeDetail" => new AuthenticationMethodModeDetail(), "#microsoft.graph.authenticationMethodsPolicy" => new AuthenticationMethodsPolicy(), + "#microsoft.graph.authenticationMethodsRoot" => new AuthenticationMethodsRoot(), "#microsoft.graph.authenticationMethodTarget" => new AuthenticationMethodTarget(), "#microsoft.graph.authenticationStrengthPolicy" => new AuthenticationStrengthPolicy(), "#microsoft.graph.authenticationStrengthRoot" => new AuthenticationStrengthRoot(), @@ -240,6 +242,7 @@ public static Entity CreateFromDiscriminatorValue(IParseNode parseNode) { "#microsoft.graph.deviceEnrollmentPlatformRestrictionsConfiguration" => new DeviceEnrollmentPlatformRestrictionsConfiguration(), "#microsoft.graph.deviceEnrollmentWindowsHelloForBusinessConfiguration" => new DeviceEnrollmentWindowsHelloForBusinessConfiguration(), "#microsoft.graph.deviceInstallState" => new DeviceInstallState(), + "#microsoft.graph.deviceLogCollectionResponse" => new DeviceLogCollectionResponse(), "#microsoft.graph.deviceManagement" => new DeviceManagement(), "#microsoft.graph.deviceManagementExchangeConnector" => new DeviceManagementExchangeConnector(), "#microsoft.graph.deviceManagementExportJob" => new DeviceManagementExportJob(), @@ -287,6 +290,7 @@ public static Entity CreateFromDiscriminatorValue(IParseNode parseNode) { "#microsoft.graph.emailAuthenticationMethod" => new EmailAuthenticationMethod(), "#microsoft.graph.emailAuthenticationMethodConfiguration" => new EmailAuthenticationMethodConfiguration(), "#microsoft.graph.emailFileAssessmentRequest" => new EmailFileAssessmentRequest(), + "#microsoft.graph.employeeExperienceUser" => new EmployeeExperienceUser(), "#microsoft.graph.endpoint" => new Endpoint(), "#microsoft.graph.enrollmentConfigurationAssignment" => new EnrollmentConfigurationAssignment(), "#microsoft.graph.enrollmentTroubleshootingEvent" => new EnrollmentTroubleshootingEvent(), @@ -373,8 +377,11 @@ public static Entity CreateFromDiscriminatorValue(IParseNode parseNode) { "#microsoft.graph.itemActivityStat" => new ItemActivityStat(), "#microsoft.graph.itemAnalytics" => new ItemAnalytics(), "#microsoft.graph.itemAttachment" => new ItemAttachment(), + "#microsoft.graph.learningAssignment" => new LearningAssignment(), "#microsoft.graph.learningContent" => new LearningContent(), + "#microsoft.graph.learningCourseActivity" => new LearningCourseActivity(), "#microsoft.graph.learningProvider" => new LearningProvider(), + "#microsoft.graph.learningSelfInitiatedCourse" => new LearningSelfInitiatedCourse(), "#microsoft.graph.licenseDetails" => new LicenseDetails(), "#microsoft.graph.linkedResource" => new LinkedResource(), "#microsoft.graph.list" => new List(), @@ -387,11 +394,13 @@ public static Entity CreateFromDiscriminatorValue(IParseNode parseNode) { "#microsoft.graph.macOSDeviceFeaturesConfiguration" => new MacOSDeviceFeaturesConfiguration(), "#microsoft.graph.macOSGeneralDeviceConfiguration" => new MacOSGeneralDeviceConfiguration(), "#microsoft.graph.macOSLobApp" => new MacOSLobApp(), + "#microsoft.graph.macOSMicrosoftDefenderApp" => new MacOSMicrosoftDefenderApp(), "#microsoft.graph.macOSMicrosoftEdgeApp" => new MacOSMicrosoftEdgeApp(), "#microsoft.graph.macOSOfficeSuiteApp" => new MacOSOfficeSuiteApp(), "#microsoft.graph.mailAssessmentRequest" => new MailAssessmentRequest(), "#microsoft.graph.mailFolder" => new MailFolder(), "#microsoft.graph.mailSearchFolder" => new MailSearchFolder(), + "#microsoft.graph.malwareStateForWindowsDevice" => new MalwareStateForWindowsDevice(), "#microsoft.graph.managedAndroidLobApp" => new ManagedAndroidLobApp(), "#microsoft.graph.managedAndroidStoreApp" => new ManagedAndroidStoreApp(), "#microsoft.graph.managedApp" => new ManagedApp(), @@ -419,6 +428,7 @@ public static Entity CreateFromDiscriminatorValue(IParseNode parseNode) { "#microsoft.graph.managedMobileLobApp" => new ManagedMobileLobApp(), "#microsoft.graph.mdmWindowsInformationProtectionPolicy" => new MdmWindowsInformationProtectionPolicy(), "#microsoft.graph.meetingAttendanceReport" => new MeetingAttendanceReport(), + "#microsoft.graph.membershipOutlierInsight" => new MembershipOutlierInsight(), "#microsoft.graph.message" => new Message(), "#microsoft.graph.messageRule" => new MessageRule(), "#microsoft.graph.microsoftAccountUserConversationMember" => new MicrosoftAccountUserConversationMember(), @@ -431,6 +441,7 @@ public static Entity CreateFromDiscriminatorValue(IParseNode parseNode) { "#microsoft.graph.mobileAppCategory" => new MobileAppCategory(), "#microsoft.graph.mobileAppContent" => new MobileAppContent(), "#microsoft.graph.mobileAppContentFile" => new MobileAppContentFile(), + "#microsoft.graph.mobileAppTroubleshootingEvent" => new MobileAppTroubleshootingEvent(), "#microsoft.graph.mobileContainedApp" => new MobileContainedApp(), "#microsoft.graph.mobileLobApp" => new MobileLobApp(), "#microsoft.graph.mobileThreatDefenseConnector" => new MobileThreatDefenseConnector(), @@ -540,6 +551,9 @@ public static Entity CreateFromDiscriminatorValue(IParseNode parseNode) { "#microsoft.graph.secureScoreControlProfile" => new SecureScoreControlProfile(), "#microsoft.graph.security" => new Microsoft.Graph.Models.Security.Security(), "#microsoft.graph.security.alert" => new Microsoft.Graph.Models.Security.Alert(), + "#microsoft.graph.security.article" => new Article(), + "#microsoft.graph.security.articleIndicator" => new ArticleIndicator(), + "#microsoft.graph.security.artifact" => new Microsoft.Graph.Models.Security.Artifact(), "#microsoft.graph.security.case" => new Case(), "#microsoft.graph.security.caseOperation" => new CaseOperation(), "#microsoft.graph.security.casesRoot" => new CasesRoot(), @@ -560,16 +574,31 @@ public static Entity CreateFromDiscriminatorValue(IParseNode parseNode) { "#microsoft.graph.security.ediscoveryReviewTag" => new EdiscoveryReviewTag(), "#microsoft.graph.security.ediscoverySearch" => new EdiscoverySearch(), "#microsoft.graph.security.ediscoveryTagOperation" => new EdiscoveryTagOperation(), + "#microsoft.graph.security.host" => new Microsoft.Graph.Models.Security.Host(), + "#microsoft.graph.security.hostComponent" => new HostComponent(), + "#microsoft.graph.security.hostCookie" => new HostCookie(), + "#microsoft.graph.security.hostname" => new Hostname(), + "#microsoft.graph.security.hostReputation" => new HostReputation(), + "#microsoft.graph.security.hostTracker" => new HostTracker(), "#microsoft.graph.security.incident" => new Incident(), + "#microsoft.graph.security.indicator" => new Indicator(), + "#microsoft.graph.security.intelligenceProfile" => new IntelligenceProfile(), + "#microsoft.graph.security.intelligenceProfileIndicator" => new IntelligenceProfileIndicator(), + "#microsoft.graph.security.ipAddress" => new IpAddress(), + "#microsoft.graph.security.passiveDnsRecord" => new PassiveDnsRecord(), "#microsoft.graph.security.retentionEvent" => new RetentionEvent(), "#microsoft.graph.security.retentionEventType" => new Microsoft.Graph.Models.Security.RetentionEventType(), "#microsoft.graph.security.search" => new Microsoft.Graph.Models.Security.Search(), "#microsoft.graph.security.siteSource" => new SiteSource(), "#microsoft.graph.security.tag" => new Tag(), + "#microsoft.graph.security.threatIntelligence" => new Microsoft.Graph.Models.Security.ThreatIntelligence(), "#microsoft.graph.security.triggersRoot" => new TriggersRoot(), "#microsoft.graph.security.triggerTypesRoot" => new TriggerTypesRoot(), + "#microsoft.graph.security.unclassifiedArtifact" => new UnclassifiedArtifact(), "#microsoft.graph.security.unifiedGroupSource" => new UnifiedGroupSource(), "#microsoft.graph.security.userSource" => new UserSource(), + "#microsoft.graph.security.vulnerability" => new Vulnerability(), + "#microsoft.graph.security.vulnerabilityComponent" => new VulnerabilityComponent(), "#microsoft.graph.securityReportsRoot" => new SecurityReportsRoot(), "#microsoft.graph.serviceAnnouncement" => new ServiceAnnouncement(), "#microsoft.graph.serviceAnnouncementAttachment" => new ServiceAnnouncementAttachment(), @@ -683,10 +712,33 @@ public static Entity CreateFromDiscriminatorValue(IParseNode parseNode) { "#microsoft.graph.user" => new User(), "#microsoft.graph.userActivity" => new UserActivity(), "#microsoft.graph.userConsentRequest" => new UserConsentRequest(), + "#microsoft.graph.userExperienceAnalyticsAppHealthApplicationPerformance" => new UserExperienceAnalyticsAppHealthApplicationPerformance(), + "#microsoft.graph.userExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails" => new UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails(), + "#microsoft.graph.userExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId" => new UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId(), + "#microsoft.graph.userExperienceAnalyticsAppHealthAppPerformanceByOSVersion" => new UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion(), + "#microsoft.graph.userExperienceAnalyticsAppHealthDeviceModelPerformance" => new UserExperienceAnalyticsAppHealthDeviceModelPerformance(), + "#microsoft.graph.userExperienceAnalyticsAppHealthDevicePerformance" => new UserExperienceAnalyticsAppHealthDevicePerformance(), + "#microsoft.graph.userExperienceAnalyticsAppHealthDevicePerformanceDetails" => new UserExperienceAnalyticsAppHealthDevicePerformanceDetails(), + "#microsoft.graph.userExperienceAnalyticsAppHealthOSVersionPerformance" => new UserExperienceAnalyticsAppHealthOSVersionPerformance(), + "#microsoft.graph.userExperienceAnalyticsBaseline" => new UserExperienceAnalyticsBaseline(), + "#microsoft.graph.userExperienceAnalyticsCategory" => new UserExperienceAnalyticsCategory(), "#microsoft.graph.userExperienceAnalyticsDevicePerformance" => new UserExperienceAnalyticsDevicePerformance(), + "#microsoft.graph.userExperienceAnalyticsDeviceScores" => new UserExperienceAnalyticsDeviceScores(), + "#microsoft.graph.userExperienceAnalyticsDeviceStartupHistory" => new UserExperienceAnalyticsDeviceStartupHistory(), + "#microsoft.graph.userExperienceAnalyticsDeviceStartupProcess" => new UserExperienceAnalyticsDeviceStartupProcess(), + "#microsoft.graph.userExperienceAnalyticsMetric" => new UserExperienceAnalyticsMetric(), + "#microsoft.graph.userExperienceAnalyticsMetricHistory" => new UserExperienceAnalyticsMetricHistory(), + "#microsoft.graph.userExperienceAnalyticsModelScores" => new UserExperienceAnalyticsModelScores(), + "#microsoft.graph.userExperienceAnalyticsOverview" => new UserExperienceAnalyticsOverview(), + "#microsoft.graph.userExperienceAnalyticsScoreHistory" => new UserExperienceAnalyticsScoreHistory(), + "#microsoft.graph.userExperienceAnalyticsWorkFromAnywhereDevice" => new UserExperienceAnalyticsWorkFromAnywhereDevice(), + "#microsoft.graph.userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric" => new UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric(), + "#microsoft.graph.userExperienceAnalyticsWorkFromAnywhereMetric" => new UserExperienceAnalyticsWorkFromAnywhereMetric(), + "#microsoft.graph.userExperienceAnalyticsWorkFromAnywhereModelPerformance" => new UserExperienceAnalyticsWorkFromAnywhereModelPerformance(), "#microsoft.graph.userFlowLanguageConfiguration" => new UserFlowLanguageConfiguration(), "#microsoft.graph.userFlowLanguagePage" => new UserFlowLanguagePage(), "#microsoft.graph.userInstallStateSummary" => new UserInstallStateSummary(), + "#microsoft.graph.userRegistrationDetails" => new UserRegistrationDetails(), "#microsoft.graph.userScopeTeamsAppInstallation" => new UserScopeTeamsAppInstallation(), "#microsoft.graph.userSettings" => new UserSettings(), "#microsoft.graph.userSignInInsight" => new UserSignInInsight(), @@ -708,17 +760,20 @@ public static Entity CreateFromDiscriminatorValue(IParseNode parseNode) { "#microsoft.graph.windowsAppX" => new WindowsAppX(), "#microsoft.graph.windowsAutopilotDeviceIdentity" => new WindowsAutopilotDeviceIdentity(), "#microsoft.graph.windowsDefenderAdvancedThreatProtectionConfiguration" => new WindowsDefenderAdvancedThreatProtectionConfiguration(), + "#microsoft.graph.windowsDeviceMalwareState" => new WindowsDeviceMalwareState(), "#microsoft.graph.windowsHelloForBusinessAuthenticationMethod" => new WindowsHelloForBusinessAuthenticationMethod(), "#microsoft.graph.windowsInformationProtection" => new WindowsInformationProtection(), "#microsoft.graph.windowsInformationProtectionAppLearningSummary" => new WindowsInformationProtectionAppLearningSummary(), "#microsoft.graph.windowsInformationProtectionAppLockerFile" => new WindowsInformationProtectionAppLockerFile(), "#microsoft.graph.windowsInformationProtectionNetworkLearningSummary" => new WindowsInformationProtectionNetworkLearningSummary(), "#microsoft.graph.windowsInformationProtectionPolicy" => new WindowsInformationProtectionPolicy(), + "#microsoft.graph.windowsMalwareInformation" => new WindowsMalwareInformation(), "#microsoft.graph.windowsMicrosoftEdgeApp" => new WindowsMicrosoftEdgeApp(), "#microsoft.graph.windowsMobileMSI" => new WindowsMobileMSI(), "#microsoft.graph.windowsPhone81CompliancePolicy" => new WindowsPhone81CompliancePolicy(), "#microsoft.graph.windowsPhone81CustomConfiguration" => new WindowsPhone81CustomConfiguration(), "#microsoft.graph.windowsPhone81GeneralConfiguration" => new WindowsPhone81GeneralConfiguration(), + "#microsoft.graph.windowsProtectionState" => new WindowsProtectionState(), "#microsoft.graph.windowsUniversalAppX" => new WindowsUniversalAppX(), "#microsoft.graph.windowsUniversalAppXContainedApp" => new WindowsUniversalAppXContainedApp(), "#microsoft.graph.windowsUpdateForBusinessConfiguration" => new WindowsUpdateForBusinessConfiguration(), diff --git a/src/Microsoft.Graph/Generated/Models/GovernanceInsight.cs b/src/Microsoft.Graph/Generated/Models/GovernanceInsight.cs index 46dfa2bf645..3a6dff37e57 100644 --- a/src/Microsoft.Graph/Generated/Models/GovernanceInsight.cs +++ b/src/Microsoft.Graph/Generated/Models/GovernanceInsight.cs @@ -5,7 +5,7 @@ using System; namespace Microsoft.Graph.Models { public class GovernanceInsight : Entity, IParsable { - /// The insightCreatedDateTime property + /// Indicates when the insight was created. public DateTimeOffset? InsightCreatedDateTime { get { return BackingStore?.Get("insightCreatedDateTime"); } set { BackingStore?.Set("insightCreatedDateTime", value); } @@ -18,6 +18,7 @@ public DateTimeOffset? InsightCreatedDateTime { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { + "#microsoft.graph.membershipOutlierInsight" => new MembershipOutlierInsight(), "#microsoft.graph.userSignInInsight" => new UserSignInInsight(), _ => new GovernanceInsight(), }; diff --git a/src/Microsoft.Graph/Generated/Models/GovernanceInsightCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GovernanceInsightCollectionResponse.cs new file mode 100644 index 00000000000..b5c145b2038 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/GovernanceInsightCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class GovernanceInsightCollectionResponse : 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 GovernanceInsightCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new GovernanceInsightCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(GovernanceInsight.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/IncludedUserRoles.cs b/src/Microsoft.Graph/Generated/Models/IncludedUserRoles.cs new file mode 100644 index 00000000000..ba43963f1f7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IncludedUserRoles.cs @@ -0,0 +1,16 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum IncludedUserRoles { + [EnumMember(Value = "all")] + All, + [EnumMember(Value = "privilegedAdmin")] + PrivilegedAdmin, + [EnumMember(Value = "admin")] + Admin, + [EnumMember(Value = "user")] + User, + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IncludedUserTypes.cs b/src/Microsoft.Graph/Generated/Models/IncludedUserTypes.cs new file mode 100644 index 00000000000..479d41fb1da --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IncludedUserTypes.cs @@ -0,0 +1,14 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum IncludedUserTypes { + [EnumMember(Value = "all")] + All, + [EnumMember(Value = "member")] + Member, + [EnumMember(Value = "guest")] + Guest, + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/InsightValueDouble.cs b/src/Microsoft.Graph/Generated/Models/InsightValueDouble.cs new file mode 100644 index 00000000000..e67f7734c8b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/InsightValueDouble.cs @@ -0,0 +1,45 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class InsightValueDouble : UserExperienceAnalyticsInsightValue, IParsable { + /// The double value of the user experience analytics insight. + public double? Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } + /// + /// Instantiates a new InsightValueDouble and sets the default values. + /// + public InsightValueDouble() : base() { + OdataType = "#microsoft.graph.insightValueDouble"; + } + /// + /// 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 InsightValueDouble CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new InsightValueDouble(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetDoubleValue(); } }, + }; + } + /// + /// 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.WriteDoubleValue("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/InsightValueInt.cs b/src/Microsoft.Graph/Generated/Models/InsightValueInt.cs new file mode 100644 index 00000000000..7ecac4a1959 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/InsightValueInt.cs @@ -0,0 +1,45 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class InsightValueInt : UserExperienceAnalyticsInsightValue, IParsable { + /// The int value of the user experience analytics insight. + public int? Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } + /// + /// Instantiates a new InsightValueInt and sets the default values. + /// + public InsightValueInt() : base() { + OdataType = "#microsoft.graph.insightValueInt"; + } + /// + /// 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 InsightValueInt CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new InsightValueInt(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetIntValue(); } }, + }; + } + /// + /// 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.WriteIntValue("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/InvestigationSecurityState.cs b/src/Microsoft.Graph/Generated/Models/InvestigationSecurityState.cs index cc6eddb1239..95588e99a60 100644 --- a/src/Microsoft.Graph/Generated/Models/InvestigationSecurityState.cs +++ b/src/Microsoft.Graph/Generated/Models/InvestigationSecurityState.cs @@ -56,7 +56,7 @@ public string Status { } #endif /// - /// Instantiates a new investigationSecurityState and sets the default values. + /// Instantiates a new InvestigationSecurityState and sets the default values. /// public InvestigationSecurityState() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); diff --git a/src/Microsoft.Graph/Generated/Models/InvitationParticipantInfo.cs b/src/Microsoft.Graph/Generated/Models/InvitationParticipantInfo.cs index 23152504081..cd4da45cf88 100644 --- a/src/Microsoft.Graph/Generated/Models/InvitationParticipantInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/InvitationParticipantInfo.cs @@ -80,7 +80,7 @@ public string ReplacesCallId { } #endif /// - /// Instantiates a new invitationParticipantInfo and sets the default values. + /// Instantiates a new InvitationParticipantInfo and sets the default values. /// public InvitationParticipantInfo() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); diff --git a/src/Microsoft.Graph/Generated/Models/IosStoreAppAssignmentSettings.cs b/src/Microsoft.Graph/Generated/Models/IosStoreAppAssignmentSettings.cs index e6dc9b57b1b..e66ebdfe2ee 100644 --- a/src/Microsoft.Graph/Generated/Models/IosStoreAppAssignmentSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/IosStoreAppAssignmentSettings.cs @@ -5,6 +5,16 @@ using System; namespace Microsoft.Graph.Models { public class IosStoreAppAssignmentSettings : MobileAppAssignmentSettings, IParsable { + /// When TRUE, indicates that the app can be uninstalled by the user. When FALSE, indicates that the app cannot be uninstalled by the user. By default, this property is set to null which internally is treated as TRUE. + public bool? IsRemovable { + get { return BackingStore?.Get("isRemovable"); } + set { BackingStore?.Set("isRemovable", value); } + } + /// When TRUE, indicates that the app should be uninstalled when the device is removed from Intune. When FALSE, indicates that the app will not be uninstalled when the device is removed from Intune. By default, property is set to null which internally is treated as TRUE. + public bool? UninstallOnDeviceRemoval { + get { return BackingStore?.Get("uninstallOnDeviceRemoval"); } + set { BackingStore?.Set("uninstallOnDeviceRemoval", value); } + } /// The VPN Configuration Id to apply for this app. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -38,6 +48,8 @@ public IosStoreAppAssignmentSettings() : base() { /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { + {"isRemovable", n => { IsRemovable = n.GetBoolValue(); } }, + {"uninstallOnDeviceRemoval", n => { UninstallOnDeviceRemoval = n.GetBoolValue(); } }, {"vpnConfigurationId", n => { VpnConfigurationId = n.GetStringValue(); } }, }; } @@ -48,6 +60,8 @@ public IosStoreAppAssignmentSettings() : base() { public new void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); + writer.WriteBoolValue("isRemovable", IsRemovable); + writer.WriteBoolValue("uninstallOnDeviceRemoval", UninstallOnDeviceRemoval); writer.WriteStringValue("vpnConfigurationId", VpnConfigurationId); } } diff --git a/src/Microsoft.Graph/Generated/Models/LearningAssignment.cs b/src/Microsoft.Graph/Generated/Models/LearningAssignment.cs new file mode 100644 index 00000000000..b0f6a9c7cd1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/LearningAssignment.cs @@ -0,0 +1,94 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class LearningAssignment : LearningCourseActivity, IParsable { + /// Assigned date for the course activity. Optional. + public DateTimeOffset? AssignedDateTime { + get { return BackingStore?.Get("assignedDateTime"); } + set { BackingStore?.Set("assignedDateTime", value); } + } + /// The user ID of the assigner. Optional. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AssignerUserId { + get { return BackingStore?.Get("assignerUserId"); } + set { BackingStore?.Set("assignerUserId", value); } + } +#nullable restore +#else + public string AssignerUserId { + get { return BackingStore?.Get("assignerUserId"); } + set { BackingStore?.Set("assignerUserId", value); } + } +#endif + /// The assignmentType property + public Microsoft.Graph.Models.AssignmentType? AssignmentType { + get { return BackingStore?.Get("assignmentType"); } + set { BackingStore?.Set("assignmentType", value); } + } + /// Due date for the course activity. Optional. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public DateTimeTimeZone? DueDateTime { + get { return BackingStore?.Get("dueDateTime"); } + set { BackingStore?.Set("dueDateTime", value); } + } +#nullable restore +#else + public DateTimeTimeZone DueDateTime { + get { return BackingStore?.Get("dueDateTime"); } + set { BackingStore?.Set("dueDateTime", value); } + } +#endif + /// Notes for the course activity. Optional. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ItemBody? Notes { + get { return BackingStore?.Get("notes"); } + set { BackingStore?.Set("notes", value); } + } +#nullable restore +#else + public ItemBody Notes { + get { return BackingStore?.Get("notes"); } + set { BackingStore?.Set("notes", 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 LearningAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new LearningAssignment(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"assignedDateTime", n => { AssignedDateTime = n.GetDateTimeOffsetValue(); } }, + {"assignerUserId", n => { AssignerUserId = n.GetStringValue(); } }, + {"assignmentType", n => { AssignmentType = n.GetEnumValue(); } }, + {"dueDateTime", n => { DueDateTime = n.GetObjectValue(DateTimeTimeZone.CreateFromDiscriminatorValue); } }, + {"notes", n => { Notes = n.GetObjectValue(ItemBody.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.WriteDateTimeOffsetValue("assignedDateTime", AssignedDateTime); + writer.WriteStringValue("assignerUserId", AssignerUserId); + writer.WriteEnumValue("assignmentType", AssignmentType); + writer.WriteObjectValue("dueDateTime", DueDateTime); + writer.WriteObjectValue("notes", Notes); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/LearningCourseActivity.cs b/src/Microsoft.Graph/Generated/Models/LearningCourseActivity.cs new file mode 100644 index 00000000000..e6f4e25584e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/LearningCourseActivity.cs @@ -0,0 +1,122 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class LearningCourseActivity : Entity, IParsable { + /// Date and time when the assignment was completed. Optional. + public DateTimeOffset? CompletedDateTime { + get { return BackingStore?.Get("completedDateTime"); } + set { BackingStore?.Set("completedDateTime", value); } + } + /// The percentage completion value of the course activity. Optional. + public int? CompletionPercentage { + get { return BackingStore?.Get("completionPercentage"); } + set { BackingStore?.Set("completionPercentage", value); } + } + /// A course activity ID generated by the provider. Optional. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ExternalcourseActivityId { + get { return BackingStore?.Get("externalcourseActivityId"); } + set { BackingStore?.Set("externalcourseActivityId", value); } + } +#nullable restore +#else + public string ExternalcourseActivityId { + get { return BackingStore?.Get("externalcourseActivityId"); } + set { BackingStore?.Set("externalcourseActivityId", value); } + } +#endif + /// The user ID of the learner to whom the activity is assigned. Required. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LearnerUserId { + get { return BackingStore?.Get("learnerUserId"); } + set { BackingStore?.Set("learnerUserId", value); } + } +#nullable restore +#else + public string LearnerUserId { + get { return BackingStore?.Get("learnerUserId"); } + set { BackingStore?.Set("learnerUserId", value); } + } +#endif + /// The ID of the learning content created in Viva Learning. Required. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LearningContentId { + get { return BackingStore?.Get("learningContentId"); } + set { BackingStore?.Set("learningContentId", value); } + } +#nullable restore +#else + public string LearningContentId { + get { return BackingStore?.Get("learningContentId"); } + set { BackingStore?.Set("learningContentId", value); } + } +#endif + /// The registration ID of the provider. Required. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LearningProviderId { + get { return BackingStore?.Get("learningProviderId"); } + set { BackingStore?.Set("learningProviderId", value); } + } +#nullable restore +#else + public string LearningProviderId { + get { return BackingStore?.Get("learningProviderId"); } + set { BackingStore?.Set("learningProviderId", value); } + } +#endif + /// The status of the course activity. Possible values are: notStarted, inProgress, completed. Required. + public CourseStatus? Status { + get { return BackingStore?.Get("status"); } + set { BackingStore?.Set("status", 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 LearningCourseActivity CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); + return mappingValue switch { + "#microsoft.graph.learningAssignment" => new LearningAssignment(), + "#microsoft.graph.learningSelfInitiatedCourse" => new LearningSelfInitiatedCourse(), + _ => new LearningCourseActivity(), + }; + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"completedDateTime", n => { CompletedDateTime = n.GetDateTimeOffsetValue(); } }, + {"completionPercentage", n => { CompletionPercentage = n.GetIntValue(); } }, + {"externalcourseActivityId", n => { ExternalcourseActivityId = n.GetStringValue(); } }, + {"learnerUserId", n => { LearnerUserId = n.GetStringValue(); } }, + {"learningContentId", n => { LearningContentId = n.GetStringValue(); } }, + {"learningProviderId", n => { LearningProviderId = n.GetStringValue(); } }, + {"status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// 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("completedDateTime", CompletedDateTime); + writer.WriteIntValue("completionPercentage", CompletionPercentage); + writer.WriteStringValue("externalcourseActivityId", ExternalcourseActivityId); + writer.WriteStringValue("learnerUserId", LearnerUserId); + writer.WriteStringValue("learningContentId", LearningContentId); + writer.WriteStringValue("learningProviderId", LearningProviderId); + writer.WriteEnumValue("status", Status); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/LearningCourseActivityCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/LearningCourseActivityCollectionResponse.cs new file mode 100644 index 00000000000..28a112425cf --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/LearningCourseActivityCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class LearningCourseActivityCollectionResponse : 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 LearningCourseActivityCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new LearningCourseActivityCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(LearningCourseActivity.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/LearningProvider.cs b/src/Microsoft.Graph/Generated/Models/LearningProvider.cs index 9ef6a618fda..4976a7446ab 100644 --- a/src/Microsoft.Graph/Generated/Models/LearningProvider.cs +++ b/src/Microsoft.Graph/Generated/Models/LearningProvider.cs @@ -37,6 +37,20 @@ public List LearningContents { get { return BackingStore?.Get>("learningContents"); } set { BackingStore?.Set("learningContents", value); } } +#endif + /// The learningCourseActivities property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? LearningCourseActivities { + get { return BackingStore?.Get?>("learningCourseActivities"); } + set { BackingStore?.Set("learningCourseActivities", value); } + } +#nullable restore +#else + public List LearningCourseActivities { + get { return BackingStore?.Get>("learningCourseActivities"); } + set { BackingStore?.Set("learningCourseActivities", value); } + } #endif /// Authentication URL to access the courses for the provider. Optional. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -124,6 +138,7 @@ public string SquareLogoWebUrlForLightTheme { {"displayName", n => { DisplayName = n.GetStringValue(); } }, {"isCourseActivitySyncEnabled", n => { IsCourseActivitySyncEnabled = n.GetBoolValue(); } }, {"learningContents", n => { LearningContents = n.GetCollectionOfObjectValues(LearningContent.CreateFromDiscriminatorValue)?.ToList(); } }, + {"learningCourseActivities", n => { LearningCourseActivities = n.GetCollectionOfObjectValues(LearningCourseActivity.CreateFromDiscriminatorValue)?.ToList(); } }, {"loginWebUrl", n => { LoginWebUrl = n.GetStringValue(); } }, {"longLogoWebUrlForDarkTheme", n => { LongLogoWebUrlForDarkTheme = n.GetStringValue(); } }, {"longLogoWebUrlForLightTheme", n => { LongLogoWebUrlForLightTheme = n.GetStringValue(); } }, @@ -141,6 +156,7 @@ public string SquareLogoWebUrlForLightTheme { writer.WriteStringValue("displayName", DisplayName); writer.WriteBoolValue("isCourseActivitySyncEnabled", IsCourseActivitySyncEnabled); writer.WriteCollectionOfObjectValues("learningContents", LearningContents); + writer.WriteCollectionOfObjectValues("learningCourseActivities", LearningCourseActivities); writer.WriteStringValue("loginWebUrl", LoginWebUrl); writer.WriteStringValue("longLogoWebUrlForDarkTheme", LongLogoWebUrlForDarkTheme); writer.WriteStringValue("longLogoWebUrlForLightTheme", LongLogoWebUrlForLightTheme); diff --git a/src/Microsoft.Graph/Generated/Models/LearningSelfInitiatedCourse.cs b/src/Microsoft.Graph/Generated/Models/LearningSelfInitiatedCourse.cs new file mode 100644 index 00000000000..c5fc50a5f62 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/LearningSelfInitiatedCourse.cs @@ -0,0 +1,39 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class LearningSelfInitiatedCourse : LearningCourseActivity, IParsable { + /// The date time value on which the self-initiated course was started by the learner. Optional. + public DateTimeOffset? StartedDateTime { + get { return BackingStore?.Get("startedDateTime"); } + set { BackingStore?.Set("startedDateTime", 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 LearningSelfInitiatedCourse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new LearningSelfInitiatedCourse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"startedDateTime", n => { StartedDateTime = 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("startedDateTime", StartedDateTime); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/MacOSMicrosoftDefenderApp.cs b/src/Microsoft.Graph/Generated/Models/MacOSMicrosoftDefenderApp.cs new file mode 100644 index 00000000000..b036458577f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/MacOSMicrosoftDefenderApp.cs @@ -0,0 +1,38 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class MacOSMicrosoftDefenderApp : MobileApp, IParsable { + /// + /// Instantiates a new MacOSMicrosoftDefenderApp and sets the default values. + /// + public MacOSMicrosoftDefenderApp() : base() { + OdataType = "#microsoft.graph.macOSMicrosoftDefenderApp"; + } + /// + /// 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 MacOSMicrosoftDefenderApp CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new MacOSMicrosoftDefenderApp(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + }; + } + /// + /// 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); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/MalwareStateForWindowsDevice.cs b/src/Microsoft.Graph/Generated/Models/MalwareStateForWindowsDevice.cs new file mode 100644 index 00000000000..5c80cc1695c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/MalwareStateForWindowsDevice.cs @@ -0,0 +1,86 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + /// + /// Malware state for a windows device + /// + public class MalwareStateForWindowsDevice : Entity, IParsable { + /// Number of times the malware is detected + public int? DetectionCount { + get { return BackingStore?.Get("detectionCount"); } + set { BackingStore?.Set("detectionCount", value); } + } + /// Device name +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeviceName { + get { return BackingStore?.Get("deviceName"); } + set { BackingStore?.Set("deviceName", value); } + } +#nullable restore +#else + public string DeviceName { + get { return BackingStore?.Get("deviceName"); } + set { BackingStore?.Set("deviceName", value); } + } +#endif + /// Execution status of the malware like blocked/executing etc. Possible values are: unknown, blocked, allowed, running, notRunning. + public WindowsMalwareExecutionState? ExecutionState { + get { return BackingStore?.Get("executionState"); } + set { BackingStore?.Set("executionState", value); } + } + /// Initial detection datetime of the malware + public DateTimeOffset? InitialDetectionDateTime { + get { return BackingStore?.Get("initialDetectionDateTime"); } + set { BackingStore?.Set("initialDetectionDateTime", value); } + } + /// The last time this particular threat was changed + public DateTimeOffset? LastStateChangeDateTime { + get { return BackingStore?.Get("lastStateChangeDateTime"); } + set { BackingStore?.Set("lastStateChangeDateTime", value); } + } + /// Threat status of the malware like cleaned/quarantined/allowed etc. Possible values are: active, actionFailed, manualStepsRequired, fullScanRequired, rebootRequired, remediatedWithNonCriticalFailures, quarantined, removed, cleaned, allowed, noStatusCleared. + public WindowsMalwareThreatState? ThreatState { + get { return BackingStore?.Get("threatState"); } + set { BackingStore?.Set("threatState", 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 MalwareStateForWindowsDevice CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new MalwareStateForWindowsDevice(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"detectionCount", n => { DetectionCount = n.GetIntValue(); } }, + {"deviceName", n => { DeviceName = n.GetStringValue(); } }, + {"executionState", n => { ExecutionState = n.GetEnumValue(); } }, + {"initialDetectionDateTime", n => { InitialDetectionDateTime = n.GetDateTimeOffsetValue(); } }, + {"lastStateChangeDateTime", n => { LastStateChangeDateTime = n.GetDateTimeOffsetValue(); } }, + {"threatState", n => { ThreatState = n.GetEnumValue(); } }, + }; + } + /// + /// 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.WriteIntValue("detectionCount", DetectionCount); + writer.WriteStringValue("deviceName", DeviceName); + writer.WriteEnumValue("executionState", ExecutionState); + writer.WriteDateTimeOffsetValue("initialDetectionDateTime", InitialDetectionDateTime); + writer.WriteDateTimeOffsetValue("lastStateChangeDateTime", LastStateChangeDateTime); + writer.WriteEnumValue("threatState", ThreatState); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/MalwareStateForWindowsDeviceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MalwareStateForWindowsDeviceCollectionResponse.cs new file mode 100644 index 00000000000..c83349634da --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/MalwareStateForWindowsDeviceCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class MalwareStateForWindowsDeviceCollectionResponse : 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 MalwareStateForWindowsDeviceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new MalwareStateForWindowsDeviceCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(MalwareStateForWindowsDevice.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/ManagedDevice.cs b/src/Microsoft.Graph/Generated/Models/ManagedDevice.cs index ec8562250c3..debef3444e8 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDevice.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDevice.cs @@ -321,6 +321,20 @@ public DateTimeOffset? LastSyncDateTime { get { return BackingStore?.Get("lastSyncDateTime"); } set { BackingStore?.Set("lastSyncDateTime", value); } } + /// List of log collection requests +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? LogCollectionRequests { + get { return BackingStore?.Get?>("logCollectionRequests"); } + set { BackingStore?.Set("logCollectionRequests", value); } + } +#nullable restore +#else + public List LogCollectionRequests { + get { return BackingStore?.Get>("logCollectionRequests"); } + set { BackingStore?.Set("logCollectionRequests", value); } + } +#endif /// Automatically generated name to identify a device. Can be overwritten to a user friendly name. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -607,6 +621,20 @@ public string WiFiMacAddress { get { return BackingStore?.Get("wiFiMacAddress"); } set { BackingStore?.Set("wiFiMacAddress", value); } } +#endif + /// The device protection status. This property is read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.WindowsProtectionState? WindowsProtectionState { + get { return BackingStore?.Get("windowsProtectionState"); } + set { BackingStore?.Set("windowsProtectionState", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.WindowsProtectionState WindowsProtectionState { + get { return BackingStore?.Get("windowsProtectionState"); } + set { BackingStore?.Set("windowsProtectionState", value); } + } #endif /// /// Creates a new instance of the appropriate class based on discriminator value @@ -653,6 +681,7 @@ public string WiFiMacAddress { {"isSupervised", n => { IsSupervised = n.GetBoolValue(); } }, {"jailBroken", n => { JailBroken = n.GetStringValue(); } }, {"lastSyncDateTime", n => { LastSyncDateTime = n.GetDateTimeOffsetValue(); } }, + {"logCollectionRequests", n => { LogCollectionRequests = n.GetCollectionOfObjectValues(DeviceLogCollectionResponse.CreateFromDiscriminatorValue)?.ToList(); } }, {"managedDeviceName", n => { ManagedDeviceName = n.GetStringValue(); } }, {"managedDeviceOwnerType", n => { ManagedDeviceOwnerType = n.GetEnumValue(); } }, {"managementAgent", n => { ManagementAgent = n.GetEnumValue(); } }, @@ -678,6 +707,7 @@ public string WiFiMacAddress { {"userPrincipalName", n => { UserPrincipalName = n.GetStringValue(); } }, {"users", n => { Users = n.GetCollectionOfObjectValues(User.CreateFromDiscriminatorValue)?.ToList(); } }, {"wiFiMacAddress", n => { WiFiMacAddress = n.GetStringValue(); } }, + {"windowsProtectionState", n => { WindowsProtectionState = n.GetObjectValue(Microsoft.Graph.Models.WindowsProtectionState.CreateFromDiscriminatorValue); } }, }; } /// @@ -695,12 +725,14 @@ public string WiFiMacAddress { writer.WriteEnumValue("deviceRegistrationState", DeviceRegistrationState); writer.WriteEnumValue("exchangeAccessState", ExchangeAccessState); writer.WriteEnumValue("exchangeAccessStateReason", ExchangeAccessStateReason); + writer.WriteCollectionOfObjectValues("logCollectionRequests", LogCollectionRequests); writer.WriteStringValue("managedDeviceName", ManagedDeviceName); writer.WriteEnumValue("managedDeviceOwnerType", ManagedDeviceOwnerType); writer.WriteEnumValue("managementAgent", ManagementAgent); writer.WriteStringValue("notes", Notes); writer.WriteEnumValue("partnerReportedThreatState", PartnerReportedThreatState); writer.WriteCollectionOfObjectValues("users", Users); + writer.WriteObjectValue("windowsProtectionState", WindowsProtectionState); } } } diff --git a/src/Microsoft.Graph/Generated/Models/MembershipOutlierInsight.cs b/src/Microsoft.Graph/Generated/Models/MembershipOutlierInsight.cs new file mode 100644 index 00000000000..b6eff8b0038 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/MembershipOutlierInsight.cs @@ -0,0 +1,132 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class MembershipOutlierInsight : GovernanceInsight, IParsable { + /// Navigation link to the container directory object. For example, to a group. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public DirectoryObject? Container { + get { return BackingStore?.Get("container"); } + set { BackingStore?.Set("container", value); } + } +#nullable restore +#else + public DirectoryObject Container { + get { return BackingStore?.Get("container"); } + set { BackingStore?.Set("container", value); } + } +#endif + /// Indicates the identifier of the container, for example, a group ID. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContainerId { + get { return BackingStore?.Get("containerId"); } + set { BackingStore?.Set("containerId", value); } + } +#nullable restore +#else + public string ContainerId { + get { return BackingStore?.Get("containerId"); } + set { BackingStore?.Set("containerId", value); } + } +#endif + /// Navigation link to a member object who modified the record. For example, to a user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public User? LastModifiedBy { + get { return BackingStore?.Get("lastModifiedBy"); } + set { BackingStore?.Set("lastModifiedBy", value); } + } +#nullable restore +#else + public User LastModifiedBy { + get { return BackingStore?.Get("lastModifiedBy"); } + set { BackingStore?.Set("lastModifiedBy", value); } + } +#endif + /// Navigation link to a member object. For example, to a user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public DirectoryObject? Member { + get { return BackingStore?.Get("member"); } + set { BackingStore?.Set("member", value); } + } +#nullable restore +#else + public DirectoryObject Member { + get { return BackingStore?.Get("member"); } + set { BackingStore?.Set("member", value); } + } +#endif + /// Indicates the identifier of the user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MemberId { + get { return BackingStore?.Get("memberId"); } + set { BackingStore?.Set("memberId", value); } + } +#nullable restore +#else + public string MemberId { + get { return BackingStore?.Get("memberId"); } + set { BackingStore?.Set("memberId", value); } + } +#endif + /// The outlierContainerType property + public Microsoft.Graph.Models.OutlierContainerType? OutlierContainerType { + get { return BackingStore?.Get("outlierContainerType"); } + set { BackingStore?.Set("outlierContainerType", value); } + } + /// The outlierMemberType property + public Microsoft.Graph.Models.OutlierMemberType? OutlierMemberType { + get { return BackingStore?.Get("outlierMemberType"); } + set { BackingStore?.Set("outlierMemberType", value); } + } + /// + /// Instantiates a new MembershipOutlierInsight and sets the default values. + /// + public MembershipOutlierInsight() : base() { + OdataType = "#microsoft.graph.membershipOutlierInsight"; + } + /// + /// 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 MembershipOutlierInsight CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new MembershipOutlierInsight(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"container", n => { Container = n.GetObjectValue(DirectoryObject.CreateFromDiscriminatorValue); } }, + {"containerId", n => { ContainerId = n.GetStringValue(); } }, + {"lastModifiedBy", n => { LastModifiedBy = n.GetObjectValue(User.CreateFromDiscriminatorValue); } }, + {"member", n => { Member = n.GetObjectValue(DirectoryObject.CreateFromDiscriminatorValue); } }, + {"memberId", n => { MemberId = n.GetStringValue(); } }, + {"outlierContainerType", n => { OutlierContainerType = n.GetEnumValue(); } }, + {"outlierMemberType", n => { OutlierMemberType = n.GetEnumValue(); } }, + }; + } + /// + /// 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.WriteObjectValue("container", Container); + writer.WriteStringValue("containerId", ContainerId); + writer.WriteObjectValue("lastModifiedBy", LastModifiedBy); + writer.WriteObjectValue("member", Member); + writer.WriteStringValue("memberId", MemberId); + writer.WriteEnumValue("outlierContainerType", OutlierContainerType); + writer.WriteEnumValue("outlierMemberType", OutlierMemberType); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/MobileApp.cs b/src/Microsoft.Graph/Generated/Models/MobileApp.cs index 6f4d51b5581..7dae1c604d3 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileApp.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileApp.cs @@ -4,6 +4,9 @@ using System.Linq; using System; namespace Microsoft.Graph.Models { + /// + /// An abstract class containing the base properties for Intune mobile apps. Note: Listing mobile apps with `$expand=assignments` has been deprecated. Instead get the list of apps without the `$expand` query on `assignments`. Then, perform the expansion on individual applications. + /// public class MobileApp : Entity, IParsable { /// The list of group assignments for this mobile app. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -194,6 +197,7 @@ public MobileAppPublishingState? PublishingState { "#microsoft.graph.iosStoreApp" => new IosStoreApp(), "#microsoft.graph.iosVppApp" => new IosVppApp(), "#microsoft.graph.macOSLobApp" => new MacOSLobApp(), + "#microsoft.graph.macOSMicrosoftDefenderApp" => new MacOSMicrosoftDefenderApp(), "#microsoft.graph.macOSMicrosoftEdgeApp" => new MacOSMicrosoftEdgeApp(), "#microsoft.graph.macOSOfficeSuiteApp" => new MacOSOfficeSuiteApp(), "#microsoft.graph.managedAndroidLobApp" => new ManagedAndroidLobApp(), diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingEvent.cs b/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingEvent.cs new file mode 100644 index 00000000000..6ae4e0d4f0a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingEvent.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class MobileAppTroubleshootingEvent : Entity, IParsable { + /// Indicates collection of App Log Upload Request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AppLogCollectionRequests { + get { return BackingStore?.Get?>("appLogCollectionRequests"); } + set { BackingStore?.Set("appLogCollectionRequests", value); } + } +#nullable restore +#else + public List AppLogCollectionRequests { + get { return BackingStore?.Get>("appLogCollectionRequests"); } + set { BackingStore?.Set("appLogCollectionRequests", 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 MobileAppTroubleshootingEvent CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new MobileAppTroubleshootingEvent(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"appLogCollectionRequests", n => { AppLogCollectionRequests = n.GetCollectionOfObjectValues(AppLogCollectionRequest.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("appLogCollectionRequests", AppLogCollectionRequests); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingEventCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingEventCollectionResponse.cs new file mode 100644 index 00000000000..cad37d036cf --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingEventCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class MobileAppTroubleshootingEventCollectionResponse : 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 MobileAppTroubleshootingEventCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new MobileAppTroubleshootingEventCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(MobileAppTroubleshootingEvent.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/OperatingSystemUpgradeEligibility.cs b/src/Microsoft.Graph/Generated/Models/OperatingSystemUpgradeEligibility.cs new file mode 100644 index 00000000000..47c2c00d845 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/OperatingSystemUpgradeEligibility.cs @@ -0,0 +1,22 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + /// Work From Anywhere windows device upgrade eligibility status. + public enum OperatingSystemUpgradeEligibility { + /// The device is upgraded to latest version of windows. + [EnumMember(Value = "upgraded")] + Upgraded, + /// Not enough data available to compute the eligibility of device for windows upgrade. + [EnumMember(Value = "unknown")] + Unknown, + /// The device is not capable for windows upgrade. + [EnumMember(Value = "notCapable")] + NotCapable, + /// The device is capable for windows upgrade. + [EnumMember(Value = "capable")] + Capable, + /// Evolvable enumeration sentinel value. Do not use. + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/OsVersionCount.cs b/src/Microsoft.Graph/Generated/Models/OsVersionCount.cs new file mode 100644 index 00000000000..6e361a041e9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/OsVersionCount.cs @@ -0,0 +1,96 @@ +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 { + /// + /// Count of devices with malware for each OS version + /// + public class OsVersionCount : 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; } + /// Count of devices with malware for the OS version + public int? DeviceCount { + get { return BackingStore?.Get("deviceCount"); } + set { BackingStore?.Set("deviceCount", value); } + } + /// The Timestamp of the last update for the device count in UTC + public DateTimeOffset? LastUpdateDateTime { + get { return BackingStore?.Get("lastUpdateDateTime"); } + set { BackingStore?.Set("lastUpdateDateTime", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// OS version +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OsVersion { + get { return BackingStore?.Get("osVersion"); } + set { BackingStore?.Set("osVersion", value); } + } +#nullable restore +#else + public string OsVersion { + get { return BackingStore?.Get("osVersion"); } + set { BackingStore?.Set("osVersion", value); } + } +#endif + /// + /// Instantiates a new osVersionCount and sets the default values. + /// + public OsVersionCount() { + 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 OsVersionCount CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new OsVersionCount(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"deviceCount", n => { DeviceCount = n.GetIntValue(); } }, + {"lastUpdateDateTime", n => { LastUpdateDateTime = n.GetDateTimeOffsetValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"osVersion", n => { OsVersion = 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.WriteIntValue("deviceCount", DeviceCount); + writer.WriteDateTimeOffsetValue("lastUpdateDateTime", LastUpdateDateTime); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteStringValue("osVersion", OsVersion); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/OutlierContainerType.cs b/src/Microsoft.Graph/Generated/Models/OutlierContainerType.cs new file mode 100644 index 00000000000..e52ede836e7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/OutlierContainerType.cs @@ -0,0 +1,10 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum OutlierContainerType { + [EnumMember(Value = "group")] + Group, + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/OutlierMemberType.cs b/src/Microsoft.Graph/Generated/Models/OutlierMemberType.cs new file mode 100644 index 00000000000..3a20b9d3959 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/OutlierMemberType.cs @@ -0,0 +1,10 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum OutlierMemberType { + [EnumMember(Value = "user")] + User, + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Phone.cs b/src/Microsoft.Graph/Generated/Models/Phone.cs index cf19b388abe..b12bd0c8e16 100644 --- a/src/Microsoft.Graph/Generated/Models/Phone.cs +++ b/src/Microsoft.Graph/Generated/Models/Phone.cs @@ -75,7 +75,7 @@ public PhoneType? Type { set { BackingStore?.Set("type", value); } } /// - /// Instantiates a new phone and sets the default values. + /// Instantiates a new Phone and sets the default values. /// public Phone() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); diff --git a/src/Microsoft.Graph/Generated/Models/PrintUsage.cs b/src/Microsoft.Graph/Generated/Models/PrintUsage.cs index 7d9c3902258..d20b3e41638 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintUsage.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintUsage.cs @@ -6,6 +6,16 @@ using System; namespace Microsoft.Graph.Models { public class PrintUsage : Entity, IParsable { + /// The blackAndWhitePageCount property + public long? BlackAndWhitePageCount { + get { return BackingStore?.Get("blackAndWhitePageCount"); } + set { BackingStore?.Set("blackAndWhitePageCount", value); } + } + /// The colorPageCount property + public long? ColorPageCount { + get { return BackingStore?.Get("colorPageCount"); } + set { BackingStore?.Set("colorPageCount", value); } + } /// The completedBlackAndWhiteJobCount property public long? CompletedBlackAndWhiteJobCount { get { return BackingStore?.Get("completedBlackAndWhiteJobCount"); } @@ -16,11 +26,36 @@ public long? CompletedColorJobCount { get { return BackingStore?.Get("completedColorJobCount"); } set { BackingStore?.Set("completedColorJobCount", value); } } + /// The completedJobCount property + public long? CompletedJobCount { + get { return BackingStore?.Get("completedJobCount"); } + set { BackingStore?.Set("completedJobCount", value); } + } + /// The doubleSidedSheetCount property + public long? DoubleSidedSheetCount { + get { return BackingStore?.Get("doubleSidedSheetCount"); } + set { BackingStore?.Set("doubleSidedSheetCount", value); } + } /// The incompleteJobCount property public long? IncompleteJobCount { get { return BackingStore?.Get("incompleteJobCount"); } set { BackingStore?.Set("incompleteJobCount", value); } } + /// The mediaSheetCount property + public long? MediaSheetCount { + get { return BackingStore?.Get("mediaSheetCount"); } + set { BackingStore?.Set("mediaSheetCount", value); } + } + /// The pageCount property + public long? PageCount { + get { return BackingStore?.Get("pageCount"); } + set { BackingStore?.Set("pageCount", value); } + } + /// The singleSidedSheetCount property + public long? SingleSidedSheetCount { + get { return BackingStore?.Get("singleSidedSheetCount"); } + set { BackingStore?.Set("singleSidedSheetCount", value); } + } /// The usageDate property public Date? UsageDate { get { return BackingStore?.Get("usageDate"); } @@ -44,9 +79,16 @@ public Date? UsageDate { /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { + {"blackAndWhitePageCount", n => { BlackAndWhitePageCount = n.GetLongValue(); } }, + {"colorPageCount", n => { ColorPageCount = n.GetLongValue(); } }, {"completedBlackAndWhiteJobCount", n => { CompletedBlackAndWhiteJobCount = n.GetLongValue(); } }, {"completedColorJobCount", n => { CompletedColorJobCount = n.GetLongValue(); } }, + {"completedJobCount", n => { CompletedJobCount = n.GetLongValue(); } }, + {"doubleSidedSheetCount", n => { DoubleSidedSheetCount = n.GetLongValue(); } }, {"incompleteJobCount", n => { IncompleteJobCount = n.GetLongValue(); } }, + {"mediaSheetCount", n => { MediaSheetCount = n.GetLongValue(); } }, + {"pageCount", n => { PageCount = n.GetLongValue(); } }, + {"singleSidedSheetCount", n => { SingleSidedSheetCount = n.GetLongValue(); } }, {"usageDate", n => { UsageDate = n.GetDateValue(); } }, }; } @@ -57,9 +99,16 @@ public Date? UsageDate { public new void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); + writer.WriteLongValue("blackAndWhitePageCount", BlackAndWhitePageCount); + writer.WriteLongValue("colorPageCount", ColorPageCount); writer.WriteLongValue("completedBlackAndWhiteJobCount", CompletedBlackAndWhiteJobCount); writer.WriteLongValue("completedColorJobCount", CompletedColorJobCount); + writer.WriteLongValue("completedJobCount", CompletedJobCount); + writer.WriteLongValue("doubleSidedSheetCount", DoubleSidedSheetCount); writer.WriteLongValue("incompleteJobCount", IncompleteJobCount); + writer.WriteLongValue("mediaSheetCount", MediaSheetCount); + writer.WriteLongValue("pageCount", PageCount); + writer.WriteLongValue("singleSidedSheetCount", SingleSidedSheetCount); writer.WriteDateValue("usageDate", UsageDate); } } diff --git a/src/Microsoft.Graph/Generated/Models/ReportRoot.cs b/src/Microsoft.Graph/Generated/Models/ReportRoot.cs index 2bafa1d09a8..a443fc51360 100644 --- a/src/Microsoft.Graph/Generated/Models/ReportRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/ReportRoot.cs @@ -11,6 +11,20 @@ public IDictionary AdditionalData { get { return BackingStore?.Get>("additionalData"); } set { BackingStore?.Set("additionalData", value); } } + /// The authenticationMethods property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public AuthenticationMethodsRoot? AuthenticationMethods { + get { return BackingStore?.Get("authenticationMethods"); } + set { BackingStore?.Set("authenticationMethods", value); } + } +#nullable restore +#else + public AuthenticationMethodsRoot AuthenticationMethods { + get { return BackingStore?.Get("authenticationMethods"); } + set { BackingStore?.Set("authenticationMethods", value); } + } +#endif /// Stores model information. public IBackingStore BackingStore { get; private set; } /// The dailyPrintUsageByPrinter property @@ -117,6 +131,7 @@ public static ReportRoot CreateFromDiscriminatorValue(IParseNode parseNode) { /// public IDictionary> GetFieldDeserializers() { return new Dictionary> { + {"authenticationMethods", n => { AuthenticationMethods = n.GetObjectValue(AuthenticationMethodsRoot.CreateFromDiscriminatorValue); } }, {"dailyPrintUsageByPrinter", n => { DailyPrintUsageByPrinter = n.GetCollectionOfObjectValues(PrintUsageByPrinter.CreateFromDiscriminatorValue)?.ToList(); } }, {"dailyPrintUsageByUser", n => { DailyPrintUsageByUser = n.GetCollectionOfObjectValues(PrintUsageByUser.CreateFromDiscriminatorValue)?.ToList(); } }, {"monthlyPrintUsageByPrinter", n => { MonthlyPrintUsageByPrinter = n.GetCollectionOfObjectValues(PrintUsageByPrinter.CreateFromDiscriminatorValue)?.ToList(); } }, @@ -131,6 +146,7 @@ public IDictionary> GetFieldDeserializers() { /// Serialization writer to use to serialize this model public void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("authenticationMethods", AuthenticationMethods); writer.WriteCollectionOfObjectValues("dailyPrintUsageByPrinter", DailyPrintUsageByPrinter); writer.WriteCollectionOfObjectValues("dailyPrintUsageByUser", DailyPrintUsageByUser); writer.WriteCollectionOfObjectValues("monthlyPrintUsageByPrinter", MonthlyPrintUsageByPrinter); diff --git a/src/Microsoft.Graph/Generated/Models/RoleDefinition.cs b/src/Microsoft.Graph/Generated/Models/RoleDefinition.cs index 9f0b1934e16..b80be29c142 100644 --- a/src/Microsoft.Graph/Generated/Models/RoleDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/RoleDefinition.cs @@ -4,6 +4,9 @@ using System.Linq; using System; namespace Microsoft.Graph.Models { + /// + /// The Role Definition resource. The role definition is the foundation of role based access in Intune. The role combines an Intune resource such as a Mobile App and associated role permissions such as Create or Read for the resource. There are two types of roles, built-in and custom. Built-in roles cannot be modified. Both built-in roles and custom roles must have assignments to be enforced. Create custom roles if you want to define a role that allows any of the available resources and role permissions to be combined into a single role. + /// public class RoleDefinition : Entity, IParsable { /// Description of the Role definition. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Models/RoomListCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/RoomListCollectionResponse.cs new file mode 100644 index 00000000000..de2126716a4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/RoomListCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class RoomListCollectionResponse : 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 RoomListCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RoomListCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(RoomList.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/RubricQualityFeedbackModel.cs b/src/Microsoft.Graph/Generated/Models/RubricQualityFeedbackModel.cs index 10229e36afa..6b626c656fc 100644 --- a/src/Microsoft.Graph/Generated/Models/RubricQualityFeedbackModel.cs +++ b/src/Microsoft.Graph/Generated/Models/RubricQualityFeedbackModel.cs @@ -56,7 +56,7 @@ public string QualityId { } #endif /// - /// Instantiates a new rubricQualityFeedbackModel and sets the default values. + /// Instantiates a new RubricQualityFeedbackModel and sets the default values. /// public RubricQualityFeedbackModel() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); diff --git a/src/Microsoft.Graph/Generated/Models/SearchAggregation.cs b/src/Microsoft.Graph/Generated/Models/SearchAggregation.cs index 6260eb5ed20..e0fb403a330 100644 --- a/src/Microsoft.Graph/Generated/Models/SearchAggregation.cs +++ b/src/Microsoft.Graph/Generated/Models/SearchAggregation.cs @@ -56,7 +56,7 @@ public string OdataType { } #endif /// - /// Instantiates a new SearchAggregation and sets the default values. + /// Instantiates a new searchAggregation and sets the default values. /// public SearchAggregation() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); diff --git a/src/Microsoft.Graph/Generated/Models/SearchRequest.cs b/src/Microsoft.Graph/Generated/Models/SearchRequest.cs index 31d1f5d07bb..31069b701dc 100644 --- a/src/Microsoft.Graph/Generated/Models/SearchRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/SearchRequest.cs @@ -11,7 +11,7 @@ public IDictionary AdditionalData { get { return BackingStore?.Get>("additionalData"); } set { BackingStore?.Set("additionalData", value); } } - /// The aggregationFilters property + /// Contains one or more filters to obtain search results aggregated and filtered to a specific value of a field. Optional.Build this filter based on a prior search that aggregates by the same field. From the response of the prior search, identify the searchBucket that filters results to the specific value of the field, use the string in its aggregationFilterToken property, and build an aggregation filter string in the format '{field}:/'{aggregationFilterToken}/''. If multiple values for the same field need to be provided, use the strings in its aggregationFilterToken property and build an aggregation filter string in the format '{field}:or(/'{aggregationFilterToken1}/',/'{aggregationFilterToken2}/')'. For example, searching and aggregating drive items by file type returns a searchBucket for the file type docx in the response. You can conveniently use the aggregationFilterToken returned for this searchBucket in a subsequent search query and filter matches down to drive items of the docx file type. Example 1 and example 2 show the actual requests and responses. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? AggregationFilters { @@ -25,7 +25,7 @@ public List AggregationFilters { set { BackingStore?.Set("aggregationFilters", value); } } #endif - /// The aggregations property + /// Specifies aggregations (also known as refiners) to be returned alongside search results. Optional. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? Aggregations { @@ -41,7 +41,7 @@ public List Aggregations { #endif /// Stores model information. public IBackingStore BackingStore { get; private set; } - /// The collapseProperties property + /// Contains the ordered collection of fields and limit to collapse results. Optional. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? CollapseProperties { @@ -55,7 +55,7 @@ public List CollapseProperties { set { BackingStore?.Set("collapseProperties", value); } } #endif - /// The contentSources property + /// Contains the connection to be targeted. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? ContentSources { @@ -69,12 +69,12 @@ public List ContentSources { set { BackingStore?.Set("contentSources", value); } } #endif - /// The enableTopResults property + /// This triggers hybrid sort for messages : the first 3 messages are the most relevant. This property is only applicable to entityType=message. Optional. public bool? EnableTopResults { get { return BackingStore?.Get("enableTopResults"); } set { BackingStore?.Set("enableTopResults", value); } } - /// The entityTypes property + /// One or more types of resources expected in the response. Possible values are: event, message, driveItem, externalItem, site, list, listItem, drive, chatMessage, person, acronym, bookmark. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum:chatMessage, person, acronym, bookmark. See known limitations for those combinations of two or more entity types that are supported in the same search request. Required. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? EntityTypes { @@ -88,7 +88,7 @@ public List EntityTypes { set { BackingStore?.Set("entityTypes", value); } } #endif - /// The fields property + /// Contains the fields to be returned for each resource object specified in entityTypes, allowing customization of the fields returned by default; otherwise, including additional fields such as custom managed properties from SharePoint and OneDrive, or custom fields in externalItem from the content that Microsoft Graph connectors bring in. The fields property can use the semantic labels applied to properties. For example, if a property is labeled as title, you can retrieve it using the following syntax: label_title. Optional. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? Fields { @@ -102,7 +102,7 @@ public List Fields { set { BackingStore?.Set("fields", value); } } #endif - /// The from property + /// Specifies the offset for the search results. Offset 0 returns the very first result. Optional. public int? From { get { return BackingStore?.Get("from"); } set { BackingStore?.Set("from", value); } @@ -135,7 +135,7 @@ public SearchQuery Query { set { BackingStore?.Set("query", value); } } #endif - /// The queryAlterationOptions property + /// Query alteration options formatted in a JSON blob that contains two optional flags related to spelling correction. Optional. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public SearchAlterationOptions? QueryAlterationOptions { @@ -149,7 +149,7 @@ public SearchAlterationOptions QueryAlterationOptions { set { BackingStore?.Set("queryAlterationOptions", value); } } #endif - /// The region property + /// The geographic location for the search. Required for searches that use application permissions. For details, see Get the region value. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Region { @@ -163,7 +163,7 @@ public string Region { set { BackingStore?.Set("region", value); } } #endif - /// The resultTemplateOptions property + /// Provides the search result template options to render search results from connectors. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public ResultTemplateOption? ResultTemplateOptions { @@ -177,7 +177,7 @@ public ResultTemplateOption ResultTemplateOptions { set { BackingStore?.Set("resultTemplateOptions", value); } } #endif - /// The sharePointOneDriveOptions property + /// Indicates the kind of contents to be searched when a search is performed using application permissions. Optional. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public Microsoft.Graph.Models.SharePointOneDriveOptions? SharePointOneDriveOptions { @@ -191,12 +191,12 @@ public Microsoft.Graph.Models.SharePointOneDriveOptions SharePointOneDriveOption set { BackingStore?.Set("sharePointOneDriveOptions", value); } } #endif - /// The size property + /// The size of the page to be retrieved. The maximum value is 500. Optional. public int? Size { get { return BackingStore?.Get("size"); } set { BackingStore?.Set("size", value); } } - /// The sortProperties property + /// Contains the ordered collection of fields and direction to sort results. There can be at most 5 sort properties in the collection. Optional. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? SortProperties { diff --git a/src/Microsoft.Graph/Generated/Models/Security/AlertComment.cs b/src/Microsoft.Graph/Generated/Models/Security/AlertComment.cs index 952ba713feb..7f75aa07fb6 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AlertComment.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AlertComment.cs @@ -61,7 +61,7 @@ public string OdataType { } #endif /// - /// Instantiates a new alertComment and sets the default values. + /// Instantiates a new AlertComment and sets the default values. /// public AlertComment() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); diff --git a/src/Microsoft.Graph/Generated/Models/Security/Article.cs b/src/Microsoft.Graph/Generated/Models/Security/Article.cs new file mode 100644 index 00000000000..0177e4e87a2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/Article.cs @@ -0,0 +1,149 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class Article : Entity, IParsable { + /// The body property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public FormattedContent? Body { + get { return BackingStore?.Get("body"); } + set { BackingStore?.Set("body", value); } + } +#nullable restore +#else + public FormattedContent Body { + get { return BackingStore?.Get("body"); } + set { BackingStore?.Set("body", value); } + } +#endif + /// The date and time when this article 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); } + } + /// URL of the header image for this article, used for display purposes. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ImageUrl { + get { return BackingStore?.Get("imageUrl"); } + set { BackingStore?.Set("imageUrl", value); } + } +#nullable restore +#else + public string ImageUrl { + get { return BackingStore?.Get("imageUrl"); } + set { BackingStore?.Set("imageUrl", value); } + } +#endif + /// Indicators related to this article. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Indicators { + get { return BackingStore?.Get?>("indicators"); } + set { BackingStore?.Set("indicators", value); } + } +#nullable restore +#else + public List Indicators { + get { return BackingStore?.Get>("indicators"); } + set { BackingStore?.Set("indicators", value); } + } +#endif + /// Indicates whether this article is currently featured by Microsoft. + public bool? IsFeatured { + get { return BackingStore?.Get("isFeatured"); } + set { BackingStore?.Set("isFeatured", value); } + } + /// The most recent date and time when this article was updated. 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? LastUpdatedDateTime { + get { return BackingStore?.Get("lastUpdatedDateTime"); } + set { BackingStore?.Set("lastUpdatedDateTime", value); } + } + /// The summary property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public FormattedContent? Summary { + get { return BackingStore?.Get("summary"); } + set { BackingStore?.Set("summary", value); } + } +#nullable restore +#else + public FormattedContent Summary { + get { return BackingStore?.Get("summary"); } + set { BackingStore?.Set("summary", value); } + } +#endif + /// Tags for this article, communicating keywords, or key concepts. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Tags { + get { return BackingStore?.Get?>("tags"); } + set { BackingStore?.Set("tags", value); } + } +#nullable restore +#else + public List Tags { + get { return BackingStore?.Get>("tags"); } + set { BackingStore?.Set("tags", value); } + } +#endif + /// The title of this article. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { + get { return BackingStore?.Get("title"); } + set { BackingStore?.Set("title", value); } + } +#nullable restore +#else + public string Title { + get { return BackingStore?.Get("title"); } + set { BackingStore?.Set("title", 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 Article CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new Article(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"body", n => { Body = n.GetObjectValue(FormattedContent.CreateFromDiscriminatorValue); } }, + {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + {"imageUrl", n => { ImageUrl = n.GetStringValue(); } }, + {"indicators", n => { Indicators = n.GetCollectionOfObjectValues(ArticleIndicator.CreateFromDiscriminatorValue)?.ToList(); } }, + {"isFeatured", n => { IsFeatured = n.GetBoolValue(); } }, + {"lastUpdatedDateTime", n => { LastUpdatedDateTime = n.GetDateTimeOffsetValue(); } }, + {"summary", n => { Summary = n.GetObjectValue(FormattedContent.CreateFromDiscriminatorValue); } }, + {"tags", n => { Tags = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"title", n => { Title = 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.WriteObjectValue("body", Body); + writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); + writer.WriteStringValue("imageUrl", ImageUrl); + writer.WriteCollectionOfObjectValues("indicators", Indicators); + writer.WriteBoolValue("isFeatured", IsFeatured); + writer.WriteDateTimeOffsetValue("lastUpdatedDateTime", LastUpdatedDateTime); + writer.WriteObjectValue("summary", Summary); + writer.WriteCollectionOfPrimitiveValues("tags", Tags); + writer.WriteStringValue("title", Title); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/ArticleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/ArticleCollectionResponse.cs new file mode 100644 index 00000000000..155f0196da1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/ArticleCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class ArticleCollectionResponse : 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 ArticleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ArticleCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues
(Article.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/Security/ArticleIndicator.cs b/src/Microsoft.Graph/Generated/Models/Security/ArticleIndicator.cs new file mode 100644 index 00000000000..486139c74ed --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/ArticleIndicator.cs @@ -0,0 +1,38 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class ArticleIndicator : Indicator, IParsable { + /// + /// Instantiates a new ArticleIndicator and sets the default values. + /// + public ArticleIndicator() : base() { + OdataType = "#microsoft.graph.security.articleIndicator"; + } + /// + /// 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 ArticleIndicator CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ArticleIndicator(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + }; + } + /// + /// 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); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/ArticleIndicatorCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/ArticleIndicatorCollectionResponse.cs new file mode 100644 index 00000000000..22bc699deda --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/ArticleIndicatorCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class ArticleIndicatorCollectionResponse : 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 ArticleIndicatorCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ArticleIndicatorCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(ArticleIndicator.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/Security/Artifact.cs b/src/Microsoft.Graph/Generated/Models/Security/Artifact.cs new file mode 100644 index 00000000000..4313b932c59 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/Artifact.cs @@ -0,0 +1,43 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class Artifact : Entity, IParsable { + /// + /// 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 Artifact CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); + return mappingValue switch { + "#microsoft.graph.security.host" => new Host(), + "#microsoft.graph.security.hostComponent" => new HostComponent(), + "#microsoft.graph.security.hostCookie" => new HostCookie(), + "#microsoft.graph.security.hostname" => new Hostname(), + "#microsoft.graph.security.hostTracker" => new HostTracker(), + "#microsoft.graph.security.ipAddress" => new IpAddress(), + "#microsoft.graph.security.passiveDnsRecord" => new PassiveDnsRecord(), + "#microsoft.graph.security.unclassifiedArtifact" => new UnclassifiedArtifact(), + _ => new Artifact(), + }; + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + }; + } + /// + /// 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); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/AutonomousSystem.cs b/src/Microsoft.Graph/Generated/Models/Security/AutonomousSystem.cs new file mode 100644 index 00000000000..dfb5e9c3673 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/AutonomousSystem.cs @@ -0,0 +1,118 @@ +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.Security { + public class AutonomousSystem : 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 name of the autonomous system. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#nullable restore +#else + public string Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#endif + /// The autonomous system number, assigned by IANA. + public int? Number { + get { return BackingStore?.Get("number"); } + set { BackingStore?.Set("number", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The name of the autonomous system organization. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Organization { + get { return BackingStore?.Get("organization"); } + set { BackingStore?.Set("organization", value); } + } +#nullable restore +#else + public string Organization { + get { return BackingStore?.Get("organization"); } + set { BackingStore?.Set("organization", value); } + } +#endif + /// A displayable value for these autonomous system details. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public string Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Instantiates a new autonomousSystem and sets the default values. + /// + public AutonomousSystem() { + 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 AutonomousSystem CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AutonomousSystem(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"name", n => { Name = n.GetStringValue(); } }, + {"number", n => { Number = n.GetIntValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"organization", n => { Organization = n.GetStringValue(); } }, + {"value", n => { Value = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("number", Number); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteStringValue("organization", Organization); + writer.WriteStringValue("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/ContentFormat.cs b/src/Microsoft.Graph/Generated/Models/Security/ContentFormat.cs new file mode 100644 index 00000000000..827206e2795 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/ContentFormat.cs @@ -0,0 +1,14 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models.Security { + public enum ContentFormat { + [EnumMember(Value = "text")] + Text, + [EnumMember(Value = "html")] + Html, + [EnumMember(Value = "markdown")] + Markdown, + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/CvssSummary.cs b/src/Microsoft.Graph/Generated/Models/Security/CvssSummary.cs new file mode 100644 index 00000000000..34b759ceab7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/CvssSummary.cs @@ -0,0 +1,93 @@ +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.Security { + public class CvssSummary : 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 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 CVSS score about this vulnerability. + public double? Score { + get { return BackingStore?.Get("score"); } + set { BackingStore?.Set("score", value); } + } + /// The CVSS severity rating for this vulnerability. The possible values are: none, low, medium, high, critical, unknownFutureValue. + public VulnerabilitySeverity? Severity { + get { return BackingStore?.Get("severity"); } + set { BackingStore?.Set("severity", value); } + } + /// The CVSS vector string for this vulnerability. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VectorString { + get { return BackingStore?.Get("vectorString"); } + set { BackingStore?.Set("vectorString", value); } + } +#nullable restore +#else + public string VectorString { + get { return BackingStore?.Get("vectorString"); } + set { BackingStore?.Set("vectorString", value); } + } +#endif + /// + /// Instantiates a new CvssSummary and sets the default values. + /// + public CvssSummary() { + 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 CvssSummary CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CvssSummary(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"score", n => { Score = n.GetDoubleValue(); } }, + {"severity", n => { Severity = n.GetEnumValue(); } }, + {"vectorString", n => { VectorString = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteDoubleValue("score", Score); + writer.WriteEnumValue("severity", Severity); + writer.WriteStringValue("vectorString", VectorString); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewSetQuery.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewSetQuery.cs index 3ffe59d7188..6b614fe9161 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewSetQuery.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewSetQuery.cs @@ -6,7 +6,7 @@ namespace Microsoft.Graph.Models.Security { public class EdiscoveryReviewSetQuery : Search, IParsable { /// - /// Instantiates a new ediscoveryReviewSetQuery and sets the default values. + /// Instantiates a new EdiscoveryReviewSetQuery and sets the default values. /// public EdiscoveryReviewSetQuery() : base() { OdataType = "#microsoft.graph.security.ediscoveryReviewSetQuery"; diff --git a/src/Microsoft.Graph/Generated/Models/Security/FormattedContent.cs b/src/Microsoft.Graph/Generated/Models/Security/FormattedContent.cs new file mode 100644 index 00000000000..81d5aed5014 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/FormattedContent.cs @@ -0,0 +1,86 @@ +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.Security { + public class FormattedContent : 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 content of this formattedContent. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Content { + get { return BackingStore?.Get("content"); } + set { BackingStore?.Set("content", value); } + } +#nullable restore +#else + public string Content { + get { return BackingStore?.Get("content"); } + set { BackingStore?.Set("content", value); } + } +#endif + /// The format of the content. The possible values are: text, html, markdown, unknownFutureValue. + public ContentFormat? Format { + get { return BackingStore?.Get("format"); } + set { BackingStore?.Set("format", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// + /// Instantiates a new FormattedContent and sets the default values. + /// + public FormattedContent() { + 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 FormattedContent CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FormattedContent(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"content", n => { Content = n.GetStringValue(); } }, + {"format", n => { Format = n.GetEnumValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("content", Content); + writer.WriteEnumValue("format", Format); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/Host.cs b/src/Microsoft.Graph/Generated/Models/Security/Host.cs new file mode 100644 index 00000000000..4746635b541 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/Host.cs @@ -0,0 +1,153 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class Host : Artifact, IParsable { + /// The hostComponents that are associated with this host. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Components { + get { return BackingStore?.Get?>("components"); } + set { BackingStore?.Set("components", value); } + } +#nullable restore +#else + public List Components { + get { return BackingStore?.Get>("components"); } + set { BackingStore?.Set("components", value); } + } +#endif + /// The hostCookies that are associated with this host. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Cookies { + get { return BackingStore?.Get?>("cookies"); } + set { BackingStore?.Set("cookies", value); } + } +#nullable restore +#else + public List Cookies { + get { return BackingStore?.Get>("cookies"); } + set { BackingStore?.Set("cookies", value); } + } +#endif + /// The first date and time this host was observed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014, is 2014-01-01T00:00:00Z. + public DateTimeOffset? FirstSeenDateTime { + get { return BackingStore?.Get("firstSeenDateTime"); } + set { BackingStore?.Set("firstSeenDateTime", value); } + } + /// The most recent date and time when this host was observed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014, is 2014-01-01T00:00:00Z. + public DateTimeOffset? LastSeenDateTime { + get { return BackingStore?.Get("lastSeenDateTime"); } + set { BackingStore?.Set("lastSeenDateTime", value); } + } + /// Passive DNS retrieval about this host. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? PassiveDns { + get { return BackingStore?.Get?>("passiveDns"); } + set { BackingStore?.Set("passiveDns", value); } + } +#nullable restore +#else + public List PassiveDns { + get { return BackingStore?.Get>("passiveDns"); } + set { BackingStore?.Set("passiveDns", value); } + } +#endif + /// Reverse passive DNS retrieval about this host. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? PassiveDnsReverse { + get { return BackingStore?.Get?>("passiveDnsReverse"); } + set { BackingStore?.Set("passiveDnsReverse", value); } + } +#nullable restore +#else + public List PassiveDnsReverse { + get { return BackingStore?.Get>("passiveDnsReverse"); } + set { BackingStore?.Set("passiveDnsReverse", value); } + } +#endif + /// Represents a calculated reputation of this host. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public HostReputation? Reputation { + get { return BackingStore?.Get("reputation"); } + set { BackingStore?.Set("reputation", value); } + } +#nullable restore +#else + public HostReputation Reputation { + get { return BackingStore?.Get("reputation"); } + set { BackingStore?.Set("reputation", value); } + } +#endif + /// The hostTrackers that are associated with this host. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Trackers { + get { return BackingStore?.Get?>("trackers"); } + set { BackingStore?.Set("trackers", value); } + } +#nullable restore +#else + public List Trackers { + get { return BackingStore?.Get>("trackers"); } + set { BackingStore?.Set("trackers", value); } + } +#endif + /// + /// Instantiates a new Host and sets the default values. + /// + public Host() : base() { + OdataType = "#microsoft.graph.security.host"; + } + /// + /// 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 Host CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); + return mappingValue switch { + "#microsoft.graph.security.hostname" => new Hostname(), + "#microsoft.graph.security.ipAddress" => new IpAddress(), + _ => new Host(), + }; + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"components", n => { Components = n.GetCollectionOfObjectValues(HostComponent.CreateFromDiscriminatorValue)?.ToList(); } }, + {"cookies", n => { Cookies = n.GetCollectionOfObjectValues(HostCookie.CreateFromDiscriminatorValue)?.ToList(); } }, + {"firstSeenDateTime", n => { FirstSeenDateTime = n.GetDateTimeOffsetValue(); } }, + {"lastSeenDateTime", n => { LastSeenDateTime = n.GetDateTimeOffsetValue(); } }, + {"passiveDns", n => { PassiveDns = n.GetCollectionOfObjectValues(PassiveDnsRecord.CreateFromDiscriminatorValue)?.ToList(); } }, + {"passiveDnsReverse", n => { PassiveDnsReverse = n.GetCollectionOfObjectValues(PassiveDnsRecord.CreateFromDiscriminatorValue)?.ToList(); } }, + {"reputation", n => { Reputation = n.GetObjectValue(HostReputation.CreateFromDiscriminatorValue); } }, + {"trackers", n => { Trackers = n.GetCollectionOfObjectValues(HostTracker.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("components", Components); + writer.WriteCollectionOfObjectValues("cookies", Cookies); + writer.WriteDateTimeOffsetValue("firstSeenDateTime", FirstSeenDateTime); + writer.WriteDateTimeOffsetValue("lastSeenDateTime", LastSeenDateTime); + writer.WriteCollectionOfObjectValues("passiveDns", PassiveDns); + writer.WriteCollectionOfObjectValues("passiveDnsReverse", PassiveDnsReverse); + writer.WriteObjectValue("reputation", Reputation); + writer.WriteCollectionOfObjectValues("trackers", Trackers); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/HostCollectionResponse.cs new file mode 100644 index 00000000000..3ac69addb00 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/HostCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class HostCollectionResponse : 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 HostCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new HostCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(Host.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/Security/HostComponent.cs b/src/Microsoft.Graph/Generated/Models/Security/HostComponent.cs new file mode 100644 index 00000000000..5549c22ec7b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/HostComponent.cs @@ -0,0 +1,116 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class HostComponent : Artifact, IParsable { + /// The type of component that was detected (for example, Operating System, Framework, Remote Access, or Server). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Category { + get { return BackingStore?.Get("category"); } + set { BackingStore?.Set("category", value); } + } +#nullable restore +#else + public string Category { + get { return BackingStore?.Get("category"); } + set { BackingStore?.Set("category", value); } + } +#endif + /// The first date and time when Microsoft Defender Threat Intelligence observed this web component. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014, is 2014-01-01T00:00:00Z. + public DateTimeOffset? FirstSeenDateTime { + get { return BackingStore?.Get("firstSeenDateTime"); } + set { BackingStore?.Set("firstSeenDateTime", value); } + } + /// The host property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.Security.Host? Host { + get { return BackingStore?.Get("host"); } + set { BackingStore?.Set("host", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.Security.Host Host { + get { return BackingStore?.Get("host"); } + set { BackingStore?.Set("host", value); } + } +#endif + /// The most recent date and time when Microsoft Defender Threat Intelligence observed this web component. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014, is 2014-01-01T00:00:00Z. + public DateTimeOffset? LastSeenDateTime { + get { return BackingStore?.Get("lastSeenDateTime"); } + set { BackingStore?.Set("lastSeenDateTime", value); } + } + /// A name running on the artifact, for example, Microsoft IIS. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#nullable restore +#else + public string Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#endif + /// The component version running on the artifact, for example, v8.5. This should not be assumed to be strictly numerical. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Version { + get { return BackingStore?.Get("version"); } + set { BackingStore?.Set("version", value); } + } +#nullable restore +#else + public string Version { + get { return BackingStore?.Get("version"); } + set { BackingStore?.Set("version", value); } + } +#endif + /// + /// Instantiates a new hostComponent and sets the default values. + /// + public HostComponent() : base() { + OdataType = "#microsoft.graph.security.hostComponent"; + } + /// + /// 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 HostComponent CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new HostComponent(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"category", n => { Category = n.GetStringValue(); } }, + {"firstSeenDateTime", n => { FirstSeenDateTime = n.GetDateTimeOffsetValue(); } }, + {"host", n => { Host = n.GetObjectValue(Microsoft.Graph.Models.Security.Host.CreateFromDiscriminatorValue); } }, + {"lastSeenDateTime", n => { LastSeenDateTime = n.GetDateTimeOffsetValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"version", n => { Version = 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.WriteStringValue("category", Category); + writer.WriteDateTimeOffsetValue("firstSeenDateTime", FirstSeenDateTime); + writer.WriteObjectValue("host", Host); + writer.WriteDateTimeOffsetValue("lastSeenDateTime", LastSeenDateTime); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("version", Version); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostComponentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/HostComponentCollectionResponse.cs new file mode 100644 index 00000000000..9f94cb45c3f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/HostComponentCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class HostComponentCollectionResponse : 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 HostComponentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new HostComponentCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(HostComponent.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/Security/HostCookie.cs b/src/Microsoft.Graph/Generated/Models/Security/HostCookie.cs new file mode 100644 index 00000000000..80548fd91bb --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/HostCookie.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.Security { + public class HostCookie : Artifact, IParsable { + /// The URI for which the cookie is valid. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Domain { + get { return BackingStore?.Get("domain"); } + set { BackingStore?.Set("domain", value); } + } +#nullable restore +#else + public string Domain { + get { return BackingStore?.Get("domain"); } + set { BackingStore?.Set("domain", value); } + } +#endif + /// The first date and time when this hostCookie was observed by Microsoft Defender Threat Intelligence. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014, is 2014-01-01T00:00:00Z. + public DateTimeOffset? FirstSeenDateTime { + get { return BackingStore?.Get("firstSeenDateTime"); } + set { BackingStore?.Set("firstSeenDateTime", value); } + } + /// The host property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.Security.Host? Host { + get { return BackingStore?.Get("host"); } + set { BackingStore?.Set("host", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.Security.Host Host { + get { return BackingStore?.Get("host"); } + set { BackingStore?.Set("host", value); } + } +#endif + /// The most recent date and time when this hostCookie was observed by Microsoft Defender Threat Intelligence. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014, is 2014-01-01T00:00:00Z. + public DateTimeOffset? LastSeenDateTime { + get { return BackingStore?.Get("lastSeenDateTime"); } + set { BackingStore?.Set("lastSeenDateTime", value); } + } + /// The name of the cookie, for example, JSESSIONID or SEARCH_NAMESITE. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#nullable restore +#else + public string Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#endif + /// + /// Instantiates a new hostCookie and sets the default values. + /// + public HostCookie() : base() { + OdataType = "#microsoft.graph.security.hostCookie"; + } + /// + /// 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 HostCookie CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new HostCookie(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"domain", n => { Domain = n.GetStringValue(); } }, + {"firstSeenDateTime", n => { FirstSeenDateTime = n.GetDateTimeOffsetValue(); } }, + {"host", n => { Host = n.GetObjectValue(Microsoft.Graph.Models.Security.Host.CreateFromDiscriminatorValue); } }, + {"lastSeenDateTime", n => { LastSeenDateTime = n.GetDateTimeOffsetValue(); } }, + {"name", n => { Name = 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.WriteStringValue("domain", Domain); + writer.WriteDateTimeOffsetValue("firstSeenDateTime", FirstSeenDateTime); + writer.WriteObjectValue("host", Host); + writer.WriteDateTimeOffsetValue("lastSeenDateTime", LastSeenDateTime); + writer.WriteStringValue("name", Name); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostCookieCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/HostCookieCollectionResponse.cs new file mode 100644 index 00000000000..fbcde762bba --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/HostCookieCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class HostCookieCollectionResponse : 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 HostCookieCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new HostCookieCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(HostCookie.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/Security/HostReputation.cs b/src/Microsoft.Graph/Generated/Models/Security/HostReputation.cs new file mode 100644 index 00000000000..04c8fc751c7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/HostReputation.cs @@ -0,0 +1,62 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class HostReputation : Entity, IParsable { + /// The classification property + public HostReputationClassification? Classification { + get { return BackingStore?.Get("classification"); } + set { BackingStore?.Set("classification", value); } + } + /// A collection of rules that have been used to calculate the classification and score. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Rules { + get { return BackingStore?.Get?>("rules"); } + set { BackingStore?.Set("rules", value); } + } +#nullable restore +#else + public List Rules { + get { return BackingStore?.Get>("rules"); } + set { BackingStore?.Set("rules", value); } + } +#endif + /// The calculated score (0-100) of the requested host. A higher value indicates that this host is more likely to be suspicious or malicious. + public int? Score { + get { return BackingStore?.Get("score"); } + set { BackingStore?.Set("score", 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 HostReputation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new HostReputation(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"classification", n => { Classification = n.GetEnumValue(); } }, + {"rules", n => { Rules = n.GetCollectionOfObjectValues(HostReputationRule.CreateFromDiscriminatorValue)?.ToList(); } }, + {"score", n => { Score = n.GetIntValue(); } }, + }; + } + /// + /// 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("classification", Classification); + writer.WriteCollectionOfObjectValues("rules", Rules); + writer.WriteIntValue("score", Score); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostReputationClassification.cs b/src/Microsoft.Graph/Generated/Models/Security/HostReputationClassification.cs new file mode 100644 index 00000000000..27d5f9f75c2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/HostReputationClassification.cs @@ -0,0 +1,16 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models.Security { + public enum HostReputationClassification { + [EnumMember(Value = "unknown")] + Unknown, + [EnumMember(Value = "neutral")] + Neutral, + [EnumMember(Value = "suspicious")] + Suspicious, + [EnumMember(Value = "malicious")] + Malicious, + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostReputationRule.cs b/src/Microsoft.Graph/Generated/Models/Security/HostReputationRule.cs new file mode 100644 index 00000000000..0f1a8bfcf6b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/HostReputationRule.cs @@ -0,0 +1,118 @@ +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.Security { + public class HostReputationRule : 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 description of the rule that gives more context. +#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 + /// The name of the rule. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#nullable restore +#else + public string Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", 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 + /// Link to a web page with details related to this rule. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RelatedDetailsUrl { + get { return BackingStore?.Get("relatedDetailsUrl"); } + set { BackingStore?.Set("relatedDetailsUrl", value); } + } +#nullable restore +#else + public string RelatedDetailsUrl { + get { return BackingStore?.Get("relatedDetailsUrl"); } + set { BackingStore?.Set("relatedDetailsUrl", value); } + } +#endif + /// The severity property + public HostReputationRuleSeverity? Severity { + get { return BackingStore?.Get("severity"); } + set { BackingStore?.Set("severity", value); } + } + /// + /// Instantiates a new hostReputationRule and sets the default values. + /// + public HostReputationRule() { + 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 HostReputationRule CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new HostReputationRule(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"description", n => { Description = n.GetStringValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"relatedDetailsUrl", n => { RelatedDetailsUrl = n.GetStringValue(); } }, + {"severity", n => { Severity = n.GetEnumValue(); } }, + }; + } + /// + /// 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("description", Description); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteStringValue("relatedDetailsUrl", RelatedDetailsUrl); + writer.WriteEnumValue("severity", Severity); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostReputationRuleSeverity.cs b/src/Microsoft.Graph/Generated/Models/Security/HostReputationRuleSeverity.cs new file mode 100644 index 00000000000..24169ae3e4c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/HostReputationRuleSeverity.cs @@ -0,0 +1,16 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models.Security { + public enum HostReputationRuleSeverity { + [EnumMember(Value = "unknown")] + Unknown, + [EnumMember(Value = "low")] + Low, + [EnumMember(Value = "medium")] + Medium, + [EnumMember(Value = "high")] + High, + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostTracker.cs b/src/Microsoft.Graph/Generated/Models/Security/HostTracker.cs new file mode 100644 index 00000000000..c7a37b98e70 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/HostTracker.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.Security { + public class HostTracker : Artifact, IParsable { + /// The first date and time when this hostTracker was observed by Microsoft Defender Threat Intelligence. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014, is 2014-01-01T00:00:00Z. + public DateTimeOffset? FirstSeenDateTime { + get { return BackingStore?.Get("firstSeenDateTime"); } + set { BackingStore?.Set("firstSeenDateTime", value); } + } + /// The host property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.Security.Host? Host { + get { return BackingStore?.Get("host"); } + set { BackingStore?.Set("host", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.Security.Host Host { + get { return BackingStore?.Get("host"); } + set { BackingStore?.Set("host", value); } + } +#endif + /// The kind of hostTracker that was detected. For example, GoogleAnalyticsID or JarmHash. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Kind { + get { return BackingStore?.Get("kind"); } + set { BackingStore?.Set("kind", value); } + } +#nullable restore +#else + public string Kind { + get { return BackingStore?.Get("kind"); } + set { BackingStore?.Set("kind", value); } + } +#endif + /// The most recent date and time when this hostTracker was observed by Microsoft Defender Threat Intelligence. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014, is 2014-01-01T00:00:00Z. + public DateTimeOffset? LastSeenDateTime { + get { return BackingStore?.Get("lastSeenDateTime"); } + set { BackingStore?.Set("lastSeenDateTime", value); } + } + /// The identification value for the hostTracker. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public string Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Instantiates a new hostTracker and sets the default values. + /// + public HostTracker() : base() { + OdataType = "#microsoft.graph.security.hostTracker"; + } + /// + /// 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 HostTracker CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new HostTracker(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"firstSeenDateTime", n => { FirstSeenDateTime = n.GetDateTimeOffsetValue(); } }, + {"host", n => { Host = n.GetObjectValue(Microsoft.Graph.Models.Security.Host.CreateFromDiscriminatorValue); } }, + {"kind", n => { Kind = n.GetStringValue(); } }, + {"lastSeenDateTime", n => { LastSeenDateTime = n.GetDateTimeOffsetValue(); } }, + {"value", n => { Value = 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("firstSeenDateTime", FirstSeenDateTime); + writer.WriteObjectValue("host", Host); + writer.WriteStringValue("kind", Kind); + writer.WriteDateTimeOffsetValue("lastSeenDateTime", LastSeenDateTime); + writer.WriteStringValue("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostTrackerCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/HostTrackerCollectionResponse.cs new file mode 100644 index 00000000000..aacaf5dee4e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/HostTrackerCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class HostTrackerCollectionResponse : 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 HostTrackerCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new HostTrackerCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(HostTracker.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/Security/Hostname.cs b/src/Microsoft.Graph/Generated/Models/Security/Hostname.cs new file mode 100644 index 00000000000..9b556827b09 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/Hostname.cs @@ -0,0 +1,70 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class Hostname : Host, IParsable { + /// The company or individual who registered this hostname, from WHOIS data. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Registrant { + get { return BackingStore?.Get("registrant"); } + set { BackingStore?.Set("registrant", value); } + } +#nullable restore +#else + public string Registrant { + get { return BackingStore?.Get("registrant"); } + set { BackingStore?.Set("registrant", value); } + } +#endif + /// The registrar for this hostname, from WHOIS data. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Registrar { + get { return BackingStore?.Get("registrar"); } + set { BackingStore?.Set("registrar", value); } + } +#nullable restore +#else + public string Registrar { + get { return BackingStore?.Get("registrar"); } + set { BackingStore?.Set("registrar", value); } + } +#endif + /// + /// Instantiates a new Hostname and sets the default values. + /// + public Hostname() : base() { + OdataType = "#microsoft.graph.security.hostname"; + } + /// + /// 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 Hostname CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new Hostname(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"registrant", n => { Registrant = n.GetStringValue(); } }, + {"registrar", n => { Registrar = 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.WriteStringValue("registrant", Registrant); + writer.WriteStringValue("registrar", Registrar); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/Hyperlink.cs b/src/Microsoft.Graph/Generated/Models/Security/Hyperlink.cs new file mode 100644 index 00000000000..2bee9bdaa98 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/Hyperlink.cs @@ -0,0 +1,95 @@ +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.Security { + public class Hyperlink : 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 name for this hyperlink. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#nullable restore +#else + public string Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", 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 URL for this hyperlink. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { + get { return BackingStore?.Get("url"); } + set { BackingStore?.Set("url", value); } + } +#nullable restore +#else + public string Url { + get { return BackingStore?.Get("url"); } + set { BackingStore?.Set("url", value); } + } +#endif + /// + /// Instantiates a new hyperlink and sets the default values. + /// + public Hyperlink() { + 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 Hyperlink CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new Hyperlink(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"name", n => { Name = n.GetStringValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/Indicator.cs b/src/Microsoft.Graph/Generated/Models/Security/Indicator.cs new file mode 100644 index 00000000000..20908d0ab46 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/Indicator.cs @@ -0,0 +1,60 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class Indicator : Entity, IParsable { + /// The artifact property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.Security.Artifact? Artifact { + get { return BackingStore?.Get("artifact"); } + set { BackingStore?.Set("artifact", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.Security.Artifact Artifact { + get { return BackingStore?.Get("artifact"); } + set { BackingStore?.Set("artifact", value); } + } +#endif + /// The source property + public IndicatorSource? Source { + get { return BackingStore?.Get("source"); } + set { BackingStore?.Set("source", 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 Indicator CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); + return mappingValue switch { + "#microsoft.graph.security.articleIndicator" => new ArticleIndicator(), + "#microsoft.graph.security.intelligenceProfileIndicator" => new IntelligenceProfileIndicator(), + _ => new Indicator(), + }; + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"artifact", n => { Artifact = n.GetObjectValue(Microsoft.Graph.Models.Security.Artifact.CreateFromDiscriminatorValue); } }, + {"source", n => { Source = n.GetEnumValue(); } }, + }; + } + /// + /// 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.WriteObjectValue("artifact", Artifact); + writer.WriteEnumValue("source", Source); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/IndicatorSource.cs b/src/Microsoft.Graph/Generated/Models/Security/IndicatorSource.cs new file mode 100644 index 00000000000..fcebe6e70a8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/IndicatorSource.cs @@ -0,0 +1,14 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models.Security { + public enum IndicatorSource { + [EnumMember(Value = "microsoft")] + Microsoft, + [EnumMember(Value = "osint")] + Osint, + [EnumMember(Value = "public")] + Public, + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfile.cs b/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfile.cs new file mode 100644 index 00000000000..a3a2a2a28e9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfile.cs @@ -0,0 +1,174 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class IntelligenceProfile : Entity, IParsable { + /// A list of commonly-known aliases for the threat intelligence included in the intelligenceProfile. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Aliases { + get { return BackingStore?.Get?>("aliases"); } + set { BackingStore?.Set("aliases", value); } + } +#nullable restore +#else + public List Aliases { + get { return BackingStore?.Get>("aliases"); } + set { BackingStore?.Set("aliases", value); } + } +#endif + /// The country/region of origin for the given actor or threat associated with this intelligenceProfile. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CountriesOrRegionsOfOrigin { + get { return BackingStore?.Get?>("countriesOrRegionsOfOrigin"); } + set { BackingStore?.Set("countriesOrRegionsOfOrigin", value); } + } +#nullable restore +#else + public List CountriesOrRegionsOfOrigin { + get { return BackingStore?.Get>("countriesOrRegionsOfOrigin"); } + set { BackingStore?.Set("countriesOrRegionsOfOrigin", value); } + } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public FormattedContent? Description { + get { return BackingStore?.Get("description"); } + set { BackingStore?.Set("description", value); } + } +#nullable restore +#else + public FormattedContent Description { + get { return BackingStore?.Get("description"); } + set { BackingStore?.Set("description", value); } + } +#endif + /// The date and time when this intelligenceProfile was first active. 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? FirstActiveDateTime { + get { return BackingStore?.Get("firstActiveDateTime"); } + set { BackingStore?.Set("firstActiveDateTime", value); } + } + /// Includes an assemblage of high-fidelity network indicators of compromise. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Indicators { + get { return BackingStore?.Get?>("indicators"); } + set { BackingStore?.Set("indicators", value); } + } +#nullable restore +#else + public List Indicators { + get { return BackingStore?.Get>("indicators"); } + set { BackingStore?.Set("indicators", value); } + } +#endif + /// The kind property + public IntelligenceProfileKind? Kind { + get { return BackingStore?.Get("kind"); } + set { BackingStore?.Set("kind", value); } + } + /// The summary property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public FormattedContent? Summary { + get { return BackingStore?.Get("summary"); } + set { BackingStore?.Set("summary", value); } + } +#nullable restore +#else + public FormattedContent Summary { + get { return BackingStore?.Get("summary"); } + set { BackingStore?.Set("summary", value); } + } +#endif + /// Known targets related to this intelligenceProfile. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Targets { + get { return BackingStore?.Get?>("targets"); } + set { BackingStore?.Set("targets", value); } + } +#nullable restore +#else + public List Targets { + get { return BackingStore?.Get>("targets"); } + set { BackingStore?.Set("targets", value); } + } +#endif + /// The title of this intelligenceProfile. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { + get { return BackingStore?.Get("title"); } + set { BackingStore?.Set("title", value); } + } +#nullable restore +#else + public string Title { + get { return BackingStore?.Get("title"); } + set { BackingStore?.Set("title", value); } + } +#endif + /// Formatted information featuring a description of the distinctive tactics, techniques, and procedures (TTP) of the group, followed by a list of all known custom, commodity, and publicly available implants used by the group. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public FormattedContent? Tradecraft { + get { return BackingStore?.Get("tradecraft"); } + set { BackingStore?.Set("tradecraft", value); } + } +#nullable restore +#else + public FormattedContent Tradecraft { + get { return BackingStore?.Get("tradecraft"); } + set { BackingStore?.Set("tradecraft", 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 IntelligenceProfile CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new IntelligenceProfile(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"aliases", n => { Aliases = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"countriesOrRegionsOfOrigin", n => { CountriesOrRegionsOfOrigin = n.GetCollectionOfObjectValues(IntelligenceProfileCountryOrRegionOfOrigin.CreateFromDiscriminatorValue)?.ToList(); } }, + {"description", n => { Description = n.GetObjectValue(FormattedContent.CreateFromDiscriminatorValue); } }, + {"firstActiveDateTime", n => { FirstActiveDateTime = n.GetDateTimeOffsetValue(); } }, + {"indicators", n => { Indicators = n.GetCollectionOfObjectValues(IntelligenceProfileIndicator.CreateFromDiscriminatorValue)?.ToList(); } }, + {"kind", n => { Kind = n.GetEnumValue(); } }, + {"summary", n => { Summary = n.GetObjectValue(FormattedContent.CreateFromDiscriminatorValue); } }, + {"targets", n => { Targets = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"title", n => { Title = n.GetStringValue(); } }, + {"tradecraft", n => { Tradecraft = n.GetObjectValue(FormattedContent.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.WriteCollectionOfPrimitiveValues("aliases", Aliases); + writer.WriteCollectionOfObjectValues("countriesOrRegionsOfOrigin", CountriesOrRegionsOfOrigin); + writer.WriteObjectValue("description", Description); + writer.WriteDateTimeOffsetValue("firstActiveDateTime", FirstActiveDateTime); + writer.WriteCollectionOfObjectValues("indicators", Indicators); + writer.WriteEnumValue("kind", Kind); + writer.WriteObjectValue("summary", Summary); + writer.WriteCollectionOfPrimitiveValues("targets", Targets); + writer.WriteStringValue("title", Title); + writer.WriteObjectValue("tradecraft", Tradecraft); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileCollectionResponse.cs new file mode 100644 index 00000000000..4ee9f012b71 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class IntelligenceProfileCollectionResponse : 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 IntelligenceProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new IntelligenceProfileCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(IntelligenceProfile.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/Security/IntelligenceProfileCountryOrRegionOfOrigin.cs b/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileCountryOrRegionOfOrigin.cs new file mode 100644 index 00000000000..34c7b5deffe --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileCountryOrRegionOfOrigin.cs @@ -0,0 +1,95 @@ +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.Security { + public class IntelligenceProfileCountryOrRegionOfOrigin : 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; } + /// A codified representation for this country/region of origin. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { + get { return BackingStore?.Get("code"); } + set { BackingStore?.Set("code", value); } + } +#nullable restore +#else + public string Code { + get { return BackingStore?.Get("code"); } + set { BackingStore?.Set("code", value); } + } +#endif + /// A display label for this ountry/region of origin. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Label { + get { return BackingStore?.Get("label"); } + set { BackingStore?.Set("label", value); } + } +#nullable restore +#else + public string Label { + get { return BackingStore?.Get("label"); } + set { BackingStore?.Set("label", 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 + /// + /// Instantiates a new intelligenceProfileCountryOrRegionOfOrigin and sets the default values. + /// + public IntelligenceProfileCountryOrRegionOfOrigin() { + 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 IntelligenceProfileCountryOrRegionOfOrigin CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new IntelligenceProfileCountryOrRegionOfOrigin(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"code", n => { Code = n.GetStringValue(); } }, + {"label", n => { Label = n.GetStringValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("label", Label); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileIndicator.cs b/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileIndicator.cs new file mode 100644 index 00000000000..1340a073c0f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileIndicator.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.Security { + public class IntelligenceProfileIndicator : Indicator, IParsable { + /// Designate when an artifact was first used actively in an attack, when a particular sample was compiled, or if neither of those could be ascertained when the file was first seen in public repositories (for example, VirusTotal, ANY.RUN, Hybrid Analysis) or reported publicly. + public DateTimeOffset? FirstSeenDateTime { + get { return BackingStore?.Get("firstSeenDateTime"); } + set { BackingStore?.Set("firstSeenDateTime", value); } + } + /// Designate when an artifact was most recently used actively in an attack, when a particular sample was compiled, or if neither of those could be ascertained when the file was first seen in public repositories (for example, VirusTotal, ANY.RUN, Hybrid Analysis) or reported publicly. + public DateTimeOffset? LastSeenDateTime { + get { return BackingStore?.Get("lastSeenDateTime"); } + set { BackingStore?.Set("lastSeenDateTime", value); } + } + /// + /// Instantiates a new IntelligenceProfileIndicator and sets the default values. + /// + public IntelligenceProfileIndicator() : base() { + OdataType = "#microsoft.graph.security.intelligenceProfileIndicator"; + } + /// + /// 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 IntelligenceProfileIndicator CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new IntelligenceProfileIndicator(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"firstSeenDateTime", n => { FirstSeenDateTime = n.GetDateTimeOffsetValue(); } }, + {"lastSeenDateTime", n => { LastSeenDateTime = 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("firstSeenDateTime", FirstSeenDateTime); + writer.WriteDateTimeOffsetValue("lastSeenDateTime", LastSeenDateTime); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileIndicatorCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileIndicatorCollectionResponse.cs new file mode 100644 index 00000000000..48bfa7e45ea --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileIndicatorCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class IntelligenceProfileIndicatorCollectionResponse : 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 IntelligenceProfileIndicatorCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new IntelligenceProfileIndicatorCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(IntelligenceProfileIndicator.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/Security/IntelligenceProfileKind.cs b/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileKind.cs new file mode 100644 index 00000000000..7643228332f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileKind.cs @@ -0,0 +1,12 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models.Security { + public enum IntelligenceProfileKind { + [EnumMember(Value = "actor")] + Actor, + [EnumMember(Value = "tool")] + Tool, + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/IpAddress.cs b/src/Microsoft.Graph/Generated/Models/Security/IpAddress.cs new file mode 100644 index 00000000000..de36931f99e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/IpAddress.cs @@ -0,0 +1,102 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class IpAddress : Host, IParsable { + /// The details about the autonomous system to which this IP address belongs. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.Security.AutonomousSystem? AutonomousSystem { + get { return BackingStore?.Get("autonomousSystem"); } + set { BackingStore?.Set("autonomousSystem", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.Security.AutonomousSystem AutonomousSystem { + get { return BackingStore?.Get("autonomousSystem"); } + set { BackingStore?.Set("autonomousSystem", value); } + } +#endif + /// The country or region for this IP address. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CountryOrRegion { + get { return BackingStore?.Get("countryOrRegion"); } + set { BackingStore?.Set("countryOrRegion", value); } + } +#nullable restore +#else + public string CountryOrRegion { + get { return BackingStore?.Get("countryOrRegion"); } + set { BackingStore?.Set("countryOrRegion", value); } + } +#endif + /// The hosting company listed for this host. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HostingProvider { + get { return BackingStore?.Get("hostingProvider"); } + set { BackingStore?.Set("hostingProvider", value); } + } +#nullable restore +#else + public string HostingProvider { + get { return BackingStore?.Get("hostingProvider"); } + set { BackingStore?.Set("hostingProvider", value); } + } +#endif + /// The block of IP addresses this IP address belongs to. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Netblock { + get { return BackingStore?.Get("netblock"); } + set { BackingStore?.Set("netblock", value); } + } +#nullable restore +#else + public string Netblock { + get { return BackingStore?.Get("netblock"); } + set { BackingStore?.Set("netblock", value); } + } +#endif + /// + /// Instantiates a new IpAddress and sets the default values. + /// + public IpAddress() : base() { + OdataType = "#microsoft.graph.security.ipAddress"; + } + /// + /// 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 IpAddress CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new IpAddress(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"autonomousSystem", n => { AutonomousSystem = n.GetObjectValue(Microsoft.Graph.Models.Security.AutonomousSystem.CreateFromDiscriminatorValue); } }, + {"countryOrRegion", n => { CountryOrRegion = n.GetStringValue(); } }, + {"hostingProvider", n => { HostingProvider = n.GetStringValue(); } }, + {"netblock", n => { Netblock = 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.WriteObjectValue("autonomousSystem", AutonomousSystem); + writer.WriteStringValue("countryOrRegion", CountryOrRegion); + writer.WriteStringValue("hostingProvider", HostingProvider); + writer.WriteStringValue("netblock", Netblock); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/PassiveDnsRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PassiveDnsRecord.cs new file mode 100644 index 00000000000..225f9190fc3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/PassiveDnsRecord.cs @@ -0,0 +1,107 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class PassiveDnsRecord : Artifact, IParsable { + /// The artifact property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.Security.Artifact? Artifact { + get { return BackingStore?.Get("artifact"); } + set { BackingStore?.Set("artifact", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.Security.Artifact Artifact { + get { return BackingStore?.Get("artifact"); } + set { BackingStore?.Set("artifact", value); } + } +#endif + /// The date and time that this passiveDnsRecord entry was collected by Microsoft. 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? CollectedDateTime { + get { return BackingStore?.Get("collectedDateTime"); } + set { BackingStore?.Set("collectedDateTime", value); } + } + /// The date and time when this passiveDnsRecord entry was first seen. 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? FirstSeenDateTime { + get { return BackingStore?.Get("firstSeenDateTime"); } + set { BackingStore?.Set("firstSeenDateTime", value); } + } + /// The date and time when this passiveDnsRecord entry was most recently seen. 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? LastSeenDateTime { + get { return BackingStore?.Get("lastSeenDateTime"); } + set { BackingStore?.Set("lastSeenDateTime", value); } + } + /// The parentHost property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Host? ParentHost { + get { return BackingStore?.Get("parentHost"); } + set { BackingStore?.Set("parentHost", value); } + } +#nullable restore +#else + public Host ParentHost { + get { return BackingStore?.Get("parentHost"); } + set { BackingStore?.Set("parentHost", value); } + } +#endif + /// The DNS record type for this passiveDnsRecord entry. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RecordType { + get { return BackingStore?.Get("recordType"); } + set { BackingStore?.Set("recordType", value); } + } +#nullable restore +#else + public string RecordType { + get { return BackingStore?.Get("recordType"); } + set { BackingStore?.Set("recordType", value); } + } +#endif + /// + /// Instantiates a new passiveDnsRecord and sets the default values. + /// + public PassiveDnsRecord() : base() { + OdataType = "#microsoft.graph.security.passiveDnsRecord"; + } + /// + /// 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 PassiveDnsRecord CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PassiveDnsRecord(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"artifact", n => { Artifact = n.GetObjectValue(Microsoft.Graph.Models.Security.Artifact.CreateFromDiscriminatorValue); } }, + {"collectedDateTime", n => { CollectedDateTime = n.GetDateTimeOffsetValue(); } }, + {"firstSeenDateTime", n => { FirstSeenDateTime = n.GetDateTimeOffsetValue(); } }, + {"lastSeenDateTime", n => { LastSeenDateTime = n.GetDateTimeOffsetValue(); } }, + {"parentHost", n => { ParentHost = n.GetObjectValue(Host.CreateFromDiscriminatorValue); } }, + {"recordType", n => { RecordType = 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.WriteObjectValue("artifact", Artifact); + writer.WriteDateTimeOffsetValue("collectedDateTime", CollectedDateTime); + writer.WriteDateTimeOffsetValue("firstSeenDateTime", FirstSeenDateTime); + writer.WriteDateTimeOffsetValue("lastSeenDateTime", LastSeenDateTime); + writer.WriteObjectValue("parentHost", ParentHost); + writer.WriteStringValue("recordType", RecordType); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/PassiveDnsRecordCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/PassiveDnsRecordCollectionResponse.cs new file mode 100644 index 00000000000..36aed59aea9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/PassiveDnsRecordCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class PassiveDnsRecordCollectionResponse : 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 PassiveDnsRecordCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PassiveDnsRecordCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(PassiveDnsRecord.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/Security/ProcessEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/ProcessEvidence.cs index 680efdcc472..60c25d4292a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ProcessEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ProcessEvidence.cs @@ -38,7 +38,7 @@ public string MdeDeviceId { set { BackingStore?.Set("mdeDeviceId", value); } } #endif - /// Date and time when the parent of the process was created. + /// Date and time when the parent of the process was created. The DateTimeOffset 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? ParentProcessCreationDateTime { get { return BackingStore?.Get("parentProcessCreationDateTime"); } set { BackingStore?.Set("parentProcessCreationDateTime", value); } @@ -76,7 +76,7 @@ public string ProcessCommandLine { set { BackingStore?.Set("processCommandLine", value); } } #endif - /// Date and time the process was created. + /// Date and time when the process was created. The DateTimeOffset 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? ProcessCreationDateTime { get { return BackingStore?.Get("processCreationDateTime"); } set { BackingStore?.Set("processCreationDateTime", value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/Security.cs b/src/Microsoft.Graph/Generated/Models/Security/Security.cs index c67bbdcc229..c3248839e18 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Security.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Security.cs @@ -102,6 +102,20 @@ public List SecureScores { get { return BackingStore?.Get>("secureScores"); } set { BackingStore?.Set("secureScores", value); } } +#endif + /// The threatIntelligence property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.Security.ThreatIntelligence? ThreatIntelligence { + get { return BackingStore?.Get("threatIntelligence"); } + set { BackingStore?.Set("threatIntelligence", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.Security.ThreatIntelligence ThreatIntelligence { + get { return BackingStore?.Get("threatIntelligence"); } + set { BackingStore?.Set("threatIntelligence", value); } + } #endif /// The triggers property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -151,6 +165,7 @@ public TriggerTypesRoot TriggerTypes { {"incidents", n => { Incidents = n.GetCollectionOfObjectValues(Incident.CreateFromDiscriminatorValue)?.ToList(); } }, {"secureScoreControlProfiles", n => { SecureScoreControlProfiles = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.SecureScoreControlProfile.CreateFromDiscriminatorValue)?.ToList(); } }, {"secureScores", n => { SecureScores = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.SecureScore.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); } }, }; @@ -169,6 +184,7 @@ public TriggerTypesRoot TriggerTypes { writer.WriteCollectionOfObjectValues("incidents", Incidents); writer.WriteCollectionOfObjectValues("secureScoreControlProfiles", SecureScoreControlProfiles); writer.WriteCollectionOfObjectValues("secureScores", SecureScores); + writer.WriteObjectValue("threatIntelligence", ThreatIntelligence); writer.WriteObjectValue("triggers", Triggers); writer.WriteObjectValue("triggerTypes", TriggerTypes); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ThreatIntelligence.cs b/src/Microsoft.Graph/Generated/Models/Security/ThreatIntelligence.cs new file mode 100644 index 00000000000..294d63c0789 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/ThreatIntelligence.cs @@ -0,0 +1,192 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class ThreatIntelligence : Entity, IParsable { + /// Refers to indicators of threat or compromise highlighted in an microsoft.graph.security.article.Note: List retrieval is not yet supported. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ArticleIndicators { + get { return BackingStore?.Get?>("articleIndicators"); } + set { BackingStore?.Set("articleIndicators", value); } + } +#nullable restore +#else + public List ArticleIndicators { + get { return BackingStore?.Get>("articleIndicators"); } + set { BackingStore?.Set("articleIndicators", value); } + } +#endif + /// A list of article objects. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List
? Articles { + get { return BackingStore?.Get?>("articles"); } + set { BackingStore?.Set("articles", value); } + } +#nullable restore +#else + public List
Articles { + get { return BackingStore?.Get>("articles"); } + set { BackingStore?.Set("articles", value); } + } +#endif + /// Retrieve details about microsoft.graph.security.hostComponent objects.Note: List retrieval is not yet supported. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? HostComponents { + get { return BackingStore?.Get?>("hostComponents"); } + set { BackingStore?.Set("hostComponents", value); } + } +#nullable restore +#else + public List HostComponents { + get { return BackingStore?.Get>("hostComponents"); } + set { BackingStore?.Set("hostComponents", value); } + } +#endif + /// Retrieve details about microsoft.graph.security.hostCookie objects.Note: List retrieval is not yet supported. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? HostCookies { + get { return BackingStore?.Get?>("hostCookies"); } + set { BackingStore?.Set("hostCookies", value); } + } +#nullable restore +#else + public List HostCookies { + get { return BackingStore?.Get>("hostCookies"); } + set { BackingStore?.Set("hostCookies", value); } + } +#endif + /// Refers to microsoft.graph.security.host objects that Microsoft Threat Intelligence has observed.Note: List retrieval is not yet supported. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Hosts { + get { return BackingStore?.Get?>("hosts"); } + set { BackingStore?.Set("hosts", value); } + } +#nullable restore +#else + public List Hosts { + get { return BackingStore?.Get>("hosts"); } + set { BackingStore?.Set("hosts", value); } + } +#endif + /// Retrieve details about microsoft.graph.security.hostTracker objects.Note: List retrieval is not yet supported. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? HostTrackers { + get { return BackingStore?.Get?>("hostTrackers"); } + set { BackingStore?.Set("hostTrackers", value); } + } +#nullable restore +#else + public List HostTrackers { + get { return BackingStore?.Get>("hostTrackers"); } + set { BackingStore?.Set("hostTrackers", value); } + } +#endif + /// The intelligenceProfileIndicators property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? IntelligenceProfileIndicators { + get { return BackingStore?.Get?>("intelligenceProfileIndicators"); } + set { BackingStore?.Set("intelligenceProfileIndicators", value); } + } +#nullable restore +#else + public List IntelligenceProfileIndicators { + get { return BackingStore?.Get>("intelligenceProfileIndicators"); } + set { BackingStore?.Set("intelligenceProfileIndicators", value); } + } +#endif + /// A list of intelligenceProfile objects. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? IntelProfiles { + get { return BackingStore?.Get?>("intelProfiles"); } + set { BackingStore?.Set("intelProfiles", value); } + } +#nullable restore +#else + public List IntelProfiles { + get { return BackingStore?.Get>("intelProfiles"); } + set { BackingStore?.Set("intelProfiles", value); } + } +#endif + /// Retrieve details about microsoft.graph.security.passiveDnsRecord objects.Note: List retrieval is not yet supported. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? PassiveDnsRecords { + get { return BackingStore?.Get?>("passiveDnsRecords"); } + set { BackingStore?.Set("passiveDnsRecords", value); } + } +#nullable restore +#else + public List PassiveDnsRecords { + get { return BackingStore?.Get>("passiveDnsRecords"); } + set { BackingStore?.Set("passiveDnsRecords", value); } + } +#endif + /// Retrieve details about microsoft.graph.security.vulnerabilities.Note: List retrieval is not yet supported. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Vulnerabilities { + get { return BackingStore?.Get?>("vulnerabilities"); } + set { BackingStore?.Set("vulnerabilities", value); } + } +#nullable restore +#else + public List Vulnerabilities { + get { return BackingStore?.Get>("vulnerabilities"); } + set { BackingStore?.Set("vulnerabilities", 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 ThreatIntelligence CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ThreatIntelligence(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"articleIndicators", n => { ArticleIndicators = n.GetCollectionOfObjectValues(ArticleIndicator.CreateFromDiscriminatorValue)?.ToList(); } }, + {"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(); } }, + {"intelProfiles", n => { IntelProfiles = n.GetCollectionOfObjectValues(IntelligenceProfile.CreateFromDiscriminatorValue)?.ToList(); } }, + {"passiveDnsRecords", n => { PassiveDnsRecords = n.GetCollectionOfObjectValues(PassiveDnsRecord.CreateFromDiscriminatorValue)?.ToList(); } }, + {"vulnerabilities", n => { Vulnerabilities = n.GetCollectionOfObjectValues(Vulnerability.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("articleIndicators", ArticleIndicators); + writer.WriteCollectionOfObjectValues
("articles", Articles); + writer.WriteCollectionOfObjectValues("hostComponents", HostComponents); + writer.WriteCollectionOfObjectValues("hostCookies", HostCookies); + writer.WriteCollectionOfObjectValues("hosts", Hosts); + writer.WriteCollectionOfObjectValues("hostTrackers", HostTrackers); + writer.WriteCollectionOfObjectValues("intelligenceProfileIndicators", IntelligenceProfileIndicators); + writer.WriteCollectionOfObjectValues("intelProfiles", IntelProfiles); + writer.WriteCollectionOfObjectValues("passiveDnsRecords", PassiveDnsRecords); + writer.WriteCollectionOfObjectValues("vulnerabilities", Vulnerabilities); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/UnclassifiedArtifact.cs b/src/Microsoft.Graph/Generated/Models/Security/UnclassifiedArtifact.cs new file mode 100644 index 00000000000..55fffbd2f0a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/UnclassifiedArtifact.cs @@ -0,0 +1,70 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class UnclassifiedArtifact : Artifact, IParsable { + /// The kind for this unclassifiedArtifact resource, describing what this value means. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Kind { + get { return BackingStore?.Get("kind"); } + set { BackingStore?.Set("kind", value); } + } +#nullable restore +#else + public string Kind { + get { return BackingStore?.Get("kind"); } + set { BackingStore?.Set("kind", value); } + } +#endif + /// The value for this unclassifiedArtifact. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public string Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Instantiates a new UnclassifiedArtifact and sets the default values. + /// + public UnclassifiedArtifact() : base() { + OdataType = "#microsoft.graph.security.unclassifiedArtifact"; + } + /// + /// 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 UnclassifiedArtifact CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UnclassifiedArtifact(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"kind", n => { Kind = n.GetStringValue(); } }, + {"value", n => { Value = 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.WriteStringValue("kind", Kind); + writer.WriteStringValue("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/Vulnerability.cs b/src/Microsoft.Graph/Generated/Models/Security/Vulnerability.cs new file mode 100644 index 00000000000..b1148043669 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/Vulnerability.cs @@ -0,0 +1,232 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class Vulnerability : Entity, IParsable { + /// Indicates whether this vulnerability has any known exploits associated to known bad actors. + public bool? ActiveExploitsObserved { + get { return BackingStore?.Get("activeExploitsObserved"); } + set { BackingStore?.Set("activeExploitsObserved", value); } + } + /// Articles related to this vulnerability. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List
? Articles { + get { return BackingStore?.Get?>("articles"); } + set { BackingStore?.Set("articles", value); } + } +#nullable restore +#else + public List
Articles { + get { return BackingStore?.Get>("articles"); } + set { BackingStore?.Set("articles", value); } + } +#endif + /// Community-defined common weakness enumerations (CWE). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CommonWeaknessEnumerationIds { + get { return BackingStore?.Get?>("commonWeaknessEnumerationIds"); } + set { BackingStore?.Set("commonWeaknessEnumerationIds", value); } + } +#nullable restore +#else + public List CommonWeaknessEnumerationIds { + get { return BackingStore?.Get>("commonWeaknessEnumerationIds"); } + set { BackingStore?.Set("commonWeaknessEnumerationIds", value); } + } +#endif + /// Components related to this vulnerability article. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Components { + get { return BackingStore?.Get?>("components"); } + set { BackingStore?.Set("components", value); } + } +#nullable restore +#else + public List Components { + get { return BackingStore?.Get>("components"); } + set { BackingStore?.Set("components", value); } + } +#endif + /// The date and time when this vulnerability article was first created. + public DateTimeOffset? CreatedDateTime { + get { return BackingStore?.Get("createdDateTime"); } + set { BackingStore?.Set("createdDateTime", value); } + } + /// The cvss2Summary property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public CvssSummary? Cvss2Summary { + get { return BackingStore?.Get("cvss2Summary"); } + set { BackingStore?.Set("cvss2Summary", value); } + } +#nullable restore +#else + public CvssSummary Cvss2Summary { + get { return BackingStore?.Get("cvss2Summary"); } + set { BackingStore?.Set("cvss2Summary", value); } + } +#endif + /// The cvss3Summary property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public CvssSummary? Cvss3Summary { + get { return BackingStore?.Get("cvss3Summary"); } + set { BackingStore?.Set("cvss3Summary", value); } + } +#nullable restore +#else + public CvssSummary Cvss3Summary { + get { return BackingStore?.Get("cvss3Summary"); } + set { BackingStore?.Set("cvss3Summary", value); } + } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public FormattedContent? Description { + get { return BackingStore?.Get("description"); } + set { BackingStore?.Set("description", value); } + } +#nullable restore +#else + public FormattedContent Description { + get { return BackingStore?.Get("description"); } + set { BackingStore?.Set("description", value); } + } +#endif + /// Known exploits for this vulnerability. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Exploits { + get { return BackingStore?.Get?>("exploits"); } + set { BackingStore?.Set("exploits", value); } + } +#nullable restore +#else + public List Exploits { + get { return BackingStore?.Get>("exploits"); } + set { BackingStore?.Set("exploits", value); } + } +#endif + /// Indicates whether this vulnerability has exploits in public sources (such as Packetstorm or Exploit-DB) online. + public bool? ExploitsAvailable { + get { return BackingStore?.Get("exploitsAvailable"); } + set { BackingStore?.Set("exploitsAvailable", value); } + } + /// Indicates whether chatter about this vulnerability has been discovered online. + public bool? HasChatter { + get { return BackingStore?.Get("hasChatter"); } + set { BackingStore?.Set("hasChatter", value); } + } + /// The date and time when this vulnerability article was most recently updated. + public DateTimeOffset? LastModifiedDateTime { + get { return BackingStore?.Get("lastModifiedDateTime"); } + set { BackingStore?.Set("lastModifiedDateTime", value); } + } + /// A unique algorithm that reflects the priority of a vulnerability based on the CVSS score, exploits, chatter, and linkage to malware. This property also evaluates the recency of these components so users can understand which vulnerability should be remediated first. + public int? PriorityScore { + get { return BackingStore?.Get("priorityScore"); } + set { BackingStore?.Set("priorityScore", value); } + } + /// The date and time when this vulnerability article was published. + public DateTimeOffset? PublishedDateTime { + get { return BackingStore?.Get("publishedDateTime"); } + set { BackingStore?.Set("publishedDateTime", value); } + } + /// Reference links where further information can be learned about this vulnerability. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? References { + get { return BackingStore?.Get?>("references"); } + set { BackingStore?.Set("references", value); } + } +#nullable restore +#else + public List References { + get { return BackingStore?.Get>("references"); } + set { BackingStore?.Set("references", value); } + } +#endif + /// Any known remediation steps. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public FormattedContent? Remediation { + get { return BackingStore?.Get("remediation"); } + set { BackingStore?.Set("remediation", value); } + } +#nullable restore +#else + public FormattedContent Remediation { + get { return BackingStore?.Get("remediation"); } + set { BackingStore?.Set("remediation", value); } + } +#endif + /// The severity property + public VulnerabilitySeverity? Severity { + get { return BackingStore?.Get("severity"); } + set { BackingStore?.Set("severity", 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 Vulnerability CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new Vulnerability(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"activeExploitsObserved", n => { ActiveExploitsObserved = n.GetBoolValue(); } }, + {"articles", n => { Articles = n.GetCollectionOfObjectValues
(Article.CreateFromDiscriminatorValue)?.ToList(); } }, + {"commonWeaknessEnumerationIds", n => { CommonWeaknessEnumerationIds = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"components", n => { Components = n.GetCollectionOfObjectValues(VulnerabilityComponent.CreateFromDiscriminatorValue)?.ToList(); } }, + {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + {"cvss2Summary", n => { Cvss2Summary = n.GetObjectValue(CvssSummary.CreateFromDiscriminatorValue); } }, + {"cvss3Summary", n => { Cvss3Summary = n.GetObjectValue(CvssSummary.CreateFromDiscriminatorValue); } }, + {"description", n => { Description = n.GetObjectValue(FormattedContent.CreateFromDiscriminatorValue); } }, + {"exploits", n => { Exploits = n.GetCollectionOfObjectValues(Hyperlink.CreateFromDiscriminatorValue)?.ToList(); } }, + {"exploitsAvailable", n => { ExploitsAvailable = n.GetBoolValue(); } }, + {"hasChatter", n => { HasChatter = n.GetBoolValue(); } }, + {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + {"priorityScore", n => { PriorityScore = n.GetIntValue(); } }, + {"publishedDateTime", n => { PublishedDateTime = n.GetDateTimeOffsetValue(); } }, + {"references", n => { References = n.GetCollectionOfObjectValues(Hyperlink.CreateFromDiscriminatorValue)?.ToList(); } }, + {"remediation", n => { Remediation = n.GetObjectValue(FormattedContent.CreateFromDiscriminatorValue); } }, + {"severity", n => { Severity = n.GetEnumValue(); } }, + }; + } + /// + /// 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.WriteBoolValue("activeExploitsObserved", ActiveExploitsObserved); + writer.WriteCollectionOfObjectValues
("articles", Articles); + writer.WriteCollectionOfPrimitiveValues("commonWeaknessEnumerationIds", CommonWeaknessEnumerationIds); + writer.WriteCollectionOfObjectValues("components", Components); + writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); + writer.WriteObjectValue("cvss2Summary", Cvss2Summary); + writer.WriteObjectValue("cvss3Summary", Cvss3Summary); + writer.WriteObjectValue("description", Description); + writer.WriteCollectionOfObjectValues("exploits", Exploits); + writer.WriteBoolValue("exploitsAvailable", ExploitsAvailable); + writer.WriteBoolValue("hasChatter", HasChatter); + writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); + writer.WriteIntValue("priorityScore", PriorityScore); + writer.WriteDateTimeOffsetValue("publishedDateTime", PublishedDateTime); + writer.WriteCollectionOfObjectValues("references", References); + writer.WriteObjectValue("remediation", Remediation); + writer.WriteEnumValue("severity", Severity); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/VulnerabilityCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/VulnerabilityCollectionResponse.cs new file mode 100644 index 00000000000..d3deb714bd1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/VulnerabilityCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class VulnerabilityCollectionResponse : 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 VulnerabilityCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new VulnerabilityCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(Vulnerability.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/Security/VulnerabilityComponent.cs b/src/Microsoft.Graph/Generated/Models/Security/VulnerabilityComponent.cs new file mode 100644 index 00000000000..9e303509a8d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/VulnerabilityComponent.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class VulnerabilityComponent : Entity, IParsable { + /// The name of this vulnerability component. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#nullable restore +#else + public string Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", 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 VulnerabilityComponent CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new VulnerabilityComponent(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"name", n => { Name = 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.WriteStringValue("name", Name); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Security/VulnerabilityComponentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/VulnerabilityComponentCollectionResponse.cs new file mode 100644 index 00000000000..2aad4b8697b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/VulnerabilityComponentCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models.Security { + public class VulnerabilityComponentCollectionResponse : 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 VulnerabilityComponentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new VulnerabilityComponentCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(VulnerabilityComponent.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/Security/VulnerabilitySeverity.cs b/src/Microsoft.Graph/Generated/Models/Security/VulnerabilitySeverity.cs new file mode 100644 index 00000000000..393775fca23 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Security/VulnerabilitySeverity.cs @@ -0,0 +1,18 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models.Security { + public enum VulnerabilitySeverity { + [EnumMember(Value = "none")] + None, + [EnumMember(Value = "low")] + Low, + [EnumMember(Value = "medium")] + Medium, + [EnumMember(Value = "high")] + High, + [EnumMember(Value = "critical")] + Critical, + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SignInUserType.cs b/src/Microsoft.Graph/Generated/Models/SignInUserType.cs new file mode 100644 index 00000000000..2b848f197ab --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SignInUserType.cs @@ -0,0 +1,12 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum SignInUserType { + [EnumMember(Value = "member")] + Member, + [EnumMember(Value = "guest")] + Guest, + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/StringKeyObjectValuePair.cs b/src/Microsoft.Graph/Generated/Models/StringKeyObjectValuePair.cs index 482b2ec6171..220efae8c65 100644 --- a/src/Microsoft.Graph/Generated/Models/StringKeyObjectValuePair.cs +++ b/src/Microsoft.Graph/Generated/Models/StringKeyObjectValuePair.cs @@ -42,7 +42,7 @@ public string OdataType { } #endif /// - /// Instantiates a new StringKeyObjectValuePair and sets the default values. + /// Instantiates a new stringKeyObjectValuePair and sets the default values. /// public StringKeyObjectValuePair() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationJobSubject.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationJobSubject.cs index cb087c4e8ee..c6dcabd7288 100644 --- a/src/Microsoft.Graph/Generated/Models/SynchronizationJobSubject.cs +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationJobSubject.cs @@ -70,7 +70,7 @@ public string OdataType { } #endif /// - /// Instantiates a new synchronizationJobSubject and sets the default values. + /// Instantiates a new SynchronizationJobSubject and sets the default values. /// public SynchronizationJobSubject() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppAuthorization.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppAuthorization.cs new file mode 100644 index 00000000000..29fc0c88b5b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppAuthorization.cs @@ -0,0 +1,79 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class TeamsAppAuthorization : 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 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 requiredPermissionSet property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public TeamsAppPermissionSet? RequiredPermissionSet { + get { return BackingStore?.Get("requiredPermissionSet"); } + set { BackingStore?.Set("requiredPermissionSet", value); } + } +#nullable restore +#else + public TeamsAppPermissionSet RequiredPermissionSet { + get { return BackingStore?.Get("requiredPermissionSet"); } + set { BackingStore?.Set("requiredPermissionSet", value); } + } +#endif + /// + /// Instantiates a new teamsAppAuthorization and sets the default values. + /// + public TeamsAppAuthorization() { + 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 TeamsAppAuthorization CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new TeamsAppAuthorization(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"requiredPermissionSet", n => { RequiredPermissionSet = n.GetObjectValue(TeamsAppPermissionSet.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteObjectValue("requiredPermissionSet", RequiredPermissionSet); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppDefinition.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppDefinition.cs index 41ed7c0ff41..f23038842cd 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAppDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppDefinition.cs @@ -5,6 +5,20 @@ using System; namespace Microsoft.Graph.Models { public class TeamsAppDefinition : Entity, IParsable { + /// The authorization property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public TeamsAppAuthorization? Authorization { + get { return BackingStore?.Get("authorization"); } + set { BackingStore?.Set("authorization", value); } + } +#nullable restore +#else + public TeamsAppAuthorization Authorization { + get { return BackingStore?.Get("authorization"); } + set { BackingStore?.Set("authorization", value); } + } +#endif /// The details of the bot specified in the Teams app manifest. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -126,6 +140,7 @@ public string Version { /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { + {"authorization", n => { Authorization = n.GetObjectValue(TeamsAppAuthorization.CreateFromDiscriminatorValue); } }, {"bot", n => { Bot = n.GetObjectValue(TeamworkBot.CreateFromDiscriminatorValue); } }, {"createdBy", n => { CreatedBy = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, {"description", n => { Description = n.GetStringValue(); } }, @@ -144,6 +159,7 @@ public string Version { public new void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); + writer.WriteObjectValue("authorization", Authorization); writer.WriteObjectValue("bot", Bot); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppInstallation.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppInstallation.cs index d08c9b36074..8196705b4fd 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAppInstallation.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppInstallation.cs @@ -5,6 +5,20 @@ using System; namespace Microsoft.Graph.Models { public class TeamsAppInstallation : Entity, IParsable { + /// The consentedPermissionSet property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public TeamsAppPermissionSet? ConsentedPermissionSet { + get { return BackingStore?.Get("consentedPermissionSet"); } + set { BackingStore?.Set("consentedPermissionSet", value); } + } +#nullable restore +#else + public TeamsAppPermissionSet ConsentedPermissionSet { + get { return BackingStore?.Get("consentedPermissionSet"); } + set { BackingStore?.Set("consentedPermissionSet", value); } + } +#endif /// The app that is installed. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -50,6 +64,7 @@ public Microsoft.Graph.Models.TeamsAppDefinition TeamsAppDefinition { /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { + {"consentedPermissionSet", n => { ConsentedPermissionSet = n.GetObjectValue(TeamsAppPermissionSet.CreateFromDiscriminatorValue); } }, {"teamsApp", n => { TeamsApp = n.GetObjectValue(Microsoft.Graph.Models.TeamsApp.CreateFromDiscriminatorValue); } }, {"teamsAppDefinition", n => { TeamsAppDefinition = n.GetObjectValue(Microsoft.Graph.Models.TeamsAppDefinition.CreateFromDiscriminatorValue); } }, }; @@ -61,6 +76,7 @@ public Microsoft.Graph.Models.TeamsAppDefinition TeamsAppDefinition { public new void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); + writer.WriteObjectValue("consentedPermissionSet", ConsentedPermissionSet); writer.WriteObjectValue("teamsApp", TeamsApp); writer.WriteObjectValue("teamsAppDefinition", TeamsAppDefinition); } diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppPermissionSet.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppPermissionSet.cs new file mode 100644 index 00000000000..6bcec972bb6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppPermissionSet.cs @@ -0,0 +1,79 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class TeamsAppPermissionSet : 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 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 resourceSpecificPermissions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ResourceSpecificPermissions { + get { return BackingStore?.Get?>("resourceSpecificPermissions"); } + set { BackingStore?.Set("resourceSpecificPermissions", value); } + } +#nullable restore +#else + public List ResourceSpecificPermissions { + get { return BackingStore?.Get>("resourceSpecificPermissions"); } + set { BackingStore?.Set("resourceSpecificPermissions", value); } + } +#endif + /// + /// Instantiates a new teamsAppPermissionSet and sets the default values. + /// + public TeamsAppPermissionSet() { + 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 TeamsAppPermissionSet CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new TeamsAppPermissionSet(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"resourceSpecificPermissions", n => { ResourceSpecificPermissions = n.GetCollectionOfObjectValues(TeamsAppResourceSpecificPermission.CreateFromDiscriminatorValue)?.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.WriteStringValue("@odata.type", OdataType); + writer.WriteCollectionOfObjectValues("resourceSpecificPermissions", ResourceSpecificPermissions); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppResourceSpecificPermission.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppResourceSpecificPermission.cs new file mode 100644 index 00000000000..7e9cc68d58e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppResourceSpecificPermission.cs @@ -0,0 +1,86 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class TeamsAppResourceSpecificPermission : 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 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 permissionType property + public TeamsAppResourceSpecificPermissionType? PermissionType { + get { return BackingStore?.Get("permissionType"); } + set { BackingStore?.Set("permissionType", value); } + } + /// The permissionValue property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PermissionValue { + get { return BackingStore?.Get("permissionValue"); } + set { BackingStore?.Set("permissionValue", value); } + } +#nullable restore +#else + public string PermissionValue { + get { return BackingStore?.Get("permissionValue"); } + set { BackingStore?.Set("permissionValue", value); } + } +#endif + /// + /// Instantiates a new teamsAppResourceSpecificPermission and sets the default values. + /// + public TeamsAppResourceSpecificPermission() { + 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 TeamsAppResourceSpecificPermission CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new TeamsAppResourceSpecificPermission(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"permissionType", n => { PermissionType = n.GetEnumValue(); } }, + {"permissionValue", n => { PermissionValue = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteEnumValue("permissionType", PermissionType); + writer.WriteStringValue("permissionValue", PermissionValue); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppResourceSpecificPermissionType.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppResourceSpecificPermissionType.cs new file mode 100644 index 00000000000..fb00b8cf92b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppResourceSpecificPermissionType.cs @@ -0,0 +1,12 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum TeamsAppResourceSpecificPermissionType { + [EnumMember(Value = "delegated")] + Delegated, + [EnumMember(Value = "application")] + Application, + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/User.cs b/src/Microsoft.Graph/Generated/Models/User.cs index 4190f0fe7e5..9e349eb2f0a 100644 --- a/src/Microsoft.Graph/Generated/Models/User.cs +++ b/src/Microsoft.Graph/Generated/Models/User.cs @@ -430,6 +430,20 @@ public List Drives { get { return BackingStore?.Get>("drives"); } set { BackingStore?.Set("drives", value); } } +#endif + /// The employeeExperience property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public EmployeeExperienceUser? EmployeeExperience { + get { return BackingStore?.Get("employeeExperience"); } + set { BackingStore?.Set("employeeExperience", value); } + } +#nullable restore +#else + public EmployeeExperienceUser EmployeeExperience { + get { return BackingStore?.Get("employeeExperience"); } + set { BackingStore?.Set("employeeExperience", value); } + } #endif /// The date and time when the user was hired or will start work in case of a future hire. Returned only on $select. Supports $filter (eq, ne, not , ge, le, in). public DateTimeOffset? EmployeeHireDate { @@ -1625,6 +1639,7 @@ public User() : base() { {"displayName", n => { DisplayName = n.GetStringValue(); } }, {"drive", n => { Drive = n.GetObjectValue(Microsoft.Graph.Models.Drive.CreateFromDiscriminatorValue); } }, {"drives", n => { Drives = n.GetCollectionOfObjectValues(Microsoft.Graph.Models.Drive.CreateFromDiscriminatorValue)?.ToList(); } }, + {"employeeExperience", n => { EmployeeExperience = n.GetObjectValue(EmployeeExperienceUser.CreateFromDiscriminatorValue); } }, {"employeeHireDate", n => { EmployeeHireDate = n.GetDateTimeOffsetValue(); } }, {"employeeId", n => { EmployeeId = n.GetStringValue(); } }, {"employeeLeaveDateTime", n => { EmployeeLeaveDateTime = n.GetDateTimeOffsetValue(); } }, @@ -1755,6 +1770,7 @@ public User() : base() { writer.WriteStringValue("displayName", DisplayName); writer.WriteObjectValue("drive", Drive); writer.WriteCollectionOfObjectValues("drives", Drives); + writer.WriteObjectValue("employeeExperience", EmployeeExperience); writer.WriteDateTimeOffsetValue("employeeHireDate", EmployeeHireDate); writer.WriteStringValue("employeeId", EmployeeId); writer.WriteDateTimeOffsetValue("employeeLeaveDateTime", EmployeeLeaveDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/UserDefaultAuthenticationMethod.cs b/src/Microsoft.Graph/Generated/Models/UserDefaultAuthenticationMethod.cs new file mode 100644 index 00000000000..8c3ddc91ae9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserDefaultAuthenticationMethod.cs @@ -0,0 +1,22 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum UserDefaultAuthenticationMethod { + [EnumMember(Value = "push")] + Push, + [EnumMember(Value = "oath")] + Oath, + [EnumMember(Value = "voiceMobile")] + VoiceMobile, + [EnumMember(Value = "voiceAlternateMobile")] + VoiceAlternateMobile, + [EnumMember(Value = "voiceOffice")] + VoiceOffice, + [EnumMember(Value = "sms")] + Sms, + [EnumMember(Value = "none")] + None, + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails.cs new file mode 100644 index 00000000000..0e132122cbc --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails.cs @@ -0,0 +1,127 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + /// + /// The user experience analytics application performance entity contains application performance by application version details. + /// + public class UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails : Entity, IParsable { + /// The number of crashes for the app. Valid values -2147483648 to 2147483647 + public int? AppCrashCount { + get { return BackingStore?.Get("appCrashCount"); } + set { BackingStore?.Set("appCrashCount", value); } + } + /// The friendly name of the application. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AppDisplayName { + get { return BackingStore?.Get("appDisplayName"); } + set { BackingStore?.Set("appDisplayName", value); } + } +#nullable restore +#else + public string AppDisplayName { + get { return BackingStore?.Get("appDisplayName"); } + set { BackingStore?.Set("appDisplayName", value); } + } +#endif + /// The name of the application. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AppName { + get { return BackingStore?.Get("appName"); } + set { BackingStore?.Set("appName", value); } + } +#nullable restore +#else + public string AppName { + get { return BackingStore?.Get("appName"); } + set { BackingStore?.Set("appName", value); } + } +#endif + /// The publisher of the application. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AppPublisher { + get { return BackingStore?.Get("appPublisher"); } + set { BackingStore?.Set("appPublisher", value); } + } +#nullable restore +#else + public string AppPublisher { + get { return BackingStore?.Get("appPublisher"); } + set { BackingStore?.Set("appPublisher", value); } + } +#endif + /// The version of the application. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AppVersion { + get { return BackingStore?.Get("appVersion"); } + set { BackingStore?.Set("appVersion", value); } + } +#nullable restore +#else + public string AppVersion { + get { return BackingStore?.Get("appVersion"); } + set { BackingStore?.Set("appVersion", value); } + } +#endif + /// The total number of devices that have reported one or more application crashes for this application and version. Valid values 0 to 2147483647. Supports: $select, $OrderBy. Read-only. Valid values -2147483648 to 2147483647 + public int? DeviceCountWithCrashes { + get { return BackingStore?.Get("deviceCountWithCrashes"); } + set { BackingStore?.Set("deviceCountWithCrashes", value); } + } + /// When TRUE, indicates the version of application is the latest version for that application that is in use. When FALSE, indicates the version is not the latest version. FALSE by default. Supports: $select, $OrderBy. + public bool? IsLatestUsedVersion { + get { return BackingStore?.Get("isLatestUsedVersion"); } + set { BackingStore?.Set("isLatestUsedVersion", value); } + } + /// When TRUE, indicates the version of application is the most used version for that application. When FALSE, indicates the version is not the most used version. FALSE by default. Supports: $select, $OrderBy. Read-only. + public bool? IsMostUsedVersion { + get { return BackingStore?.Get("isMostUsedVersion"); } + set { BackingStore?.Set("isMostUsedVersion", 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 UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"appCrashCount", n => { AppCrashCount = n.GetIntValue(); } }, + {"appDisplayName", n => { AppDisplayName = n.GetStringValue(); } }, + {"appName", n => { AppName = n.GetStringValue(); } }, + {"appPublisher", n => { AppPublisher = n.GetStringValue(); } }, + {"appVersion", n => { AppVersion = n.GetStringValue(); } }, + {"deviceCountWithCrashes", n => { DeviceCountWithCrashes = n.GetIntValue(); } }, + {"isLatestUsedVersion", n => { IsLatestUsedVersion = n.GetBoolValue(); } }, + {"isMostUsedVersion", n => { IsMostUsedVersion = 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.WriteIntValue("appCrashCount", AppCrashCount); + writer.WriteStringValue("appDisplayName", AppDisplayName); + writer.WriteStringValue("appName", AppName); + writer.WriteStringValue("appPublisher", AppPublisher); + writer.WriteStringValue("appVersion", AppVersion); + writer.WriteIntValue("deviceCountWithCrashes", DeviceCountWithCrashes); + writer.WriteBoolValue("isLatestUsedVersion", IsLatestUsedVersion); + writer.WriteBoolValue("isMostUsedVersion", IsMostUsedVersion); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsCollectionResponse.cs new file mode 100644 index 00000000000..72f3a262d90 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsCollectionResponse : 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 UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails.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/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId.cs new file mode 100644 index 00000000000..10e087eeeb4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId.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 { + /// + /// The user experience analytics application performance entity contains application performance by application version device id. + /// + public class UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId : Entity, IParsable { + /// The number of crashes for the app. Valid values -2147483648 to 2147483647 + public int? AppCrashCount { + get { return BackingStore?.Get("appCrashCount"); } + set { BackingStore?.Set("appCrashCount", value); } + } + /// The friendly name of the application. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AppDisplayName { + get { return BackingStore?.Get("appDisplayName"); } + set { BackingStore?.Set("appDisplayName", value); } + } +#nullable restore +#else + public string AppDisplayName { + get { return BackingStore?.Get("appDisplayName"); } + set { BackingStore?.Set("appDisplayName", value); } + } +#endif + /// The name of the application. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AppName { + get { return BackingStore?.Get("appName"); } + set { BackingStore?.Set("appName", value); } + } +#nullable restore +#else + public string AppName { + get { return BackingStore?.Get("appName"); } + set { BackingStore?.Set("appName", value); } + } +#endif + /// The publisher of the application. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AppPublisher { + get { return BackingStore?.Get("appPublisher"); } + set { BackingStore?.Set("appPublisher", value); } + } +#nullable restore +#else + public string AppPublisher { + get { return BackingStore?.Get("appPublisher"); } + set { BackingStore?.Set("appPublisher", value); } + } +#endif + /// The version of the application. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AppVersion { + get { return BackingStore?.Get("appVersion"); } + set { BackingStore?.Set("appVersion", value); } + } +#nullable restore +#else + public string AppVersion { + get { return BackingStore?.Get("appVersion"); } + set { BackingStore?.Set("appVersion", value); } + } +#endif + /// The name of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeviceDisplayName { + get { return BackingStore?.Get("deviceDisplayName"); } + set { BackingStore?.Set("deviceDisplayName", value); } + } +#nullable restore +#else + public string DeviceDisplayName { + get { return BackingStore?.Get("deviceDisplayName"); } + set { BackingStore?.Set("deviceDisplayName", value); } + } +#endif + /// The Intune device id of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeviceId { + get { return BackingStore?.Get("deviceId"); } + set { BackingStore?.Set("deviceId", value); } + } +#nullable restore +#else + public string DeviceId { + get { return BackingStore?.Get("deviceId"); } + set { BackingStore?.Set("deviceId", value); } + } +#endif + /// The date and time when the statistics were last computed. The value cannot be modified and is automatically populated when the statistics are computed. 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, 2022 would look like this: '2022-01-01T00:00:00Z'. Returned by default. Read-only. + public DateTimeOffset? ProcessedDateTime { + get { return BackingStore?.Get("processedDateTime"); } + set { BackingStore?.Set("processedDateTime", 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 UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"appCrashCount", n => { AppCrashCount = n.GetIntValue(); } }, + {"appDisplayName", n => { AppDisplayName = n.GetStringValue(); } }, + {"appName", n => { AppName = n.GetStringValue(); } }, + {"appPublisher", n => { AppPublisher = n.GetStringValue(); } }, + {"appVersion", n => { AppVersion = n.GetStringValue(); } }, + {"deviceDisplayName", n => { DeviceDisplayName = n.GetStringValue(); } }, + {"deviceId", n => { DeviceId = n.GetStringValue(); } }, + {"processedDateTime", n => { ProcessedDateTime = 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.WriteIntValue("appCrashCount", AppCrashCount); + writer.WriteStringValue("appDisplayName", AppDisplayName); + writer.WriteStringValue("appName", AppName); + writer.WriteStringValue("appPublisher", AppPublisher); + writer.WriteStringValue("appVersion", AppVersion); + writer.WriteStringValue("deviceDisplayName", DeviceDisplayName); + writer.WriteStringValue("deviceId", DeviceId); + writer.WriteDateTimeOffsetValue("processedDateTime", ProcessedDateTime); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdCollectionResponse.cs new file mode 100644 index 00000000000..d39eeff0640 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdCollectionResponse : 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 UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId.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/UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion.cs new file mode 100644 index 00000000000..e39b49c4175 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion.cs @@ -0,0 +1,143 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + /// + /// The user experience analytics application performance entity contains app performance details by OS version. + /// + public class UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion : Entity, IParsable { + /// The number of devices where the application has been active. Valid values 0 to 2147483647. Supports: $select, $OrderBy. Read-only. Valid values -2147483648 to 2147483647 + public int? ActiveDeviceCount { + get { return BackingStore?.Get("activeDeviceCount"); } + set { BackingStore?.Set("activeDeviceCount", value); } + } + /// The number of crashes for the application. Valid values 0 to 2147483647. Supports: $select, $OrderBy. Read-only. Valid values -2147483648 to 2147483647 + public int? AppCrashCount { + get { return BackingStore?.Get("appCrashCount"); } + set { BackingStore?.Set("appCrashCount", value); } + } + /// The friendly name of the application. Possible values are: Outlook, Excel. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AppDisplayName { + get { return BackingStore?.Get("appDisplayName"); } + set { BackingStore?.Set("appDisplayName", value); } + } +#nullable restore +#else + public string AppDisplayName { + get { return BackingStore?.Get("appDisplayName"); } + set { BackingStore?.Set("appDisplayName", value); } + } +#endif + /// The name of the application. Possible values are: outlook.exe, excel.exe. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AppName { + get { return BackingStore?.Get("appName"); } + set { BackingStore?.Set("appName", value); } + } +#nullable restore +#else + public string AppName { + get { return BackingStore?.Get("appName"); } + set { BackingStore?.Set("appName", value); } + } +#endif + /// The publisher of the application. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AppPublisher { + get { return BackingStore?.Get("appPublisher"); } + set { BackingStore?.Set("appPublisher", value); } + } +#nullable restore +#else + public string AppPublisher { + get { return BackingStore?.Get("appPublisher"); } + set { BackingStore?.Set("appPublisher", value); } + } +#endif + /// The total usage time of the application in minutes. Valid values 0 to 2147483647. Supports: $select, $OrderBy. Read-only. Valid values -2147483648 to 2147483647 + public int? AppUsageDuration { + get { return BackingStore?.Get("appUsageDuration"); } + set { BackingStore?.Set("appUsageDuration", value); } + } + /// The mean time to failure for the application in minutes. Valid values 0 to 2147483647. Supports: $select, $OrderBy. Read-only. Valid values -2147483648 to 2147483647 + public int? MeanTimeToFailureInMinutes { + get { return BackingStore?.Get("meanTimeToFailureInMinutes"); } + set { BackingStore?.Set("meanTimeToFailureInMinutes", value); } + } + /// The OS build number of the application. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OsBuildNumber { + get { return BackingStore?.Get("osBuildNumber"); } + set { BackingStore?.Set("osBuildNumber", value); } + } +#nullable restore +#else + public string OsBuildNumber { + get { return BackingStore?.Get("osBuildNumber"); } + set { BackingStore?.Set("osBuildNumber", value); } + } +#endif + /// The OS version of the application. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OsVersion { + get { return BackingStore?.Get("osVersion"); } + set { BackingStore?.Set("osVersion", value); } + } +#nullable restore +#else + public string OsVersion { + get { return BackingStore?.Get("osVersion"); } + set { BackingStore?.Set("osVersion", 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 UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"activeDeviceCount", n => { ActiveDeviceCount = n.GetIntValue(); } }, + {"appCrashCount", n => { AppCrashCount = n.GetIntValue(); } }, + {"appDisplayName", n => { AppDisplayName = n.GetStringValue(); } }, + {"appName", n => { AppName = n.GetStringValue(); } }, + {"appPublisher", n => { AppPublisher = n.GetStringValue(); } }, + {"appUsageDuration", n => { AppUsageDuration = n.GetIntValue(); } }, + {"meanTimeToFailureInMinutes", n => { MeanTimeToFailureInMinutes = n.GetIntValue(); } }, + {"osBuildNumber", n => { OsBuildNumber = n.GetStringValue(); } }, + {"osVersion", n => { OsVersion = 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.WriteIntValue("activeDeviceCount", ActiveDeviceCount); + writer.WriteIntValue("appCrashCount", AppCrashCount); + writer.WriteStringValue("appDisplayName", AppDisplayName); + writer.WriteStringValue("appName", AppName); + writer.WriteStringValue("appPublisher", AppPublisher); + writer.WriteIntValue("appUsageDuration", AppUsageDuration); + writer.WriteIntValue("meanTimeToFailureInMinutes", MeanTimeToFailureInMinutes); + writer.WriteStringValue("osBuildNumber", OsBuildNumber); + writer.WriteStringValue("osVersion", OsVersion); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionCollectionResponse.cs new file mode 100644 index 00000000000..ff6840364b0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionCollectionResponse : 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 UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion.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/UserExperienceAnalyticsAppHealthApplicationPerformance.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthApplicationPerformance.cs new file mode 100644 index 00000000000..ef0df7f5e16 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthApplicationPerformance.cs @@ -0,0 +1,125 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + /// + /// The user experience analytics application performance entity contains application performance details. + /// + public class UserExperienceAnalyticsAppHealthApplicationPerformance : Entity, IParsable { + /// The health score of the application. Valid values 0 to 100. Supports: $filter, $select, $OrderBy. Read-only. Valid values -2147483648 to 2147483647 + public int? ActiveDeviceCount { + get { return BackingStore?.Get("activeDeviceCount"); } + set { BackingStore?.Set("activeDeviceCount", value); } + } + /// The number of crashes for the application. Valid values 0 to 2147483647. Supports: $select, $OrderBy. Read-only. Valid values -2147483648 to 2147483647 + public int? AppCrashCount { + get { return BackingStore?.Get("appCrashCount"); } + set { BackingStore?.Set("appCrashCount", value); } + } + /// The friendly name of the application. Possible values are: Outlook, Excel. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AppDisplayName { + get { return BackingStore?.Get("appDisplayName"); } + set { BackingStore?.Set("appDisplayName", value); } + } +#nullable restore +#else + public string AppDisplayName { + get { return BackingStore?.Get("appDisplayName"); } + set { BackingStore?.Set("appDisplayName", value); } + } +#endif + /// The number of hangs for the application. Supports: $select, $OrderBy. Read-only. Valid values -2147483648 to 2147483647 + public int? AppHangCount { + get { return BackingStore?.Get("appHangCount"); } + set { BackingStore?.Set("appHangCount", value); } + } + /// The health score of the application. Valid values 0 to 100. Supports: $filter, $select, $OrderBy. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? AppHealthScore { + get { return BackingStore?.Get("appHealthScore"); } + set { BackingStore?.Set("appHealthScore", value); } + } + /// The name of the application. Possible values are: outlook.exe, excel.exe. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AppName { + get { return BackingStore?.Get("appName"); } + set { BackingStore?.Set("appName", value); } + } +#nullable restore +#else + public string AppName { + get { return BackingStore?.Get("appName"); } + set { BackingStore?.Set("appName", value); } + } +#endif + /// The publisher of the application. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AppPublisher { + get { return BackingStore?.Get("appPublisher"); } + set { BackingStore?.Set("appPublisher", value); } + } +#nullable restore +#else + public string AppPublisher { + get { return BackingStore?.Get("appPublisher"); } + set { BackingStore?.Set("appPublisher", value); } + } +#endif + /// The total usage time of the application in minutes. Valid values 0 to 2147483647. Supports: $select, $OrderBy. Read-only. Valid values -2147483648 to 2147483647 + public int? AppUsageDuration { + get { return BackingStore?.Get("appUsageDuration"); } + set { BackingStore?.Set("appUsageDuration", value); } + } + /// The mean time to failure for the application in minutes. Valid values 0 to 2147483647. Supports: $select, $OrderBy. Read-only. Valid values -2147483648 to 2147483647 + public int? MeanTimeToFailureInMinutes { + get { return BackingStore?.Get("meanTimeToFailureInMinutes"); } + set { BackingStore?.Set("meanTimeToFailureInMinutes", 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 UserExperienceAnalyticsAppHealthApplicationPerformance CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsAppHealthApplicationPerformance(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"activeDeviceCount", n => { ActiveDeviceCount = n.GetIntValue(); } }, + {"appCrashCount", n => { AppCrashCount = n.GetIntValue(); } }, + {"appDisplayName", n => { AppDisplayName = n.GetStringValue(); } }, + {"appHangCount", n => { AppHangCount = n.GetIntValue(); } }, + {"appHealthScore", n => { AppHealthScore = n.GetDoubleValue(); } }, + {"appName", n => { AppName = n.GetStringValue(); } }, + {"appPublisher", n => { AppPublisher = n.GetStringValue(); } }, + {"appUsageDuration", n => { AppUsageDuration = n.GetIntValue(); } }, + {"meanTimeToFailureInMinutes", n => { MeanTimeToFailureInMinutes = n.GetIntValue(); } }, + }; + } + /// + /// 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.WriteIntValue("activeDeviceCount", ActiveDeviceCount); + writer.WriteIntValue("appCrashCount", AppCrashCount); + writer.WriteStringValue("appDisplayName", AppDisplayName); + writer.WriteIntValue("appHangCount", AppHangCount); + writer.WriteDoubleValue("appHealthScore", AppHealthScore); + writer.WriteStringValue("appName", AppName); + writer.WriteStringValue("appPublisher", AppPublisher); + writer.WriteIntValue("appUsageDuration", AppUsageDuration); + writer.WriteIntValue("meanTimeToFailureInMinutes", MeanTimeToFailureInMinutes); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthApplicationPerformanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthApplicationPerformanceCollectionResponse.cs new file mode 100644 index 00000000000..b5a139b2ca4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthApplicationPerformanceCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserExperienceAnalyticsAppHealthApplicationPerformanceCollectionResponse : 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 UserExperienceAnalyticsAppHealthApplicationPerformanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsAppHealthApplicationPerformanceCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(UserExperienceAnalyticsAppHealthApplicationPerformance.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/UserExperienceAnalyticsAppHealthDeviceModelPerformance.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDeviceModelPerformance.cs new file mode 100644 index 00000000000..1c7cd1a8e34 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDeviceModelPerformance.cs @@ -0,0 +1,95 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + /// + /// The user experience analytics device model performance entity contains device model performance details. + /// + public class UserExperienceAnalyticsAppHealthDeviceModelPerformance : Entity, IParsable { + /// The number of active devices for the model. Valid values 0 to 2147483647. Supports: $filter, $select, $OrderBy. Read-only. Valid values -2147483648 to 2147483647 + public int? ActiveDeviceCount { + get { return BackingStore?.Get("activeDeviceCount"); } + set { BackingStore?.Set("activeDeviceCount", value); } + } + /// The manufacturer name of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeviceManufacturer { + get { return BackingStore?.Get("deviceManufacturer"); } + set { BackingStore?.Set("deviceManufacturer", value); } + } +#nullable restore +#else + public string DeviceManufacturer { + get { return BackingStore?.Get("deviceManufacturer"); } + set { BackingStore?.Set("deviceManufacturer", value); } + } +#endif + /// The model name of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeviceModel { + get { return BackingStore?.Get("deviceModel"); } + set { BackingStore?.Set("deviceModel", value); } + } +#nullable restore +#else + public string DeviceModel { + get { return BackingStore?.Get("deviceModel"); } + set { BackingStore?.Set("deviceModel", value); } + } +#endif + /// The healthStatus property + public UserExperienceAnalyticsHealthState? HealthStatus { + get { return BackingStore?.Get("healthStatus"); } + set { BackingStore?.Set("healthStatus", value); } + } + /// The mean time to failure for the application in minutes. Valid values 0 to 2147483647. Supports: $filter, $select, $OrderBy. Read-only. Valid values -2147483648 to 2147483647 + public int? MeanTimeToFailureInMinutes { + get { return BackingStore?.Get("meanTimeToFailureInMinutes"); } + set { BackingStore?.Set("meanTimeToFailureInMinutes", value); } + } + /// The application health score of the device model. Valid values 0 to 100. Supports: $filter, $select, $OrderBy. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? ModelAppHealthScore { + get { return BackingStore?.Get("modelAppHealthScore"); } + set { BackingStore?.Set("modelAppHealthScore", 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 UserExperienceAnalyticsAppHealthDeviceModelPerformance CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsAppHealthDeviceModelPerformance(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"activeDeviceCount", n => { ActiveDeviceCount = n.GetIntValue(); } }, + {"deviceManufacturer", n => { DeviceManufacturer = n.GetStringValue(); } }, + {"deviceModel", n => { DeviceModel = n.GetStringValue(); } }, + {"healthStatus", n => { HealthStatus = n.GetEnumValue(); } }, + {"meanTimeToFailureInMinutes", n => { MeanTimeToFailureInMinutes = n.GetIntValue(); } }, + {"modelAppHealthScore", n => { ModelAppHealthScore = n.GetDoubleValue(); } }, + }; + } + /// + /// 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.WriteIntValue("activeDeviceCount", ActiveDeviceCount); + writer.WriteStringValue("deviceManufacturer", DeviceManufacturer); + writer.WriteStringValue("deviceModel", DeviceModel); + writer.WriteEnumValue("healthStatus", HealthStatus); + writer.WriteIntValue("meanTimeToFailureInMinutes", MeanTimeToFailureInMinutes); + writer.WriteDoubleValue("modelAppHealthScore", ModelAppHealthScore); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDeviceModelPerformanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDeviceModelPerformanceCollectionResponse.cs new file mode 100644 index 00000000000..3f64d2b0837 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDeviceModelPerformanceCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserExperienceAnalyticsAppHealthDeviceModelPerformanceCollectionResponse : 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 UserExperienceAnalyticsAppHealthDeviceModelPerformanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsAppHealthDeviceModelPerformanceCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(UserExperienceAnalyticsAppHealthDeviceModelPerformance.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/UserExperienceAnalyticsAppHealthDevicePerformance.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformance.cs new file mode 100644 index 00000000000..ad2cfb91b54 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformance.cs @@ -0,0 +1,148 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + /// + /// The user experience analytics device performance entity contains device performance details. + /// + public class UserExperienceAnalyticsAppHealthDevicePerformance : Entity, IParsable { + /// The number of application crashes for the device. Valid values 0 to 2147483647. Supports: $filter, $select, $OrderBy. Read-only. Valid values -2147483648 to 2147483647 + public int? AppCrashCount { + get { return BackingStore?.Get("appCrashCount"); } + set { BackingStore?.Set("appCrashCount", value); } + } + /// The number of application hangs for the device. Valid values 0 to 2147483647. Supports: $select, $OrderBy. Read-only. Valid values -2147483648 to 2147483647 + public int? AppHangCount { + get { return BackingStore?.Get("appHangCount"); } + set { BackingStore?.Set("appHangCount", value); } + } + /// The number of distinct application crashes for the device. Valid values 0 to 2147483647. Supports: $select, $OrderBy. Read-only. Valid values -2147483648 to 2147483647 + public int? CrashedAppCount { + get { return BackingStore?.Get("crashedAppCount"); } + set { BackingStore?.Set("crashedAppCount", value); } + } + /// The application health score of the device. Valid values 0 to 100. Supports: $filter, $select, $OrderBy. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? DeviceAppHealthScore { + get { return BackingStore?.Get("deviceAppHealthScore"); } + set { BackingStore?.Set("deviceAppHealthScore", value); } + } + /// The name of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeviceDisplayName { + get { return BackingStore?.Get("deviceDisplayName"); } + set { BackingStore?.Set("deviceDisplayName", value); } + } +#nullable restore +#else + public string DeviceDisplayName { + get { return BackingStore?.Get("deviceDisplayName"); } + set { BackingStore?.Set("deviceDisplayName", value); } + } +#endif + /// The Intune device id of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeviceId { + get { return BackingStore?.Get("deviceId"); } + set { BackingStore?.Set("deviceId", value); } + } +#nullable restore +#else + public string DeviceId { + get { return BackingStore?.Get("deviceId"); } + set { BackingStore?.Set("deviceId", value); } + } +#endif + /// The manufacturer name of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeviceManufacturer { + get { return BackingStore?.Get("deviceManufacturer"); } + set { BackingStore?.Set("deviceManufacturer", value); } + } +#nullable restore +#else + public string DeviceManufacturer { + get { return BackingStore?.Get("deviceManufacturer"); } + set { BackingStore?.Set("deviceManufacturer", value); } + } +#endif + /// The model name of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeviceModel { + get { return BackingStore?.Get("deviceModel"); } + set { BackingStore?.Set("deviceModel", value); } + } +#nullable restore +#else + public string DeviceModel { + get { return BackingStore?.Get("deviceModel"); } + set { BackingStore?.Set("deviceModel", value); } + } +#endif + /// The healthStatus property + public UserExperienceAnalyticsHealthState? HealthStatus { + get { return BackingStore?.Get("healthStatus"); } + set { BackingStore?.Set("healthStatus", value); } + } + /// The mean time to failure for the application in minutes. Valid values 0 to 2147483647. Supports: $filter, $select, $OrderBy. Read-only. Valid values -2147483648 to 2147483647 + public int? MeanTimeToFailureInMinutes { + get { return BackingStore?.Get("meanTimeToFailureInMinutes"); } + set { BackingStore?.Set("meanTimeToFailureInMinutes", value); } + } + /// The date and time when the statistics were last computed. The value cannot be modified and is automatically populated when the statistics are computed. 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, 2022 would look like this: '2022-01-01T00:00:00Z'. Returned by default. Read-only. + public DateTimeOffset? ProcessedDateTime { + get { return BackingStore?.Get("processedDateTime"); } + set { BackingStore?.Set("processedDateTime", 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 UserExperienceAnalyticsAppHealthDevicePerformance CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsAppHealthDevicePerformance(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"appCrashCount", n => { AppCrashCount = n.GetIntValue(); } }, + {"appHangCount", n => { AppHangCount = n.GetIntValue(); } }, + {"crashedAppCount", n => { CrashedAppCount = n.GetIntValue(); } }, + {"deviceAppHealthScore", n => { DeviceAppHealthScore = n.GetDoubleValue(); } }, + {"deviceDisplayName", n => { DeviceDisplayName = n.GetStringValue(); } }, + {"deviceId", n => { DeviceId = n.GetStringValue(); } }, + {"deviceManufacturer", n => { DeviceManufacturer = n.GetStringValue(); } }, + {"deviceModel", n => { DeviceModel = n.GetStringValue(); } }, + {"healthStatus", n => { HealthStatus = n.GetEnumValue(); } }, + {"meanTimeToFailureInMinutes", n => { MeanTimeToFailureInMinutes = n.GetIntValue(); } }, + {"processedDateTime", n => { ProcessedDateTime = 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.WriteIntValue("appCrashCount", AppCrashCount); + writer.WriteIntValue("appHangCount", AppHangCount); + writer.WriteIntValue("crashedAppCount", CrashedAppCount); + writer.WriteDoubleValue("deviceAppHealthScore", DeviceAppHealthScore); + writer.WriteStringValue("deviceDisplayName", DeviceDisplayName); + writer.WriteStringValue("deviceId", DeviceId); + writer.WriteStringValue("deviceManufacturer", DeviceManufacturer); + writer.WriteStringValue("deviceModel", DeviceModel); + writer.WriteEnumValue("healthStatus", HealthStatus); + writer.WriteIntValue("meanTimeToFailureInMinutes", MeanTimeToFailureInMinutes); + writer.WriteDateTimeOffsetValue("processedDateTime", ProcessedDateTime); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformanceCollectionResponse.cs new file mode 100644 index 00000000000..7cd985da527 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformanceCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserExperienceAnalyticsAppHealthDevicePerformanceCollectionResponse : 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 UserExperienceAnalyticsAppHealthDevicePerformanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsAppHealthDevicePerformanceCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(UserExperienceAnalyticsAppHealthDevicePerformance.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/UserExperienceAnalyticsAppHealthDevicePerformanceDetails.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformanceDetails.cs new file mode 100644 index 00000000000..b4302bdcc5f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformanceDetails.cs @@ -0,0 +1,138 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + /// + /// The user experience analytics device performance entity contains device performance details. + /// + public class UserExperienceAnalyticsAppHealthDevicePerformanceDetails : Entity, IParsable { + /// The friendly name of the application for which the event occurred. Possible values are: outlook.exe, excel.exe. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AppDisplayName { + get { return BackingStore?.Get("appDisplayName"); } + set { BackingStore?.Set("appDisplayName", value); } + } +#nullable restore +#else + public string AppDisplayName { + get { return BackingStore?.Get("appDisplayName"); } + set { BackingStore?.Set("appDisplayName", value); } + } +#endif + /// The publisher of the application. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AppPublisher { + get { return BackingStore?.Get("appPublisher"); } + set { BackingStore?.Set("appPublisher", value); } + } +#nullable restore +#else + public string AppPublisher { + get { return BackingStore?.Get("appPublisher"); } + set { BackingStore?.Set("appPublisher", value); } + } +#endif + /// The version of the application. Possible values are: 1.0.0.1, 75.65.23.9. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AppVersion { + get { return BackingStore?.Get("appVersion"); } + set { BackingStore?.Set("appVersion", value); } + } +#nullable restore +#else + public string AppVersion { + get { return BackingStore?.Get("appVersion"); } + set { BackingStore?.Set("appVersion", value); } + } +#endif + /// The name of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeviceDisplayName { + get { return BackingStore?.Get("deviceDisplayName"); } + set { BackingStore?.Set("deviceDisplayName", value); } + } +#nullable restore +#else + public string DeviceDisplayName { + get { return BackingStore?.Get("deviceDisplayName"); } + set { BackingStore?.Set("deviceDisplayName", value); } + } +#endif + /// The Intune device id of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeviceId { + get { return BackingStore?.Get("deviceId"); } + set { BackingStore?.Set("deviceId", value); } + } +#nullable restore +#else + public string DeviceId { + get { return BackingStore?.Get("deviceId"); } + set { BackingStore?.Set("deviceId", value); } + } +#endif + /// The time the event occurred. The value cannot be modified and is automatically populated when the statistics are computed. 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, 2022 would look like this: '2022-01-01T00:00:00Z'. Returned by default. Read-only. + public DateTimeOffset? EventDateTime { + get { return BackingStore?.Get("eventDateTime"); } + set { BackingStore?.Set("eventDateTime", value); } + } + /// The type of the event. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventType { + get { return BackingStore?.Get("eventType"); } + set { BackingStore?.Set("eventType", value); } + } +#nullable restore +#else + public string EventType { + get { return BackingStore?.Get("eventType"); } + set { BackingStore?.Set("eventType", 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 UserExperienceAnalyticsAppHealthDevicePerformanceDetails CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsAppHealthDevicePerformanceDetails(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"appDisplayName", n => { AppDisplayName = n.GetStringValue(); } }, + {"appPublisher", n => { AppPublisher = n.GetStringValue(); } }, + {"appVersion", n => { AppVersion = n.GetStringValue(); } }, + {"deviceDisplayName", n => { DeviceDisplayName = n.GetStringValue(); } }, + {"deviceId", n => { DeviceId = n.GetStringValue(); } }, + {"eventDateTime", n => { EventDateTime = n.GetDateTimeOffsetValue(); } }, + {"eventType", n => { EventType = 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.WriteStringValue("appDisplayName", AppDisplayName); + writer.WriteStringValue("appPublisher", AppPublisher); + writer.WriteStringValue("appVersion", AppVersion); + writer.WriteStringValue("deviceDisplayName", DeviceDisplayName); + writer.WriteStringValue("deviceId", DeviceId); + writer.WriteDateTimeOffsetValue("eventDateTime", EventDateTime); + writer.WriteStringValue("eventType", EventType); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformanceDetailsCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformanceDetailsCollectionResponse.cs new file mode 100644 index 00000000000..12b2e308b44 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformanceDetailsCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserExperienceAnalyticsAppHealthDevicePerformanceDetailsCollectionResponse : 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 UserExperienceAnalyticsAppHealthDevicePerformanceDetailsCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsAppHealthDevicePerformanceDetailsCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(UserExperienceAnalyticsAppHealthDevicePerformanceDetails.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/UserExperienceAnalyticsAppHealthOSVersionPerformance.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthOSVersionPerformance.cs new file mode 100644 index 00000000000..d5961e57c1b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthOSVersionPerformance.cs @@ -0,0 +1,88 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + /// + /// The user experience analytics device OS version performance entity contains OS version performance details. + /// + public class UserExperienceAnalyticsAppHealthOSVersionPerformance : Entity, IParsable { + /// The number of active devices for the OS version. Valid values 0 to 2147483647. Supports: $filter, $select, $OrderBy. Read-only. Valid values -2147483648 to 2147483647 + public int? ActiveDeviceCount { + get { return BackingStore?.Get("activeDeviceCount"); } + set { BackingStore?.Set("activeDeviceCount", value); } + } + /// The mean time to failure for the application in minutes. Valid values 0 to 2147483647. Supports: $filter, $select, $OrderBy. Read-only. Valid values -2147483648 to 2147483647 + public int? MeanTimeToFailureInMinutes { + get { return BackingStore?.Get("meanTimeToFailureInMinutes"); } + set { BackingStore?.Set("meanTimeToFailureInMinutes", value); } + } + /// The OS build number installed on the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OsBuildNumber { + get { return BackingStore?.Get("osBuildNumber"); } + set { BackingStore?.Set("osBuildNumber", value); } + } +#nullable restore +#else + public string OsBuildNumber { + get { return BackingStore?.Get("osBuildNumber"); } + set { BackingStore?.Set("osBuildNumber", value); } + } +#endif + /// The OS version installed on the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OsVersion { + get { return BackingStore?.Get("osVersion"); } + set { BackingStore?.Set("osVersion", value); } + } +#nullable restore +#else + public string OsVersion { + get { return BackingStore?.Get("osVersion"); } + set { BackingStore?.Set("osVersion", value); } + } +#endif + /// The application health score of the OS version. Valid values 0 to 100. Supports: $filter, $select, $OrderBy. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? OsVersionAppHealthScore { + get { return BackingStore?.Get("osVersionAppHealthScore"); } + set { BackingStore?.Set("osVersionAppHealthScore", 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 UserExperienceAnalyticsAppHealthOSVersionPerformance CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsAppHealthOSVersionPerformance(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"activeDeviceCount", n => { ActiveDeviceCount = n.GetIntValue(); } }, + {"meanTimeToFailureInMinutes", n => { MeanTimeToFailureInMinutes = n.GetIntValue(); } }, + {"osBuildNumber", n => { OsBuildNumber = n.GetStringValue(); } }, + {"osVersion", n => { OsVersion = n.GetStringValue(); } }, + {"osVersionAppHealthScore", n => { OsVersionAppHealthScore = n.GetDoubleValue(); } }, + }; + } + /// + /// 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.WriteIntValue("activeDeviceCount", ActiveDeviceCount); + writer.WriteIntValue("meanTimeToFailureInMinutes", MeanTimeToFailureInMinutes); + writer.WriteStringValue("osBuildNumber", OsBuildNumber); + writer.WriteStringValue("osVersion", OsVersion); + writer.WriteDoubleValue("osVersionAppHealthScore", OsVersionAppHealthScore); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthOSVersionPerformanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthOSVersionPerformanceCollectionResponse.cs new file mode 100644 index 00000000000..d49c02f9d41 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthOSVersionPerformanceCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserExperienceAnalyticsAppHealthOSVersionPerformanceCollectionResponse : 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 UserExperienceAnalyticsAppHealthOSVersionPerformanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsAppHealthOSVersionPerformanceCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(UserExperienceAnalyticsAppHealthOSVersionPerformance.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/UserExperienceAnalyticsAutopilotDevicesSummary.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAutopilotDevicesSummary.cs new file mode 100644 index 00000000000..abe887d2024 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAutopilotDevicesSummary.cs @@ -0,0 +1,87 @@ +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 { + /// + /// The user experience analytics summary of Devices not windows autopilot ready. + /// + public class UserExperienceAnalyticsAutopilotDevicesSummary : 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 count of intune devices that are not autopilot registerd. Read-only. + public int? DevicesNotAutopilotRegistered { + get { return BackingStore?.Get("devicesNotAutopilotRegistered"); } + set { BackingStore?.Set("devicesNotAutopilotRegistered", value); } + } + /// The count of intune devices not autopilot profile assigned. Read-only. + public int? DevicesWithoutAutopilotProfileAssigned { + get { return BackingStore?.Get("devicesWithoutAutopilotProfileAssigned"); } + set { BackingStore?.Set("devicesWithoutAutopilotProfileAssigned", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The count of windows 10 devices that are Intune and co-managed. Read-only. + public int? TotalWindows10DevicesWithoutTenantAttached { + get { return BackingStore?.Get("totalWindows10DevicesWithoutTenantAttached"); } + set { BackingStore?.Set("totalWindows10DevicesWithoutTenantAttached", value); } + } + /// + /// Instantiates a new userExperienceAnalyticsAutopilotDevicesSummary and sets the default values. + /// + public UserExperienceAnalyticsAutopilotDevicesSummary() { + 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 UserExperienceAnalyticsAutopilotDevicesSummary CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsAutopilotDevicesSummary(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"devicesNotAutopilotRegistered", n => { DevicesNotAutopilotRegistered = n.GetIntValue(); } }, + {"devicesWithoutAutopilotProfileAssigned", n => { DevicesWithoutAutopilotProfileAssigned = n.GetIntValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"totalWindows10DevicesWithoutTenantAttached", n => { TotalWindows10DevicesWithoutTenantAttached = n.GetIntValue(); } }, + }; + } + /// + /// 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.WriteIntValue("devicesNotAutopilotRegistered", DevicesNotAutopilotRegistered); + writer.WriteIntValue("devicesWithoutAutopilotProfileAssigned", DevicesWithoutAutopilotProfileAssigned); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteIntValue("totalWindows10DevicesWithoutTenantAttached", TotalWindows10DevicesWithoutTenantAttached); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBaseline.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBaseline.cs new file mode 100644 index 00000000000..c3ce5251915 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBaseline.cs @@ -0,0 +1,177 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + /// + /// The user experience analytics baseline entity contains baseline values against which to compare the user experience analytics scores. + /// + public class UserExperienceAnalyticsBaseline : Entity, IParsable { + /// The scores and insights for the application health metrics. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UserExperienceAnalyticsCategory? AppHealthMetrics { + get { return BackingStore?.Get("appHealthMetrics"); } + set { BackingStore?.Set("appHealthMetrics", value); } + } +#nullable restore +#else + public UserExperienceAnalyticsCategory AppHealthMetrics { + get { return BackingStore?.Get("appHealthMetrics"); } + set { BackingStore?.Set("appHealthMetrics", value); } + } +#endif + /// The scores and insights for the battery health metrics. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UserExperienceAnalyticsCategory? BatteryHealthMetrics { + get { return BackingStore?.Get("batteryHealthMetrics"); } + set { BackingStore?.Set("batteryHealthMetrics", value); } + } +#nullable restore +#else + public UserExperienceAnalyticsCategory BatteryHealthMetrics { + get { return BackingStore?.Get("batteryHealthMetrics"); } + set { BackingStore?.Set("batteryHealthMetrics", value); } + } +#endif + /// The scores and insights for the best practices metrics. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UserExperienceAnalyticsCategory? BestPracticesMetrics { + get { return BackingStore?.Get("bestPracticesMetrics"); } + set { BackingStore?.Set("bestPracticesMetrics", value); } + } +#nullable restore +#else + public UserExperienceAnalyticsCategory BestPracticesMetrics { + get { return BackingStore?.Get("bestPracticesMetrics"); } + set { BackingStore?.Set("bestPracticesMetrics", value); } + } +#endif + /// The date the custom baseline was created. The value cannot be modified and is automatically populated when the baseline is 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 would look like this: '2014-01-01T00:00:00Z'. Returned by default. + public DateTimeOffset? CreatedDateTime { + get { return BackingStore?.Get("createdDateTime"); } + set { BackingStore?.Set("createdDateTime", value); } + } + /// The scores and insights for the device boot performance metrics. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UserExperienceAnalyticsCategory? DeviceBootPerformanceMetrics { + get { return BackingStore?.Get("deviceBootPerformanceMetrics"); } + set { BackingStore?.Set("deviceBootPerformanceMetrics", value); } + } +#nullable restore +#else + public UserExperienceAnalyticsCategory DeviceBootPerformanceMetrics { + get { return BackingStore?.Get("deviceBootPerformanceMetrics"); } + set { BackingStore?.Set("deviceBootPerformanceMetrics", value); } + } +#endif + /// The name of the baseline. +#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 + /// When TRUE, indicates the current baseline is the commercial median baseline. When FALSE, indicates it is a custom baseline. FALSE by default. + public bool? IsBuiltIn { + get { return BackingStore?.Get("isBuiltIn"); } + set { BackingStore?.Set("isBuiltIn", value); } + } + /// The scores and insights for the reboot analytics metrics. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UserExperienceAnalyticsCategory? RebootAnalyticsMetrics { + get { return BackingStore?.Get("rebootAnalyticsMetrics"); } + set { BackingStore?.Set("rebootAnalyticsMetrics", value); } + } +#nullable restore +#else + public UserExperienceAnalyticsCategory RebootAnalyticsMetrics { + get { return BackingStore?.Get("rebootAnalyticsMetrics"); } + set { BackingStore?.Set("rebootAnalyticsMetrics", value); } + } +#endif + /// The scores and insights for the resource performance metrics. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UserExperienceAnalyticsCategory? ResourcePerformanceMetrics { + get { return BackingStore?.Get("resourcePerformanceMetrics"); } + set { BackingStore?.Set("resourcePerformanceMetrics", value); } + } +#nullable restore +#else + public UserExperienceAnalyticsCategory ResourcePerformanceMetrics { + get { return BackingStore?.Get("resourcePerformanceMetrics"); } + set { BackingStore?.Set("resourcePerformanceMetrics", value); } + } +#endif + /// The scores and insights for the work from anywhere metrics. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UserExperienceAnalyticsCategory? WorkFromAnywhereMetrics { + get { return BackingStore?.Get("workFromAnywhereMetrics"); } + set { BackingStore?.Set("workFromAnywhereMetrics", value); } + } +#nullable restore +#else + public UserExperienceAnalyticsCategory WorkFromAnywhereMetrics { + get { return BackingStore?.Get("workFromAnywhereMetrics"); } + set { BackingStore?.Set("workFromAnywhereMetrics", 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 UserExperienceAnalyticsBaseline CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsBaseline(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"appHealthMetrics", n => { AppHealthMetrics = n.GetObjectValue(UserExperienceAnalyticsCategory.CreateFromDiscriminatorValue); } }, + {"batteryHealthMetrics", n => { BatteryHealthMetrics = n.GetObjectValue(UserExperienceAnalyticsCategory.CreateFromDiscriminatorValue); } }, + {"bestPracticesMetrics", n => { BestPracticesMetrics = n.GetObjectValue(UserExperienceAnalyticsCategory.CreateFromDiscriminatorValue); } }, + {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + {"deviceBootPerformanceMetrics", n => { DeviceBootPerformanceMetrics = n.GetObjectValue(UserExperienceAnalyticsCategory.CreateFromDiscriminatorValue); } }, + {"displayName", n => { DisplayName = n.GetStringValue(); } }, + {"isBuiltIn", n => { IsBuiltIn = n.GetBoolValue(); } }, + {"rebootAnalyticsMetrics", n => { RebootAnalyticsMetrics = n.GetObjectValue(UserExperienceAnalyticsCategory.CreateFromDiscriminatorValue); } }, + {"resourcePerformanceMetrics", n => { ResourcePerformanceMetrics = n.GetObjectValue(UserExperienceAnalyticsCategory.CreateFromDiscriminatorValue); } }, + {"workFromAnywhereMetrics", n => { WorkFromAnywhereMetrics = n.GetObjectValue(UserExperienceAnalyticsCategory.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.WriteObjectValue("appHealthMetrics", AppHealthMetrics); + writer.WriteObjectValue("batteryHealthMetrics", BatteryHealthMetrics); + writer.WriteObjectValue("bestPracticesMetrics", BestPracticesMetrics); + writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); + writer.WriteObjectValue("deviceBootPerformanceMetrics", DeviceBootPerformanceMetrics); + writer.WriteStringValue("displayName", DisplayName); + writer.WriteBoolValue("isBuiltIn", IsBuiltIn); + writer.WriteObjectValue("rebootAnalyticsMetrics", RebootAnalyticsMetrics); + writer.WriteObjectValue("resourcePerformanceMetrics", ResourcePerformanceMetrics); + writer.WriteObjectValue("workFromAnywhereMetrics", WorkFromAnywhereMetrics); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBaselineCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBaselineCollectionResponse.cs new file mode 100644 index 00000000000..ffab9fe8aad --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBaselineCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserExperienceAnalyticsBaselineCollectionResponse : 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 UserExperienceAnalyticsBaselineCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsBaselineCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(UserExperienceAnalyticsBaseline.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/UserExperienceAnalyticsCategory.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCategory.cs new file mode 100644 index 00000000000..99420c2556d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCategory.cs @@ -0,0 +1,64 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserExperienceAnalyticsCategory : Entity, IParsable { + /// The insights for the category. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Insights { + get { return BackingStore?.Get?>("insights"); } + set { BackingStore?.Set("insights", value); } + } +#nullable restore +#else + public List Insights { + get { return BackingStore?.Get>("insights"); } + set { BackingStore?.Set("insights", value); } + } +#endif + /// The metric values for the user experience analytics category. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? MetricValues { + get { return BackingStore?.Get?>("metricValues"); } + set { BackingStore?.Set("metricValues", value); } + } +#nullable restore +#else + public List MetricValues { + get { return BackingStore?.Get>("metricValues"); } + set { BackingStore?.Set("metricValues", 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 UserExperienceAnalyticsCategory CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsCategory(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"insights", n => { Insights = n.GetCollectionOfObjectValues(UserExperienceAnalyticsInsight.CreateFromDiscriminatorValue)?.ToList(); } }, + {"metricValues", n => { MetricValues = n.GetCollectionOfObjectValues(UserExperienceAnalyticsMetric.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("insights", Insights); + writer.WriteCollectionOfObjectValues("metricValues", MetricValues); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCategoryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCategoryCollectionResponse.cs new file mode 100644 index 00000000000..388e26d0975 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCategoryCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserExperienceAnalyticsCategoryCollectionResponse : 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 UserExperienceAnalyticsCategoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsCategoryCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(UserExperienceAnalyticsCategory.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/UserExperienceAnalyticsCloudIdentityDevicesSummary.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCloudIdentityDevicesSummary.cs new file mode 100644 index 00000000000..301a544deab --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCloudIdentityDevicesSummary.cs @@ -0,0 +1,73 @@ +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 { + /// + /// The user experience analytics work from anywhere cloud identity devices summary. + /// + public class UserExperienceAnalyticsCloudIdentityDevicesSummary : 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 count of devices that are not cloud identity. Read-only. + public int? DeviceWithoutCloudIdentityCount { + get { return BackingStore?.Get("deviceWithoutCloudIdentityCount"); } + set { BackingStore?.Set("deviceWithoutCloudIdentityCount", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// + /// Instantiates a new userExperienceAnalyticsCloudIdentityDevicesSummary and sets the default values. + /// + public UserExperienceAnalyticsCloudIdentityDevicesSummary() { + 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 UserExperienceAnalyticsCloudIdentityDevicesSummary CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsCloudIdentityDevicesSummary(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"deviceWithoutCloudIdentityCount", n => { DeviceWithoutCloudIdentityCount = n.GetIntValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("deviceWithoutCloudIdentityCount", DeviceWithoutCloudIdentityCount); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCloudManagementDevicesSummary.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCloudManagementDevicesSummary.cs new file mode 100644 index 00000000000..a666f3e596e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCloudManagementDevicesSummary.cs @@ -0,0 +1,87 @@ +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 { + /// + /// The user experience work from anywhere Cloud management devices summary. + /// + public class UserExperienceAnalyticsCloudManagementDevicesSummary : 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; } + /// Total number of co-managed devices. Read-only. + public int? CoManagedDeviceCount { + get { return BackingStore?.Get("coManagedDeviceCount"); } + set { BackingStore?.Set("coManagedDeviceCount", value); } + } + /// The count of intune devices that are not autopilot registerd. Read-only. + public int? IntuneDeviceCount { + get { return BackingStore?.Get("intuneDeviceCount"); } + set { BackingStore?.Set("intuneDeviceCount", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// Total count of tenant attach devices. Read-only. + public int? TenantAttachDeviceCount { + get { return BackingStore?.Get("tenantAttachDeviceCount"); } + set { BackingStore?.Set("tenantAttachDeviceCount", value); } + } + /// + /// Instantiates a new userExperienceAnalyticsCloudManagementDevicesSummary and sets the default values. + /// + public UserExperienceAnalyticsCloudManagementDevicesSummary() { + 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 UserExperienceAnalyticsCloudManagementDevicesSummary CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsCloudManagementDevicesSummary(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"coManagedDeviceCount", n => { CoManagedDeviceCount = n.GetIntValue(); } }, + {"intuneDeviceCount", n => { IntuneDeviceCount = n.GetIntValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"tenantAttachDeviceCount", n => { TenantAttachDeviceCount = n.GetIntValue(); } }, + }; + } + /// + /// 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.WriteIntValue("coManagedDeviceCount", CoManagedDeviceCount); + writer.WriteIntValue("intuneDeviceCount", IntuneDeviceCount); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteIntValue("tenantAttachDeviceCount", TenantAttachDeviceCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDevicePerformance.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDevicePerformance.cs index f8edd1ee7d6..9d39f91c85c 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDevicePerformance.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDevicePerformance.cs @@ -4,6 +4,9 @@ using System.Linq; using System; namespace Microsoft.Graph.Models { + /// + /// The user experience analytics device performance entity contains device boot performance details. + /// public class UserExperienceAnalyticsDevicePerformance : Entity, IParsable { /// Average (mean) number of Blue Screens per device in the last 30 days. Valid values 0 to 9999999 public double? AverageBlueScreens { diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDevicePerformanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDevicePerformanceCollectionResponse.cs new file mode 100644 index 00000000000..c24a7e7c1ca --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDevicePerformanceCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserExperienceAnalyticsDevicePerformanceCollectionResponse : 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 UserExperienceAnalyticsDevicePerformanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsDevicePerformanceCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(UserExperienceAnalyticsDevicePerformance.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/UserExperienceAnalyticsDeviceScores.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScores.cs new file mode 100644 index 00000000000..a09720751f1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScores.cs @@ -0,0 +1,125 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + /// + /// The user experience analytics device scores entity consolidates the various Endpoint Analytics scores. + /// + public class UserExperienceAnalyticsDeviceScores : Entity, IParsable { + /// Indicates a score calculated from application health data to indicate when a device is having problems running one or more applications. Valid values range from 0-100. Value -1 means associated score is unavailable. A higher score indicates a healthier device. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? AppReliabilityScore { + get { return BackingStore?.Get("appReliabilityScore"); } + set { BackingStore?.Set("appReliabilityScore", value); } + } + /// Indicates a calulated score indicating the health of the device's battery. Valid values range from 0-100. Value -1 means associated score is unavailable. A higher score indicates a healthier device. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? BatteryHealthScore { + get { return BackingStore?.Get("batteryHealthScore"); } + set { BackingStore?.Set("batteryHealthScore", value); } + } + /// The name of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeviceName { + get { return BackingStore?.Get("deviceName"); } + set { BackingStore?.Set("deviceName", value); } + } +#nullable restore +#else + public string DeviceName { + get { return BackingStore?.Get("deviceName"); } + set { BackingStore?.Set("deviceName", value); } + } +#endif + /// Indicates a weighted average of the various scores. Valid values range from 0-100. Value -1 means associated score is unavailable. A higher score indicates a healthier device. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? EndpointAnalyticsScore { + get { return BackingStore?.Get("endpointAnalyticsScore"); } + set { BackingStore?.Set("endpointAnalyticsScore", value); } + } + /// The healthStatus property + public UserExperienceAnalyticsHealthState? HealthStatus { + get { return BackingStore?.Get("healthStatus"); } + set { BackingStore?.Set("healthStatus", value); } + } + /// The manufacturer name of the device. Examples: Microsoft Corporation, HP, Lenovo. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Manufacturer { + get { return BackingStore?.Get("manufacturer"); } + set { BackingStore?.Set("manufacturer", value); } + } +#nullable restore +#else + public string Manufacturer { + get { return BackingStore?.Get("manufacturer"); } + set { BackingStore?.Set("manufacturer", value); } + } +#endif + /// The model name of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Model { + get { return BackingStore?.Get("model"); } + set { BackingStore?.Set("model", value); } + } +#nullable restore +#else + public string Model { + get { return BackingStore?.Get("model"); } + set { BackingStore?.Set("model", value); } + } +#endif + /// Indicates a weighted average of boot score and logon score used for measuring startup performance. Valid values range from 0-100. Value -1 means associated score is unavailable. A higher score indicates a healthier device. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? StartupPerformanceScore { + get { return BackingStore?.Get("startupPerformanceScore"); } + set { BackingStore?.Set("startupPerformanceScore", value); } + } + /// Indicates a weighted score of the work from anywhere on a device level. Valid values range from 0-100. Value -1 means associated score is unavailable. A higher score indicates a healthier device. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? WorkFromAnywhereScore { + get { return BackingStore?.Get("workFromAnywhereScore"); } + set { BackingStore?.Set("workFromAnywhereScore", 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 UserExperienceAnalyticsDeviceScores CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsDeviceScores(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"appReliabilityScore", n => { AppReliabilityScore = n.GetDoubleValue(); } }, + {"batteryHealthScore", n => { BatteryHealthScore = n.GetDoubleValue(); } }, + {"deviceName", n => { DeviceName = n.GetStringValue(); } }, + {"endpointAnalyticsScore", n => { EndpointAnalyticsScore = n.GetDoubleValue(); } }, + {"healthStatus", n => { HealthStatus = n.GetEnumValue(); } }, + {"manufacturer", n => { Manufacturer = n.GetStringValue(); } }, + {"model", n => { Model = n.GetStringValue(); } }, + {"startupPerformanceScore", n => { StartupPerformanceScore = n.GetDoubleValue(); } }, + {"workFromAnywhereScore", n => { WorkFromAnywhereScore = n.GetDoubleValue(); } }, + }; + } + /// + /// 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.WriteDoubleValue("appReliabilityScore", AppReliabilityScore); + writer.WriteDoubleValue("batteryHealthScore", BatteryHealthScore); + writer.WriteStringValue("deviceName", DeviceName); + writer.WriteDoubleValue("endpointAnalyticsScore", EndpointAnalyticsScore); + writer.WriteEnumValue("healthStatus", HealthStatus); + writer.WriteStringValue("manufacturer", Manufacturer); + writer.WriteStringValue("model", Model); + writer.WriteDoubleValue("startupPerformanceScore", StartupPerformanceScore); + writer.WriteDoubleValue("workFromAnywhereScore", WorkFromAnywhereScore); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScoresCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScoresCollectionResponse.cs new file mode 100644 index 00000000000..02c8da67e02 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScoresCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserExperienceAnalyticsDeviceScoresCollectionResponse : 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 UserExperienceAnalyticsDeviceScoresCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsDeviceScoresCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(UserExperienceAnalyticsDeviceScores.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/UserExperienceAnalyticsDeviceStartupHistory.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupHistory.cs new file mode 100644 index 00000000000..9759e2591dd --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupHistory.cs @@ -0,0 +1,183 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + /// + /// The user experience analytics device startup history entity contains device boot performance history details. + /// + public class UserExperienceAnalyticsDeviceStartupHistory : Entity, IParsable { + /// The device core boot time in milliseconds. Supports: $select, $OrderBy. Read-only. + public int? CoreBootTimeInMs { + get { return BackingStore?.Get("coreBootTimeInMs"); } + set { BackingStore?.Set("coreBootTimeInMs", value); } + } + /// The device core login time in milliseconds. Supports: $select, $OrderBy. Read-only. + public int? CoreLoginTimeInMs { + get { return BackingStore?.Get("coreLoginTimeInMs"); } + set { BackingStore?.Set("coreLoginTimeInMs", value); } + } + /// The Intune device id of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeviceId { + get { return BackingStore?.Get("deviceId"); } + set { BackingStore?.Set("deviceId", value); } + } +#nullable restore +#else + public string DeviceId { + get { return BackingStore?.Get("deviceId"); } + set { BackingStore?.Set("deviceId", value); } + } +#endif + /// The impact of device feature updates on boot time in milliseconds. Supports: $select, $OrderBy. Read-only. + public int? FeatureUpdateBootTimeInMs { + get { return BackingStore?.Get("featureUpdateBootTimeInMs"); } + set { BackingStore?.Set("featureUpdateBootTimeInMs", value); } + } + /// The impact of device group policy client on boot time in milliseconds. Supports: $select, $OrderBy. Read-only. + public int? GroupPolicyBootTimeInMs { + get { return BackingStore?.Get("groupPolicyBootTimeInMs"); } + set { BackingStore?.Set("groupPolicyBootTimeInMs", value); } + } + /// The impact of device group policy client on login time in milliseconds. Supports: $select, $OrderBy. Read-only. + public int? GroupPolicyLoginTimeInMs { + get { return BackingStore?.Get("groupPolicyLoginTimeInMs"); } + set { BackingStore?.Set("groupPolicyLoginTimeInMs", value); } + } + /// When TRUE, indicates the device boot record is associated with feature updates. When FALSE, indicates the device boot record is not associated with feature updates. Supports: $select, $OrderBy. Read-only. + public bool? IsFeatureUpdate { + get { return BackingStore?.Get("isFeatureUpdate"); } + set { BackingStore?.Set("isFeatureUpdate", value); } + } + /// When TRUE, indicates the device login is the first login after a reboot. When FALSE, indicates the device login is not the first login after a reboot. Supports: $select, $OrderBy. Read-only. + public bool? IsFirstLogin { + get { return BackingStore?.Get("isFirstLogin"); } + set { BackingStore?.Set("isFirstLogin", value); } + } + /// The user experience analytics device boot record's operating system version. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OperatingSystemVersion { + get { return BackingStore?.Get("operatingSystemVersion"); } + set { BackingStore?.Set("operatingSystemVersion", value); } + } +#nullable restore +#else + public string OperatingSystemVersion { + get { return BackingStore?.Get("operatingSystemVersion"); } + set { BackingStore?.Set("operatingSystemVersion", value); } + } +#endif + /// The time for desktop to become responsive during login process in milliseconds. Supports: $select, $OrderBy. Read-only. + public int? ResponsiveDesktopTimeInMs { + get { return BackingStore?.Get("responsiveDesktopTimeInMs"); } + set { BackingStore?.Set("responsiveDesktopTimeInMs", value); } + } + /// Operating System restart category. + public UserExperienceAnalyticsOperatingSystemRestartCategory? RestartCategory { + get { return BackingStore?.Get("restartCategory"); } + set { BackingStore?.Set("restartCategory", value); } + } + /// OS restart fault bucket. The fault bucket is used to find additional information about a system crash. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RestartFaultBucket { + get { return BackingStore?.Get("restartFaultBucket"); } + set { BackingStore?.Set("restartFaultBucket", value); } + } +#nullable restore +#else + public string RestartFaultBucket { + get { return BackingStore?.Get("restartFaultBucket"); } + set { BackingStore?.Set("restartFaultBucket", value); } + } +#endif + /// OS restart stop code. This shows the bug check code which can be used to look up the blue screen reason. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RestartStopCode { + get { return BackingStore?.Get("restartStopCode"); } + set { BackingStore?.Set("restartStopCode", value); } + } +#nullable restore +#else + public string RestartStopCode { + get { return BackingStore?.Get("restartStopCode"); } + set { BackingStore?.Set("restartStopCode", value); } + } +#endif + /// The device boot start time. The value cannot be modified and is automatically populated when the device performs a reboot. 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, 2022 would look like this: '2022-01-01T00:00:00Z'. Returned by default. Read-only. + public DateTimeOffset? StartTime { + get { return BackingStore?.Get("startTime"); } + set { BackingStore?.Set("startTime", value); } + } + /// The device total boot time in milliseconds. Supports: $select, $OrderBy. Read-only. + public int? TotalBootTimeInMs { + get { return BackingStore?.Get("totalBootTimeInMs"); } + set { BackingStore?.Set("totalBootTimeInMs", value); } + } + /// The device total login time in milliseconds. Supports: $select, $OrderBy. Read-only. + public int? TotalLoginTimeInMs { + get { return BackingStore?.Get("totalLoginTimeInMs"); } + set { BackingStore?.Set("totalLoginTimeInMs", 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 UserExperienceAnalyticsDeviceStartupHistory CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsDeviceStartupHistory(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"coreBootTimeInMs", n => { CoreBootTimeInMs = n.GetIntValue(); } }, + {"coreLoginTimeInMs", n => { CoreLoginTimeInMs = n.GetIntValue(); } }, + {"deviceId", n => { DeviceId = n.GetStringValue(); } }, + {"featureUpdateBootTimeInMs", n => { FeatureUpdateBootTimeInMs = n.GetIntValue(); } }, + {"groupPolicyBootTimeInMs", n => { GroupPolicyBootTimeInMs = n.GetIntValue(); } }, + {"groupPolicyLoginTimeInMs", n => { GroupPolicyLoginTimeInMs = n.GetIntValue(); } }, + {"isFeatureUpdate", n => { IsFeatureUpdate = n.GetBoolValue(); } }, + {"isFirstLogin", n => { IsFirstLogin = n.GetBoolValue(); } }, + {"operatingSystemVersion", n => { OperatingSystemVersion = n.GetStringValue(); } }, + {"responsiveDesktopTimeInMs", n => { ResponsiveDesktopTimeInMs = n.GetIntValue(); } }, + {"restartCategory", n => { RestartCategory = n.GetEnumValue(); } }, + {"restartFaultBucket", n => { RestartFaultBucket = n.GetStringValue(); } }, + {"restartStopCode", n => { RestartStopCode = n.GetStringValue(); } }, + {"startTime", n => { StartTime = n.GetDateTimeOffsetValue(); } }, + {"totalBootTimeInMs", n => { TotalBootTimeInMs = n.GetIntValue(); } }, + {"totalLoginTimeInMs", n => { TotalLoginTimeInMs = n.GetIntValue(); } }, + }; + } + /// + /// 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.WriteIntValue("coreBootTimeInMs", CoreBootTimeInMs); + writer.WriteIntValue("coreLoginTimeInMs", CoreLoginTimeInMs); + writer.WriteStringValue("deviceId", DeviceId); + writer.WriteIntValue("featureUpdateBootTimeInMs", FeatureUpdateBootTimeInMs); + writer.WriteIntValue("groupPolicyBootTimeInMs", GroupPolicyBootTimeInMs); + writer.WriteIntValue("groupPolicyLoginTimeInMs", GroupPolicyLoginTimeInMs); + writer.WriteBoolValue("isFeatureUpdate", IsFeatureUpdate); + writer.WriteBoolValue("isFirstLogin", IsFirstLogin); + writer.WriteStringValue("operatingSystemVersion", OperatingSystemVersion); + writer.WriteIntValue("responsiveDesktopTimeInMs", ResponsiveDesktopTimeInMs); + writer.WriteEnumValue("restartCategory", RestartCategory); + writer.WriteStringValue("restartFaultBucket", RestartFaultBucket); + writer.WriteStringValue("restartStopCode", RestartStopCode); + writer.WriteDateTimeOffsetValue("startTime", StartTime); + writer.WriteIntValue("totalBootTimeInMs", TotalBootTimeInMs); + writer.WriteIntValue("totalLoginTimeInMs", TotalLoginTimeInMs); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupHistoryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupHistoryCollectionResponse.cs new file mode 100644 index 00000000000..9ba587b551d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupHistoryCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserExperienceAnalyticsDeviceStartupHistoryCollectionResponse : 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 UserExperienceAnalyticsDeviceStartupHistoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsDeviceStartupHistoryCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(UserExperienceAnalyticsDeviceStartupHistory.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/UserExperienceAnalyticsDeviceStartupProcess.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupProcess.cs new file mode 100644 index 00000000000..acce1b09304 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupProcess.cs @@ -0,0 +1,106 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + /// + /// The user experience analytics device startup process details. + /// + public class UserExperienceAnalyticsDeviceStartupProcess : Entity, IParsable { + /// The Intune device id of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ManagedDeviceId { + get { return BackingStore?.Get("managedDeviceId"); } + set { BackingStore?.Set("managedDeviceId", value); } + } +#nullable restore +#else + public string ManagedDeviceId { + get { return BackingStore?.Get("managedDeviceId"); } + set { BackingStore?.Set("managedDeviceId", value); } + } +#endif + /// The name of the process. Examples: outlook, excel. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProcessName { + get { return BackingStore?.Get("processName"); } + set { BackingStore?.Set("processName", value); } + } +#nullable restore +#else + public string ProcessName { + get { return BackingStore?.Get("processName"); } + set { BackingStore?.Set("processName", value); } + } +#endif + /// The product name of the process. Examples: Microsoft Outlook, Microsoft Excel. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProductName { + get { return BackingStore?.Get("productName"); } + set { BackingStore?.Set("productName", value); } + } +#nullable restore +#else + public string ProductName { + get { return BackingStore?.Get("productName"); } + set { BackingStore?.Set("productName", value); } + } +#endif + /// The publisher of the process. Examples: Microsoft Corporation, Contoso Corp. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Publisher { + get { return BackingStore?.Get("publisher"); } + set { BackingStore?.Set("publisher", value); } + } +#nullable restore +#else + public string Publisher { + get { return BackingStore?.Get("publisher"); } + set { BackingStore?.Set("publisher", value); } + } +#endif + /// The impact of startup process on device boot time in milliseconds. Supports: $select, $OrderBy. Read-only. + public int? StartupImpactInMs { + get { return BackingStore?.Get("startupImpactInMs"); } + set { BackingStore?.Set("startupImpactInMs", 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 UserExperienceAnalyticsDeviceStartupProcess CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsDeviceStartupProcess(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"managedDeviceId", n => { ManagedDeviceId = n.GetStringValue(); } }, + {"processName", n => { ProcessName = n.GetStringValue(); } }, + {"productName", n => { ProductName = n.GetStringValue(); } }, + {"publisher", n => { Publisher = n.GetStringValue(); } }, + {"startupImpactInMs", n => { StartupImpactInMs = n.GetIntValue(); } }, + }; + } + /// + /// 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("managedDeviceId", ManagedDeviceId); + writer.WriteStringValue("processName", ProcessName); + writer.WriteStringValue("productName", ProductName); + writer.WriteStringValue("publisher", Publisher); + writer.WriteIntValue("startupImpactInMs", StartupImpactInMs); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupProcessCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupProcessCollectionResponse.cs new file mode 100644 index 00000000000..04082a76599 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupProcessCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserExperienceAnalyticsDeviceStartupProcessCollectionResponse : 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 UserExperienceAnalyticsDeviceStartupProcessCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsDeviceStartupProcessCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(UserExperienceAnalyticsDeviceStartupProcess.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/UserExperienceAnalyticsHealthState.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsHealthState.cs index 63222f9896a..8103cc236e6 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsHealthState.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsHealthState.cs @@ -2,15 +2,19 @@ using System; namespace Microsoft.Graph.Models { public enum UserExperienceAnalyticsHealthState { + /// Indicates that the health state is unknown. [EnumMember(Value = "unknown")] Unknown, + /// Indicates that the health state is insufficient data. [EnumMember(Value = "insufficientData")] InsufficientData, + /// Indicates that the health state needs attention. [EnumMember(Value = "needsAttention")] NeedsAttention, + /// Indicates that the health state is meeting goals. [EnumMember(Value = "meetingGoals")] MeetingGoals, - /// Evolvable enum member + /// Evolvable enumeration sentinel value. Do not use. [EnumMember(Value = "unknownFutureValue")] UnknownFutureValue, } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsInsight.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsInsight.cs new file mode 100644 index 00000000000..b91b4bfa6a1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsInsight.cs @@ -0,0 +1,121 @@ +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 { + /// + /// The user experience analytics insight is the recomendation to improve the user experience analytics score. + /// + public class UserExperienceAnalyticsInsight : 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 unique identifier of the user experience analytics insight. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? InsightId { + get { return BackingStore?.Get("insightId"); } + set { BackingStore?.Set("insightId", value); } + } +#nullable restore +#else + public string InsightId { + get { return BackingStore?.Get("insightId"); } + set { BackingStore?.Set("insightId", 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 + /// Indicates severity of insights. Possible values are: None, Informational, Warning, Error. + public UserExperienceAnalyticsInsightSeverity? Severity { + get { return BackingStore?.Get("severity"); } + set { BackingStore?.Set("severity", value); } + } + /// The unique identifier of the user experience analytics metric. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserExperienceAnalyticsMetricId { + get { return BackingStore?.Get("userExperienceAnalyticsMetricId"); } + set { BackingStore?.Set("userExperienceAnalyticsMetricId", value); } + } +#nullable restore +#else + public string UserExperienceAnalyticsMetricId { + get { return BackingStore?.Get("userExperienceAnalyticsMetricId"); } + set { BackingStore?.Set("userExperienceAnalyticsMetricId", value); } + } +#endif + /// The value of the user experience analytics insight. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Values { + get { return BackingStore?.Get?>("values"); } + set { BackingStore?.Set("values", value); } + } +#nullable restore +#else + public List Values { + get { return BackingStore?.Get>("values"); } + set { BackingStore?.Set("values", value); } + } +#endif + /// + /// Instantiates a new userExperienceAnalyticsInsight and sets the default values. + /// + public UserExperienceAnalyticsInsight() { + 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 UserExperienceAnalyticsInsight CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsInsight(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"insightId", n => { InsightId = n.GetStringValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"severity", n => { Severity = n.GetEnumValue(); } }, + {"userExperienceAnalyticsMetricId", n => { UserExperienceAnalyticsMetricId = n.GetStringValue(); } }, + {"values", n => { Values = n.GetCollectionOfObjectValues(UserExperienceAnalyticsInsightValue.CreateFromDiscriminatorValue)?.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.WriteStringValue("insightId", InsightId); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteEnumValue("severity", Severity); + writer.WriteStringValue("userExperienceAnalyticsMetricId", UserExperienceAnalyticsMetricId); + writer.WriteCollectionOfObjectValues("values", Values); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsInsightSeverity.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsInsightSeverity.cs new file mode 100644 index 00000000000..3094c74b610 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsInsightSeverity.cs @@ -0,0 +1,22 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + /// Indicates severity of insights. Possible values are: None, Informational, Warning, Error. + public enum UserExperienceAnalyticsInsightSeverity { + /// Indicates that the insight severity is none. + [EnumMember(Value = "none")] + None, + /// Indicates that the insight severity is informational. + [EnumMember(Value = "informational")] + Informational, + /// Indicates that the insight severity is warning. + [EnumMember(Value = "warning")] + Warning, + /// Indicates that the insight severity is error. + [EnumMember(Value = "error")] + Error, + /// Evolvable enumeration sentinel value. Do not use. + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsInsightValue.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsInsightValue.cs new file mode 100644 index 00000000000..24a60034b52 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsInsightValue.cs @@ -0,0 +1,71 @@ +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 { + /// + /// The value in an user experience analytics insight. + /// + public class UserExperienceAnalyticsInsightValue : 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 OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// + /// Instantiates a new userExperienceAnalyticsInsightValue and sets the default values. + /// + public UserExperienceAnalyticsInsightValue() { + 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 UserExperienceAnalyticsInsightValue CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); + return mappingValue switch { + "#microsoft.graph.insightValueDouble" => new InsightValueDouble(), + "#microsoft.graph.insightValueInt" => new InsightValueInt(), + _ => new UserExperienceAnalyticsInsightValue(), + }; + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetric.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetric.cs new file mode 100644 index 00000000000..14794561c75 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetric.cs @@ -0,0 +1,58 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + /// + /// The user experience analytics metric contains the score and units of a metric of a user experience anlaytics category. + /// + public class UserExperienceAnalyticsMetric : Entity, IParsable { + /// The unit of the user experience analytics metric. Examples: none, percentage, count, seconds, score. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Unit { + get { return BackingStore?.Get("unit"); } + set { BackingStore?.Set("unit", value); } + } +#nullable restore +#else + public string Unit { + get { return BackingStore?.Get("unit"); } + set { BackingStore?.Set("unit", value); } + } +#endif + /// The value of the user experience analytics metric. + public double? Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", 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 UserExperienceAnalyticsMetric CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsMetric(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"unit", n => { Unit = n.GetStringValue(); } }, + {"value", n => { Value = n.GetDoubleValue(); } }, + }; + } + /// + /// 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("unit", Unit); + writer.WriteDoubleValue("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetricCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetricCollectionResponse.cs new file mode 100644 index 00000000000..3751d75d779 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetricCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserExperienceAnalyticsMetricCollectionResponse : 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 UserExperienceAnalyticsMetricCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsMetricCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(UserExperienceAnalyticsMetric.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/UserExperienceAnalyticsMetricHistory.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetricHistory.cs new file mode 100644 index 00000000000..8c8c31861dc --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetricHistory.cs @@ -0,0 +1,74 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + /// + /// The user experience analytics metric history. + /// + public class UserExperienceAnalyticsMetricHistory : Entity, IParsable { + /// The Intune device id of the device. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeviceId { + get { return BackingStore?.Get("deviceId"); } + set { BackingStore?.Set("deviceId", value); } + } +#nullable restore +#else + public string DeviceId { + get { return BackingStore?.Get("deviceId"); } + set { BackingStore?.Set("deviceId", value); } + } +#endif + /// The metric date time. The value cannot be modified and is automatically populated when the metric is 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 would look like this: '2014-01-01T00:00:00Z'. Returned by default. + public DateTimeOffset? MetricDateTime { + get { return BackingStore?.Get("metricDateTime"); } + set { BackingStore?.Set("metricDateTime", value); } + } + /// The user experience analytics metric type. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MetricType { + get { return BackingStore?.Get("metricType"); } + set { BackingStore?.Set("metricType", value); } + } +#nullable restore +#else + public string MetricType { + get { return BackingStore?.Get("metricType"); } + set { BackingStore?.Set("metricType", 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 UserExperienceAnalyticsMetricHistory CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsMetricHistory(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"deviceId", n => { DeviceId = n.GetStringValue(); } }, + {"metricDateTime", n => { MetricDateTime = n.GetDateTimeOffsetValue(); } }, + {"metricType", n => { MetricType = 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.WriteStringValue("deviceId", DeviceId); + writer.WriteDateTimeOffsetValue("metricDateTime", MetricDateTime); + writer.WriteStringValue("metricType", MetricType); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetricHistoryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetricHistoryCollectionResponse.cs new file mode 100644 index 00000000000..a2d73409853 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetricHistoryCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserExperienceAnalyticsMetricHistoryCollectionResponse : 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 UserExperienceAnalyticsMetricHistoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsMetricHistoryCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(UserExperienceAnalyticsMetricHistory.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/UserExperienceAnalyticsModelScores.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsModelScores.cs new file mode 100644 index 00000000000..e49e4f0c610 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsModelScores.cs @@ -0,0 +1,116 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + /// + /// The user experience analytics model scores entity consolidates the various Endpoint Analytics scores. + /// + public class UserExperienceAnalyticsModelScores : Entity, IParsable { + /// Indicates a score calculated from application health data to indicate when a device is having problems running one or more applications. Valid values range from 0-100. Value -1 means associated score is unavailable. A higher score indicates a healthier device. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? AppReliabilityScore { + get { return BackingStore?.Get("appReliabilityScore"); } + set { BackingStore?.Set("appReliabilityScore", value); } + } + /// Indicates a calulated score indicating the health of the device's battery. Valid values range from 0-100. Value -1 means associated score is unavailable. A higher score indicates a healthier device. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? BatteryHealthScore { + get { return BackingStore?.Get("batteryHealthScore"); } + set { BackingStore?.Set("batteryHealthScore", value); } + } + /// Indicates a weighted average of the various scores. Valid values range from 0-100. Value -1 means associated score is unavailable. A higher score indicates a healthier device. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? EndpointAnalyticsScore { + get { return BackingStore?.Get("endpointAnalyticsScore"); } + set { BackingStore?.Set("endpointAnalyticsScore", value); } + } + /// The healthStatus property + public UserExperienceAnalyticsHealthState? HealthStatus { + get { return BackingStore?.Get("healthStatus"); } + set { BackingStore?.Set("healthStatus", value); } + } + /// The manufacturer name of the device. Examples: Microsoft Corporation, HP, Lenovo. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Manufacturer { + get { return BackingStore?.Get("manufacturer"); } + set { BackingStore?.Set("manufacturer", value); } + } +#nullable restore +#else + public string Manufacturer { + get { return BackingStore?.Get("manufacturer"); } + set { BackingStore?.Set("manufacturer", value); } + } +#endif + /// The model name of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Model { + get { return BackingStore?.Get("model"); } + set { BackingStore?.Set("model", value); } + } +#nullable restore +#else + public string Model { + get { return BackingStore?.Get("model"); } + set { BackingStore?.Set("model", value); } + } +#endif + /// Indicates unique devices count of given model in a consolidated report. Supports: $select, $OrderBy. Read-only. Valid values -9.22337203685478E+18 to 9.22337203685478E+18 + public long? ModelDeviceCount { + get { return BackingStore?.Get("modelDeviceCount"); } + set { BackingStore?.Set("modelDeviceCount", value); } + } + /// Indicates a weighted average of boot score and logon score used for measuring startup performance. Valid values range from 0-100. Value -1 means associated score is unavailable. A higher score indicates a healthier device. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? StartupPerformanceScore { + get { return BackingStore?.Get("startupPerformanceScore"); } + set { BackingStore?.Set("startupPerformanceScore", value); } + } + /// Indicates a weighted score of the work from anywhere on a device level. Valid values range from 0-100. Value -1 means associated score is unavailable. A higher score indicates a healthier device. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? WorkFromAnywhereScore { + get { return BackingStore?.Get("workFromAnywhereScore"); } + set { BackingStore?.Set("workFromAnywhereScore", 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 UserExperienceAnalyticsModelScores CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsModelScores(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"appReliabilityScore", n => { AppReliabilityScore = n.GetDoubleValue(); } }, + {"batteryHealthScore", n => { BatteryHealthScore = n.GetDoubleValue(); } }, + {"endpointAnalyticsScore", n => { EndpointAnalyticsScore = n.GetDoubleValue(); } }, + {"healthStatus", n => { HealthStatus = n.GetEnumValue(); } }, + {"manufacturer", n => { Manufacturer = n.GetStringValue(); } }, + {"model", n => { Model = n.GetStringValue(); } }, + {"modelDeviceCount", n => { ModelDeviceCount = n.GetLongValue(); } }, + {"startupPerformanceScore", n => { StartupPerformanceScore = n.GetDoubleValue(); } }, + {"workFromAnywhereScore", n => { WorkFromAnywhereScore = n.GetDoubleValue(); } }, + }; + } + /// + /// 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.WriteDoubleValue("appReliabilityScore", AppReliabilityScore); + writer.WriteDoubleValue("batteryHealthScore", BatteryHealthScore); + writer.WriteDoubleValue("endpointAnalyticsScore", EndpointAnalyticsScore); + writer.WriteEnumValue("healthStatus", HealthStatus); + writer.WriteStringValue("manufacturer", Manufacturer); + writer.WriteStringValue("model", Model); + writer.WriteLongValue("modelDeviceCount", ModelDeviceCount); + writer.WriteDoubleValue("startupPerformanceScore", StartupPerformanceScore); + writer.WriteDoubleValue("workFromAnywhereScore", WorkFromAnywhereScore); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsModelScoresCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsModelScoresCollectionResponse.cs new file mode 100644 index 00000000000..32b26f1a381 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsModelScoresCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserExperienceAnalyticsModelScoresCollectionResponse : 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 UserExperienceAnalyticsModelScoresCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsModelScoresCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(UserExperienceAnalyticsModelScores.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/UserExperienceAnalyticsOperatingSystemRestartCategory.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsOperatingSystemRestartCategory.cs new file mode 100644 index 00000000000..c5b1846c894 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsOperatingSystemRestartCategory.cs @@ -0,0 +1,37 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + /// Operating System restart category. + public enum UserExperienceAnalyticsOperatingSystemRestartCategory { + /// Default. Set to unknown if device operating system restart category has not yet been calculated. + [EnumMember(Value = "unknown")] + Unknown, + /// Indicates that the device operating system restart is along with an update. + [EnumMember(Value = "restartWithUpdate")] + RestartWithUpdate, + /// Indicates that the device operating system restart is without update. + [EnumMember(Value = "restartWithoutUpdate")] + RestartWithoutUpdate, + /// Indicates that the device operating system restart is due to a specific stop error. + [EnumMember(Value = "blueScreen")] + BlueScreen, + /// Indicates that the device operating system restart is due to shutdown with update. + [EnumMember(Value = "shutdownWithUpdate")] + ShutdownWithUpdate, + /// Indicates that the device operating system restart is due to shutdown without update. + [EnumMember(Value = "shutdownWithoutUpdate")] + ShutdownWithoutUpdate, + /// Indicates that the device operating system restart is due to update long power-button press. + [EnumMember(Value = "longPowerButtonPress")] + LongPowerButtonPress, + /// Indicates that the device operating system restart is due to boot error. + [EnumMember(Value = "bootError")] + BootError, + /// Indicates that the device operating system restarted after an update. + [EnumMember(Value = "update")] + Update, + /// Evolvable enumeration sentinel value. Do not use. + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsOverview.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsOverview.cs new file mode 100644 index 00000000000..c51a5a066b7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsOverview.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserExperienceAnalyticsOverview : Entity, IParsable { + /// The user experience analytics insights. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Insights { + get { return BackingStore?.Get?>("insights"); } + set { BackingStore?.Set("insights", value); } + } +#nullable restore +#else + public List Insights { + get { return BackingStore?.Get>("insights"); } + set { BackingStore?.Set("insights", 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 UserExperienceAnalyticsOverview CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsOverview(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"insights", n => { Insights = n.GetCollectionOfObjectValues(UserExperienceAnalyticsInsight.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("insights", Insights); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsScoreHistory.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsScoreHistory.cs new file mode 100644 index 00000000000..086928fd9ab --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsScoreHistory.cs @@ -0,0 +1,42 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + /// + /// The user experience analytics device startup score history. + /// + public class UserExperienceAnalyticsScoreHistory : Entity, IParsable { + /// The device startup date time. The value cannot be modified and is automatically populated. 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 would look like this: '2014-01-01T00:00:00Z'. Returned by default. + public DateTimeOffset? StartupDateTime { + get { return BackingStore?.Get("startupDateTime"); } + set { BackingStore?.Set("startupDateTime", 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 UserExperienceAnalyticsScoreHistory CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsScoreHistory(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"startupDateTime", n => { StartupDateTime = 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("startupDateTime", StartupDateTime); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsScoreHistoryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsScoreHistoryCollectionResponse.cs new file mode 100644 index 00000000000..bfb96d8e3f9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsScoreHistoryCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserExperienceAnalyticsScoreHistoryCollectionResponse : 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 UserExperienceAnalyticsScoreHistoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsScoreHistoryCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(UserExperienceAnalyticsScoreHistory.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/UserExperienceAnalyticsSettings.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsSettings.cs new file mode 100644 index 00000000000..fccf409fb22 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsSettings.cs @@ -0,0 +1,73 @@ +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 { + /// + /// The user experience analytics insight is the recomendation to improve the user experience analytics score. + /// + public class UserExperienceAnalyticsSettings : 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; } + /// When TRUE, indicates Tenant attach is configured properly and System Center Configuration Manager (SCCM) tenant attached devices will show up in endpoint analytics reporting. When FALSE, indicates Tenant attach is not configured. FALSE by default. + public bool? ConfigurationManagerDataConnectorConfigured { + get { return BackingStore?.Get("configurationManagerDataConnectorConfigured"); } + set { BackingStore?.Set("configurationManagerDataConnectorConfigured", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// + /// Instantiates a new userExperienceAnalyticsSettings and sets the default values. + /// + public UserExperienceAnalyticsSettings() { + 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 UserExperienceAnalyticsSettings CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsSettings(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"configurationManagerDataConnectorConfigured", n => { ConfigurationManagerDataConnectorConfigured = n.GetBoolValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("configurationManagerDataConnectorConfigured", ConfigurationManagerDataConnectorConfigured); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWindows10DevicesSummary.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWindows10DevicesSummary.cs new file mode 100644 index 00000000000..508c74365e0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWindows10DevicesSummary.cs @@ -0,0 +1,73 @@ +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 { + /// + /// The user experience analytics work from anywhere Windows 10 devices summary. + /// + public class UserExperienceAnalyticsWindows10DevicesSummary : 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 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 count of Windows 10 devices that have unsupported OS versions. Read-only. + public int? UnsupportedOSversionDeviceCount { + get { return BackingStore?.Get("unsupportedOSversionDeviceCount"); } + set { BackingStore?.Set("unsupportedOSversionDeviceCount", value); } + } + /// + /// Instantiates a new userExperienceAnalyticsWindows10DevicesSummary and sets the default values. + /// + public UserExperienceAnalyticsWindows10DevicesSummary() { + 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 UserExperienceAnalyticsWindows10DevicesSummary CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsWindows10DevicesSummary(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"unsupportedOSversionDeviceCount", n => { UnsupportedOSversionDeviceCount = n.GetIntValue(); } }, + }; + } + /// + /// 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("@odata.type", OdataType); + writer.WriteIntValue("unsupportedOSversionDeviceCount", UnsupportedOSversionDeviceCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereDevice.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereDevice.cs new file mode 100644 index 00000000000..b52ea77ec89 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereDevice.cs @@ -0,0 +1,372 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + /// + /// The user experience analytics device for work from anywhere report. + /// + public class UserExperienceAnalyticsWorkFromAnywhereDevice : Entity, IParsable { + /// When TRUE, indicates the intune device's autopilot profile is assigned. When FALSE, indicates it's not Assigned. Supports: $select, $OrderBy. Read-only. + public bool? AutoPilotProfileAssigned { + get { return BackingStore?.Get("autoPilotProfileAssigned"); } + set { BackingStore?.Set("autoPilotProfileAssigned", value); } + } + /// When TRUE, indicates the intune device's autopilot is registered. When FALSE, indicates it's not registered. Supports: $select, $OrderBy. Read-only. + public bool? AutoPilotRegistered { + get { return BackingStore?.Get("autoPilotRegistered"); } + set { BackingStore?.Set("autoPilotRegistered", value); } + } + /// The Azure Active Directory (Azure AD) device Id. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AzureAdDeviceId { + get { return BackingStore?.Get("azureAdDeviceId"); } + set { BackingStore?.Set("azureAdDeviceId", value); } + } +#nullable restore +#else + public string AzureAdDeviceId { + get { return BackingStore?.Get("azureAdDeviceId"); } + set { BackingStore?.Set("azureAdDeviceId", value); } + } +#endif + /// The work from anywhere device's Azure Active Directory (Azure AD) join type. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AzureAdJoinType { + get { return BackingStore?.Get("azureAdJoinType"); } + set { BackingStore?.Set("azureAdJoinType", value); } + } +#nullable restore +#else + public string AzureAdJoinType { + get { return BackingStore?.Get("azureAdJoinType"); } + set { BackingStore?.Set("azureAdJoinType", value); } + } +#endif + /// When TRUE, indicates the device's Azure Active Directory (Azure AD) is registered. When False, indicates it's not registered. Supports: $select, $OrderBy. Read-only. + public bool? AzureAdRegistered { + get { return BackingStore?.Get("azureAdRegistered"); } + set { BackingStore?.Set("azureAdRegistered", value); } + } + /// Indicates per device cloud identity score. Valid values 0 to 100. Value -1 means associated score is unavailable. Supports: $select, $OrderBy. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? CloudIdentityScore { + get { return BackingStore?.Get("cloudIdentityScore"); } + set { BackingStore?.Set("cloudIdentityScore", value); } + } + /// Indicates per device cloud management score. Valid values 0 to 100. Value -1 means associated score is unavailable. Supports: $select, $OrderBy. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? CloudManagementScore { + get { return BackingStore?.Get("cloudManagementScore"); } + set { BackingStore?.Set("cloudManagementScore", value); } + } + /// Indicates per device cloud provisioning score. Valid values 0 to 100. Value -1 means associated score is unavailable. Supports: $select, $OrderBy. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? CloudProvisioningScore { + get { return BackingStore?.Get("cloudProvisioningScore"); } + set { BackingStore?.Set("cloudProvisioningScore", value); } + } + /// When TRUE, indicates the device's compliance policy is set to intune. When FALSE, indicates it's not set to intune. Supports: $select, $OrderBy. Read-only. + public bool? CompliancePolicySetToIntune { + get { return BackingStore?.Get("compliancePolicySetToIntune"); } + set { BackingStore?.Set("compliancePolicySetToIntune", value); } + } + /// The Intune device id of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeviceId { + get { return BackingStore?.Get("deviceId"); } + set { BackingStore?.Set("deviceId", value); } + } +#nullable restore +#else + public string DeviceId { + get { return BackingStore?.Get("deviceId"); } + set { BackingStore?.Set("deviceId", value); } + } +#endif + /// The name of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeviceName { + get { return BackingStore?.Get("deviceName"); } + set { BackingStore?.Set("deviceName", value); } + } +#nullable restore +#else + public string DeviceName { + get { return BackingStore?.Get("deviceName"); } + set { BackingStore?.Set("deviceName", value); } + } +#endif + /// The healthStatus property + public UserExperienceAnalyticsHealthState? HealthStatus { + get { return BackingStore?.Get("healthStatus"); } + set { BackingStore?.Set("healthStatus", value); } + } + /// When TRUE, indicates the device's Cloud Management Gateway for Configuration Manager is enabled. When FALSE, indicates it's not enabled. Supports: $select, $OrderBy. Read-only. + public bool? IsCloudManagedGatewayEnabled { + get { return BackingStore?.Get("isCloudManagedGatewayEnabled"); } + set { BackingStore?.Set("isCloudManagedGatewayEnabled", value); } + } + /// The management agent of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ManagedBy { + get { return BackingStore?.Get("managedBy"); } + set { BackingStore?.Set("managedBy", value); } + } +#nullable restore +#else + public string ManagedBy { + get { return BackingStore?.Get("managedBy"); } + set { BackingStore?.Set("managedBy", value); } + } +#endif + /// The manufacturer name of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Manufacturer { + get { return BackingStore?.Get("manufacturer"); } + set { BackingStore?.Set("manufacturer", value); } + } +#nullable restore +#else + public string Manufacturer { + get { return BackingStore?.Get("manufacturer"); } + set { BackingStore?.Set("manufacturer", value); } + } +#endif + /// The model name of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Model { + get { return BackingStore?.Get("model"); } + set { BackingStore?.Set("model", value); } + } +#nullable restore +#else + public string Model { + get { return BackingStore?.Get("model"); } + set { BackingStore?.Set("model", value); } + } +#endif + /// When TRUE, indicates OS check failed for device to upgrade to the latest version of windows. When FALSE, indicates the check succeeded. Supports: $select, $OrderBy. Read-only. + public bool? OsCheckFailed { + get { return BackingStore?.Get("osCheckFailed"); } + set { BackingStore?.Set("osCheckFailed", value); } + } + /// The OS description of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OsDescription { + get { return BackingStore?.Get("osDescription"); } + set { BackingStore?.Set("osDescription", value); } + } +#nullable restore +#else + public string OsDescription { + get { return BackingStore?.Get("osDescription"); } + set { BackingStore?.Set("osDescription", value); } + } +#endif + /// The OS version of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OsVersion { + get { return BackingStore?.Get("osVersion"); } + set { BackingStore?.Set("osVersion", value); } + } +#nullable restore +#else + public string OsVersion { + get { return BackingStore?.Get("osVersion"); } + set { BackingStore?.Set("osVersion", value); } + } +#endif + /// When TRUE, indicates the device's other workloads is set to intune. When FALSE, indicates it's not set to intune. Supports: $select, $OrderBy. Read-only. + public bool? OtherWorkloadsSetToIntune { + get { return BackingStore?.Get("otherWorkloadsSetToIntune"); } + set { BackingStore?.Set("otherWorkloadsSetToIntune", value); } + } + /// Ownership of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ownership { + get { return BackingStore?.Get("ownership"); } + set { BackingStore?.Set("ownership", value); } + } +#nullable restore +#else + public string Ownership { + get { return BackingStore?.Get("ownership"); } + set { BackingStore?.Set("ownership", value); } + } +#endif + /// When TRUE, indicates processor hardware 64-bit architecture check failed for device to upgrade to the latest version of windows. When FALSE, indicates the check succeeded. Supports: $select, $OrderBy. Read-only. + public bool? Processor64BitCheckFailed { + get { return BackingStore?.Get("processor64BitCheckFailed"); } + set { BackingStore?.Set("processor64BitCheckFailed", value); } + } + /// When TRUE, indicates processor hardware core count check failed for device to upgrade to the latest version of windows. When FALSE, indicates the check succeeded. Supports: $select, $OrderBy. Read-only. + public bool? ProcessorCoreCountCheckFailed { + get { return BackingStore?.Get("processorCoreCountCheckFailed"); } + set { BackingStore?.Set("processorCoreCountCheckFailed", value); } + } + /// When TRUE, indicates processor hardware family check failed for device to upgrade to the latest version of windows. When FALSE, indicates the check succeeded. Supports: $select, $OrderBy. Read-only. + public bool? ProcessorFamilyCheckFailed { + get { return BackingStore?.Get("processorFamilyCheckFailed"); } + set { BackingStore?.Set("processorFamilyCheckFailed", value); } + } + /// When TRUE, indicates processor hardware speed check failed for device to upgrade to the latest version of windows. When FALSE, indicates the check succeeded. Supports: $select, $OrderBy. Read-only. + public bool? ProcessorSpeedCheckFailed { + get { return BackingStore?.Get("processorSpeedCheckFailed"); } + set { BackingStore?.Set("processorSpeedCheckFailed", value); } + } + /// When TRUE, indicates RAM hardware check failed for device to upgrade to the latest version of windows. When FALSE, indicates the check succeeded. Supports: $select, $OrderBy. Read-only. + public bool? RamCheckFailed { + get { return BackingStore?.Get("ramCheckFailed"); } + set { BackingStore?.Set("ramCheckFailed", value); } + } + /// When TRUE, indicates secure boot hardware check failed for device to upgrade to the latest version of windows. When FALSE, indicates the check succeeded. Supports: $select, $OrderBy. Read-only. + public bool? SecureBootCheckFailed { + get { return BackingStore?.Get("secureBootCheckFailed"); } + set { BackingStore?.Set("secureBootCheckFailed", value); } + } + /// The serial number of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SerialNumber { + get { return BackingStore?.Get("serialNumber"); } + set { BackingStore?.Set("serialNumber", value); } + } +#nullable restore +#else + public string SerialNumber { + get { return BackingStore?.Get("serialNumber"); } + set { BackingStore?.Set("serialNumber", value); } + } +#endif + /// When TRUE, indicates storage hardware check failed for device to upgrade to the latest version of windows. When FALSE, indicates the check succeeded. Supports: $select, $OrderBy. Read-only. + public bool? StorageCheckFailed { + get { return BackingStore?.Get("storageCheckFailed"); } + set { BackingStore?.Set("storageCheckFailed", value); } + } + /// When TRUE, indicates the device is Tenant Attached. When FALSE, indicates it's not Tenant Attached. Supports: $select, $OrderBy. Read-only. + public bool? TenantAttached { + get { return BackingStore?.Get("tenantAttached"); } + set { BackingStore?.Set("tenantAttached", value); } + } + /// When TRUE, indicates Trusted Platform Module (TPM) hardware check failed for device to the latest version of upgrade to windows. When FALSE, indicates the check succeeded. Supports: $select, $OrderBy. Read-only. + public bool? TpmCheckFailed { + get { return BackingStore?.Get("tpmCheckFailed"); } + set { BackingStore?.Set("tpmCheckFailed", value); } + } + /// Work From Anywhere windows device upgrade eligibility status. + public OperatingSystemUpgradeEligibility? UpgradeEligibility { + get { return BackingStore?.Get("upgradeEligibility"); } + set { BackingStore?.Set("upgradeEligibility", value); } + } + /// Indicates per device windows score. Valid values 0 to 100. Value -1 means associated score is unavailable. Supports: $select, $OrderBy. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? WindowsScore { + get { return BackingStore?.Get("windowsScore"); } + set { BackingStore?.Set("windowsScore", value); } + } + /// Indicates work from anywhere per device overall score. Valid values 0 to 100. Value -1 means associated score is unavailable. Supports: $select, $OrderBy. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? WorkFromAnywhereScore { + get { return BackingStore?.Get("workFromAnywhereScore"); } + set { BackingStore?.Set("workFromAnywhereScore", 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 UserExperienceAnalyticsWorkFromAnywhereDevice CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsWorkFromAnywhereDevice(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"autoPilotProfileAssigned", n => { AutoPilotProfileAssigned = n.GetBoolValue(); } }, + {"autoPilotRegistered", n => { AutoPilotRegistered = n.GetBoolValue(); } }, + {"azureAdDeviceId", n => { AzureAdDeviceId = n.GetStringValue(); } }, + {"azureAdJoinType", n => { AzureAdJoinType = n.GetStringValue(); } }, + {"azureAdRegistered", n => { AzureAdRegistered = n.GetBoolValue(); } }, + {"cloudIdentityScore", n => { CloudIdentityScore = n.GetDoubleValue(); } }, + {"cloudManagementScore", n => { CloudManagementScore = n.GetDoubleValue(); } }, + {"cloudProvisioningScore", n => { CloudProvisioningScore = n.GetDoubleValue(); } }, + {"compliancePolicySetToIntune", n => { CompliancePolicySetToIntune = n.GetBoolValue(); } }, + {"deviceId", n => { DeviceId = n.GetStringValue(); } }, + {"deviceName", n => { DeviceName = n.GetStringValue(); } }, + {"healthStatus", n => { HealthStatus = n.GetEnumValue(); } }, + {"isCloudManagedGatewayEnabled", n => { IsCloudManagedGatewayEnabled = n.GetBoolValue(); } }, + {"managedBy", n => { ManagedBy = n.GetStringValue(); } }, + {"manufacturer", n => { Manufacturer = n.GetStringValue(); } }, + {"model", n => { Model = n.GetStringValue(); } }, + {"osCheckFailed", n => { OsCheckFailed = n.GetBoolValue(); } }, + {"osDescription", n => { OsDescription = n.GetStringValue(); } }, + {"osVersion", n => { OsVersion = n.GetStringValue(); } }, + {"otherWorkloadsSetToIntune", n => { OtherWorkloadsSetToIntune = n.GetBoolValue(); } }, + {"ownership", n => { Ownership = n.GetStringValue(); } }, + {"processor64BitCheckFailed", n => { Processor64BitCheckFailed = n.GetBoolValue(); } }, + {"processorCoreCountCheckFailed", n => { ProcessorCoreCountCheckFailed = n.GetBoolValue(); } }, + {"processorFamilyCheckFailed", n => { ProcessorFamilyCheckFailed = n.GetBoolValue(); } }, + {"processorSpeedCheckFailed", n => { ProcessorSpeedCheckFailed = n.GetBoolValue(); } }, + {"ramCheckFailed", n => { RamCheckFailed = n.GetBoolValue(); } }, + {"secureBootCheckFailed", n => { SecureBootCheckFailed = n.GetBoolValue(); } }, + {"serialNumber", n => { SerialNumber = n.GetStringValue(); } }, + {"storageCheckFailed", n => { StorageCheckFailed = n.GetBoolValue(); } }, + {"tenantAttached", n => { TenantAttached = n.GetBoolValue(); } }, + {"tpmCheckFailed", n => { TpmCheckFailed = n.GetBoolValue(); } }, + {"upgradeEligibility", n => { UpgradeEligibility = n.GetEnumValue(); } }, + {"windowsScore", n => { WindowsScore = n.GetDoubleValue(); } }, + {"workFromAnywhereScore", n => { WorkFromAnywhereScore = n.GetDoubleValue(); } }, + }; + } + /// + /// 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.WriteBoolValue("autoPilotProfileAssigned", AutoPilotProfileAssigned); + writer.WriteBoolValue("autoPilotRegistered", AutoPilotRegistered); + writer.WriteStringValue("azureAdDeviceId", AzureAdDeviceId); + writer.WriteStringValue("azureAdJoinType", AzureAdJoinType); + writer.WriteBoolValue("azureAdRegistered", AzureAdRegistered); + writer.WriteDoubleValue("cloudIdentityScore", CloudIdentityScore); + writer.WriteDoubleValue("cloudManagementScore", CloudManagementScore); + writer.WriteDoubleValue("cloudProvisioningScore", CloudProvisioningScore); + writer.WriteBoolValue("compliancePolicySetToIntune", CompliancePolicySetToIntune); + writer.WriteStringValue("deviceId", DeviceId); + writer.WriteStringValue("deviceName", DeviceName); + writer.WriteEnumValue("healthStatus", HealthStatus); + writer.WriteBoolValue("isCloudManagedGatewayEnabled", IsCloudManagedGatewayEnabled); + writer.WriteStringValue("managedBy", ManagedBy); + writer.WriteStringValue("manufacturer", Manufacturer); + writer.WriteStringValue("model", Model); + writer.WriteBoolValue("osCheckFailed", OsCheckFailed); + writer.WriteStringValue("osDescription", OsDescription); + writer.WriteStringValue("osVersion", OsVersion); + writer.WriteBoolValue("otherWorkloadsSetToIntune", OtherWorkloadsSetToIntune); + writer.WriteStringValue("ownership", Ownership); + writer.WriteBoolValue("processor64BitCheckFailed", Processor64BitCheckFailed); + writer.WriteBoolValue("processorCoreCountCheckFailed", ProcessorCoreCountCheckFailed); + writer.WriteBoolValue("processorFamilyCheckFailed", ProcessorFamilyCheckFailed); + writer.WriteBoolValue("processorSpeedCheckFailed", ProcessorSpeedCheckFailed); + writer.WriteBoolValue("ramCheckFailed", RamCheckFailed); + writer.WriteBoolValue("secureBootCheckFailed", SecureBootCheckFailed); + writer.WriteStringValue("serialNumber", SerialNumber); + writer.WriteBoolValue("storageCheckFailed", StorageCheckFailed); + writer.WriteBoolValue("tenantAttached", TenantAttached); + writer.WriteBoolValue("tpmCheckFailed", TpmCheckFailed); + writer.WriteEnumValue("upgradeEligibility", UpgradeEligibility); + writer.WriteDoubleValue("windowsScore", WindowsScore); + writer.WriteDoubleValue("workFromAnywhereScore", WorkFromAnywhereScore); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereDeviceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereDeviceCollectionResponse.cs new file mode 100644 index 00000000000..42326406bcb --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereDeviceCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserExperienceAnalyticsWorkFromAnywhereDeviceCollectionResponse : 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 UserExperienceAnalyticsWorkFromAnywhereDeviceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsWorkFromAnywhereDeviceCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(UserExperienceAnalyticsWorkFromAnywhereDevice.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/UserExperienceAnalyticsWorkFromAnywhereDevicesSummary.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereDevicesSummary.cs new file mode 100644 index 00000000000..345d9c80259 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereDevicesSummary.cs @@ -0,0 +1,200 @@ +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 { + /// + /// The user experience analytics Work From Anywhere metrics devices summary. + /// + public class UserExperienceAnalyticsWorkFromAnywhereDevicesSummary : 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); } + } + /// The user experience analytics work from anywhere Autopilot devices summary. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UserExperienceAnalyticsAutopilotDevicesSummary? AutopilotDevicesSummary { + get { return BackingStore?.Get("autopilotDevicesSummary"); } + set { BackingStore?.Set("autopilotDevicesSummary", value); } + } +#nullable restore +#else + public UserExperienceAnalyticsAutopilotDevicesSummary AutopilotDevicesSummary { + get { return BackingStore?.Get("autopilotDevicesSummary"); } + set { BackingStore?.Set("autopilotDevicesSummary", value); } + } +#endif + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The user experience analytics work from anywhere Cloud Identity devices summary. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UserExperienceAnalyticsCloudIdentityDevicesSummary? CloudIdentityDevicesSummary { + get { return BackingStore?.Get("cloudIdentityDevicesSummary"); } + set { BackingStore?.Set("cloudIdentityDevicesSummary", value); } + } +#nullable restore +#else + public UserExperienceAnalyticsCloudIdentityDevicesSummary CloudIdentityDevicesSummary { + get { return BackingStore?.Get("cloudIdentityDevicesSummary"); } + set { BackingStore?.Set("cloudIdentityDevicesSummary", value); } + } +#endif + /// The user experience analytics work from anywhere Cloud management devices summary. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UserExperienceAnalyticsCloudManagementDevicesSummary? CloudManagementDevicesSummary { + get { return BackingStore?.Get("cloudManagementDevicesSummary"); } + set { BackingStore?.Set("cloudManagementDevicesSummary", value); } + } +#nullable restore +#else + public UserExperienceAnalyticsCloudManagementDevicesSummary CloudManagementDevicesSummary { + get { return BackingStore?.Get("cloudManagementDevicesSummary"); } + set { BackingStore?.Set("cloudManagementDevicesSummary", value); } + } +#endif + /// Total number of co-managed devices. Read-only. Valid values -2147483648 to 2147483647 + public int? CoManagedDevices { + get { return BackingStore?.Get("coManagedDevices"); } + set { BackingStore?.Set("coManagedDevices", value); } + } + /// The count of intune devices that are not autopilot registerd. Read-only. Valid values -2147483648 to 2147483647 + public int? DevicesNotAutopilotRegistered { + get { return BackingStore?.Get("devicesNotAutopilotRegistered"); } + set { BackingStore?.Set("devicesNotAutopilotRegistered", value); } + } + /// The count of intune devices not autopilot profile assigned. Read-only. Valid values -2147483648 to 2147483647 + public int? DevicesWithoutAutopilotProfileAssigned { + get { return BackingStore?.Get("devicesWithoutAutopilotProfileAssigned"); } + set { BackingStore?.Set("devicesWithoutAutopilotProfileAssigned", value); } + } + /// The count of devices that are not cloud identity. Read-only. Valid values -2147483648 to 2147483647 + public int? DevicesWithoutCloudIdentity { + get { return BackingStore?.Get("devicesWithoutCloudIdentity"); } + set { BackingStore?.Set("devicesWithoutCloudIdentity", value); } + } + /// The count of intune devices that are not autopilot registerd. Read-only. Valid values -2147483648 to 2147483647 + public int? IntuneDevices { + get { return BackingStore?.Get("intuneDevices"); } + set { BackingStore?.Set("intuneDevices", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// Total count of tenant attach devices. Read-only. Valid values -2147483648 to 2147483647 + public int? TenantAttachDevices { + get { return BackingStore?.Get("tenantAttachDevices"); } + set { BackingStore?.Set("tenantAttachDevices", value); } + } + /// The total count of devices. Read-only. Valid values -2147483648 to 2147483647 + public int? TotalDevices { + get { return BackingStore?.Get("totalDevices"); } + set { BackingStore?.Set("totalDevices", value); } + } + /// The count of Windows 10 devices that have unsupported OS versions. Read-only. Valid values -2147483648 to 2147483647 + public int? UnsupportedOSversionDevices { + get { return BackingStore?.Get("unsupportedOSversionDevices"); } + set { BackingStore?.Set("unsupportedOSversionDevices", value); } + } + /// The count of windows 10 devices. Read-only. Valid values -2147483648 to 2147483647 + public int? Windows10Devices { + get { return BackingStore?.Get("windows10Devices"); } + set { BackingStore?.Set("windows10Devices", value); } + } + /// The user experience analytics work from anywhere Windows 10 devices summary. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UserExperienceAnalyticsWindows10DevicesSummary? Windows10DevicesSummary { + get { return BackingStore?.Get("windows10DevicesSummary"); } + set { BackingStore?.Set("windows10DevicesSummary", value); } + } +#nullable restore +#else + public UserExperienceAnalyticsWindows10DevicesSummary Windows10DevicesSummary { + get { return BackingStore?.Get("windows10DevicesSummary"); } + set { BackingStore?.Set("windows10DevicesSummary", value); } + } +#endif + /// The count of windows 10 devices that are Intune and co-managed. Read-only. Valid values -2147483648 to 2147483647 + public int? Windows10DevicesWithoutTenantAttach { + get { return BackingStore?.Get("windows10DevicesWithoutTenantAttach"); } + set { BackingStore?.Set("windows10DevicesWithoutTenantAttach", value); } + } + /// + /// Instantiates a new userExperienceAnalyticsWorkFromAnywhereDevicesSummary and sets the default values. + /// + public UserExperienceAnalyticsWorkFromAnywhereDevicesSummary() { + 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 UserExperienceAnalyticsWorkFromAnywhereDevicesSummary CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsWorkFromAnywhereDevicesSummary(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"autopilotDevicesSummary", n => { AutopilotDevicesSummary = n.GetObjectValue(UserExperienceAnalyticsAutopilotDevicesSummary.CreateFromDiscriminatorValue); } }, + {"cloudIdentityDevicesSummary", n => { CloudIdentityDevicesSummary = n.GetObjectValue(UserExperienceAnalyticsCloudIdentityDevicesSummary.CreateFromDiscriminatorValue); } }, + {"cloudManagementDevicesSummary", n => { CloudManagementDevicesSummary = n.GetObjectValue(UserExperienceAnalyticsCloudManagementDevicesSummary.CreateFromDiscriminatorValue); } }, + {"coManagedDevices", n => { CoManagedDevices = n.GetIntValue(); } }, + {"devicesNotAutopilotRegistered", n => { DevicesNotAutopilotRegistered = n.GetIntValue(); } }, + {"devicesWithoutAutopilotProfileAssigned", n => { DevicesWithoutAutopilotProfileAssigned = n.GetIntValue(); } }, + {"devicesWithoutCloudIdentity", n => { DevicesWithoutCloudIdentity = n.GetIntValue(); } }, + {"intuneDevices", n => { IntuneDevices = n.GetIntValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"tenantAttachDevices", n => { TenantAttachDevices = n.GetIntValue(); } }, + {"totalDevices", n => { TotalDevices = n.GetIntValue(); } }, + {"unsupportedOSversionDevices", n => { UnsupportedOSversionDevices = n.GetIntValue(); } }, + {"windows10Devices", n => { Windows10Devices = n.GetIntValue(); } }, + {"windows10DevicesSummary", n => { Windows10DevicesSummary = n.GetObjectValue(UserExperienceAnalyticsWindows10DevicesSummary.CreateFromDiscriminatorValue); } }, + {"windows10DevicesWithoutTenantAttach", n => { Windows10DevicesWithoutTenantAttach = n.GetIntValue(); } }, + }; + } + /// + /// 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("autopilotDevicesSummary", AutopilotDevicesSummary); + writer.WriteObjectValue("cloudIdentityDevicesSummary", CloudIdentityDevicesSummary); + writer.WriteObjectValue("cloudManagementDevicesSummary", CloudManagementDevicesSummary); + writer.WriteIntValue("coManagedDevices", CoManagedDevices); + writer.WriteIntValue("devicesNotAutopilotRegistered", DevicesNotAutopilotRegistered); + writer.WriteIntValue("devicesWithoutAutopilotProfileAssigned", DevicesWithoutAutopilotProfileAssigned); + writer.WriteIntValue("devicesWithoutCloudIdentity", DevicesWithoutCloudIdentity); + writer.WriteIntValue("intuneDevices", IntuneDevices); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteIntValue("tenantAttachDevices", TenantAttachDevices); + writer.WriteIntValue("totalDevices", TotalDevices); + writer.WriteIntValue("unsupportedOSversionDevices", UnsupportedOSversionDevices); + writer.WriteIntValue("windows10Devices", Windows10Devices); + writer.WriteObjectValue("windows10DevicesSummary", Windows10DevicesSummary); + writer.WriteIntValue("windows10DevicesWithoutTenantAttach", Windows10DevicesWithoutTenantAttach); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric.cs new file mode 100644 index 00000000000..f629470f7d1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric.cs @@ -0,0 +1,109 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric : Entity, IParsable { + /// The percentage of devices for which OS check has failed. Valid values 0 to 100. Supports: $select, $OrderBy. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? OsCheckFailedPercentage { + get { return BackingStore?.Get("osCheckFailedPercentage"); } + set { BackingStore?.Set("osCheckFailedPercentage", value); } + } + /// The percentage of devices for which processor hardware 64-bit architecture check has failed. Valid values 0 to 100. Supports: $select, $OrderBy. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? Processor64BitCheckFailedPercentage { + get { return BackingStore?.Get("processor64BitCheckFailedPercentage"); } + set { BackingStore?.Set("processor64BitCheckFailedPercentage", value); } + } + /// The percentage of devices for which processor hardware core count check has failed. Valid values 0 to 100. Supports: $select, $OrderBy. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? ProcessorCoreCountCheckFailedPercentage { + get { return BackingStore?.Get("processorCoreCountCheckFailedPercentage"); } + set { BackingStore?.Set("processorCoreCountCheckFailedPercentage", value); } + } + /// The percentage of devices for which processor hardware family check has failed. Valid values 0 to 100. Supports: $select, $OrderBy. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? ProcessorFamilyCheckFailedPercentage { + get { return BackingStore?.Get("processorFamilyCheckFailedPercentage"); } + set { BackingStore?.Set("processorFamilyCheckFailedPercentage", value); } + } + /// The percentage of devices for which processor hardware speed check has failed. Valid values 0 to 100. Supports: $select, $OrderBy. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? ProcessorSpeedCheckFailedPercentage { + get { return BackingStore?.Get("processorSpeedCheckFailedPercentage"); } + set { BackingStore?.Set("processorSpeedCheckFailedPercentage", value); } + } + /// The percentage of devices for which RAM hardware check has failed. Valid values 0 to 100. Supports: $select, $OrderBy. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? RamCheckFailedPercentage { + get { return BackingStore?.Get("ramCheckFailedPercentage"); } + set { BackingStore?.Set("ramCheckFailedPercentage", value); } + } + /// The percentage of devices for which secure boot hardware check has failed. Valid values 0 to 100. Supports: $select, $OrderBy. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? SecureBootCheckFailedPercentage { + get { return BackingStore?.Get("secureBootCheckFailedPercentage"); } + set { BackingStore?.Set("secureBootCheckFailedPercentage", value); } + } + /// The percentage of devices for which storage hardware check has failed. Valid values 0 to 100. Supports: $select, $OrderBy. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? StorageCheckFailedPercentage { + get { return BackingStore?.Get("storageCheckFailedPercentage"); } + set { BackingStore?.Set("storageCheckFailedPercentage", value); } + } + /// The count of total devices in an organization. Valid values 0 to 2147483647. Supports: $select, $OrderBy. Read-only. Valid values -2147483648 to 2147483647 + public int? TotalDeviceCount { + get { return BackingStore?.Get("totalDeviceCount"); } + set { BackingStore?.Set("totalDeviceCount", value); } + } + /// The percentage of devices for which Trusted Platform Module (TPM) hardware check has failed. Valid values 0 to 100. Supports: $select, $OrderBy. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? TpmCheckFailedPercentage { + get { return BackingStore?.Get("tpmCheckFailedPercentage"); } + set { BackingStore?.Set("tpmCheckFailedPercentage", value); } + } + /// The count of devices in an organization eligible for windows upgrade. Valid values 0 to 2147483647. Supports: $select, $OrderBy. Read-only. Valid values -2147483648 to 2147483647 + public int? UpgradeEligibleDeviceCount { + get { return BackingStore?.Get("upgradeEligibleDeviceCount"); } + set { BackingStore?.Set("upgradeEligibleDeviceCount", 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 UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"osCheckFailedPercentage", n => { OsCheckFailedPercentage = n.GetDoubleValue(); } }, + {"processor64BitCheckFailedPercentage", n => { Processor64BitCheckFailedPercentage = n.GetDoubleValue(); } }, + {"processorCoreCountCheckFailedPercentage", n => { ProcessorCoreCountCheckFailedPercentage = n.GetDoubleValue(); } }, + {"processorFamilyCheckFailedPercentage", n => { ProcessorFamilyCheckFailedPercentage = n.GetDoubleValue(); } }, + {"processorSpeedCheckFailedPercentage", n => { ProcessorSpeedCheckFailedPercentage = n.GetDoubleValue(); } }, + {"ramCheckFailedPercentage", n => { RamCheckFailedPercentage = n.GetDoubleValue(); } }, + {"secureBootCheckFailedPercentage", n => { SecureBootCheckFailedPercentage = n.GetDoubleValue(); } }, + {"storageCheckFailedPercentage", n => { StorageCheckFailedPercentage = n.GetDoubleValue(); } }, + {"totalDeviceCount", n => { TotalDeviceCount = n.GetIntValue(); } }, + {"tpmCheckFailedPercentage", n => { TpmCheckFailedPercentage = n.GetDoubleValue(); } }, + {"upgradeEligibleDeviceCount", n => { UpgradeEligibleDeviceCount = n.GetIntValue(); } }, + }; + } + /// + /// 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.WriteDoubleValue("osCheckFailedPercentage", OsCheckFailedPercentage); + writer.WriteDoubleValue("processor64BitCheckFailedPercentage", Processor64BitCheckFailedPercentage); + writer.WriteDoubleValue("processorCoreCountCheckFailedPercentage", ProcessorCoreCountCheckFailedPercentage); + writer.WriteDoubleValue("processorFamilyCheckFailedPercentage", ProcessorFamilyCheckFailedPercentage); + writer.WriteDoubleValue("processorSpeedCheckFailedPercentage", ProcessorSpeedCheckFailedPercentage); + writer.WriteDoubleValue("ramCheckFailedPercentage", RamCheckFailedPercentage); + writer.WriteDoubleValue("secureBootCheckFailedPercentage", SecureBootCheckFailedPercentage); + writer.WriteDoubleValue("storageCheckFailedPercentage", StorageCheckFailedPercentage); + writer.WriteIntValue("totalDeviceCount", TotalDeviceCount); + writer.WriteDoubleValue("tpmCheckFailedPercentage", TpmCheckFailedPercentage); + writer.WriteIntValue("upgradeEligibleDeviceCount", UpgradeEligibleDeviceCount); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereMetric.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereMetric.cs new file mode 100644 index 00000000000..10fd4112b9d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereMetric.cs @@ -0,0 +1,51 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + /// + /// The user experience analytics metric for work from anywhere report. + /// + public class UserExperienceAnalyticsWorkFromAnywhereMetric : Entity, IParsable { + /// The work from anywhere metric devices. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? MetricDevices { + get { return BackingStore?.Get?>("metricDevices"); } + set { BackingStore?.Set("metricDevices", value); } + } +#nullable restore +#else + public List MetricDevices { + get { return BackingStore?.Get>("metricDevices"); } + set { BackingStore?.Set("metricDevices", 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 UserExperienceAnalyticsWorkFromAnywhereMetric CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsWorkFromAnywhereMetric(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"metricDevices", n => { MetricDevices = n.GetCollectionOfObjectValues(UserExperienceAnalyticsWorkFromAnywhereDevice.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("metricDevices", MetricDevices); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereMetricCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereMetricCollectionResponse.cs new file mode 100644 index 00000000000..5722c6f2729 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereMetricCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserExperienceAnalyticsWorkFromAnywhereMetricCollectionResponse : 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 UserExperienceAnalyticsWorkFromAnywhereMetricCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsWorkFromAnywhereMetricCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(UserExperienceAnalyticsWorkFromAnywhereMetric.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/UserExperienceAnalyticsWorkFromAnywhereModelPerformance.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereModelPerformance.cs new file mode 100644 index 00000000000..8c50c97f688 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereModelPerformance.cs @@ -0,0 +1,116 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + /// + /// The user experience analytics work from anywhere model performance. + /// + public class UserExperienceAnalyticsWorkFromAnywhereModelPerformance : Entity, IParsable { + /// The cloud identity score of the device model. Valid values 0 to 100. Value -1 means associated score is unavailable. Supports: $select, $OrderBy. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? CloudIdentityScore { + get { return BackingStore?.Get("cloudIdentityScore"); } + set { BackingStore?.Set("cloudIdentityScore", value); } + } + /// The cloud management score of the device model. Valid values 0 to 100. Value -1 means associated score is unavailable. Supports: $select, $OrderBy. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? CloudManagementScore { + get { return BackingStore?.Get("cloudManagementScore"); } + set { BackingStore?.Set("cloudManagementScore", value); } + } + /// The cloud provisioning score of the device model. Valid values 0 to 100. Value -1 means associated score is unavailable. Supports: $select, $OrderBy. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? CloudProvisioningScore { + get { return BackingStore?.Get("cloudProvisioningScore"); } + set { BackingStore?.Set("cloudProvisioningScore", value); } + } + /// The healthStatus property + public UserExperienceAnalyticsHealthState? HealthStatus { + get { return BackingStore?.Get("healthStatus"); } + set { BackingStore?.Set("healthStatus", value); } + } + /// The manufacturer name of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Manufacturer { + get { return BackingStore?.Get("manufacturer"); } + set { BackingStore?.Set("manufacturer", value); } + } +#nullable restore +#else + public string Manufacturer { + get { return BackingStore?.Get("manufacturer"); } + set { BackingStore?.Set("manufacturer", value); } + } +#endif + /// The model name of the device. Supports: $select, $OrderBy. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Model { + get { return BackingStore?.Get("model"); } + set { BackingStore?.Set("model", value); } + } +#nullable restore +#else + public string Model { + get { return BackingStore?.Get("model"); } + set { BackingStore?.Set("model", value); } + } +#endif + /// The devices count for the model. Supports: $select, $OrderBy. Read-only. Valid values -2147483648 to 2147483647 + public int? ModelDeviceCount { + get { return BackingStore?.Get("modelDeviceCount"); } + set { BackingStore?.Set("modelDeviceCount", value); } + } + /// The window score of the device model. Valid values 0 to 100. Value -1 means associated score is unavailable. Supports: $select, $OrderBy. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? WindowsScore { + get { return BackingStore?.Get("windowsScore"); } + set { BackingStore?.Set("windowsScore", value); } + } + /// The work from anywhere score of the device model. Valid values 0 to 100. Value -1 means associated score is unavailable. Supports: $select, $OrderBy. Read-only. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + public double? WorkFromAnywhereScore { + get { return BackingStore?.Get("workFromAnywhereScore"); } + set { BackingStore?.Set("workFromAnywhereScore", 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 UserExperienceAnalyticsWorkFromAnywhereModelPerformance CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsWorkFromAnywhereModelPerformance(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"cloudIdentityScore", n => { CloudIdentityScore = n.GetDoubleValue(); } }, + {"cloudManagementScore", n => { CloudManagementScore = n.GetDoubleValue(); } }, + {"cloudProvisioningScore", n => { CloudProvisioningScore = n.GetDoubleValue(); } }, + {"healthStatus", n => { HealthStatus = n.GetEnumValue(); } }, + {"manufacturer", n => { Manufacturer = n.GetStringValue(); } }, + {"model", n => { Model = n.GetStringValue(); } }, + {"modelDeviceCount", n => { ModelDeviceCount = n.GetIntValue(); } }, + {"windowsScore", n => { WindowsScore = n.GetDoubleValue(); } }, + {"workFromAnywhereScore", n => { WorkFromAnywhereScore = n.GetDoubleValue(); } }, + }; + } + /// + /// 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.WriteDoubleValue("cloudIdentityScore", CloudIdentityScore); + writer.WriteDoubleValue("cloudManagementScore", CloudManagementScore); + writer.WriteDoubleValue("cloudProvisioningScore", CloudProvisioningScore); + writer.WriteEnumValue("healthStatus", HealthStatus); + writer.WriteStringValue("manufacturer", Manufacturer); + writer.WriteStringValue("model", Model); + writer.WriteIntValue("modelDeviceCount", ModelDeviceCount); + writer.WriteDoubleValue("windowsScore", WindowsScore); + writer.WriteDoubleValue("workFromAnywhereScore", WorkFromAnywhereScore); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereModelPerformanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereModelPerformanceCollectionResponse.cs new file mode 100644 index 00000000000..7642e5961a5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereModelPerformanceCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserExperienceAnalyticsWorkFromAnywhereModelPerformanceCollectionResponse : 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 UserExperienceAnalyticsWorkFromAnywhereModelPerformanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserExperienceAnalyticsWorkFromAnywhereModelPerformanceCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(UserExperienceAnalyticsWorkFromAnywhereModelPerformance.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/UserLastSignInRecommendationInsightSetting.cs b/src/Microsoft.Graph/Generated/Models/UserLastSignInRecommendationInsightSetting.cs index 3f80c5a2349..fe440a98ffb 100644 --- a/src/Microsoft.Graph/Generated/Models/UserLastSignInRecommendationInsightSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/UserLastSignInRecommendationInsightSetting.cs @@ -5,12 +5,12 @@ using System; namespace Microsoft.Graph.Models { public class UserLastSignInRecommendationInsightSetting : AccessReviewRecommendationInsightSetting, IParsable { - /// The recommendationLookBackDuration property + /// Optional. Indicates the time period of inactivity (with respect to the start date of the review instance) that recommendations will be configured from. The recommendation will be to deny if the user is inactive during the look-back duration. For reviews of groups and Azure AD roles, any duration is accepted. For reviews of applications, 30 days is the maximum duration. If not specified, the duration is 30 days. public TimeSpan? RecommendationLookBackDuration { get { return BackingStore?.Get("recommendationLookBackDuration"); } set { BackingStore?.Set("recommendationLookBackDuration", value); } } - /// The signInScope property + /// Indicates whether inactivity is calculated based on the user's inactivity in the tenant or in the application. The possible values are tenant, application, unknownFutureValue. application is only relevant when the access review is a review of an assignment to an application. public UserSignInRecommendationScope? SignInScope { get { return BackingStore?.Get("signInScope"); } set { BackingStore?.Set("signInScope", value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserRegistrationDetails.cs b/src/Microsoft.Graph/Generated/Models/UserRegistrationDetails.cs new file mode 100644 index 00000000000..2b116d082e4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserRegistrationDetails.cs @@ -0,0 +1,173 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserRegistrationDetails : Entity, IParsable { + /// The isAdmin property + public bool? IsAdmin { + get { return BackingStore?.Get("isAdmin"); } + set { BackingStore?.Set("isAdmin", value); } + } + /// The isMfaCapable property + public bool? IsMfaCapable { + get { return BackingStore?.Get("isMfaCapable"); } + set { BackingStore?.Set("isMfaCapable", value); } + } + /// The isMfaRegistered property + public bool? IsMfaRegistered { + get { return BackingStore?.Get("isMfaRegistered"); } + set { BackingStore?.Set("isMfaRegistered", value); } + } + /// The isPasswordlessCapable property + public bool? IsPasswordlessCapable { + get { return BackingStore?.Get("isPasswordlessCapable"); } + set { BackingStore?.Set("isPasswordlessCapable", value); } + } + /// The isSsprCapable property + public bool? IsSsprCapable { + get { return BackingStore?.Get("isSsprCapable"); } + set { BackingStore?.Set("isSsprCapable", value); } + } + /// The isSsprEnabled property + public bool? IsSsprEnabled { + get { return BackingStore?.Get("isSsprEnabled"); } + set { BackingStore?.Set("isSsprEnabled", value); } + } + /// The isSsprRegistered property + public bool? IsSsprRegistered { + get { return BackingStore?.Get("isSsprRegistered"); } + set { BackingStore?.Set("isSsprRegistered", value); } + } + /// The isSystemPreferredAuthenticationMethodEnabled property + public bool? IsSystemPreferredAuthenticationMethodEnabled { + get { return BackingStore?.Get("isSystemPreferredAuthenticationMethodEnabled"); } + set { BackingStore?.Set("isSystemPreferredAuthenticationMethodEnabled", value); } + } + /// The lastUpdatedDateTime property + public DateTimeOffset? LastUpdatedDateTime { + get { return BackingStore?.Get("lastUpdatedDateTime"); } + set { BackingStore?.Set("lastUpdatedDateTime", value); } + } + /// The methodsRegistered property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? MethodsRegistered { + get { return BackingStore?.Get?>("methodsRegistered"); } + set { BackingStore?.Set("methodsRegistered", value); } + } +#nullable restore +#else + public List MethodsRegistered { + get { return BackingStore?.Get>("methodsRegistered"); } + set { BackingStore?.Set("methodsRegistered", value); } + } +#endif + /// The systemPreferredAuthenticationMethods property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SystemPreferredAuthenticationMethods { + get { return BackingStore?.Get?>("systemPreferredAuthenticationMethods"); } + set { BackingStore?.Set("systemPreferredAuthenticationMethods", value); } + } +#nullable restore +#else + public List SystemPreferredAuthenticationMethods { + get { return BackingStore?.Get>("systemPreferredAuthenticationMethods"); } + set { BackingStore?.Set("systemPreferredAuthenticationMethods", value); } + } +#endif + /// The userDisplayName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserDisplayName { + get { return BackingStore?.Get("userDisplayName"); } + set { BackingStore?.Set("userDisplayName", value); } + } +#nullable restore +#else + public string UserDisplayName { + get { return BackingStore?.Get("userDisplayName"); } + set { BackingStore?.Set("userDisplayName", value); } + } +#endif + /// The userPreferredMethodForSecondaryAuthentication property + public UserDefaultAuthenticationMethod? UserPreferredMethodForSecondaryAuthentication { + get { return BackingStore?.Get("userPreferredMethodForSecondaryAuthentication"); } + set { BackingStore?.Set("userPreferredMethodForSecondaryAuthentication", value); } + } + /// The userPrincipalName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserPrincipalName { + get { return BackingStore?.Get("userPrincipalName"); } + set { BackingStore?.Set("userPrincipalName", value); } + } +#nullable restore +#else + public string UserPrincipalName { + get { return BackingStore?.Get("userPrincipalName"); } + set { BackingStore?.Set("userPrincipalName", value); } + } +#endif + /// The userType property + public SignInUserType? UserType { + get { return BackingStore?.Get("userType"); } + set { BackingStore?.Set("userType", 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 UserRegistrationDetails CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserRegistrationDetails(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"isAdmin", n => { IsAdmin = n.GetBoolValue(); } }, + {"isMfaCapable", n => { IsMfaCapable = n.GetBoolValue(); } }, + {"isMfaRegistered", n => { IsMfaRegistered = n.GetBoolValue(); } }, + {"isPasswordlessCapable", n => { IsPasswordlessCapable = n.GetBoolValue(); } }, + {"isSsprCapable", n => { IsSsprCapable = n.GetBoolValue(); } }, + {"isSsprEnabled", n => { IsSsprEnabled = n.GetBoolValue(); } }, + {"isSsprRegistered", n => { IsSsprRegistered = n.GetBoolValue(); } }, + {"isSystemPreferredAuthenticationMethodEnabled", n => { IsSystemPreferredAuthenticationMethodEnabled = n.GetBoolValue(); } }, + {"lastUpdatedDateTime", n => { LastUpdatedDateTime = n.GetDateTimeOffsetValue(); } }, + {"methodsRegistered", n => { MethodsRegistered = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"systemPreferredAuthenticationMethods", n => { SystemPreferredAuthenticationMethods = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"userDisplayName", n => { UserDisplayName = n.GetStringValue(); } }, + {"userPreferredMethodForSecondaryAuthentication", n => { UserPreferredMethodForSecondaryAuthentication = n.GetEnumValue(); } }, + {"userPrincipalName", n => { UserPrincipalName = n.GetStringValue(); } }, + {"userType", n => { UserType = n.GetEnumValue(); } }, + }; + } + /// + /// 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.WriteBoolValue("isAdmin", IsAdmin); + writer.WriteBoolValue("isMfaCapable", IsMfaCapable); + writer.WriteBoolValue("isMfaRegistered", IsMfaRegistered); + writer.WriteBoolValue("isPasswordlessCapable", IsPasswordlessCapable); + writer.WriteBoolValue("isSsprCapable", IsSsprCapable); + writer.WriteBoolValue("isSsprEnabled", IsSsprEnabled); + writer.WriteBoolValue("isSsprRegistered", IsSsprRegistered); + writer.WriteBoolValue("isSystemPreferredAuthenticationMethodEnabled", IsSystemPreferredAuthenticationMethodEnabled); + writer.WriteDateTimeOffsetValue("lastUpdatedDateTime", LastUpdatedDateTime); + writer.WriteCollectionOfPrimitiveValues("methodsRegistered", MethodsRegistered); + writer.WriteCollectionOfPrimitiveValues("systemPreferredAuthenticationMethods", SystemPreferredAuthenticationMethods); + writer.WriteStringValue("userDisplayName", UserDisplayName); + writer.WriteEnumValue("userPreferredMethodForSecondaryAuthentication", UserPreferredMethodForSecondaryAuthentication); + writer.WriteStringValue("userPrincipalName", UserPrincipalName); + writer.WriteEnumValue("userType", UserType); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserRegistrationDetailsCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserRegistrationDetailsCollectionResponse.cs new file mode 100644 index 00000000000..8ee90c03de0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserRegistrationDetailsCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserRegistrationDetailsCollectionResponse : 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 UserRegistrationDetailsCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserRegistrationDetailsCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(UserRegistrationDetails.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/UserRegistrationFeatureCount.cs b/src/Microsoft.Graph/Generated/Models/UserRegistrationFeatureCount.cs new file mode 100644 index 00000000000..91fdc9e431d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserRegistrationFeatureCount.cs @@ -0,0 +1,77 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserRegistrationFeatureCount : 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 feature property + public AuthenticationMethodFeature? Feature { + get { return BackingStore?.Get("feature"); } + set { BackingStore?.Set("feature", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The userCount property + public long? UserCount { + get { return BackingStore?.Get("userCount"); } + set { BackingStore?.Set("userCount", value); } + } + /// + /// Instantiates a new UserRegistrationFeatureCount and sets the default values. + /// + public UserRegistrationFeatureCount() { + 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 UserRegistrationFeatureCount CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserRegistrationFeatureCount(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"feature", n => { Feature = n.GetEnumValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"userCount", n => { UserCount = n.GetLongValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("feature", Feature); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteLongValue("userCount", UserCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserRegistrationFeatureSummary.cs b/src/Microsoft.Graph/Generated/Models/UserRegistrationFeatureSummary.cs new file mode 100644 index 00000000000..4b962d54ed6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserRegistrationFeatureSummary.cs @@ -0,0 +1,100 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserRegistrationFeatureSummary : 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 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 totalUserCount property + public long? TotalUserCount { + get { return BackingStore?.Get("totalUserCount"); } + set { BackingStore?.Set("totalUserCount", value); } + } + /// The userRegistrationFeatureCounts property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserRegistrationFeatureCounts { + get { return BackingStore?.Get?>("userRegistrationFeatureCounts"); } + set { BackingStore?.Set("userRegistrationFeatureCounts", value); } + } +#nullable restore +#else + public List UserRegistrationFeatureCounts { + get { return BackingStore?.Get>("userRegistrationFeatureCounts"); } + set { BackingStore?.Set("userRegistrationFeatureCounts", value); } + } +#endif + /// The userRoles property + public IncludedUserRoles? UserRoles { + get { return BackingStore?.Get("userRoles"); } + set { BackingStore?.Set("userRoles", value); } + } + /// The userTypes property + public IncludedUserTypes? UserTypes { + get { return BackingStore?.Get("userTypes"); } + set { BackingStore?.Set("userTypes", value); } + } + /// + /// Instantiates a new UserRegistrationFeatureSummary and sets the default values. + /// + public UserRegistrationFeatureSummary() { + 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 UserRegistrationFeatureSummary CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserRegistrationFeatureSummary(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"totalUserCount", n => { TotalUserCount = n.GetLongValue(); } }, + {"userRegistrationFeatureCounts", n => { UserRegistrationFeatureCounts = n.GetCollectionOfObjectValues(UserRegistrationFeatureCount.CreateFromDiscriminatorValue)?.ToList(); } }, + {"userRoles", n => { UserRoles = n.GetEnumValue(); } }, + {"userTypes", n => { UserTypes = n.GetEnumValue(); } }, + }; + } + /// + /// 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("@odata.type", OdataType); + writer.WriteLongValue("totalUserCount", TotalUserCount); + writer.WriteCollectionOfObjectValues("userRegistrationFeatureCounts", UserRegistrationFeatureCounts); + writer.WriteEnumValue("userRoles", UserRoles); + writer.WriteEnumValue("userTypes", UserTypes); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserRegistrationMethodCount.cs b/src/Microsoft.Graph/Generated/Models/UserRegistrationMethodCount.cs new file mode 100644 index 00000000000..785dbc8f270 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserRegistrationMethodCount.cs @@ -0,0 +1,86 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserRegistrationMethodCount : 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); } + } + /// The authenticationMethod property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AuthenticationMethod { + get { return BackingStore?.Get("authenticationMethod"); } + set { BackingStore?.Set("authenticationMethod", value); } + } +#nullable restore +#else + public string AuthenticationMethod { + get { return BackingStore?.Get("authenticationMethod"); } + set { BackingStore?.Set("authenticationMethod", value); } + } +#endif + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// 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 userCount property + public long? UserCount { + get { return BackingStore?.Get("userCount"); } + set { BackingStore?.Set("userCount", value); } + } + /// + /// Instantiates a new UserRegistrationMethodCount and sets the default values. + /// + public UserRegistrationMethodCount() { + 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 UserRegistrationMethodCount CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserRegistrationMethodCount(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"authenticationMethod", n => { AuthenticationMethod = n.GetStringValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"userCount", n => { UserCount = n.GetLongValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("authenticationMethod", AuthenticationMethod); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteLongValue("userCount", UserCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserRegistrationMethodSummary.cs b/src/Microsoft.Graph/Generated/Models/UserRegistrationMethodSummary.cs new file mode 100644 index 00000000000..81f25a8147b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/UserRegistrationMethodSummary.cs @@ -0,0 +1,100 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class UserRegistrationMethodSummary : 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 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 totalUserCount property + public long? TotalUserCount { + get { return BackingStore?.Get("totalUserCount"); } + set { BackingStore?.Set("totalUserCount", value); } + } + /// The userRegistrationMethodCounts property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserRegistrationMethodCounts { + get { return BackingStore?.Get?>("userRegistrationMethodCounts"); } + set { BackingStore?.Set("userRegistrationMethodCounts", value); } + } +#nullable restore +#else + public List UserRegistrationMethodCounts { + get { return BackingStore?.Get>("userRegistrationMethodCounts"); } + set { BackingStore?.Set("userRegistrationMethodCounts", value); } + } +#endif + /// The userRoles property + public IncludedUserRoles? UserRoles { + get { return BackingStore?.Get("userRoles"); } + set { BackingStore?.Set("userRoles", value); } + } + /// The userTypes property + public IncludedUserTypes? UserTypes { + get { return BackingStore?.Get("userTypes"); } + set { BackingStore?.Set("userTypes", value); } + } + /// + /// Instantiates a new UserRegistrationMethodSummary and sets the default values. + /// + public UserRegistrationMethodSummary() { + 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 UserRegistrationMethodSummary CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserRegistrationMethodSummary(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"totalUserCount", n => { TotalUserCount = n.GetLongValue(); } }, + {"userRegistrationMethodCounts", n => { UserRegistrationMethodCounts = n.GetCollectionOfObjectValues(UserRegistrationMethodCount.CreateFromDiscriminatorValue)?.ToList(); } }, + {"userRoles", n => { UserRoles = n.GetEnumValue(); } }, + {"userTypes", n => { UserTypes = n.GetEnumValue(); } }, + }; + } + /// + /// 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("@odata.type", OdataType); + writer.WriteLongValue("totalUserCount", TotalUserCount); + writer.WriteCollectionOfObjectValues("userRegistrationMethodCounts", UserRegistrationMethodCounts); + writer.WriteEnumValue("userRoles", UserRoles); + writer.WriteEnumValue("userTypes", UserTypes); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/UserSignInInsight.cs b/src/Microsoft.Graph/Generated/Models/UserSignInInsight.cs index 698f8bbcfb3..de31434bfc4 100644 --- a/src/Microsoft.Graph/Generated/Models/UserSignInInsight.cs +++ b/src/Microsoft.Graph/Generated/Models/UserSignInInsight.cs @@ -5,7 +5,7 @@ using System; namespace Microsoft.Graph.Models { public class UserSignInInsight : GovernanceInsight, IParsable { - /// The lastSignInDateTime property + /// Indicates when the user last signed in. public DateTimeOffset? LastSignInDateTime { get { return BackingStore?.Get("lastSignInDateTime"); } set { BackingStore?.Set("lastSignInDateTime", value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDefenderProductStatus.cs b/src/Microsoft.Graph/Generated/Models/WindowsDefenderProductStatus.cs new file mode 100644 index 00000000000..40dcb5bbd55 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/WindowsDefenderProductStatus.cs @@ -0,0 +1,85 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + /// Product Status of Windows Defender + public enum WindowsDefenderProductStatus { + /// No status + [EnumMember(Value = "noStatus")] + NoStatus, + /// Service not running + [EnumMember(Value = "serviceNotRunning")] + ServiceNotRunning, + /// Service started without any malware protection engine + [EnumMember(Value = "serviceStartedWithoutMalwareProtection")] + ServiceStartedWithoutMalwareProtection, + /// Pending full scan due to threat action + [EnumMember(Value = "pendingFullScanDueToThreatAction")] + PendingFullScanDueToThreatAction, + /// Pending reboot due to threat action + [EnumMember(Value = "pendingRebootDueToThreatAction")] + PendingRebootDueToThreatAction, + /// Pending manual steps due to threat action + [EnumMember(Value = "pendingManualStepsDueToThreatAction")] + PendingManualStepsDueToThreatAction, + /// AV signatures out of date + [EnumMember(Value = "avSignaturesOutOfDate")] + AvSignaturesOutOfDate, + /// AS signatures out of date + [EnumMember(Value = "asSignaturesOutOfDate")] + AsSignaturesOutOfDate, + /// No quick scan has happened for a specified period + [EnumMember(Value = "noQuickScanHappenedForSpecifiedPeriod")] + NoQuickScanHappenedForSpecifiedPeriod, + /// No full scan has happened for a specified period + [EnumMember(Value = "noFullScanHappenedForSpecifiedPeriod")] + NoFullScanHappenedForSpecifiedPeriod, + /// System initiated scan in progress + [EnumMember(Value = "systemInitiatedScanInProgress")] + SystemInitiatedScanInProgress, + /// System initiated clean in progress + [EnumMember(Value = "systemInitiatedCleanInProgress")] + SystemInitiatedCleanInProgress, + /// There are samples pending submission + [EnumMember(Value = "samplesPendingSubmission")] + SamplesPendingSubmission, + /// Product running in evaluation mode + [EnumMember(Value = "productRunningInEvaluationMode")] + ProductRunningInEvaluationMode, + /// Product running in non-genuine Windows mode + [EnumMember(Value = "productRunningInNonGenuineMode")] + ProductRunningInNonGenuineMode, + /// Product expired + [EnumMember(Value = "productExpired")] + ProductExpired, + /// Off-line scan required + [EnumMember(Value = "offlineScanRequired")] + OfflineScanRequired, + /// Service is shutting down as part of system shutdown + [EnumMember(Value = "serviceShutdownAsPartOfSystemShutdown")] + ServiceShutdownAsPartOfSystemShutdown, + /// Threat remediation failed critically + [EnumMember(Value = "threatRemediationFailedCritically")] + ThreatRemediationFailedCritically, + /// Threat remediation failed non-critically + [EnumMember(Value = "threatRemediationFailedNonCritically")] + ThreatRemediationFailedNonCritically, + /// No status flags set (well initialized state) + [EnumMember(Value = "noStatusFlagsSet")] + NoStatusFlagsSet, + /// Platform is out of date + [EnumMember(Value = "platformOutOfDate")] + PlatformOutOfDate, + /// Platform update is in progress + [EnumMember(Value = "platformUpdateInProgress")] + PlatformUpdateInProgress, + /// Platform is about to be outdated + [EnumMember(Value = "platformAboutToBeOutdated")] + PlatformAboutToBeOutdated, + /// Signature or platform end of life is past or is impending + [EnumMember(Value = "signatureOrPlatformEndOfLifeIsPastOrIsImpending")] + SignatureOrPlatformEndOfLifeIsPastOrIsImpending, + /// Windows SMode signatures still in use on non-Win10S install + [EnumMember(Value = "windowsSModeSignaturesInUseOnNonWin10SInstall")] + WindowsSModeSignaturesInUseOnNonWin10SInstall, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDeviceHealthState.cs b/src/Microsoft.Graph/Generated/Models/WindowsDeviceHealthState.cs new file mode 100644 index 00000000000..9ec229a676c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/WindowsDeviceHealthState.cs @@ -0,0 +1,25 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + /// Computer endpoint protection state + public enum WindowsDeviceHealthState { + /// Computer is clean and no action is required + [EnumMember(Value = "clean")] + Clean, + /// Computer is in pending full scan state + [EnumMember(Value = "fullScanPending")] + FullScanPending, + /// Computer is in pending reboot state + [EnumMember(Value = "rebootPending")] + RebootPending, + /// Computer is in pending manual steps state + [EnumMember(Value = "manualStepsPending")] + ManualStepsPending, + /// Computer is in pending offline scan state + [EnumMember(Value = "offlineScanPending")] + OfflineScanPending, + /// Computer is in critical failure state + [EnumMember(Value = "critical")] + Critical, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDeviceMalwareState.cs b/src/Microsoft.Graph/Generated/Models/WindowsDeviceMalwareState.cs new file mode 100644 index 00000000000..cda8d7f5f12 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/WindowsDeviceMalwareState.cs @@ -0,0 +1,123 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + /// + /// Malware detection entity. + /// + public class WindowsDeviceMalwareState : Entity, IParsable { + /// Information URL to learn more about the malware +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AdditionalInformationUrl { + get { return BackingStore?.Get("additionalInformationUrl"); } + set { BackingStore?.Set("additionalInformationUrl", value); } + } +#nullable restore +#else + public string AdditionalInformationUrl { + get { return BackingStore?.Get("additionalInformationUrl"); } + set { BackingStore?.Set("additionalInformationUrl", value); } + } +#endif + /// Category of the malware. Possible values are: invalid, adware, spyware, passwordStealer, trojanDownloader, worm, backdoor, remoteAccessTrojan, trojan, emailFlooder, keylogger, dialer, monitoringSoftware, browserModifier, cookie, browserPlugin, aolExploit, nuker, securityDisabler, jokeProgram, hostileActiveXControl, softwareBundler, stealthNotifier, settingsModifier, toolBar, remoteControlSoftware, trojanFtp, potentialUnwantedSoftware, icqExploit, trojanTelnet, exploit, filesharingProgram, malwareCreationTool, remote_Control_Software, tool, trojanDenialOfService, trojanDropper, trojanMassMailer, trojanMonitoringSoftware, trojanProxyServer, virus, known, unknown, spp, behavior, vulnerability, policy, enterpriseUnwantedSoftware, ransom, hipsRule. + public WindowsMalwareCategory? Category { + get { return BackingStore?.Get("category"); } + set { BackingStore?.Set("category", value); } + } + /// Number of times the malware is detected + public int? DetectionCount { + get { return BackingStore?.Get("detectionCount"); } + set { BackingStore?.Set("detectionCount", value); } + } + /// Malware name +#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 + /// Execution status of the malware like blocked/executing etc. Possible values are: unknown, blocked, allowed, running, notRunning. + public WindowsMalwareExecutionState? ExecutionState { + get { return BackingStore?.Get("executionState"); } + set { BackingStore?.Set("executionState", value); } + } + /// Initial detection datetime of the malware + public DateTimeOffset? InitialDetectionDateTime { + get { return BackingStore?.Get("initialDetectionDateTime"); } + set { BackingStore?.Set("initialDetectionDateTime", value); } + } + /// The last time this particular threat was changed + public DateTimeOffset? LastStateChangeDateTime { + get { return BackingStore?.Get("lastStateChangeDateTime"); } + set { BackingStore?.Set("lastStateChangeDateTime", value); } + } + /// Severity of the malware. Possible values are: unknown, low, moderate, high, severe. + public WindowsMalwareSeverity? Severity { + get { return BackingStore?.Get("severity"); } + set { BackingStore?.Set("severity", value); } + } + /// Current status of the malware like cleaned/quarantined/allowed etc. Possible values are: unknown, detected, cleaned, quarantined, removed, allowed, blocked, cleanFailed, quarantineFailed, removeFailed, allowFailed, abandoned, blockFailed. + public WindowsMalwareState? State { + get { return BackingStore?.Get("state"); } + set { BackingStore?.Set("state", value); } + } + /// Current status of the malware like cleaned/quarantined/allowed etc. Possible values are: active, actionFailed, manualStepsRequired, fullScanRequired, rebootRequired, remediatedWithNonCriticalFailures, quarantined, removed, cleaned, allowed, noStatusCleared. + public WindowsMalwareThreatState? ThreatState { + get { return BackingStore?.Get("threatState"); } + set { BackingStore?.Set("threatState", 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 WindowsDeviceMalwareState CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new WindowsDeviceMalwareState(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"additionalInformationUrl", n => { AdditionalInformationUrl = n.GetStringValue(); } }, + {"category", n => { Category = n.GetEnumValue(); } }, + {"detectionCount", n => { DetectionCount = n.GetIntValue(); } }, + {"displayName", n => { DisplayName = n.GetStringValue(); } }, + {"executionState", n => { ExecutionState = n.GetEnumValue(); } }, + {"initialDetectionDateTime", n => { InitialDetectionDateTime = n.GetDateTimeOffsetValue(); } }, + {"lastStateChangeDateTime", n => { LastStateChangeDateTime = n.GetDateTimeOffsetValue(); } }, + {"severity", n => { Severity = n.GetEnumValue(); } }, + {"state", n => { State = n.GetEnumValue(); } }, + {"threatState", n => { ThreatState = n.GetEnumValue(); } }, + }; + } + /// + /// 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("additionalInformationUrl", AdditionalInformationUrl); + writer.WriteEnumValue("category", Category); + writer.WriteIntValue("detectionCount", DetectionCount); + writer.WriteStringValue("displayName", DisplayName); + writer.WriteEnumValue("executionState", ExecutionState); + writer.WriteDateTimeOffsetValue("initialDetectionDateTime", InitialDetectionDateTime); + writer.WriteDateTimeOffsetValue("lastStateChangeDateTime", LastStateChangeDateTime); + writer.WriteEnumValue("severity", Severity); + writer.WriteEnumValue("state", State); + writer.WriteEnumValue("threatState", ThreatState); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDeviceMalwareStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsDeviceMalwareStateCollectionResponse.cs new file mode 100644 index 00000000000..b67a66020b3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/WindowsDeviceMalwareStateCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class WindowsDeviceMalwareStateCollectionResponse : 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 WindowsDeviceMalwareStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new WindowsDeviceMalwareStateCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(WindowsDeviceMalwareState.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/WindowsMalwareCategory.cs b/src/Microsoft.Graph/Generated/Models/WindowsMalwareCategory.cs new file mode 100644 index 00000000000..fabc96b117b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/WindowsMalwareCategory.cs @@ -0,0 +1,157 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + /// Malware category id + public enum WindowsMalwareCategory { + /// Invalid + [EnumMember(Value = "invalid")] + Invalid, + /// Adware + [EnumMember(Value = "adware")] + Adware, + /// Spyware + [EnumMember(Value = "spyware")] + Spyware, + /// Password stealer + [EnumMember(Value = "passwordStealer")] + PasswordStealer, + /// Trojan downloader + [EnumMember(Value = "trojanDownloader")] + TrojanDownloader, + /// Worm + [EnumMember(Value = "worm")] + Worm, + /// Backdoor + [EnumMember(Value = "backdoor")] + Backdoor, + /// Remote access Trojan + [EnumMember(Value = "remoteAccessTrojan")] + RemoteAccessTrojan, + /// Trojan + [EnumMember(Value = "trojan")] + Trojan, + /// Email flooder + [EnumMember(Value = "emailFlooder")] + EmailFlooder, + /// Keylogger + [EnumMember(Value = "keylogger")] + Keylogger, + /// Dialer + [EnumMember(Value = "dialer")] + Dialer, + /// Monitoring software + [EnumMember(Value = "monitoringSoftware")] + MonitoringSoftware, + /// Browser modifier + [EnumMember(Value = "browserModifier")] + BrowserModifier, + /// Cookie + [EnumMember(Value = "cookie")] + Cookie, + /// Browser plugin + [EnumMember(Value = "browserPlugin")] + BrowserPlugin, + /// AOL exploit + [EnumMember(Value = "aolExploit")] + AolExploit, + /// Nuker + [EnumMember(Value = "nuker")] + Nuker, + /// Security disabler + [EnumMember(Value = "securityDisabler")] + SecurityDisabler, + /// Joke program + [EnumMember(Value = "jokeProgram")] + JokeProgram, + /// Hostile ActiveX control + [EnumMember(Value = "hostileActiveXControl")] + HostileActiveXControl, + /// Software bundler + [EnumMember(Value = "softwareBundler")] + SoftwareBundler, + /// Stealth modifier + [EnumMember(Value = "stealthNotifier")] + StealthNotifier, + /// Settings modifier + [EnumMember(Value = "settingsModifier")] + SettingsModifier, + /// Toolbar + [EnumMember(Value = "toolBar")] + ToolBar, + /// Remote control software + [EnumMember(Value = "remoteControlSoftware")] + RemoteControlSoftware, + /// Trojan FTP + [EnumMember(Value = "trojanFtp")] + TrojanFtp, + /// Potential unwanted software + [EnumMember(Value = "potentialUnwantedSoftware")] + PotentialUnwantedSoftware, + /// ICQ exploit + [EnumMember(Value = "icqExploit")] + IcqExploit, + /// Trojan telnet + [EnumMember(Value = "trojanTelnet")] + TrojanTelnet, + /// Exploit + [EnumMember(Value = "exploit")] + Exploit, + /// File sharing program + [EnumMember(Value = "filesharingProgram")] + FilesharingProgram, + /// Malware creation tool + [EnumMember(Value = "malwareCreationTool")] + MalwareCreationTool, + /// Remote control software + [EnumMember(Value = "remote_Control_Software")] + Remote_Control_Software, + /// Tool + [EnumMember(Value = "tool")] + Tool, + /// Trojan denial of service + [EnumMember(Value = "trojanDenialOfService")] + TrojanDenialOfService, + /// Trojan dropper + [EnumMember(Value = "trojanDropper")] + TrojanDropper, + /// Trojan mass mailer + [EnumMember(Value = "trojanMassMailer")] + TrojanMassMailer, + /// Trojan monitoring software + [EnumMember(Value = "trojanMonitoringSoftware")] + TrojanMonitoringSoftware, + /// Trojan proxy server + [EnumMember(Value = "trojanProxyServer")] + TrojanProxyServer, + /// Virus + [EnumMember(Value = "virus")] + Virus, + /// Known + [EnumMember(Value = "known")] + Known, + /// Unknown + [EnumMember(Value = "unknown")] + Unknown, + /// SPP + [EnumMember(Value = "spp")] + Spp, + /// Behavior + [EnumMember(Value = "behavior")] + Behavior, + /// Vulnerability + [EnumMember(Value = "vulnerability")] + Vulnerability, + /// Policy + [EnumMember(Value = "policy")] + Policy, + /// Enterprise Unwanted Software + [EnumMember(Value = "enterpriseUnwantedSoftware")] + EnterpriseUnwantedSoftware, + /// Ransom + [EnumMember(Value = "ransom")] + Ransom, + /// HIPS Rule + [EnumMember(Value = "hipsRule")] + HipsRule, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/WindowsMalwareCategoryCount.cs b/src/Microsoft.Graph/Generated/Models/WindowsMalwareCategoryCount.cs new file mode 100644 index 00000000000..07b1fcd28de --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/WindowsMalwareCategoryCount.cs @@ -0,0 +1,101 @@ +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 { + /// + /// Malware category device count + /// + public class WindowsMalwareCategoryCount : IAdditionalDataHolder, IBackedModel, IParsable { + /// Count of active malware detections for this malware category. Valid values -2147483648 to 2147483647 + public int? ActiveMalwareDetectionCount { + get { return BackingStore?.Get("activeMalwareDetectionCount"); } + set { BackingStore?.Set("activeMalwareDetectionCount", value); } + } + /// 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; } + /// Malware category id + public WindowsMalwareCategory? Category { + get { return BackingStore?.Get("category"); } + set { BackingStore?.Set("category", value); } + } + /// Count of devices with malware detections for this malware category + public int? DeviceCount { + get { return BackingStore?.Get("deviceCount"); } + set { BackingStore?.Set("deviceCount", value); } + } + /// Count of distinct active malwares for this malware category. Valid values -2147483648 to 2147483647 + public int? DistinctActiveMalwareCount { + get { return BackingStore?.Get("distinctActiveMalwareCount"); } + set { BackingStore?.Set("distinctActiveMalwareCount", value); } + } + /// The Timestamp of the last update for the device count in UTC + public DateTimeOffset? LastUpdateDateTime { + get { return BackingStore?.Get("lastUpdateDateTime"); } + set { BackingStore?.Set("lastUpdateDateTime", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// + /// Instantiates a new windowsMalwareCategoryCount and sets the default values. + /// + public WindowsMalwareCategoryCount() { + 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 WindowsMalwareCategoryCount CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new WindowsMalwareCategoryCount(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"activeMalwareDetectionCount", n => { ActiveMalwareDetectionCount = n.GetIntValue(); } }, + {"category", n => { Category = n.GetEnumValue(); } }, + {"deviceCount", n => { DeviceCount = n.GetIntValue(); } }, + {"distinctActiveMalwareCount", n => { DistinctActiveMalwareCount = n.GetIntValue(); } }, + {"lastUpdateDateTime", n => { LastUpdateDateTime = n.GetDateTimeOffsetValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("activeMalwareDetectionCount", ActiveMalwareDetectionCount); + writer.WriteEnumValue("category", Category); + writer.WriteIntValue("deviceCount", DeviceCount); + writer.WriteIntValue("distinctActiveMalwareCount", DistinctActiveMalwareCount); + writer.WriteDateTimeOffsetValue("lastUpdateDateTime", LastUpdateDateTime); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/WindowsMalwareExecutionState.cs b/src/Microsoft.Graph/Generated/Models/WindowsMalwareExecutionState.cs new file mode 100644 index 00000000000..83342a0003c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/WindowsMalwareExecutionState.cs @@ -0,0 +1,22 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + /// Malware execution status + public enum WindowsMalwareExecutionState { + /// Unknown + [EnumMember(Value = "unknown")] + Unknown, + /// Blocked + [EnumMember(Value = "blocked")] + Blocked, + /// Allowed + [EnumMember(Value = "allowed")] + Allowed, + /// Running + [EnumMember(Value = "running")] + Running, + /// Not running + [EnumMember(Value = "notRunning")] + NotRunning, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/WindowsMalwareExecutionStateCount.cs b/src/Microsoft.Graph/Generated/Models/WindowsMalwareExecutionStateCount.cs new file mode 100644 index 00000000000..a6224045e67 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/WindowsMalwareExecutionStateCount.cs @@ -0,0 +1,87 @@ +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 { + /// + /// Windows malware execution state summary. + /// + public class WindowsMalwareExecutionStateCount : 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; } + /// Count of devices with malware detections for this malware execution state + public int? DeviceCount { + get { return BackingStore?.Get("deviceCount"); } + set { BackingStore?.Set("deviceCount", value); } + } + /// Malware execution status + public WindowsMalwareExecutionState? ExecutionState { + get { return BackingStore?.Get("executionState"); } + set { BackingStore?.Set("executionState", value); } + } + /// The Timestamp of the last update for the device count in UTC + public DateTimeOffset? LastUpdateDateTime { + get { return BackingStore?.Get("lastUpdateDateTime"); } + set { BackingStore?.Set("lastUpdateDateTime", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// + /// Instantiates a new windowsMalwareExecutionStateCount and sets the default values. + /// + public WindowsMalwareExecutionStateCount() { + 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 WindowsMalwareExecutionStateCount CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new WindowsMalwareExecutionStateCount(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"deviceCount", n => { DeviceCount = n.GetIntValue(); } }, + {"executionState", n => { ExecutionState = n.GetEnumValue(); } }, + {"lastUpdateDateTime", n => { LastUpdateDateTime = n.GetDateTimeOffsetValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("deviceCount", DeviceCount); + writer.WriteEnumValue("executionState", ExecutionState); + writer.WriteDateTimeOffsetValue("lastUpdateDateTime", LastUpdateDateTime); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/WindowsMalwareInformation.cs b/src/Microsoft.Graph/Generated/Models/WindowsMalwareInformation.cs new file mode 100644 index 00000000000..25278b06573 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/WindowsMalwareInformation.cs @@ -0,0 +1,104 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + /// + /// Malware information entity. + /// + public class WindowsMalwareInformation : Entity, IParsable { + /// Information URL to learn more about the malware +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AdditionalInformationUrl { + get { return BackingStore?.Get("additionalInformationUrl"); } + set { BackingStore?.Set("additionalInformationUrl", value); } + } +#nullable restore +#else + public string AdditionalInformationUrl { + get { return BackingStore?.Get("additionalInformationUrl"); } + set { BackingStore?.Set("additionalInformationUrl", value); } + } +#endif + /// Category of the malware. Possible values are: invalid, adware, spyware, passwordStealer, trojanDownloader, worm, backdoor, remoteAccessTrojan, trojan, emailFlooder, keylogger, dialer, monitoringSoftware, browserModifier, cookie, browserPlugin, aolExploit, nuker, securityDisabler, jokeProgram, hostileActiveXControl, softwareBundler, stealthNotifier, settingsModifier, toolBar, remoteControlSoftware, trojanFtp, potentialUnwantedSoftware, icqExploit, trojanTelnet, exploit, filesharingProgram, malwareCreationTool, remote_Control_Software, tool, trojanDenialOfService, trojanDropper, trojanMassMailer, trojanMonitoringSoftware, trojanProxyServer, virus, known, unknown, spp, behavior, vulnerability, policy, enterpriseUnwantedSoftware, ransom, hipsRule. + public WindowsMalwareCategory? Category { + get { return BackingStore?.Get("category"); } + set { BackingStore?.Set("category", value); } + } + /// List of devices affected by current malware with the malware state on each device +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? DeviceMalwareStates { + get { return BackingStore?.Get?>("deviceMalwareStates"); } + set { BackingStore?.Set("deviceMalwareStates", value); } + } +#nullable restore +#else + public List DeviceMalwareStates { + get { return BackingStore?.Get>("deviceMalwareStates"); } + set { BackingStore?.Set("deviceMalwareStates", value); } + } +#endif + /// Malware name +#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 last time the malware is detected + public DateTimeOffset? LastDetectionDateTime { + get { return BackingStore?.Get("lastDetectionDateTime"); } + set { BackingStore?.Set("lastDetectionDateTime", value); } + } + /// Severity of the malware. Possible values are: unknown, low, moderate, high, severe. + public WindowsMalwareSeverity? Severity { + get { return BackingStore?.Get("severity"); } + set { BackingStore?.Set("severity", 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 WindowsMalwareInformation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new WindowsMalwareInformation(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"additionalInformationUrl", n => { AdditionalInformationUrl = n.GetStringValue(); } }, + {"category", n => { Category = n.GetEnumValue(); } }, + {"deviceMalwareStates", n => { DeviceMalwareStates = n.GetCollectionOfObjectValues(MalwareStateForWindowsDevice.CreateFromDiscriminatorValue)?.ToList(); } }, + {"displayName", n => { DisplayName = n.GetStringValue(); } }, + {"lastDetectionDateTime", n => { LastDetectionDateTime = n.GetDateTimeOffsetValue(); } }, + {"severity", n => { Severity = n.GetEnumValue(); } }, + }; + } + /// + /// 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("additionalInformationUrl", AdditionalInformationUrl); + writer.WriteEnumValue("category", Category); + writer.WriteCollectionOfObjectValues("deviceMalwareStates", DeviceMalwareStates); + writer.WriteStringValue("displayName", DisplayName); + writer.WriteDateTimeOffsetValue("lastDetectionDateTime", LastDetectionDateTime); + writer.WriteEnumValue("severity", Severity); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/WindowsMalwareInformationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsMalwareInformationCollectionResponse.cs new file mode 100644 index 00000000000..1fd3b9cea0a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/WindowsMalwareInformationCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class WindowsMalwareInformationCollectionResponse : 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 WindowsMalwareInformationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new WindowsMalwareInformationCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(WindowsMalwareInformation.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/WindowsMalwareNameCount.cs b/src/Microsoft.Graph/Generated/Models/WindowsMalwareNameCount.cs new file mode 100644 index 00000000000..b64ad2ce899 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/WindowsMalwareNameCount.cs @@ -0,0 +1,112 @@ +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 { + /// + /// Malware name device count + /// + public class WindowsMalwareNameCount : 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; } + /// Count of devices with malware dectected for this malware + public int? DeviceCount { + get { return BackingStore?.Get("deviceCount"); } + set { BackingStore?.Set("deviceCount", value); } + } + /// The Timestamp of the last update for the device count in UTC + public DateTimeOffset? LastUpdateDateTime { + get { return BackingStore?.Get("lastUpdateDateTime"); } + set { BackingStore?.Set("lastUpdateDateTime", value); } + } + /// The unique identifier. This is malware identifier +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MalwareIdentifier { + get { return BackingStore?.Get("malwareIdentifier"); } + set { BackingStore?.Set("malwareIdentifier", value); } + } +#nullable restore +#else + public string MalwareIdentifier { + get { return BackingStore?.Get("malwareIdentifier"); } + set { BackingStore?.Set("malwareIdentifier", value); } + } +#endif + /// Malware name +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#nullable restore +#else + public string Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", 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 + /// + /// Instantiates a new windowsMalwareNameCount and sets the default values. + /// + public WindowsMalwareNameCount() { + 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 WindowsMalwareNameCount CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new WindowsMalwareNameCount(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"deviceCount", n => { DeviceCount = n.GetIntValue(); } }, + {"lastUpdateDateTime", n => { LastUpdateDateTime = n.GetDateTimeOffsetValue(); } }, + {"malwareIdentifier", n => { MalwareIdentifier = n.GetStringValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("deviceCount", DeviceCount); + writer.WriteDateTimeOffsetValue("lastUpdateDateTime", LastUpdateDateTime); + writer.WriteStringValue("malwareIdentifier", MalwareIdentifier); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/WindowsMalwareOverview.cs b/src/Microsoft.Graph/Generated/Models/WindowsMalwareOverview.cs new file mode 100644 index 00000000000..488e6b44324 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/WindowsMalwareOverview.cs @@ -0,0 +1,183 @@ +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 { + /// + /// Windows device malware overview. + /// + public class WindowsMalwareOverview : 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; } + /// Count of devices per malware category +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? MalwareCategorySummary { + get { return BackingStore?.Get?>("malwareCategorySummary"); } + set { BackingStore?.Set("malwareCategorySummary", value); } + } +#nullable restore +#else + public List MalwareCategorySummary { + get { return BackingStore?.Get>("malwareCategorySummary"); } + set { BackingStore?.Set("malwareCategorySummary", value); } + } +#endif + /// Count of devices with malware detected in the last 30 days + public int? MalwareDetectedDeviceCount { + get { return BackingStore?.Get("malwareDetectedDeviceCount"); } + set { BackingStore?.Set("malwareDetectedDeviceCount", value); } + } + /// Count of devices per malware execution state +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? MalwareExecutionStateSummary { + get { return BackingStore?.Get?>("malwareExecutionStateSummary"); } + set { BackingStore?.Set("malwareExecutionStateSummary", value); } + } +#nullable restore +#else + public List MalwareExecutionStateSummary { + get { return BackingStore?.Get>("malwareExecutionStateSummary"); } + set { BackingStore?.Set("malwareExecutionStateSummary", value); } + } +#endif + /// Count of devices per malware +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? MalwareNameSummary { + get { return BackingStore?.Get?>("malwareNameSummary"); } + set { BackingStore?.Set("malwareNameSummary", value); } + } +#nullable restore +#else + public List MalwareNameSummary { + get { return BackingStore?.Get>("malwareNameSummary"); } + set { BackingStore?.Set("malwareNameSummary", value); } + } +#endif + /// Count of active malware per malware severity +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? MalwareSeveritySummary { + get { return BackingStore?.Get?>("malwareSeveritySummary"); } + set { BackingStore?.Set("malwareSeveritySummary", value); } + } +#nullable restore +#else + public List MalwareSeveritySummary { + get { return BackingStore?.Get>("malwareSeveritySummary"); } + set { BackingStore?.Set("malwareSeveritySummary", value); } + } +#endif + /// Count of devices per malware state +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? MalwareStateSummary { + get { return BackingStore?.Get?>("malwareStateSummary"); } + set { BackingStore?.Set("malwareStateSummary", value); } + } +#nullable restore +#else + public List MalwareStateSummary { + get { return BackingStore?.Get>("malwareStateSummary"); } + set { BackingStore?.Set("malwareStateSummary", 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 + /// Count of devices with malware per windows OS version +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? OsVersionsSummary { + get { return BackingStore?.Get?>("osVersionsSummary"); } + set { BackingStore?.Set("osVersionsSummary", value); } + } +#nullable restore +#else + public List OsVersionsSummary { + get { return BackingStore?.Get>("osVersionsSummary"); } + set { BackingStore?.Set("osVersionsSummary", value); } + } +#endif + /// Count of all distinct malwares detected across all devices. Valid values -2147483648 to 2147483647 + public int? TotalDistinctMalwareCount { + get { return BackingStore?.Get("totalDistinctMalwareCount"); } + set { BackingStore?.Set("totalDistinctMalwareCount", value); } + } + /// Count of all malware detections across all devices. Valid values -2147483648 to 2147483647 + public int? TotalMalwareCount { + get { return BackingStore?.Get("totalMalwareCount"); } + set { BackingStore?.Set("totalMalwareCount", value); } + } + /// + /// Instantiates a new windowsMalwareOverview and sets the default values. + /// + public WindowsMalwareOverview() { + 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 WindowsMalwareOverview CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new WindowsMalwareOverview(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"malwareCategorySummary", n => { MalwareCategorySummary = n.GetCollectionOfObjectValues(WindowsMalwareCategoryCount.CreateFromDiscriminatorValue)?.ToList(); } }, + {"malwareDetectedDeviceCount", n => { MalwareDetectedDeviceCount = n.GetIntValue(); } }, + {"malwareExecutionStateSummary", n => { MalwareExecutionStateSummary = n.GetCollectionOfObjectValues(WindowsMalwareExecutionStateCount.CreateFromDiscriminatorValue)?.ToList(); } }, + {"malwareNameSummary", n => { MalwareNameSummary = n.GetCollectionOfObjectValues(WindowsMalwareNameCount.CreateFromDiscriminatorValue)?.ToList(); } }, + {"malwareSeveritySummary", n => { MalwareSeveritySummary = n.GetCollectionOfObjectValues(WindowsMalwareSeverityCount.CreateFromDiscriminatorValue)?.ToList(); } }, + {"malwareStateSummary", n => { MalwareStateSummary = n.GetCollectionOfObjectValues(WindowsMalwareStateCount.CreateFromDiscriminatorValue)?.ToList(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"osVersionsSummary", n => { OsVersionsSummary = n.GetCollectionOfObjectValues(OsVersionCount.CreateFromDiscriminatorValue)?.ToList(); } }, + {"totalDistinctMalwareCount", n => { TotalDistinctMalwareCount = n.GetIntValue(); } }, + {"totalMalwareCount", n => { TotalMalwareCount = n.GetIntValue(); } }, + }; + } + /// + /// 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.WriteCollectionOfObjectValues("malwareCategorySummary", MalwareCategorySummary); + writer.WriteIntValue("malwareDetectedDeviceCount", MalwareDetectedDeviceCount); + writer.WriteCollectionOfObjectValues("malwareExecutionStateSummary", MalwareExecutionStateSummary); + writer.WriteCollectionOfObjectValues("malwareNameSummary", MalwareNameSummary); + writer.WriteCollectionOfObjectValues("malwareSeveritySummary", MalwareSeveritySummary); + writer.WriteCollectionOfObjectValues("malwareStateSummary", MalwareStateSummary); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteCollectionOfObjectValues("osVersionsSummary", OsVersionsSummary); + writer.WriteIntValue("totalDistinctMalwareCount", TotalDistinctMalwareCount); + writer.WriteIntValue("totalMalwareCount", TotalMalwareCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/WindowsMalwareSeverity.cs b/src/Microsoft.Graph/Generated/Models/WindowsMalwareSeverity.cs new file mode 100644 index 00000000000..533ea25a2e9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/WindowsMalwareSeverity.cs @@ -0,0 +1,22 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + /// Malware severity + public enum WindowsMalwareSeverity { + /// Unknown + [EnumMember(Value = "unknown")] + Unknown, + /// Low + [EnumMember(Value = "low")] + Low, + /// Moderate + [EnumMember(Value = "moderate")] + Moderate, + /// High + [EnumMember(Value = "high")] + High, + /// Severe + [EnumMember(Value = "severe")] + Severe, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/WindowsMalwareSeverityCount.cs b/src/Microsoft.Graph/Generated/Models/WindowsMalwareSeverityCount.cs new file mode 100644 index 00000000000..fe223833a0f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/WindowsMalwareSeverityCount.cs @@ -0,0 +1,94 @@ +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 { + /// + /// Windows Malware Severity Count Summary + /// + public class WindowsMalwareSeverityCount : 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; } + /// Count of distinct malwares for this malware State. Valid values -2147483648 to 2147483647 + public int? DistinctMalwareCount { + get { return BackingStore?.Get("distinctMalwareCount"); } + set { BackingStore?.Set("distinctMalwareCount", value); } + } + /// The Timestamp of the last update for the WindowsMalwareSeverityCount in UTC + public DateTimeOffset? LastUpdateDateTime { + get { return BackingStore?.Get("lastUpdateDateTime"); } + set { BackingStore?.Set("lastUpdateDateTime", value); } + } + /// Count of threats detections for this malware severity. Valid values -2147483648 to 2147483647 + public int? MalwareDetectionCount { + get { return BackingStore?.Get("malwareDetectionCount"); } + set { BackingStore?.Set("malwareDetectionCount", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// Malware severity + public WindowsMalwareSeverity? Severity { + get { return BackingStore?.Get("severity"); } + set { BackingStore?.Set("severity", value); } + } + /// + /// Instantiates a new windowsMalwareSeverityCount and sets the default values. + /// + public WindowsMalwareSeverityCount() { + 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 WindowsMalwareSeverityCount CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new WindowsMalwareSeverityCount(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"distinctMalwareCount", n => { DistinctMalwareCount = n.GetIntValue(); } }, + {"lastUpdateDateTime", n => { LastUpdateDateTime = n.GetDateTimeOffsetValue(); } }, + {"malwareDetectionCount", n => { MalwareDetectionCount = n.GetIntValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"severity", n => { Severity = n.GetEnumValue(); } }, + }; + } + /// + /// 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.WriteIntValue("distinctMalwareCount", DistinctMalwareCount); + writer.WriteDateTimeOffsetValue("lastUpdateDateTime", LastUpdateDateTime); + writer.WriteIntValue("malwareDetectionCount", MalwareDetectionCount); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteEnumValue("severity", Severity); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/WindowsMalwareState.cs b/src/Microsoft.Graph/Generated/Models/WindowsMalwareState.cs new file mode 100644 index 00000000000..6160606c2e5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/WindowsMalwareState.cs @@ -0,0 +1,46 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + /// Malware current status + public enum WindowsMalwareState { + /// Unknown + [EnumMember(Value = "unknown")] + Unknown, + /// Detected + [EnumMember(Value = "detected")] + Detected, + /// Cleaned + [EnumMember(Value = "cleaned")] + Cleaned, + /// Quarantined + [EnumMember(Value = "quarantined")] + Quarantined, + /// Removed + [EnumMember(Value = "removed")] + Removed, + /// Allowed + [EnumMember(Value = "allowed")] + Allowed, + /// Blocked + [EnumMember(Value = "blocked")] + Blocked, + /// Clean failed + [EnumMember(Value = "cleanFailed")] + CleanFailed, + /// Quarantine failed + [EnumMember(Value = "quarantineFailed")] + QuarantineFailed, + /// Remove failed + [EnumMember(Value = "removeFailed")] + RemoveFailed, + /// Allow failed + [EnumMember(Value = "allowFailed")] + AllowFailed, + /// Abandoned + [EnumMember(Value = "abandoned")] + Abandoned, + /// Block failed + [EnumMember(Value = "blockFailed")] + BlockFailed, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/WindowsMalwareStateCount.cs b/src/Microsoft.Graph/Generated/Models/WindowsMalwareStateCount.cs new file mode 100644 index 00000000000..cd504a643f0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/WindowsMalwareStateCount.cs @@ -0,0 +1,101 @@ +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 { + /// + /// Windows Malware State Summary. + /// + public class WindowsMalwareStateCount : 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; } + /// Count of devices with malware detections for this malware State + public int? DeviceCount { + get { return BackingStore?.Get("deviceCount"); } + set { BackingStore?.Set("deviceCount", value); } + } + /// Count of distinct malwares for this malware State. Valid values -2147483648 to 2147483647 + public int? DistinctMalwareCount { + get { return BackingStore?.Get("distinctMalwareCount"); } + set { BackingStore?.Set("distinctMalwareCount", value); } + } + /// The Timestamp of the last update for the device count in UTC + public DateTimeOffset? LastUpdateDateTime { + get { return BackingStore?.Get("lastUpdateDateTime"); } + set { BackingStore?.Set("lastUpdateDateTime", value); } + } + /// Count of total malware detections for this malware State. Valid values -2147483648 to 2147483647 + public int? MalwareDetectionCount { + get { return BackingStore?.Get("malwareDetectionCount"); } + set { BackingStore?.Set("malwareDetectionCount", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// Malware threat status + public WindowsMalwareThreatState? State { + get { return BackingStore?.Get("state"); } + set { BackingStore?.Set("state", value); } + } + /// + /// Instantiates a new WindowsMalwareStateCount and sets the default values. + /// + public WindowsMalwareStateCount() { + 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 WindowsMalwareStateCount CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new WindowsMalwareStateCount(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"deviceCount", n => { DeviceCount = n.GetIntValue(); } }, + {"distinctMalwareCount", n => { DistinctMalwareCount = n.GetIntValue(); } }, + {"lastUpdateDateTime", n => { LastUpdateDateTime = n.GetDateTimeOffsetValue(); } }, + {"malwareDetectionCount", n => { MalwareDetectionCount = n.GetIntValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"state", n => { State = n.GetEnumValue(); } }, + }; + } + /// + /// 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.WriteIntValue("deviceCount", DeviceCount); + writer.WriteIntValue("distinctMalwareCount", DistinctMalwareCount); + writer.WriteDateTimeOffsetValue("lastUpdateDateTime", LastUpdateDateTime); + writer.WriteIntValue("malwareDetectionCount", MalwareDetectionCount); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteEnumValue("state", State); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/WindowsMalwareThreatState.cs b/src/Microsoft.Graph/Generated/Models/WindowsMalwareThreatState.cs new file mode 100644 index 00000000000..e1a10ec2d11 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/WindowsMalwareThreatState.cs @@ -0,0 +1,40 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + /// Malware threat status + public enum WindowsMalwareThreatState { + /// Active + [EnumMember(Value = "active")] + Active, + /// Action failed + [EnumMember(Value = "actionFailed")] + ActionFailed, + /// Manual steps required + [EnumMember(Value = "manualStepsRequired")] + ManualStepsRequired, + /// Full scan required + [EnumMember(Value = "fullScanRequired")] + FullScanRequired, + /// Reboot required + [EnumMember(Value = "rebootRequired")] + RebootRequired, + /// Remediated with non critical failures + [EnumMember(Value = "remediatedWithNonCriticalFailures")] + RemediatedWithNonCriticalFailures, + /// Quarantined + [EnumMember(Value = "quarantined")] + Quarantined, + /// Removed + [EnumMember(Value = "removed")] + Removed, + /// Cleaned + [EnumMember(Value = "cleaned")] + Cleaned, + /// Allowed + [EnumMember(Value = "allowed")] + Allowed, + /// No status cleared + [EnumMember(Value = "noStatusCleared")] + NoStatusCleared, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/WindowsProtectionState.cs b/src/Microsoft.Graph/Generated/Models/WindowsProtectionState.cs new file mode 100644 index 00000000000..0dfb1cb6652 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/WindowsProtectionState.cs @@ -0,0 +1,233 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class WindowsProtectionState : Entity, IParsable { + /// Current anti malware version +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AntiMalwareVersion { + get { return BackingStore?.Get("antiMalwareVersion"); } + set { BackingStore?.Set("antiMalwareVersion", value); } + } +#nullable restore +#else + public string AntiMalwareVersion { + get { return BackingStore?.Get("antiMalwareVersion"); } + set { BackingStore?.Set("antiMalwareVersion", value); } + } +#endif + /// Device malware list +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? DetectedMalwareState { + get { return BackingStore?.Get?>("detectedMalwareState"); } + set { BackingStore?.Set("detectedMalwareState", value); } + } +#nullable restore +#else + public List DetectedMalwareState { + get { return BackingStore?.Get>("detectedMalwareState"); } + set { BackingStore?.Set("detectedMalwareState", value); } + } +#endif + /// Computer's state (like clean or pending full scan or pending reboot etc). Possible values are: clean, fullScanPending, rebootPending, manualStepsPending, offlineScanPending, critical. + public WindowsDeviceHealthState? DeviceState { + get { return BackingStore?.Get("deviceState"); } + set { BackingStore?.Set("deviceState", value); } + } + /// Current endpoint protection engine's version +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EngineVersion { + get { return BackingStore?.Get("engineVersion"); } + set { BackingStore?.Set("engineVersion", value); } + } +#nullable restore +#else + public string EngineVersion { + get { return BackingStore?.Get("engineVersion"); } + set { BackingStore?.Set("engineVersion", value); } + } +#endif + /// Full scan overdue or not? + public bool? FullScanOverdue { + get { return BackingStore?.Get("fullScanOverdue"); } + set { BackingStore?.Set("fullScanOverdue", value); } + } + /// Full scan required or not? + public bool? FullScanRequired { + get { return BackingStore?.Get("fullScanRequired"); } + set { BackingStore?.Set("fullScanRequired", value); } + } + /// Indicates whether the device is a virtual machine. + public bool? IsVirtualMachine { + get { return BackingStore?.Get("isVirtualMachine"); } + set { BackingStore?.Set("isVirtualMachine", value); } + } + /// Last quick scan datetime + public DateTimeOffset? LastFullScanDateTime { + get { return BackingStore?.Get("lastFullScanDateTime"); } + set { BackingStore?.Set("lastFullScanDateTime", value); } + } + /// Last full scan signature version +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LastFullScanSignatureVersion { + get { return BackingStore?.Get("lastFullScanSignatureVersion"); } + set { BackingStore?.Set("lastFullScanSignatureVersion", value); } + } +#nullable restore +#else + public string LastFullScanSignatureVersion { + get { return BackingStore?.Get("lastFullScanSignatureVersion"); } + set { BackingStore?.Set("lastFullScanSignatureVersion", value); } + } +#endif + /// Last quick scan datetime + public DateTimeOffset? LastQuickScanDateTime { + get { return BackingStore?.Get("lastQuickScanDateTime"); } + set { BackingStore?.Set("lastQuickScanDateTime", value); } + } + /// Last quick scan signature version +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LastQuickScanSignatureVersion { + get { return BackingStore?.Get("lastQuickScanSignatureVersion"); } + set { BackingStore?.Set("lastQuickScanSignatureVersion", value); } + } +#nullable restore +#else + public string LastQuickScanSignatureVersion { + get { return BackingStore?.Get("lastQuickScanSignatureVersion"); } + set { BackingStore?.Set("lastQuickScanSignatureVersion", value); } + } +#endif + /// Last device health status reported time + public DateTimeOffset? LastReportedDateTime { + get { return BackingStore?.Get("lastReportedDateTime"); } + set { BackingStore?.Set("lastReportedDateTime", value); } + } + /// Anti malware is enabled or not + public bool? MalwareProtectionEnabled { + get { return BackingStore?.Get("malwareProtectionEnabled"); } + set { BackingStore?.Set("malwareProtectionEnabled", value); } + } + /// Network inspection system enabled or not? + public bool? NetworkInspectionSystemEnabled { + get { return BackingStore?.Get("networkInspectionSystemEnabled"); } + set { BackingStore?.Set("networkInspectionSystemEnabled", value); } + } + /// Product Status of Windows Defender Antivirus. Possible values are: noStatus, serviceNotRunning, serviceStartedWithoutMalwareProtection, pendingFullScanDueToThreatAction, pendingRebootDueToThreatAction, pendingManualStepsDueToThreatAction, avSignaturesOutOfDate, asSignaturesOutOfDate, noQuickScanHappenedForSpecifiedPeriod, noFullScanHappenedForSpecifiedPeriod, systemInitiatedScanInProgress, systemInitiatedCleanInProgress, samplesPendingSubmission, productRunningInEvaluationMode, productRunningInNonGenuineMode, productExpired, offlineScanRequired, serviceShutdownAsPartOfSystemShutdown, threatRemediationFailedCritically, threatRemediationFailedNonCritically, noStatusFlagsSet, platformOutOfDate, platformUpdateInProgress, platformAboutToBeOutdated, signatureOrPlatformEndOfLifeIsPastOrIsImpending, windowsSModeSignaturesInUseOnNonWin10SInstall. + public WindowsDefenderProductStatus? ProductStatus { + get { return BackingStore?.Get("productStatus"); } + set { BackingStore?.Set("productStatus", value); } + } + /// Quick scan overdue or not? + public bool? QuickScanOverdue { + get { return BackingStore?.Get("quickScanOverdue"); } + set { BackingStore?.Set("quickScanOverdue", value); } + } + /// Real time protection is enabled or not? + public bool? RealTimeProtectionEnabled { + get { return BackingStore?.Get("realTimeProtectionEnabled"); } + set { BackingStore?.Set("realTimeProtectionEnabled", value); } + } + /// Reboot required or not? + public bool? RebootRequired { + get { return BackingStore?.Get("rebootRequired"); } + set { BackingStore?.Set("rebootRequired", value); } + } + /// Signature out of date or not? + public bool? SignatureUpdateOverdue { + get { return BackingStore?.Get("signatureUpdateOverdue"); } + set { BackingStore?.Set("signatureUpdateOverdue", value); } + } + /// Current malware definitions version +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SignatureVersion { + get { return BackingStore?.Get("signatureVersion"); } + set { BackingStore?.Set("signatureVersion", value); } + } +#nullable restore +#else + public string SignatureVersion { + get { return BackingStore?.Get("signatureVersion"); } + set { BackingStore?.Set("signatureVersion", value); } + } +#endif + /// Indicates whether the Windows Defender tamper protection feature is enabled. + public bool? TamperProtectionEnabled { + get { return BackingStore?.Get("tamperProtectionEnabled"); } + set { BackingStore?.Set("tamperProtectionEnabled", 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 WindowsProtectionState CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new WindowsProtectionState(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"antiMalwareVersion", n => { AntiMalwareVersion = n.GetStringValue(); } }, + {"detectedMalwareState", n => { DetectedMalwareState = n.GetCollectionOfObjectValues(WindowsDeviceMalwareState.CreateFromDiscriminatorValue)?.ToList(); } }, + {"deviceState", n => { DeviceState = n.GetEnumValue(); } }, + {"engineVersion", n => { EngineVersion = n.GetStringValue(); } }, + {"fullScanOverdue", n => { FullScanOverdue = n.GetBoolValue(); } }, + {"fullScanRequired", n => { FullScanRequired = n.GetBoolValue(); } }, + {"isVirtualMachine", n => { IsVirtualMachine = n.GetBoolValue(); } }, + {"lastFullScanDateTime", n => { LastFullScanDateTime = n.GetDateTimeOffsetValue(); } }, + {"lastFullScanSignatureVersion", n => { LastFullScanSignatureVersion = n.GetStringValue(); } }, + {"lastQuickScanDateTime", n => { LastQuickScanDateTime = n.GetDateTimeOffsetValue(); } }, + {"lastQuickScanSignatureVersion", n => { LastQuickScanSignatureVersion = n.GetStringValue(); } }, + {"lastReportedDateTime", n => { LastReportedDateTime = n.GetDateTimeOffsetValue(); } }, + {"malwareProtectionEnabled", n => { MalwareProtectionEnabled = n.GetBoolValue(); } }, + {"networkInspectionSystemEnabled", n => { NetworkInspectionSystemEnabled = n.GetBoolValue(); } }, + {"productStatus", n => { ProductStatus = n.GetEnumValue(); } }, + {"quickScanOverdue", n => { QuickScanOverdue = n.GetBoolValue(); } }, + {"realTimeProtectionEnabled", n => { RealTimeProtectionEnabled = n.GetBoolValue(); } }, + {"rebootRequired", n => { RebootRequired = n.GetBoolValue(); } }, + {"signatureUpdateOverdue", n => { SignatureUpdateOverdue = n.GetBoolValue(); } }, + {"signatureVersion", n => { SignatureVersion = n.GetStringValue(); } }, + {"tamperProtectionEnabled", n => { TamperProtectionEnabled = 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("antiMalwareVersion", AntiMalwareVersion); + writer.WriteCollectionOfObjectValues("detectedMalwareState", DetectedMalwareState); + writer.WriteEnumValue("deviceState", DeviceState); + writer.WriteStringValue("engineVersion", EngineVersion); + writer.WriteBoolValue("fullScanOverdue", FullScanOverdue); + writer.WriteBoolValue("fullScanRequired", FullScanRequired); + writer.WriteBoolValue("isVirtualMachine", IsVirtualMachine); + writer.WriteDateTimeOffsetValue("lastFullScanDateTime", LastFullScanDateTime); + writer.WriteStringValue("lastFullScanSignatureVersion", LastFullScanSignatureVersion); + writer.WriteDateTimeOffsetValue("lastQuickScanDateTime", LastQuickScanDateTime); + writer.WriteStringValue("lastQuickScanSignatureVersion", LastQuickScanSignatureVersion); + writer.WriteDateTimeOffsetValue("lastReportedDateTime", LastReportedDateTime); + writer.WriteBoolValue("malwareProtectionEnabled", MalwareProtectionEnabled); + writer.WriteBoolValue("networkInspectionSystemEnabled", NetworkInspectionSystemEnabled); + writer.WriteEnumValue("productStatus", ProductStatus); + writer.WriteBoolValue("quickScanOverdue", QuickScanOverdue); + writer.WriteBoolValue("realTimeProtectionEnabled", RealTimeProtectionEnabled); + writer.WriteBoolValue("rebootRequired", RebootRequired); + writer.WriteBoolValue("signatureUpdateOverdue", SignatureUpdateOverdue); + writer.WriteStringValue("signatureVersion", SignatureVersion); + writer.WriteBoolValue("tamperProtectionEnabled", TamperProtectionEnabled); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Organization/Item/OrganizationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/OrganizationItemRequestBuilder.cs index 80c25532e4f..34b800e32b9 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/OrganizationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/OrganizationItemRequestBuilder.cs @@ -92,8 +92,8 @@ public async Task DeleteAsync(Action - /// Read properties and relationships of the organization object. - /// Find more info here + /// Get the properties and relationships of the currently authenticated organization. Since the **organization** resource supports extensions, you can also use the `GET` operation to get custom properties and extension data in an **organization** instance. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -158,7 +158,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Read properties and relationships of the organization object. + /// Get the properties and relationships of the currently authenticated organization. Since the **organization** resource supports extensions, you can also use the `GET` operation to get custom properties and extension data in an **organization** instance. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -228,7 +228,7 @@ public OrganizationItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Read properties and relationships of the organization object. + /// Get the properties and relationships of the currently authenticated organization. Since the **organization** resource supports extensions, you can also use the `GET` operation to get custom properties and extension data in an **organization** instance. /// public class OrganizationItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Places/GraphRoomList/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Places/GraphRoomList/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..5ce9dd6370e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Places/GraphRoomList/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Places.GraphRoomList.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/graph.roomList/$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/graph.roomList/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Places/GraphRoomList/GraphRoomListRequestBuilder.cs b/src/Microsoft.Graph/Generated/Places/GraphRoomList/GraphRoomListRequestBuilder.cs new file mode 100644 index 00000000000..f0c0109088d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Places/GraphRoomList/GraphRoomListRequestBuilder.cs @@ -0,0 +1,163 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Places.GraphRoomList.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.Places.GraphRoomList { + /// + /// Casts the previous resource to roomList. + /// + public class GraphRoomListRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new GraphRoomListRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphRoomListRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/places/graph.roomList{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new GraphRoomListRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphRoomListRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/places/graph.roomList{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get the items of type microsoft.graph.roomList in the microsoft.graph.place collection + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, RoomListCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the items of type microsoft.graph.roomList in the microsoft.graph.place collection + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new GraphRoomListRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the items of type microsoft.graph.roomList in the microsoft.graph.place collection + /// + public class GraphRoomListRequestBuilderGetQueryParameters { + /// 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 GraphRoomListRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphRoomListRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphRoomListRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphRoomListRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphRoomListRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/GraphRoomListRequestBuilder.cs b/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/GraphRoomListRequestBuilder.cs new file mode 100644 index 00000000000..e07d93ddbf5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/GraphRoomListRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Places.Item.GraphRoomList { + /// + /// Casts the previous resource to roomList. + /// + public class GraphRoomListRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new GraphRoomListRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphRoomListRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/places/{place%2Did}/graph.roomList{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new GraphRoomListRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphRoomListRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/places/{place%2Did}/graph.roomList{?%24select,%24expand}", rawUrl) { + } + /// + /// Get the item of type microsoft.graph.place as microsoft.graph.roomList + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, RoomList.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the item of type microsoft.graph.place as microsoft.graph.roomList + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new GraphRoomListRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the item of type microsoft.graph.place as microsoft.graph.roomList + /// + public class GraphRoomListRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 GraphRoomListRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphRoomListRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphRoomListRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphRoomListRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphRoomListRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Places/Item/PlaceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Places/Item/PlaceItemRequestBuilder.cs index f0da93b44c8..9145c2717f5 100644 --- a/src/Microsoft.Graph/Generated/Places/Item/PlaceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Places/Item/PlaceItemRequestBuilder.cs @@ -1,6 +1,7 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; using Microsoft.Graph.Places.Item.GraphRoom; +using Microsoft.Graph.Places.Item.GraphRoomList; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -18,6 +19,10 @@ public class PlaceItemRequestBuilder : BaseRequestBuilder { public GraphRoomRequestBuilder GraphRoom { get => new GraphRoomRequestBuilder(PathParameters, RequestAdapter); } + /// Casts the previous resource to roomList. + public GraphRoomListRequestBuilder GraphRoomList { get => + new GraphRoomListRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new PlaceItemRequestBuilder and sets the default values. /// diff --git a/src/Microsoft.Graph/Generated/Places/PlacesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Places/PlacesRequestBuilder.cs index e17f3485137..7d3346dd09e 100644 --- a/src/Microsoft.Graph/Generated/Places/PlacesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Places/PlacesRequestBuilder.cs @@ -1,5 +1,6 @@ using Microsoft.Graph.Places.Count; using Microsoft.Graph.Places.GraphRoom; +using Microsoft.Graph.Places.GraphRoomList; using Microsoft.Graph.Places.Item; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -20,6 +21,10 @@ public class PlacesRequestBuilder : BaseRequestBuilder { public GraphRoomRequestBuilder GraphRoom { get => new GraphRoomRequestBuilder(PathParameters, RequestAdapter); } + /// Casts the previous resource to roomList. + public GraphRoomListRequestBuilder GraphRoomList { get => + new GraphRoomListRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the collection of place entities. public PlaceItemRequestBuilder this[string position] { get { var urlTplParams = new Dictionary(PathParameters); diff --git a/src/Microsoft.Graph/Generated/Policies/AppManagementPolicies/Item/AppManagementPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/AppManagementPolicies/Item/AppManagementPolicyItemRequestBuilder.cs index 7c985b708ce..2285b0bd496 100644 --- a/src/Microsoft.Graph/Generated/Policies/AppManagementPolicies/Item/AppManagementPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/AppManagementPolicies/Item/AppManagementPolicyItemRequestBuilder.cs @@ -34,7 +34,7 @@ public AppManagementPolicyItemRequestBuilder(string rawUrl, IRequestAdapter requ } /// /// Delete an appManagementPolicy 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. @@ -74,7 +74,7 @@ public async Task GetAsync(Action /// Update an appManagementPolicy 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/Policies/CrossTenantAccessPolicy/Partners/Item/IdentitySynchronization/IdentitySynchronizationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/Item/IdentitySynchronization/IdentitySynchronizationRequestBuilder.cs index 3cbc446072f..cf8cba19301 100644 --- a/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/Item/IdentitySynchronization/IdentitySynchronizationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/Item/IdentitySynchronization/IdentitySynchronizationRequestBuilder.cs @@ -68,8 +68,8 @@ public async Task GetAsync(Action(requestInfo, CrossTenantIdentitySyncPolicyPartner.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Update the user synchronization policy of a partner-specific configuration. - /// Find more info here + /// Create a cross-tenant user synchronization policy for a partner-specific configuration. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -140,7 +140,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the user synchronization policy of a partner-specific configuration. + /// Create a cross-tenant user synchronization policy for a partner-specific configuration. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/AuthenticationMethodsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/AuthenticationMethodsRequestBuilder.cs new file mode 100644 index 00000000000..9a74ab987fe --- /dev/null +++ b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/AuthenticationMethodsRequestBuilder.cs @@ -0,0 +1,280 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Reports.AuthenticationMethods.UserRegistrationDetails; +using Microsoft.Graph.Reports.AuthenticationMethods.UsersRegisteredByFeature; +using Microsoft.Graph.Reports.AuthenticationMethods.UsersRegisteredByFeatureWithIncludedUserTypesWithIncludedUserRoles; +using Microsoft.Graph.Reports.AuthenticationMethods.UsersRegisteredByMethod; +using Microsoft.Graph.Reports.AuthenticationMethods.UsersRegisteredByMethodWithIncludedUserTypesWithIncludedUserRoles; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Reports.AuthenticationMethods { + /// + /// Provides operations to manage the authenticationMethods property of the microsoft.graph.reportRoot entity. + /// + public class AuthenticationMethodsRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the userRegistrationDetails property of the microsoft.graph.authenticationMethodsRoot entity. + public UserRegistrationDetailsRequestBuilder UserRegistrationDetails { get => + new UserRegistrationDetailsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the usersRegisteredByFeature method. + public UsersRegisteredByFeatureRequestBuilder UsersRegisteredByFeature { get => + new UsersRegisteredByFeatureRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the usersRegisteredByMethod method. + public UsersRegisteredByMethodRequestBuilder UsersRegisteredByMethod { get => + new UsersRegisteredByMethodRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new AuthenticationMethodsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AuthenticationMethodsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/reports/authenticationMethods{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AuthenticationMethodsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AuthenticationMethodsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/reports/authenticationMethods{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property authenticationMethods for reports + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get authenticationMethods from reports + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, AuthenticationMethodsRoot.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property authenticationMethods in reports + /// + /// 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(AuthenticationMethodsRoot body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(AuthenticationMethodsRoot 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, AuthenticationMethodsRoot.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property authenticationMethods for reports + /// + /// Configuration 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 AuthenticationMethodsRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get authenticationMethods from reports + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new AuthenticationMethodsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property authenticationMethods in reports + /// + /// 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(AuthenticationMethodsRoot body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(AuthenticationMethodsRoot 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 AuthenticationMethodsRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Provides operations to call the usersRegisteredByFeature method. + /// + /// Usage: includedUserRoles='{includedUserRoles}' + /// Usage: includedUserTypes='{includedUserTypes}' + public UsersRegisteredByFeatureWithIncludedUserTypesWithIncludedUserRolesRequestBuilder UsersRegisteredByFeatureWithIncludedUserTypesWithIncludedUserRoles(string includedUserRoles, string includedUserTypes) { + if(string.IsNullOrEmpty(includedUserRoles)) throw new ArgumentNullException(nameof(includedUserRoles)); + if(string.IsNullOrEmpty(includedUserTypes)) throw new ArgumentNullException(nameof(includedUserTypes)); + return new UsersRegisteredByFeatureWithIncludedUserTypesWithIncludedUserRolesRequestBuilder(PathParameters, RequestAdapter, includedUserRoles, includedUserTypes); + } + /// + /// Provides operations to call the usersRegisteredByMethod method. + /// + /// Usage: includedUserRoles='{includedUserRoles}' + /// Usage: includedUserTypes='{includedUserTypes}' + public UsersRegisteredByMethodWithIncludedUserTypesWithIncludedUserRolesRequestBuilder UsersRegisteredByMethodWithIncludedUserTypesWithIncludedUserRoles(string includedUserRoles, string includedUserTypes) { + if(string.IsNullOrEmpty(includedUserRoles)) throw new ArgumentNullException(nameof(includedUserRoles)); + if(string.IsNullOrEmpty(includedUserTypes)) throw new ArgumentNullException(nameof(includedUserTypes)); + return new UsersRegisteredByMethodWithIncludedUserTypesWithIncludedUserRolesRequestBuilder(PathParameters, RequestAdapter, includedUserRoles, includedUserTypes); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AuthenticationMethodsRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new authenticationMethodsRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public AuthenticationMethodsRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get authenticationMethods from reports + /// + public class AuthenticationMethodsRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 AuthenticationMethodsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AuthenticationMethodsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AuthenticationMethodsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new authenticationMethodsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AuthenticationMethodsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AuthenticationMethodsRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new authenticationMethodsRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public AuthenticationMethodsRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationDetails/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationDetails/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..ff656ad3c34 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationDetails/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Reports.AuthenticationMethods.UserRegistrationDetails.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}/reports/authenticationMethods/userRegistrationDetails/$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}/reports/authenticationMethods/userRegistrationDetails/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationDetails/Item/UserRegistrationDetailsItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationDetails/Item/UserRegistrationDetailsItemRequestBuilder.cs new file mode 100644 index 00000000000..e687275a732 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationDetails/Item/UserRegistrationDetailsItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Reports.AuthenticationMethods.UserRegistrationDetails.Item { + /// + /// Provides operations to manage the userRegistrationDetails property of the microsoft.graph.authenticationMethodsRoot entity. + /// + public class UserRegistrationDetailsItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UserRegistrationDetailsItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserRegistrationDetailsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/reports/authenticationMethods/userRegistrationDetails/{userRegistrationDetails%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserRegistrationDetailsItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserRegistrationDetailsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/reports/authenticationMethods/userRegistrationDetails/{userRegistrationDetails%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property userRegistrationDetails for reports + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get userRegistrationDetails from reports + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = 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.UserRegistrationDetails.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property userRegistrationDetails in reports + /// + /// 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.UserRegistrationDetails body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.UserRegistrationDetails 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.UserRegistrationDetails.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property userRegistrationDetails for reports + /// + /// Configuration 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 UserRegistrationDetailsItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get userRegistrationDetails from reports + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserRegistrationDetailsItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property userRegistrationDetails in reports + /// + /// 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.UserRegistrationDetails body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.UserRegistrationDetails 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 UserRegistrationDetailsItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserRegistrationDetailsItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserRegistrationDetailsItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public UserRegistrationDetailsItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get userRegistrationDetails from reports + /// + public class UserRegistrationDetailsItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 UserRegistrationDetailsItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserRegistrationDetailsItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserRegistrationDetailsItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new UserRegistrationDetailsItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserRegistrationDetailsItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserRegistrationDetailsItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new UserRegistrationDetailsItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public UserRegistrationDetailsItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationDetails/UserRegistrationDetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationDetails/UserRegistrationDetailsRequestBuilder.cs new file mode 100644 index 00000000000..16f3da87903 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationDetails/UserRegistrationDetailsRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Reports.AuthenticationMethods.UserRegistrationDetails.Count; +using Microsoft.Graph.Reports.AuthenticationMethods.UserRegistrationDetails.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.Reports.AuthenticationMethods.UserRegistrationDetails { + /// + /// Provides operations to manage the userRegistrationDetails property of the microsoft.graph.authenticationMethodsRoot entity. + /// + public class UserRegistrationDetailsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the userRegistrationDetails property of the microsoft.graph.authenticationMethodsRoot entity. + public UserRegistrationDetailsItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("userRegistrationDetails%2Did", position); + return new UserRegistrationDetailsItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new UserRegistrationDetailsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserRegistrationDetailsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/reports/authenticationMethods/userRegistrationDetails{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new UserRegistrationDetailsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserRegistrationDetailsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/reports/authenticationMethods/userRegistrationDetails{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get userRegistrationDetails from reports + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserRegistrationDetailsCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to userRegistrationDetails for reports + /// + /// 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.UserRegistrationDetails body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Microsoft.Graph.Models.UserRegistrationDetails 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.UserRegistrationDetails.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get userRegistrationDetails from reports + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UserRegistrationDetailsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to userRegistrationDetails for reports + /// + /// 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.UserRegistrationDetails body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Microsoft.Graph.Models.UserRegistrationDetails 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 UserRegistrationDetailsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get userRegistrationDetails from reports + /// + public class UserRegistrationDetailsRequestBuilderGetQueryParameters { + /// 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 UserRegistrationDetailsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public UserRegistrationDetailsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new UserRegistrationDetailsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new userRegistrationDetailsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UserRegistrationDetailsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UserRegistrationDetailsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new userRegistrationDetailsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public UserRegistrationDetailsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UsersRegisteredByFeature/UsersRegisteredByFeatureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UsersRegisteredByFeature/UsersRegisteredByFeatureRequestBuilder.cs new file mode 100644 index 00000000000..550aae4e58b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UsersRegisteredByFeature/UsersRegisteredByFeatureRequestBuilder.cs @@ -0,0 +1,91 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Reports.AuthenticationMethods.UsersRegisteredByFeature { + /// + /// Provides operations to call the usersRegisteredByFeature method. + /// + public class UsersRegisteredByFeatureRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UsersRegisteredByFeatureRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UsersRegisteredByFeatureRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/reports/authenticationMethods/usersRegisteredByFeature()", pathParameters) { + } + /// + /// Instantiates a new UsersRegisteredByFeatureRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UsersRegisteredByFeatureRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/reports/authenticationMethods/usersRegisteredByFeature()", rawUrl) { + } + /// + /// Invoke function usersRegisteredByFeature + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserRegistrationFeatureSummary.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke function usersRegisteredByFeature + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UsersRegisteredByFeatureRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UsersRegisteredByFeatureRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new usersRegisteredByFeatureRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UsersRegisteredByFeatureRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UsersRegisteredByFeatureWithIncludedUserTypesWithIncludedUserRoles/UsersRegisteredByFeatureWithIncludedUserTypesWithIncludedUserRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UsersRegisteredByFeatureWithIncludedUserTypesWithIncludedUserRoles/UsersRegisteredByFeatureWithIncludedUserTypesWithIncludedUserRolesRequestBuilder.cs new file mode 100644 index 00000000000..c0ddb58b83e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UsersRegisteredByFeatureWithIncludedUserTypesWithIncludedUserRoles/UsersRegisteredByFeatureWithIncludedUserTypesWithIncludedUserRolesRequestBuilder.cs @@ -0,0 +1,95 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Reports.AuthenticationMethods.UsersRegisteredByFeatureWithIncludedUserTypesWithIncludedUserRoles { + /// + /// Provides operations to call the usersRegisteredByFeature method. + /// + public class UsersRegisteredByFeatureWithIncludedUserTypesWithIncludedUserRolesRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UsersRegisteredByFeatureWithIncludedUserTypesWithIncludedUserRolesRequestBuilder and sets the default values. + /// + /// Usage: includedUserRoles='{includedUserRoles}' + /// Usage: includedUserTypes='{includedUserTypes}' + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UsersRegisteredByFeatureWithIncludedUserTypesWithIncludedUserRolesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter, string includedUserRoles = "", string includedUserTypes = "") : base(requestAdapter, "{+baseurl}/reports/authenticationMethods/usersRegisteredByFeature(includedUserTypes='{includedUserTypes}',includedUserRoles='{includedUserRoles}')", pathParameters) { + if (!string.IsNullOrWhiteSpace(includedUserRoles)) PathParameters.Add("includedUserRoles", includedUserRoles); + if (!string.IsNullOrWhiteSpace(includedUserTypes)) PathParameters.Add("includedUserTypes", includedUserTypes); + } + /// + /// Instantiates a new UsersRegisteredByFeatureWithIncludedUserTypesWithIncludedUserRolesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UsersRegisteredByFeatureWithIncludedUserTypesWithIncludedUserRolesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/reports/authenticationMethods/usersRegisteredByFeature(includedUserTypes='{includedUserTypes}',includedUserRoles='{includedUserRoles}')", rawUrl) { + } + /// + /// Invoke function usersRegisteredByFeature + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserRegistrationFeatureSummary.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke function usersRegisteredByFeature + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UsersRegisteredByFeatureWithIncludedUserTypesWithIncludedUserRolesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UsersRegisteredByFeatureWithIncludedUserTypesWithIncludedUserRolesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new usersRegisteredByFeatureWithIncludedUserTypesWithIncludedUserRolesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UsersRegisteredByFeatureWithIncludedUserTypesWithIncludedUserRolesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UsersRegisteredByMethod/UsersRegisteredByMethodRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UsersRegisteredByMethod/UsersRegisteredByMethodRequestBuilder.cs new file mode 100644 index 00000000000..ad9b1e7e0f4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UsersRegisteredByMethod/UsersRegisteredByMethodRequestBuilder.cs @@ -0,0 +1,91 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Reports.AuthenticationMethods.UsersRegisteredByMethod { + /// + /// Provides operations to call the usersRegisteredByMethod method. + /// + public class UsersRegisteredByMethodRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UsersRegisteredByMethodRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UsersRegisteredByMethodRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/reports/authenticationMethods/usersRegisteredByMethod()", pathParameters) { + } + /// + /// Instantiates a new UsersRegisteredByMethodRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UsersRegisteredByMethodRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/reports/authenticationMethods/usersRegisteredByMethod()", rawUrl) { + } + /// + /// Invoke function usersRegisteredByMethod + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserRegistrationMethodSummary.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke function usersRegisteredByMethod + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UsersRegisteredByMethodRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UsersRegisteredByMethodRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new usersRegisteredByMethodRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UsersRegisteredByMethodRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UsersRegisteredByMethodWithIncludedUserTypesWithIncludedUserRoles/UsersRegisteredByMethodWithIncludedUserTypesWithIncludedUserRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UsersRegisteredByMethodWithIncludedUserTypesWithIncludedUserRoles/UsersRegisteredByMethodWithIncludedUserTypesWithIncludedUserRolesRequestBuilder.cs new file mode 100644 index 00000000000..deadbbad2a3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UsersRegisteredByMethodWithIncludedUserTypesWithIncludedUserRoles/UsersRegisteredByMethodWithIncludedUserTypesWithIncludedUserRolesRequestBuilder.cs @@ -0,0 +1,95 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Reports.AuthenticationMethods.UsersRegisteredByMethodWithIncludedUserTypesWithIncludedUserRoles { + /// + /// Provides operations to call the usersRegisteredByMethod method. + /// + public class UsersRegisteredByMethodWithIncludedUserTypesWithIncludedUserRolesRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new UsersRegisteredByMethodWithIncludedUserTypesWithIncludedUserRolesRequestBuilder and sets the default values. + /// + /// Usage: includedUserRoles='{includedUserRoles}' + /// Usage: includedUserTypes='{includedUserTypes}' + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UsersRegisteredByMethodWithIncludedUserTypesWithIncludedUserRolesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter, string includedUserRoles = "", string includedUserTypes = "") : base(requestAdapter, "{+baseurl}/reports/authenticationMethods/usersRegisteredByMethod(includedUserTypes='{includedUserTypes}',includedUserRoles='{includedUserRoles}')", pathParameters) { + if (!string.IsNullOrWhiteSpace(includedUserRoles)) PathParameters.Add("includedUserRoles", includedUserRoles); + if (!string.IsNullOrWhiteSpace(includedUserTypes)) PathParameters.Add("includedUserTypes", includedUserTypes); + } + /// + /// Instantiates a new UsersRegisteredByMethodWithIncludedUserTypesWithIncludedUserRolesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UsersRegisteredByMethodWithIncludedUserTypesWithIncludedUserRolesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/reports/authenticationMethods/usersRegisteredByMethod(includedUserTypes='{includedUserTypes}',includedUserRoles='{includedUserRoles}')", rawUrl) { + } + /// + /// Invoke function usersRegisteredByMethod + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, UserRegistrationMethodSummary.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke function usersRegisteredByMethod + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new UsersRegisteredByMethodWithIncludedUserTypesWithIncludedUserRolesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class UsersRegisteredByMethodWithIncludedUserTypesWithIncludedUserRolesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new usersRegisteredByMethodWithIncludedUserTypesWithIncludedUserRolesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public UsersRegisteredByMethodWithIncludedUserTypesWithIncludedUserRolesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Reports/ReportsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/ReportsRequestBuilder.cs index f89682f782f..b67eeb684e9 100644 --- a/src/Microsoft.Graph/Generated/Reports/ReportsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/ReportsRequestBuilder.cs @@ -1,5 +1,6 @@ using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Models; +using Microsoft.Graph.Reports.AuthenticationMethods; using Microsoft.Graph.Reports.DailyPrintUsageByPrinter; using Microsoft.Graph.Reports.DailyPrintUsageByUser; using Microsoft.Graph.Reports.DeviceConfigurationDeviceActivity; @@ -119,6 +120,10 @@ namespace Microsoft.Graph.Reports { /// Provides operations to manage the reportRoot singleton. /// public class ReportsRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the authenticationMethods property of the microsoft.graph.reportRoot entity. + public AuthenticationMethodsRequestBuilder AuthenticationMethods { get => + new AuthenticationMethodsRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the dailyPrintUsageByPrinter property of the microsoft.graph.reportRoot entity. public DailyPrintUsageByPrinterRequestBuilder DailyPrintUsageByPrinter { get => new DailyPrintUsageByPrinterRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Search/Query/QueryRequestBuilder.cs b/src/Microsoft.Graph/Generated/Search/Query/QueryRequestBuilder.cs index 99d2ab53b6c..cf0e7dde497 100644 --- a/src/Microsoft.Graph/Generated/Search/Query/QueryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Search/Query/QueryRequestBuilder.cs @@ -27,7 +27,8 @@ public QueryRequestBuilder(Dictionary pathParameters, IRequestAd public QueryRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/search/query", rawUrl) { } /// - /// Invoke action query + /// Runs the query specified in the request body. Search results are provided in the response. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -48,7 +49,7 @@ public async Task PostAsync(QueryPostRequestBody body, Action(requestInfo, QueryResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Invoke action query + /// Runs the query specified in the request body. Search results are provided in the response. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Security/SecurityRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/SecurityRequestBuilder.cs index 2494f53be75..b6f39e6c1b4 100644 --- a/src/Microsoft.Graph/Generated/Security/SecurityRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Security/SecurityRequestBuilder.cs @@ -8,6 +8,7 @@ using Microsoft.Graph.Security.MicrosoftGraphSecurityRunHuntingQuery; using Microsoft.Graph.Security.SecureScoreControlProfiles; using Microsoft.Graph.Security.SecureScores; +using Microsoft.Graph.Security.ThreatIntelligence; using Microsoft.Graph.Security.TriggerTypes; using Microsoft.Graph.Security.Triggers; using Microsoft.Kiota.Abstractions.Serialization; @@ -55,6 +56,10 @@ public class SecurityRequestBuilder : BaseRequestBuilder { public SecureScoresRequestBuilder SecureScores { get => new SecureScoresRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the threatIntelligence property of the microsoft.graph.security entity. + public ThreatIntelligenceRequestBuilder ThreatIntelligence { get => + new ThreatIntelligenceRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the triggers property of the microsoft.graph.security entity. public TriggersRequestBuilder Triggers { get => new TriggersRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/ArticleIndicators/ArticleIndicatorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/ArticleIndicators/ArticleIndicatorsRequestBuilder.cs new file mode 100644 index 00000000000..8d8746b4753 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/ArticleIndicators/ArticleIndicatorsRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.ArticleIndicators.Count; +using Microsoft.Graph.Security.ThreatIntelligence.ArticleIndicators.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.Security.ThreatIntelligence.ArticleIndicators { + /// + /// Provides operations to manage the articleIndicators property of the microsoft.graph.security.threatIntelligence entity. + /// + public class ArticleIndicatorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the articleIndicators property of the microsoft.graph.security.threatIntelligence entity. + public ArticleIndicatorItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("articleIndicator%2Did", position); + return new ArticleIndicatorItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ArticleIndicatorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ArticleIndicatorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/articleIndicators{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ArticleIndicatorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ArticleIndicatorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/articleIndicators{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Read the properties and relationships of an articleIndicator object. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, ArticleIndicatorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to articleIndicators for security + /// + /// 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(ArticleIndicator body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ArticleIndicator 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, ArticleIndicator.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Read the properties and relationships of an articleIndicator 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 ArticleIndicatorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to articleIndicators for security + /// + /// 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(ArticleIndicator body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ArticleIndicator 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 ArticleIndicatorsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read the properties and relationships of an articleIndicator object. + /// + public class ArticleIndicatorsRequestBuilderGetQueryParameters { + /// 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 ArticleIndicatorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ArticleIndicatorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ArticleIndicatorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new articleIndicatorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ArticleIndicatorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ArticleIndicatorsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new articleIndicatorsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ArticleIndicatorsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/ArticleIndicators/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/ArticleIndicators/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..23de3ace9f2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/ArticleIndicators/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Security.ThreatIntelligence.ArticleIndicators.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/threatIntelligence/articleIndicators/$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/threatIntelligence/articleIndicators/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/ArticleIndicators/Item/ArticleIndicatorItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/ArticleIndicators/Item/ArticleIndicatorItemRequestBuilder.cs new file mode 100644 index 00000000000..1eeec0624af --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/ArticleIndicators/Item/ArticleIndicatorItemRequestBuilder.cs @@ -0,0 +1,249 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.ArticleIndicators.Item.Artifact; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.ArticleIndicators.Item { + /// + /// Provides operations to manage the articleIndicators property of the microsoft.graph.security.threatIntelligence entity. + /// + public class ArticleIndicatorItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the artifact property of the microsoft.graph.security.indicator entity. + public ArtifactRequestBuilder Artifact { get => + new ArtifactRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ArticleIndicatorItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ArticleIndicatorItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/articleIndicators/{articleIndicator%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ArticleIndicatorItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ArticleIndicatorItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/articleIndicators/{articleIndicator%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property articleIndicators for security + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// Read the properties and relationships of an articleIndicator 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, ArticleIndicator.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property articleIndicators in security + /// + /// 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(ArticleIndicator body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(ArticleIndicator 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, ArticleIndicator.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property articleIndicators for security + /// + /// Configuration 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 ArticleIndicatorItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read the properties and relationships of an articleIndicator 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 ArticleIndicatorItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property articleIndicators in security + /// + /// 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(ArticleIndicator body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(ArticleIndicator 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 ArticleIndicatorItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ArticleIndicatorItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new ArticleIndicatorItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public ArticleIndicatorItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read the properties and relationships of an articleIndicator object. + /// + public class ArticleIndicatorItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 ArticleIndicatorItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ArticleIndicatorItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ArticleIndicatorItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new ArticleIndicatorItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ArticleIndicatorItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ArticleIndicatorItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new ArticleIndicatorItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public ArticleIndicatorItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/ArticleIndicators/Item/Artifact/ArtifactRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/ArticleIndicators/Item/Artifact/ArtifactRequestBuilder.cs new file mode 100644 index 00000000000..bceaf47c9ea --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/ArticleIndicators/Item/Artifact/ArtifactRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.ArticleIndicators.Item.Artifact { + /// + /// Provides operations to manage the artifact property of the microsoft.graph.security.indicator entity. + /// + public class ArtifactRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new ArtifactRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ArtifactRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/articleIndicators/{articleIndicator%2Did}/artifact{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ArtifactRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ArtifactRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/articleIndicators/{articleIndicator%2Did}/artifact{?%24select,%24expand}", rawUrl) { + } + /// + /// The artifact related to this indicator. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = 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.Security.Artifact.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The artifact related to this indicator. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new ArtifactRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The artifact related to this indicator. + /// + public class ArtifactRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 ArtifactRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ArtifactRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ArtifactRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new artifactRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ArtifactRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Articles/ArticlesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Articles/ArticlesRequestBuilder.cs new file mode 100644 index 00000000000..472dd3fc420 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Articles/ArticlesRequestBuilder.cs @@ -0,0 +1,236 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.Articles.Count; +using Microsoft.Graph.Security.ThreatIntelligence.Articles.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.Security.ThreatIntelligence.Articles { + /// + /// Provides operations to manage the articles property of the microsoft.graph.security.threatIntelligence entity. + /// + public class ArticlesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the articles property of the microsoft.graph.security.threatIntelligence entity. + public ArticleItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("article%2Did", position); + return new ArticleItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ArticlesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ArticlesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/articles{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ArticlesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ArticlesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/articles{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get a list of article objects, including their properties and relationships. + /// 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, ArticleCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to articles for security + /// + /// 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(Article body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task
PostAsync(Article 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, Article.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get a list of article objects, including their properties and relationships. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new ArticlesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to articles for security + /// + /// 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(Article body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Article 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 ArticlesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get a list of article objects, including their properties and relationships. + /// + public class ArticlesRequestBuilderGetQueryParameters { + /// 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 ArticlesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ArticlesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ArticlesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new articlesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ArticlesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ArticlesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new articlesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ArticlesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Articles/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Articles/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..256f6e4da9c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Articles/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Security.ThreatIntelligence.Articles.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/threatIntelligence/articles/$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/threatIntelligence/articles/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Articles/Item/ArticleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Articles/Item/ArticleItemRequestBuilder.cs new file mode 100644 index 00000000000..3f0877cbb34 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Articles/Item/ArticleItemRequestBuilder.cs @@ -0,0 +1,249 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.Articles.Item.Indicators; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.Articles.Item { + /// + /// Provides operations to manage the articles property of the microsoft.graph.security.threatIntelligence entity. + /// + public class ArticleItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the indicators property of the microsoft.graph.security.article entity. + public IndicatorsRequestBuilder Indicators { get => + new IndicatorsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ArticleItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ArticleItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/articles/{article%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ArticleItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ArticleItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/articles/{article%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property articles for security + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// Read the properties and relationships of an article 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, Article.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property articles in security + /// + /// 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(Article body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task
PatchAsync(Article 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, Article.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property articles for security + /// + /// Configuration 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 ArticleItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read the properties and relationships of an article 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 ArticleItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property articles in security + /// + /// 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(Article body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Article 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 ArticleItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ArticleItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new ArticleItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public ArticleItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read the properties and relationships of an article object. + /// + public class ArticleItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 ArticleItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ArticleItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ArticleItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new ArticleItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ArticleItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ArticleItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new ArticleItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public ArticleItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Articles/Item/Indicators/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Articles/Item/Indicators/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..64d59e80c86 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Articles/Item/Indicators/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Security.ThreatIntelligence.Articles.Item.Indicators.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/threatIntelligence/articles/{article%2Did}/indicators/$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/threatIntelligence/articles/{article%2Did}/indicators/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Articles/Item/Indicators/IndicatorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Articles/Item/Indicators/IndicatorsRequestBuilder.cs new file mode 100644 index 00000000000..210dd93a8c1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Articles/Item/Indicators/IndicatorsRequestBuilder.cs @@ -0,0 +1,171 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.Articles.Item.Indicators.Count; +using Microsoft.Graph.Security.ThreatIntelligence.Articles.Item.Indicators.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.Security.ThreatIntelligence.Articles.Item.Indicators { + /// + /// Provides operations to manage the indicators property of the microsoft.graph.security.article entity. + /// + public class IndicatorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the indicators property of the microsoft.graph.security.article entity. + public ArticleIndicatorItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("articleIndicator%2Did", position); + return new ArticleIndicatorItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new IndicatorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IndicatorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/articles/{article%2Did}/indicators{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new IndicatorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IndicatorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/articles/{article%2Did}/indicators{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get a list of articleIndicator objects that represent indicators of threat or compromise related to the contents of an article. + /// 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, ArticleIndicatorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get a list of articleIndicator objects that represent indicators of threat or compromise related to the contents of an article. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new IndicatorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get a list of articleIndicator objects that represent indicators of threat or compromise related to the contents of an article. + /// + public class IndicatorsRequestBuilderGetQueryParameters { + /// 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 IndicatorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public IndicatorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new IndicatorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new indicatorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public IndicatorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Articles/Item/Indicators/Item/ArticleIndicatorItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Articles/Item/Indicators/Item/ArticleIndicatorItemRequestBuilder.cs new file mode 100644 index 00000000000..51b87f55b63 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Articles/Item/Indicators/Item/ArticleIndicatorItemRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.Articles.Item.Indicators.Item { + /// + /// Provides operations to manage the indicators property of the microsoft.graph.security.article entity. + /// + public class ArticleIndicatorItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new ArticleIndicatorItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ArticleIndicatorItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/articles/{article%2Did}/indicators/{articleIndicator%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ArticleIndicatorItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ArticleIndicatorItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/articles/{article%2Did}/indicators/{articleIndicator%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Indicators related to this article. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, ArticleIndicator.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Indicators related to this article. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new ArticleIndicatorItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Indicators related to this article. + /// + public class ArticleIndicatorItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 ArticleIndicatorItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ArticleIndicatorItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ArticleIndicatorItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new ArticleIndicatorItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ArticleIndicatorItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostComponents/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostComponents/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..6fa8ef1720e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostComponents/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Security.ThreatIntelligence.HostComponents.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/threatIntelligence/hostComponents/$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/threatIntelligence/hostComponents/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostComponents/HostComponentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostComponents/HostComponentsRequestBuilder.cs new file mode 100644 index 00000000000..4a596d65a6f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostComponents/HostComponentsRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.HostComponents.Count; +using Microsoft.Graph.Security.ThreatIntelligence.HostComponents.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.Security.ThreatIntelligence.HostComponents { + /// + /// Provides operations to manage the hostComponents property of the microsoft.graph.security.threatIntelligence entity. + /// + public class HostComponentsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the hostComponents property of the microsoft.graph.security.threatIntelligence entity. + public HostComponentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("hostComponent%2Did", position); + return new HostComponentItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new HostComponentsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public HostComponentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hostComponents{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new HostComponentsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public HostComponentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hostComponents{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Read the properties and relationships of a hostComponent object. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, HostComponentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to hostComponents for security + /// + /// 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(HostComponent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(HostComponent 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, HostComponent.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Read the properties and relationships of a hostComponent 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 HostComponentsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to hostComponents for security + /// + /// 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(HostComponent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(HostComponent 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 HostComponentsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read the properties and relationships of a hostComponent object. + /// + public class HostComponentsRequestBuilderGetQueryParameters { + /// 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 HostComponentsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public HostComponentsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new HostComponentsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new hostComponentsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public HostComponentsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class HostComponentsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new hostComponentsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public HostComponentsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostComponents/Item/Host/HostRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostComponents/Item/Host/HostRequestBuilder.cs new file mode 100644 index 00000000000..d7b3ec8f25b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostComponents/Item/Host/HostRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.HostComponents.Item.Host { + /// + /// Provides operations to manage the host property of the microsoft.graph.security.hostComponent entity. + /// + public class HostRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new HostRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public HostRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hostComponents/{hostComponent%2Did}/host{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new HostRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public HostRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hostComponents/{hostComponent%2Did}/host{?%24select,%24expand}", rawUrl) { + } + /// + /// The host related to this component. This is a reverse navigation property. When navigating to components from a host, this should be assumed to be a return reference. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = 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.Security.Host.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The host related to this component. This is a reverse navigation property. When navigating to components from a host, this should be assumed to be a return reference. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new HostRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The host related to this component. This is a reverse navigation property. When navigating to components from a host, this should be assumed to be a return reference. + /// + public class HostRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 HostRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public HostRequestBuilderGetQueryParameters QueryParameters { get; set; } = new HostRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new hostRequestBuilderGetRequestConfiguration and sets the default values. + /// + public HostRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostComponents/Item/HostComponentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostComponents/Item/HostComponentItemRequestBuilder.cs new file mode 100644 index 00000000000..3f7d74dca2f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostComponents/Item/HostComponentItemRequestBuilder.cs @@ -0,0 +1,249 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.HostComponents.Item.Host; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.HostComponents.Item { + /// + /// Provides operations to manage the hostComponents property of the microsoft.graph.security.threatIntelligence entity. + /// + public class HostComponentItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the host property of the microsoft.graph.security.hostComponent entity. + public HostRequestBuilder Host { get => + new HostRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new HostComponentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public HostComponentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hostComponents/{hostComponent%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new HostComponentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public HostComponentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hostComponents/{hostComponent%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property hostComponents for security + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// Read the properties and relationships of a hostComponent 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, HostComponent.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property hostComponents in security + /// + /// 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(HostComponent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(HostComponent 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, HostComponent.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property hostComponents for security + /// + /// Configuration 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 HostComponentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read the properties and relationships of a hostComponent 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 HostComponentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property hostComponents in security + /// + /// 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(HostComponent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(HostComponent 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 HostComponentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class HostComponentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new HostComponentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public HostComponentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read the properties and relationships of a hostComponent object. + /// + public class HostComponentItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 HostComponentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public HostComponentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new HostComponentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new HostComponentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public HostComponentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class HostComponentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new HostComponentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public HostComponentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostCookies/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostCookies/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..26b008e79e9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostCookies/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Security.ThreatIntelligence.HostCookies.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/threatIntelligence/hostCookies/$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/threatIntelligence/hostCookies/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostCookies/HostCookiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostCookies/HostCookiesRequestBuilder.cs new file mode 100644 index 00000000000..c8c593aa6be --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostCookies/HostCookiesRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.HostCookies.Count; +using Microsoft.Graph.Security.ThreatIntelligence.HostCookies.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.Security.ThreatIntelligence.HostCookies { + /// + /// Provides operations to manage the hostCookies property of the microsoft.graph.security.threatIntelligence entity. + /// + public class HostCookiesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the hostCookies property of the microsoft.graph.security.threatIntelligence entity. + public HostCookieItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("hostCookie%2Did", position); + return new HostCookieItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new HostCookiesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public HostCookiesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hostCookies{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new HostCookiesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public HostCookiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hostCookies{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Read the properties and relationships of a hostCookie object. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, HostCookieCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to hostCookies for security + /// + /// 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(HostCookie body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(HostCookie 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, HostCookie.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Read the properties and relationships of a hostCookie 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 HostCookiesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to hostCookies for security + /// + /// 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(HostCookie body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(HostCookie 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 HostCookiesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read the properties and relationships of a hostCookie object. + /// + public class HostCookiesRequestBuilderGetQueryParameters { + /// 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 HostCookiesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public HostCookiesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new HostCookiesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new hostCookiesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public HostCookiesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class HostCookiesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new hostCookiesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public HostCookiesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostCookies/Item/Host/HostRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostCookies/Item/Host/HostRequestBuilder.cs new file mode 100644 index 00000000000..b6544b3c8f1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostCookies/Item/Host/HostRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.HostCookies.Item.Host { + /// + /// Provides operations to manage the host property of the microsoft.graph.security.hostCookie entity. + /// + public class HostRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new HostRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public HostRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hostCookies/{hostCookie%2Did}/host{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new HostRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public HostRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hostCookies/{hostCookie%2Did}/host{?%24select,%24expand}", rawUrl) { + } + /// + /// Indicates that a cookie of this name and domain was found related to this host. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = 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.Security.Host.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Indicates that a cookie of this name and domain was found related to this host. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new HostRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Indicates that a cookie of this name and domain was found related to this host. + /// + public class HostRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 HostRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public HostRequestBuilderGetQueryParameters QueryParameters { get; set; } = new HostRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new hostRequestBuilderGetRequestConfiguration and sets the default values. + /// + public HostRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostCookies/Item/HostCookieItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostCookies/Item/HostCookieItemRequestBuilder.cs new file mode 100644 index 00000000000..e237dcc52f6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostCookies/Item/HostCookieItemRequestBuilder.cs @@ -0,0 +1,249 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.HostCookies.Item.Host; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.HostCookies.Item { + /// + /// Provides operations to manage the hostCookies property of the microsoft.graph.security.threatIntelligence entity. + /// + public class HostCookieItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the host property of the microsoft.graph.security.hostCookie entity. + public HostRequestBuilder Host { get => + new HostRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new HostCookieItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public HostCookieItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hostCookies/{hostCookie%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new HostCookieItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public HostCookieItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hostCookies/{hostCookie%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property hostCookies for security + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// Read the properties and relationships of a hostCookie 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, HostCookie.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property hostCookies in security + /// + /// 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(HostCookie body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(HostCookie 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, HostCookie.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property hostCookies for security + /// + /// Configuration 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 HostCookieItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read the properties and relationships of a hostCookie 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 HostCookieItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property hostCookies in security + /// + /// 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(HostCookie body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(HostCookie 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 HostCookieItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class HostCookieItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new HostCookieItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public HostCookieItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read the properties and relationships of a hostCookie object. + /// + public class HostCookieItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 HostCookieItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public HostCookieItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new HostCookieItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new HostCookieItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public HostCookieItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class HostCookieItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new HostCookieItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public HostCookieItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostTrackers/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostTrackers/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..5487d8f8a22 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostTrackers/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Security.ThreatIntelligence.HostTrackers.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/threatIntelligence/hostTrackers/$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/threatIntelligence/hostTrackers/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostTrackers/HostTrackersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostTrackers/HostTrackersRequestBuilder.cs new file mode 100644 index 00000000000..d1b16c9ffd2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostTrackers/HostTrackersRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.HostTrackers.Count; +using Microsoft.Graph.Security.ThreatIntelligence.HostTrackers.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.Security.ThreatIntelligence.HostTrackers { + /// + /// Provides operations to manage the hostTrackers property of the microsoft.graph.security.threatIntelligence entity. + /// + public class HostTrackersRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the hostTrackers property of the microsoft.graph.security.threatIntelligence entity. + public HostTrackerItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("hostTracker%2Did", position); + return new HostTrackerItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new HostTrackersRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public HostTrackersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hostTrackers{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new HostTrackersRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public HostTrackersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hostTrackers{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Read the properties and relationships of a hostTracker object. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, HostTrackerCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to hostTrackers for security + /// + /// 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(HostTracker body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(HostTracker 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, HostTracker.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Read the properties and relationships of a hostTracker 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 HostTrackersRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to hostTrackers for security + /// + /// 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(HostTracker body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(HostTracker 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 HostTrackersRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read the properties and relationships of a hostTracker object. + /// + public class HostTrackersRequestBuilderGetQueryParameters { + /// 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 HostTrackersRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public HostTrackersRequestBuilderGetQueryParameters QueryParameters { get; set; } = new HostTrackersRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new hostTrackersRequestBuilderGetRequestConfiguration and sets the default values. + /// + public HostTrackersRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class HostTrackersRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new hostTrackersRequestBuilderPostRequestConfiguration and sets the default values. + /// + public HostTrackersRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostTrackers/Item/Host/HostRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostTrackers/Item/Host/HostRequestBuilder.cs new file mode 100644 index 00000000000..7896ab7fd3b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostTrackers/Item/Host/HostRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.HostTrackers.Item.Host { + /// + /// Provides operations to manage the host property of the microsoft.graph.security.hostTracker entity. + /// + public class HostRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new HostRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public HostRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hostTrackers/{hostTracker%2Did}/host{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new HostRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public HostRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hostTrackers/{hostTracker%2Did}/host{?%24select,%24expand}", rawUrl) { + } + /// + /// The host related to this hostTracker. When navigating to a hostTracker from a host, this should be assumed to be a return reference. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = 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.Security.Host.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The host related to this hostTracker. When navigating to a hostTracker from a host, this should be assumed to be a return reference. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new HostRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The host related to this hostTracker. When navigating to a hostTracker from a host, this should be assumed to be a return reference. + /// + public class HostRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 HostRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public HostRequestBuilderGetQueryParameters QueryParameters { get; set; } = new HostRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new hostRequestBuilderGetRequestConfiguration and sets the default values. + /// + public HostRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostTrackers/Item/HostTrackerItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostTrackers/Item/HostTrackerItemRequestBuilder.cs new file mode 100644 index 00000000000..ec71ab2bfdb --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/HostTrackers/Item/HostTrackerItemRequestBuilder.cs @@ -0,0 +1,249 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.HostTrackers.Item.Host; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.HostTrackers.Item { + /// + /// Provides operations to manage the hostTrackers property of the microsoft.graph.security.threatIntelligence entity. + /// + public class HostTrackerItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the host property of the microsoft.graph.security.hostTracker entity. + public HostRequestBuilder Host { get => + new HostRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new HostTrackerItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public HostTrackerItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hostTrackers/{hostTracker%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new HostTrackerItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public HostTrackerItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hostTrackers/{hostTracker%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property hostTrackers for security + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// Read the properties and relationships of a hostTracker 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, HostTracker.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property hostTrackers in security + /// + /// 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(HostTracker body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(HostTracker 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, HostTracker.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property hostTrackers for security + /// + /// Configuration 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 HostTrackerItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read the properties and relationships of a hostTracker 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 HostTrackerItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property hostTrackers in security + /// + /// 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(HostTracker body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(HostTracker 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 HostTrackerItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class HostTrackerItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new HostTrackerItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public HostTrackerItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read the properties and relationships of a hostTracker object. + /// + public class HostTrackerItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 HostTrackerItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public HostTrackerItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new HostTrackerItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new HostTrackerItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public HostTrackerItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class HostTrackerItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new HostTrackerItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public HostTrackerItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..97f9db639da --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Security.ThreatIntelligence.Hosts.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/threatIntelligence/hosts/$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/threatIntelligence/hosts/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/HostsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/HostsRequestBuilder.cs new file mode 100644 index 00000000000..15ebbb96237 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/HostsRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.Hosts.Count; +using Microsoft.Graph.Security.ThreatIntelligence.Hosts.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.Security.ThreatIntelligence.Hosts { + /// + /// Provides operations to manage the hosts property of the microsoft.graph.security.threatIntelligence entity. + /// + public class HostsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the hosts property of the microsoft.graph.security.threatIntelligence entity. + public HostItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("host%2Did", position); + return new HostItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new HostsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public HostsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new HostsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public HostsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Read the properties and relationships of a host object. The host resource is the abstract base type that returns an implementation. A host can be of one of the following types: + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, HostCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to hosts for security + /// + /// 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.Security.Host body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Microsoft.Graph.Models.Security.Host 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.Security.Host.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Read the properties and relationships of a host object. The host resource is the abstract base type that returns an implementation. A host can be of one of the following types: + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new HostsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to hosts for security + /// + /// 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.Security.Host body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Microsoft.Graph.Models.Security.Host 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 HostsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read the properties and relationships of a host object. The host resource is the abstract base type that returns an implementation. A host can be of one of the following types: + /// + public class HostsRequestBuilderGetQueryParameters { + /// 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 HostsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public HostsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new HostsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new hostsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public HostsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class HostsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new hostsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public HostsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Components/ComponentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Components/ComponentsRequestBuilder.cs new file mode 100644 index 00000000000..126402ef2ee --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Components/ComponentsRequestBuilder.cs @@ -0,0 +1,171 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.Hosts.Item.Components.Count; +using Microsoft.Graph.Security.ThreatIntelligence.Hosts.Item.Components.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.Security.ThreatIntelligence.Hosts.Item.Components { + /// + /// Provides operations to manage the components property of the microsoft.graph.security.host entity. + /// + public class ComponentsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the components property of the microsoft.graph.security.host entity. + public HostComponentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("hostComponent%2Did", position); + return new HostComponentItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ComponentsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ComponentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/components{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ComponentsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ComponentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/components{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get a list of hostComponent resources. + /// 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, HostComponentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get a list of hostComponent resources. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new ComponentsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get a list of hostComponent resources. + /// + public class ComponentsRequestBuilderGetQueryParameters { + /// 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 ComponentsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ComponentsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ComponentsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new componentsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ComponentsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Components/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Components/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..f61d0c4a679 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Components/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Security.ThreatIntelligence.Hosts.Item.Components.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/threatIntelligence/hosts/{host%2Did}/components/$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/threatIntelligence/hosts/{host%2Did}/components/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Components/Item/HostComponentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Components/Item/HostComponentItemRequestBuilder.cs new file mode 100644 index 00000000000..2beeb3c7dc7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Components/Item/HostComponentItemRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.Hosts.Item.Components.Item { + /// + /// Provides operations to manage the components property of the microsoft.graph.security.host entity. + /// + public class HostComponentItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new HostComponentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public HostComponentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/components/{hostComponent%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new HostComponentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public HostComponentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/components/{hostComponent%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// The hostComponents that are associated with this host. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, HostComponent.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The hostComponents that are associated with this host. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new HostComponentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The hostComponents that are associated with this host. + /// + public class HostComponentItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 HostComponentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public HostComponentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new HostComponentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new HostComponentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public HostComponentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Cookies/CookiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Cookies/CookiesRequestBuilder.cs new file mode 100644 index 00000000000..8751498b410 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Cookies/CookiesRequestBuilder.cs @@ -0,0 +1,171 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.Hosts.Item.Cookies.Count; +using Microsoft.Graph.Security.ThreatIntelligence.Hosts.Item.Cookies.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.Security.ThreatIntelligence.Hosts.Item.Cookies { + /// + /// Provides operations to manage the cookies property of the microsoft.graph.security.host entity. + /// + public class CookiesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the cookies property of the microsoft.graph.security.host entity. + public HostCookieItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("hostCookie%2Did", position); + return new HostCookieItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new CookiesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CookiesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/cookies{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new CookiesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CookiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/cookies{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get a list of hostCookie resources. + /// 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, HostCookieCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get a list of hostCookie resources. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new CookiesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get a list of hostCookie resources. + /// + public class CookiesRequestBuilderGetQueryParameters { + /// 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 CookiesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CookiesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CookiesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new cookiesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CookiesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Cookies/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Cookies/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..e3de1013ba9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Cookies/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Security.ThreatIntelligence.Hosts.Item.Cookies.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/threatIntelligence/hosts/{host%2Did}/cookies/$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/threatIntelligence/hosts/{host%2Did}/cookies/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Cookies/Item/HostCookieItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Cookies/Item/HostCookieItemRequestBuilder.cs new file mode 100644 index 00000000000..0f33e89c7f4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Cookies/Item/HostCookieItemRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.Hosts.Item.Cookies.Item { + /// + /// Provides operations to manage the cookies property of the microsoft.graph.security.host entity. + /// + public class HostCookieItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new HostCookieItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public HostCookieItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/cookies/{hostCookie%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new HostCookieItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public HostCookieItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/cookies/{hostCookie%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// The hostCookies that are associated with this host. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, HostCookie.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The hostCookies that are associated with this host. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new HostCookieItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The hostCookies that are associated with this host. + /// + public class HostCookieItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 HostCookieItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public HostCookieItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new HostCookieItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new HostCookieItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public HostCookieItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/HostItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/HostItemRequestBuilder.cs new file mode 100644 index 00000000000..06790570716 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/HostItemRequestBuilder.cs @@ -0,0 +1,274 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.Hosts.Item.Components; +using Microsoft.Graph.Security.ThreatIntelligence.Hosts.Item.Cookies; +using Microsoft.Graph.Security.ThreatIntelligence.Hosts.Item.PassiveDns; +using Microsoft.Graph.Security.ThreatIntelligence.Hosts.Item.PassiveDnsReverse; +using Microsoft.Graph.Security.ThreatIntelligence.Hosts.Item.Reputation; +using Microsoft.Graph.Security.ThreatIntelligence.Hosts.Item.Trackers; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.Hosts.Item { + /// + /// Provides operations to manage the hosts property of the microsoft.graph.security.threatIntelligence entity. + /// + public class HostItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the components property of the microsoft.graph.security.host entity. + public ComponentsRequestBuilder Components { get => + new ComponentsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the cookies property of the microsoft.graph.security.host entity. + public CookiesRequestBuilder Cookies { get => + new CookiesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the passiveDns property of the microsoft.graph.security.host entity. + public PassiveDnsRequestBuilder PassiveDns { get => + new PassiveDnsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the passiveDnsReverse property of the microsoft.graph.security.host entity. + public PassiveDnsReverseRequestBuilder PassiveDnsReverse { get => + new PassiveDnsReverseRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the reputation property of the microsoft.graph.security.host entity. + public ReputationRequestBuilder Reputation { get => + new ReputationRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the trackers property of the microsoft.graph.security.host entity. + public TrackersRequestBuilder Trackers { get => + new TrackersRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new HostItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public HostItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new HostItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public HostItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property hosts for security + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// Read the properties and relationships of a host object. The host resource is the abstract base type that returns an implementation. A host can be of one of the following types: + /// 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, Microsoft.Graph.Models.Security.Host.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property hosts in security + /// + /// 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.Security.Host body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.Security.Host 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.Security.Host.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property hosts for security + /// + /// Configuration 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 HostItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read the properties and relationships of a host object. The host resource is the abstract base type that returns an implementation. A host can be of one of the following types: + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new HostItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property hosts in security + /// + /// 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.Security.Host body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.Security.Host 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 HostItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class HostItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new HostItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public HostItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read the properties and relationships of a host object. The host resource is the abstract base type that returns an implementation. A host can be of one of the following types: + /// + public class HostItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 HostItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public HostItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new HostItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new HostItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public HostItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class HostItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new HostItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public HostItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/PassiveDns/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/PassiveDns/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..3729898c532 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/PassiveDns/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Security.ThreatIntelligence.Hosts.Item.PassiveDns.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/threatIntelligence/hosts/{host%2Did}/passiveDns/$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/threatIntelligence/hosts/{host%2Did}/passiveDns/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/PassiveDns/Item/PassiveDnsRecordItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/PassiveDns/Item/PassiveDnsRecordItemRequestBuilder.cs new file mode 100644 index 00000000000..4eaf72c3059 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/PassiveDns/Item/PassiveDnsRecordItemRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.Hosts.Item.PassiveDns.Item { + /// + /// Provides operations to manage the passiveDns property of the microsoft.graph.security.host entity. + /// + public class PassiveDnsRecordItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new PassiveDnsRecordItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PassiveDnsRecordItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/passiveDns/{passiveDnsRecord%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PassiveDnsRecordItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PassiveDnsRecordItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/passiveDns/{passiveDnsRecord%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Passive DNS retrieval about this host. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PassiveDnsRecord.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Passive DNS retrieval about this host. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new PassiveDnsRecordItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Passive DNS retrieval about this host. + /// + public class PassiveDnsRecordItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 PassiveDnsRecordItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PassiveDnsRecordItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PassiveDnsRecordItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new PassiveDnsRecordItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PassiveDnsRecordItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/PassiveDns/PassiveDnsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/PassiveDns/PassiveDnsRequestBuilder.cs new file mode 100644 index 00000000000..5d1fc5d3378 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/PassiveDns/PassiveDnsRequestBuilder.cs @@ -0,0 +1,171 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.Hosts.Item.PassiveDns.Count; +using Microsoft.Graph.Security.ThreatIntelligence.Hosts.Item.PassiveDns.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.Security.ThreatIntelligence.Hosts.Item.PassiveDns { + /// + /// Provides operations to manage the passiveDns property of the microsoft.graph.security.host entity. + /// + public class PassiveDnsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the passiveDns property of the microsoft.graph.security.host entity. + public PassiveDnsRecordItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("passiveDnsRecord%2Did", position); + return new PassiveDnsRecordItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new PassiveDnsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PassiveDnsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/passiveDns{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PassiveDnsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PassiveDnsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/passiveDns{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get a list of passiveDnsRecord resources associated to a host. + /// 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, PassiveDnsRecordCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get a list of passiveDnsRecord resources associated to a host. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new PassiveDnsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get a list of passiveDnsRecord resources associated to a host. + /// + public class PassiveDnsRequestBuilderGetQueryParameters { + /// 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 PassiveDnsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PassiveDnsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PassiveDnsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new passiveDnsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PassiveDnsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/PassiveDnsReverse/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/PassiveDnsReverse/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..618841eed9e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/PassiveDnsReverse/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Security.ThreatIntelligence.Hosts.Item.PassiveDnsReverse.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/threatIntelligence/hosts/{host%2Did}/passiveDnsReverse/$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/threatIntelligence/hosts/{host%2Did}/passiveDnsReverse/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/PassiveDnsReverse/Item/PassiveDnsRecordItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/PassiveDnsReverse/Item/PassiveDnsRecordItemRequestBuilder.cs new file mode 100644 index 00000000000..133c6eed19b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/PassiveDnsReverse/Item/PassiveDnsRecordItemRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.Hosts.Item.PassiveDnsReverse.Item { + /// + /// Provides operations to manage the passiveDnsReverse property of the microsoft.graph.security.host entity. + /// + public class PassiveDnsRecordItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new PassiveDnsRecordItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PassiveDnsRecordItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/passiveDnsReverse/{passiveDnsRecord%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PassiveDnsRecordItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PassiveDnsRecordItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/passiveDnsReverse/{passiveDnsRecord%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Reverse passive DNS retrieval about this host. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PassiveDnsRecord.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Reverse passive DNS retrieval about this host. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new PassiveDnsRecordItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Reverse passive DNS retrieval about this host. + /// + public class PassiveDnsRecordItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 PassiveDnsRecordItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PassiveDnsRecordItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PassiveDnsRecordItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new PassiveDnsRecordItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PassiveDnsRecordItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/PassiveDnsReverse/PassiveDnsReverseRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/PassiveDnsReverse/PassiveDnsReverseRequestBuilder.cs new file mode 100644 index 00000000000..1a0be9d503b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/PassiveDnsReverse/PassiveDnsReverseRequestBuilder.cs @@ -0,0 +1,171 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.Hosts.Item.PassiveDnsReverse.Count; +using Microsoft.Graph.Security.ThreatIntelligence.Hosts.Item.PassiveDnsReverse.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.Security.ThreatIntelligence.Hosts.Item.PassiveDnsReverse { + /// + /// Provides operations to manage the passiveDnsReverse property of the microsoft.graph.security.host entity. + /// + public class PassiveDnsReverseRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the passiveDnsReverse property of the microsoft.graph.security.host entity. + public PassiveDnsRecordItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("passiveDnsRecord%2Did", position); + return new PassiveDnsRecordItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new PassiveDnsReverseRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PassiveDnsReverseRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/passiveDnsReverse{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PassiveDnsReverseRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PassiveDnsReverseRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/passiveDnsReverse{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get a list of passiveDnsRecord resources. + /// 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, PassiveDnsRecordCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get a list of passiveDnsRecord resources. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new PassiveDnsReverseRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get a list of passiveDnsRecord resources. + /// + public class PassiveDnsReverseRequestBuilderGetQueryParameters { + /// 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 PassiveDnsReverseRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PassiveDnsReverseRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PassiveDnsReverseRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new passiveDnsReverseRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PassiveDnsReverseRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Reputation/ReputationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Reputation/ReputationRequestBuilder.cs new file mode 100644 index 00000000000..1a80a7f476f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Reputation/ReputationRequestBuilder.cs @@ -0,0 +1,244 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.Hosts.Item.Reputation { + /// + /// Provides operations to manage the reputation property of the microsoft.graph.security.host entity. + /// + public class ReputationRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new ReputationRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReputationRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/reputation{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ReputationRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReputationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/reputation{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property reputation for security + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the properties and relationships of a hostReputation 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, HostReputation.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property reputation in security + /// + /// 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(HostReputation body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(HostReputation 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, HostReputation.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property reputation for security + /// + /// Configuration 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 ReputationRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the properties and relationships of a hostReputation 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 ReputationRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property reputation in security + /// + /// 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(HostReputation body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(HostReputation 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 ReputationRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ReputationRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new reputationRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public ReputationRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get the properties and relationships of a hostReputation object. + /// + public class ReputationRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 ReputationRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ReputationRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ReputationRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new reputationRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ReputationRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ReputationRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new reputationRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public ReputationRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Trackers/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Trackers/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..4d4d215c917 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Trackers/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Security.ThreatIntelligence.Hosts.Item.Trackers.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/threatIntelligence/hosts/{host%2Did}/trackers/$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/threatIntelligence/hosts/{host%2Did}/trackers/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Trackers/Item/HostTrackerItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Trackers/Item/HostTrackerItemRequestBuilder.cs new file mode 100644 index 00000000000..b665eab208f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Trackers/Item/HostTrackerItemRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.Hosts.Item.Trackers.Item { + /// + /// Provides operations to manage the trackers property of the microsoft.graph.security.host entity. + /// + public class HostTrackerItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new HostTrackerItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public HostTrackerItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/trackers/{hostTracker%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new HostTrackerItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public HostTrackerItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/trackers/{hostTracker%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// The hostTrackers that are associated with this host. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, HostTracker.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The hostTrackers that are associated with this host. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new HostTrackerItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The hostTrackers that are associated with this host. + /// + public class HostTrackerItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 HostTrackerItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public HostTrackerItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new HostTrackerItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new HostTrackerItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public HostTrackerItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Trackers/TrackersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Trackers/TrackersRequestBuilder.cs new file mode 100644 index 00000000000..cbd023f83f5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Hosts/Item/Trackers/TrackersRequestBuilder.cs @@ -0,0 +1,171 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.Hosts.Item.Trackers.Count; +using Microsoft.Graph.Security.ThreatIntelligence.Hosts.Item.Trackers.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.Security.ThreatIntelligence.Hosts.Item.Trackers { + /// + /// Provides operations to manage the trackers property of the microsoft.graph.security.host entity. + /// + public class TrackersRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the trackers property of the microsoft.graph.security.host entity. + public HostTrackerItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("hostTracker%2Did", position); + return new HostTrackerItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new TrackersRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TrackersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/trackers{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TrackersRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TrackersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/hosts/{host%2Did}/trackers{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get a list of hostTracker resources. + /// 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, HostTrackerCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get a list of hostTracker resources. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TrackersRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get a list of hostTracker resources. + /// + public class TrackersRequestBuilderGetQueryParameters { + /// 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 TrackersRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TrackersRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TrackersRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new trackersRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TrackersRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelProfiles/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelProfiles/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..ab7b01a63d2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelProfiles/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Security.ThreatIntelligence.IntelProfiles.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/threatIntelligence/intelProfiles/$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/threatIntelligence/intelProfiles/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelProfiles/IntelProfilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelProfiles/IntelProfilesRequestBuilder.cs new file mode 100644 index 00000000000..3fc551a8e17 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelProfiles/IntelProfilesRequestBuilder.cs @@ -0,0 +1,236 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.IntelProfiles.Count; +using Microsoft.Graph.Security.ThreatIntelligence.IntelProfiles.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.Security.ThreatIntelligence.IntelProfiles { + /// + /// Provides operations to manage the intelProfiles property of the microsoft.graph.security.threatIntelligence entity. + /// + public class IntelProfilesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the intelProfiles property of the microsoft.graph.security.threatIntelligence entity. + public IntelligenceProfileItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("intelligenceProfile%2Did", position); + return new IntelligenceProfileItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new IntelProfilesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IntelProfilesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/intelProfiles{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new IntelProfilesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IntelProfilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/intelProfiles{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get a list of the intelligenceProfile objects and their properties. + /// 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, IntelligenceProfileCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to intelProfiles for security + /// + /// 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(IntelligenceProfile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(IntelligenceProfile 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, IntelligenceProfile.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get a list of the intelligenceProfile objects and their properties. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new IntelProfilesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to intelProfiles for security + /// + /// 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(IntelligenceProfile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(IntelligenceProfile 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 IntelProfilesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get a list of the intelligenceProfile objects and their properties. + /// + public class IntelProfilesRequestBuilderGetQueryParameters { + /// 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 IntelProfilesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public IntelProfilesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new IntelProfilesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new intelProfilesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public IntelProfilesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class IntelProfilesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new intelProfilesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public IntelProfilesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelProfiles/Item/Indicators/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelProfiles/Item/Indicators/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..cb76e294c5d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelProfiles/Item/Indicators/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Security.ThreatIntelligence.IntelProfiles.Item.Indicators.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/threatIntelligence/intelProfiles/{intelligenceProfile%2Did}/indicators/$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/threatIntelligence/intelProfiles/{intelligenceProfile%2Did}/indicators/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelProfiles/Item/Indicators/IndicatorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelProfiles/Item/Indicators/IndicatorsRequestBuilder.cs new file mode 100644 index 00000000000..0514b1b0c6a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelProfiles/Item/Indicators/IndicatorsRequestBuilder.cs @@ -0,0 +1,171 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.IntelProfiles.Item.Indicators.Count; +using Microsoft.Graph.Security.ThreatIntelligence.IntelProfiles.Item.Indicators.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.Security.ThreatIntelligence.IntelProfiles.Item.Indicators { + /// + /// Provides operations to manage the indicators property of the microsoft.graph.security.intelligenceProfile entity. + /// + public class IndicatorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the indicators property of the microsoft.graph.security.intelligenceProfile entity. + public IntelligenceProfileIndicatorItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("intelligenceProfileIndicator%2Did", position); + return new IntelligenceProfileIndicatorItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new IndicatorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IndicatorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/intelProfiles/{intelligenceProfile%2Did}/indicators{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new IndicatorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IndicatorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/intelProfiles/{intelligenceProfile%2Did}/indicators{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get the intelligenceProfileIndicator resources from the **indicators** navigation property of an intelligenceProfile. + /// 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, IntelligenceProfileIndicatorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the intelligenceProfileIndicator resources from the **indicators** navigation property of an intelligenceProfile. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new IndicatorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the intelligenceProfileIndicator resources from the **indicators** navigation property of an intelligenceProfile. + /// + public class IndicatorsRequestBuilderGetQueryParameters { + /// 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 IndicatorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public IndicatorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new IndicatorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new indicatorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public IndicatorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelProfiles/Item/Indicators/Item/IntelligenceProfileIndicatorItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelProfiles/Item/Indicators/Item/IntelligenceProfileIndicatorItemRequestBuilder.cs new file mode 100644 index 00000000000..e98ac57a7b5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelProfiles/Item/Indicators/Item/IntelligenceProfileIndicatorItemRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.IntelProfiles.Item.Indicators.Item { + /// + /// Provides operations to manage the indicators property of the microsoft.graph.security.intelligenceProfile entity. + /// + public class IntelligenceProfileIndicatorItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new IntelligenceProfileIndicatorItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IntelligenceProfileIndicatorItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/intelProfiles/{intelligenceProfile%2Did}/indicators/{intelligenceProfileIndicator%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new IntelligenceProfileIndicatorItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IntelligenceProfileIndicatorItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/intelProfiles/{intelligenceProfile%2Did}/indicators/{intelligenceProfileIndicator%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Includes an assemblage of high-fidelity network indicators of compromise. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, IntelligenceProfileIndicator.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Includes an assemblage of high-fidelity network indicators of compromise. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new IntelligenceProfileIndicatorItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Includes an assemblage of high-fidelity network indicators of compromise. + /// + public class IntelligenceProfileIndicatorItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 IntelligenceProfileIndicatorItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public IntelligenceProfileIndicatorItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new IntelligenceProfileIndicatorItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new IntelligenceProfileIndicatorItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public IntelligenceProfileIndicatorItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelProfiles/Item/IntelligenceProfileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelProfiles/Item/IntelligenceProfileItemRequestBuilder.cs new file mode 100644 index 00000000000..2bb2ed93769 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelProfiles/Item/IntelligenceProfileItemRequestBuilder.cs @@ -0,0 +1,249 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.IntelProfiles.Item.Indicators; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.IntelProfiles.Item { + /// + /// Provides operations to manage the intelProfiles property of the microsoft.graph.security.threatIntelligence entity. + /// + public class IntelligenceProfileItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the indicators property of the microsoft.graph.security.intelligenceProfile entity. + public IndicatorsRequestBuilder Indicators { get => + new IndicatorsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new IntelligenceProfileItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IntelligenceProfileItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/intelProfiles/{intelligenceProfile%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new IntelligenceProfileItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IntelligenceProfileItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/intelProfiles/{intelligenceProfile%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property intelProfiles for security + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// Read the properties and relationships of a intelligenceProfile 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, IntelligenceProfile.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property intelProfiles in security + /// + /// 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(IntelligenceProfile body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(IntelligenceProfile 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, IntelligenceProfile.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property intelProfiles for security + /// + /// Configuration 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 IntelligenceProfileItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read the properties and relationships of a intelligenceProfile 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 IntelligenceProfileItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property intelProfiles in security + /// + /// 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(IntelligenceProfile body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(IntelligenceProfile 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 IntelligenceProfileItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class IntelligenceProfileItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new IntelligenceProfileItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public IntelligenceProfileItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read the properties and relationships of a intelligenceProfile object. + /// + public class IntelligenceProfileItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 IntelligenceProfileItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public IntelligenceProfileItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new IntelligenceProfileItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new IntelligenceProfileItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public IntelligenceProfileItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class IntelligenceProfileItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new IntelligenceProfileItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public IntelligenceProfileItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelligenceProfileIndicators/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelligenceProfileIndicators/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..c6138a571fb --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelligenceProfileIndicators/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Security.ThreatIntelligence.IntelligenceProfileIndicators.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/threatIntelligence/intelligenceProfileIndicators/$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/threatIntelligence/intelligenceProfileIndicators/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelligenceProfileIndicators/IntelligenceProfileIndicatorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelligenceProfileIndicators/IntelligenceProfileIndicatorsRequestBuilder.cs new file mode 100644 index 00000000000..a4a45404ec8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelligenceProfileIndicators/IntelligenceProfileIndicatorsRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.IntelligenceProfileIndicators.Count; +using Microsoft.Graph.Security.ThreatIntelligence.IntelligenceProfileIndicators.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.Security.ThreatIntelligence.IntelligenceProfileIndicators { + /// + /// Provides operations to manage the intelligenceProfileIndicators property of the microsoft.graph.security.threatIntelligence entity. + /// + public class IntelligenceProfileIndicatorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the intelligenceProfileIndicators property of the microsoft.graph.security.threatIntelligence entity. + public IntelligenceProfileIndicatorItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("intelligenceProfileIndicator%2Did", position); + return new IntelligenceProfileIndicatorItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new IntelligenceProfileIndicatorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IntelligenceProfileIndicatorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/intelligenceProfileIndicators{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new IntelligenceProfileIndicatorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IntelligenceProfileIndicatorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/intelligenceProfileIndicators{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get intelligenceProfileIndicators from security + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, IntelligenceProfileIndicatorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to intelligenceProfileIndicators for security + /// + /// 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(IntelligenceProfileIndicator body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(IntelligenceProfileIndicator 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, IntelligenceProfileIndicator.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get intelligenceProfileIndicators from security + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new IntelligenceProfileIndicatorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to intelligenceProfileIndicators for security + /// + /// 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(IntelligenceProfileIndicator body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(IntelligenceProfileIndicator 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 IntelligenceProfileIndicatorsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get intelligenceProfileIndicators from security + /// + public class IntelligenceProfileIndicatorsRequestBuilderGetQueryParameters { + /// 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 IntelligenceProfileIndicatorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public IntelligenceProfileIndicatorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new IntelligenceProfileIndicatorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new intelligenceProfileIndicatorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public IntelligenceProfileIndicatorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class IntelligenceProfileIndicatorsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new intelligenceProfileIndicatorsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public IntelligenceProfileIndicatorsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelligenceProfileIndicators/Item/Artifact/ArtifactRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelligenceProfileIndicators/Item/Artifact/ArtifactRequestBuilder.cs new file mode 100644 index 00000000000..591bb79e5b3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelligenceProfileIndicators/Item/Artifact/ArtifactRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.IntelligenceProfileIndicators.Item.Artifact { + /// + /// Provides operations to manage the artifact property of the microsoft.graph.security.indicator entity. + /// + public class ArtifactRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new ArtifactRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ArtifactRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/intelligenceProfileIndicators/{intelligenceProfileIndicator%2Did}/artifact{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ArtifactRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ArtifactRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/intelligenceProfileIndicators/{intelligenceProfileIndicator%2Did}/artifact{?%24select,%24expand}", rawUrl) { + } + /// + /// The artifact related to this indicator. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = 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.Security.Artifact.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The artifact related to this indicator. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new ArtifactRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The artifact related to this indicator. + /// + public class ArtifactRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 ArtifactRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ArtifactRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ArtifactRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new artifactRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ArtifactRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelligenceProfileIndicators/Item/IntelligenceProfileIndicatorItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelligenceProfileIndicators/Item/IntelligenceProfileIndicatorItemRequestBuilder.cs new file mode 100644 index 00000000000..a26bbbdf4ed --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/IntelligenceProfileIndicators/Item/IntelligenceProfileIndicatorItemRequestBuilder.cs @@ -0,0 +1,248 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.IntelligenceProfileIndicators.Item.Artifact; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.IntelligenceProfileIndicators.Item { + /// + /// Provides operations to manage the intelligenceProfileIndicators property of the microsoft.graph.security.threatIntelligence entity. + /// + public class IntelligenceProfileIndicatorItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the artifact property of the microsoft.graph.security.indicator entity. + public ArtifactRequestBuilder Artifact { get => + new ArtifactRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new IntelligenceProfileIndicatorItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IntelligenceProfileIndicatorItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/intelligenceProfileIndicators/{intelligenceProfileIndicator%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new IntelligenceProfileIndicatorItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IntelligenceProfileIndicatorItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/intelligenceProfileIndicators/{intelligenceProfileIndicator%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property intelligenceProfileIndicators for security + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get intelligenceProfileIndicators from security + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, IntelligenceProfileIndicator.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property intelligenceProfileIndicators in security + /// + /// 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(IntelligenceProfileIndicator body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(IntelligenceProfileIndicator 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, IntelligenceProfileIndicator.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property intelligenceProfileIndicators for security + /// + /// Configuration 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 IntelligenceProfileIndicatorItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get intelligenceProfileIndicators from security + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new IntelligenceProfileIndicatorItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property intelligenceProfileIndicators in security + /// + /// 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(IntelligenceProfileIndicator body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(IntelligenceProfileIndicator 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 IntelligenceProfileIndicatorItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class IntelligenceProfileIndicatorItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new IntelligenceProfileIndicatorItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public IntelligenceProfileIndicatorItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get intelligenceProfileIndicators from security + /// + public class IntelligenceProfileIndicatorItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 IntelligenceProfileIndicatorItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public IntelligenceProfileIndicatorItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new IntelligenceProfileIndicatorItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new IntelligenceProfileIndicatorItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public IntelligenceProfileIndicatorItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class IntelligenceProfileIndicatorItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new IntelligenceProfileIndicatorItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public IntelligenceProfileIndicatorItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/PassiveDnsRecords/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/PassiveDnsRecords/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..c6c6623f37d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/PassiveDnsRecords/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Security.ThreatIntelligence.PassiveDnsRecords.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/threatIntelligence/passiveDnsRecords/$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/threatIntelligence/passiveDnsRecords/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/PassiveDnsRecords/Item/Artifact/ArtifactRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/PassiveDnsRecords/Item/Artifact/ArtifactRequestBuilder.cs new file mode 100644 index 00000000000..e57cbfbe6f3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/PassiveDnsRecords/Item/Artifact/ArtifactRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.PassiveDnsRecords.Item.Artifact { + /// + /// Provides operations to manage the artifact property of the microsoft.graph.security.passiveDnsRecord entity. + /// + public class ArtifactRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new ArtifactRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ArtifactRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/passiveDnsRecords/{passiveDnsRecord%2Did}/artifact{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ArtifactRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ArtifactRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/passiveDnsRecords/{passiveDnsRecord%2Did}/artifact{?%24select,%24expand}", rawUrl) { + } + /// + /// The artifact related to this passiveDnsRecord entry. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = 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.Security.Artifact.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The artifact related to this passiveDnsRecord entry. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new ArtifactRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The artifact related to this passiveDnsRecord entry. + /// + public class ArtifactRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 ArtifactRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ArtifactRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ArtifactRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new artifactRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ArtifactRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/PassiveDnsRecords/Item/ParentHost/ParentHostRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/PassiveDnsRecords/Item/ParentHost/ParentHostRequestBuilder.cs new file mode 100644 index 00000000000..0ee07f7b38e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/PassiveDnsRecords/Item/ParentHost/ParentHostRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.PassiveDnsRecords.Item.ParentHost { + /// + /// Provides operations to manage the parentHost property of the microsoft.graph.security.passiveDnsRecord entity. + /// + public class ParentHostRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new ParentHostRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ParentHostRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/passiveDnsRecords/{passiveDnsRecord%2Did}/parentHost{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ParentHostRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ParentHostRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/passiveDnsRecords/{passiveDnsRecord%2Did}/parentHost{?%24select,%24expand}", rawUrl) { + } + /// + /// The parent host related to this passiveDnsRecord entry. Generally, this is the value that you can search to discover this passiveDnsRecord 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, Microsoft.Graph.Models.Security.Host.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The parent host related to this passiveDnsRecord entry. Generally, this is the value that you can search to discover this passiveDnsRecord 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 ParentHostRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The parent host related to this passiveDnsRecord entry. Generally, this is the value that you can search to discover this passiveDnsRecord value. + /// + public class ParentHostRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 ParentHostRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ParentHostRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ParentHostRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new parentHostRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ParentHostRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/PassiveDnsRecords/Item/PassiveDnsRecordItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/PassiveDnsRecords/Item/PassiveDnsRecordItemRequestBuilder.cs new file mode 100644 index 00000000000..963a2dff8c9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/PassiveDnsRecords/Item/PassiveDnsRecordItemRequestBuilder.cs @@ -0,0 +1,254 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.PassiveDnsRecords.Item.Artifact; +using Microsoft.Graph.Security.ThreatIntelligence.PassiveDnsRecords.Item.ParentHost; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.PassiveDnsRecords.Item { + /// + /// Provides operations to manage the passiveDnsRecords property of the microsoft.graph.security.threatIntelligence entity. + /// + public class PassiveDnsRecordItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the artifact property of the microsoft.graph.security.passiveDnsRecord entity. + public ArtifactRequestBuilder Artifact { get => + new ArtifactRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the parentHost property of the microsoft.graph.security.passiveDnsRecord entity. + public ParentHostRequestBuilder ParentHost { get => + new ParentHostRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new PassiveDnsRecordItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PassiveDnsRecordItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/passiveDnsRecords/{passiveDnsRecord%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PassiveDnsRecordItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PassiveDnsRecordItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/passiveDnsRecords/{passiveDnsRecord%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property passiveDnsRecords for security + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// Read the properties and relationships of a passiveDnsRecord 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, PassiveDnsRecord.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property passiveDnsRecords in security + /// + /// 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(PassiveDnsRecord body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(PassiveDnsRecord 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, PassiveDnsRecord.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property passiveDnsRecords for security + /// + /// Configuration 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 PassiveDnsRecordItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read the properties and relationships of a passiveDnsRecord 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 PassiveDnsRecordItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property passiveDnsRecords in security + /// + /// 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(PassiveDnsRecord body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(PassiveDnsRecord 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 PassiveDnsRecordItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PassiveDnsRecordItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PassiveDnsRecordItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public PassiveDnsRecordItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read the properties and relationships of a passiveDnsRecord object. + /// + public class PassiveDnsRecordItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 PassiveDnsRecordItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PassiveDnsRecordItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PassiveDnsRecordItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new PassiveDnsRecordItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PassiveDnsRecordItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PassiveDnsRecordItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new PassiveDnsRecordItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public PassiveDnsRecordItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/PassiveDnsRecords/PassiveDnsRecordsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/PassiveDnsRecords/PassiveDnsRecordsRequestBuilder.cs new file mode 100644 index 00000000000..f4e2f3f748c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/PassiveDnsRecords/PassiveDnsRecordsRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.PassiveDnsRecords.Count; +using Microsoft.Graph.Security.ThreatIntelligence.PassiveDnsRecords.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.Security.ThreatIntelligence.PassiveDnsRecords { + /// + /// Provides operations to manage the passiveDnsRecords property of the microsoft.graph.security.threatIntelligence entity. + /// + public class PassiveDnsRecordsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the passiveDnsRecords property of the microsoft.graph.security.threatIntelligence entity. + public PassiveDnsRecordItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("passiveDnsRecord%2Did", position); + return new PassiveDnsRecordItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new PassiveDnsRecordsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PassiveDnsRecordsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/passiveDnsRecords{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new PassiveDnsRecordsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PassiveDnsRecordsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/passiveDnsRecords{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Read the properties and relationships of a passiveDnsRecord object. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, PassiveDnsRecordCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to passiveDnsRecords for security + /// + /// 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(PassiveDnsRecord body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(PassiveDnsRecord 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, PassiveDnsRecord.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Read the properties and relationships of a passiveDnsRecord 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 PassiveDnsRecordsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to passiveDnsRecords for security + /// + /// 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(PassiveDnsRecord body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(PassiveDnsRecord 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 PassiveDnsRecordsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read the properties and relationships of a passiveDnsRecord object. + /// + public class PassiveDnsRecordsRequestBuilderGetQueryParameters { + /// 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 PassiveDnsRecordsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public PassiveDnsRecordsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PassiveDnsRecordsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new passiveDnsRecordsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public PassiveDnsRecordsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PassiveDnsRecordsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new passiveDnsRecordsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public PassiveDnsRecordsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/ThreatIntelligenceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/ThreatIntelligenceRequestBuilder.cs new file mode 100644 index 00000000000..f0641482973 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/ThreatIntelligenceRequestBuilder.cs @@ -0,0 +1,293 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.ArticleIndicators; +using Microsoft.Graph.Security.ThreatIntelligence.Articles; +using Microsoft.Graph.Security.ThreatIntelligence.HostComponents; +using Microsoft.Graph.Security.ThreatIntelligence.HostCookies; +using Microsoft.Graph.Security.ThreatIntelligence.HostTrackers; +using Microsoft.Graph.Security.ThreatIntelligence.Hosts; +using Microsoft.Graph.Security.ThreatIntelligence.IntelProfiles; +using Microsoft.Graph.Security.ThreatIntelligence.IntelligenceProfileIndicators; +using Microsoft.Graph.Security.ThreatIntelligence.PassiveDnsRecords; +using Microsoft.Graph.Security.ThreatIntelligence.Vulnerabilities; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence { + /// + /// Provides operations to manage the threatIntelligence property of the microsoft.graph.security entity. + /// + public class ThreatIntelligenceRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the articleIndicators property of the microsoft.graph.security.threatIntelligence entity. + public ArticleIndicatorsRequestBuilder ArticleIndicators { get => + new ArticleIndicatorsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the articles property of the microsoft.graph.security.threatIntelligence entity. + public ArticlesRequestBuilder Articles { get => + new ArticlesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the hostComponents property of the microsoft.graph.security.threatIntelligence entity. + public HostComponentsRequestBuilder HostComponents { get => + new HostComponentsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the hostCookies property of the microsoft.graph.security.threatIntelligence entity. + public HostCookiesRequestBuilder HostCookies { get => + new HostCookiesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the hosts property of the microsoft.graph.security.threatIntelligence entity. + public HostsRequestBuilder Hosts { get => + new HostsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the hostTrackers property of the microsoft.graph.security.threatIntelligence entity. + public HostTrackersRequestBuilder HostTrackers { get => + new HostTrackersRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the intelligenceProfileIndicators property of the microsoft.graph.security.threatIntelligence entity. + public IntelligenceProfileIndicatorsRequestBuilder IntelligenceProfileIndicators { get => + new IntelligenceProfileIndicatorsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the intelProfiles property of the microsoft.graph.security.threatIntelligence entity. + public IntelProfilesRequestBuilder IntelProfiles { get => + new IntelProfilesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the passiveDnsRecords property of the microsoft.graph.security.threatIntelligence entity. + public PassiveDnsRecordsRequestBuilder PassiveDnsRecords { get => + new PassiveDnsRecordsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the vulnerabilities property of the microsoft.graph.security.threatIntelligence entity. + public VulnerabilitiesRequestBuilder Vulnerabilities { get => + new VulnerabilitiesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new ThreatIntelligenceRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ThreatIntelligenceRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ThreatIntelligenceRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ThreatIntelligenceRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property threatIntelligence for security + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get threatIntelligence from security + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = 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.Security.ThreatIntelligence.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property threatIntelligence in security + /// + /// 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.Security.ThreatIntelligence body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.Security.ThreatIntelligence 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.Security.ThreatIntelligence.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property threatIntelligence for security + /// + /// Configuration 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 ThreatIntelligenceRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get threatIntelligence from security + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new ThreatIntelligenceRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property threatIntelligence in security + /// + /// 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.Security.ThreatIntelligence body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.Security.ThreatIntelligence 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 ThreatIntelligenceRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ThreatIntelligenceRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new threatIntelligenceRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public ThreatIntelligenceRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get threatIntelligence from security + /// + public class ThreatIntelligenceRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 ThreatIntelligenceRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ThreatIntelligenceRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ThreatIntelligenceRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new threatIntelligenceRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ThreatIntelligenceRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ThreatIntelligenceRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new threatIntelligenceRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public ThreatIntelligenceRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..bc3729125b5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Security.ThreatIntelligence.Vulnerabilities.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/threatIntelligence/vulnerabilities/$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/threatIntelligence/vulnerabilities/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/Item/Articles/ArticlesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/Item/Articles/ArticlesRequestBuilder.cs new file mode 100644 index 00000000000..2755b4876ae --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/Item/Articles/ArticlesRequestBuilder.cs @@ -0,0 +1,170 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.Vulnerabilities.Item.Articles.Count; +using Microsoft.Graph.Security.ThreatIntelligence.Vulnerabilities.Item.Articles.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.Security.ThreatIntelligence.Vulnerabilities.Item.Articles { + /// + /// Provides operations to manage the articles property of the microsoft.graph.security.vulnerability entity. + /// + public class ArticlesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the articles property of the microsoft.graph.security.vulnerability entity. + public ArticleItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("article%2Did", position); + return new ArticleItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ArticlesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ArticlesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/vulnerabilities/{vulnerability%2Did}/articles{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ArticlesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ArticlesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/vulnerabilities/{vulnerability%2Did}/articles{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Articles related to this vulnerability. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, ArticleCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Articles related to this vulnerability. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new ArticlesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Articles related to this vulnerability. + /// + public class ArticlesRequestBuilderGetQueryParameters { + /// 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 ArticlesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ArticlesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ArticlesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new articlesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ArticlesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/Item/Articles/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/Item/Articles/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..2aa12ff4cd3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/Item/Articles/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Security.ThreatIntelligence.Vulnerabilities.Item.Articles.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/threatIntelligence/vulnerabilities/{vulnerability%2Did}/articles/$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/threatIntelligence/vulnerabilities/{vulnerability%2Did}/articles/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/Item/Articles/Item/ArticleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/Item/Articles/Item/ArticleItemRequestBuilder.cs new file mode 100644 index 00000000000..ad0418f8e9a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/Item/Articles/Item/ArticleItemRequestBuilder.cs @@ -0,0 +1,119 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.Vulnerabilities.Item.Articles.Item { + /// + /// Provides operations to manage the articles property of the microsoft.graph.security.vulnerability entity. + /// + public class ArticleItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new ArticleItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ArticleItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/vulnerabilities/{vulnerability%2Did}/articles/{article%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ArticleItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ArticleItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/vulnerabilities/{vulnerability%2Did}/articles/{article%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Articles related to this vulnerability. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task
GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync
(requestInfo, Article.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Articles related to this vulnerability. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new ArticleItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Articles related to this vulnerability. + /// + public class ArticleItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 ArticleItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ArticleItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ArticleItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new ArticleItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ArticleItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/Item/Components/ComponentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/Item/Components/ComponentsRequestBuilder.cs new file mode 100644 index 00000000000..cf970bb726a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/Item/Components/ComponentsRequestBuilder.cs @@ -0,0 +1,236 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.Vulnerabilities.Item.Components.Count; +using Microsoft.Graph.Security.ThreatIntelligence.Vulnerabilities.Item.Components.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.Security.ThreatIntelligence.Vulnerabilities.Item.Components { + /// + /// Provides operations to manage the components property of the microsoft.graph.security.vulnerability entity. + /// + public class ComponentsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the components property of the microsoft.graph.security.vulnerability entity. + public VulnerabilityComponentItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("vulnerabilityComponent%2Did", position); + return new VulnerabilityComponentItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ComponentsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ComponentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/vulnerabilities/{vulnerability%2Did}/components{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new ComponentsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ComponentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/vulnerabilities/{vulnerability%2Did}/components{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get a list of the microsoft.graph.security.vulnerabilityComponent objects and their properties. + /// 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, VulnerabilityComponentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to components for security + /// + /// 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(VulnerabilityComponent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(VulnerabilityComponent 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, VulnerabilityComponent.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get a list of the microsoft.graph.security.vulnerabilityComponent objects and their properties. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new ComponentsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to components for security + /// + /// 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(VulnerabilityComponent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(VulnerabilityComponent 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 ComponentsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get a list of the microsoft.graph.security.vulnerabilityComponent objects and their properties. + /// + public class ComponentsRequestBuilderGetQueryParameters { + /// 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 ComponentsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ComponentsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ComponentsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new componentsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ComponentsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ComponentsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new componentsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ComponentsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/Item/Components/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/Item/Components/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..d4966b627bb --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/Item/Components/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Security.ThreatIntelligence.Vulnerabilities.Item.Components.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/threatIntelligence/vulnerabilities/{vulnerability%2Did}/components/$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/threatIntelligence/vulnerabilities/{vulnerability%2Did}/components/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/Item/Components/Item/VulnerabilityComponentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/Item/Components/Item/VulnerabilityComponentItemRequestBuilder.cs new file mode 100644 index 00000000000..b5d9f1a62a1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/Item/Components/Item/VulnerabilityComponentItemRequestBuilder.cs @@ -0,0 +1,244 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.Vulnerabilities.Item.Components.Item { + /// + /// Provides operations to manage the components property of the microsoft.graph.security.vulnerability entity. + /// + public class VulnerabilityComponentItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new VulnerabilityComponentItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public VulnerabilityComponentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/vulnerabilities/{vulnerability%2Did}/components/{vulnerabilityComponent%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new VulnerabilityComponentItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public VulnerabilityComponentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/vulnerabilities/{vulnerability%2Did}/components/{vulnerabilityComponent%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property components for security + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// Read the properties and relationships of a vulnerabilityComponent 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, VulnerabilityComponent.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property components in security + /// + /// 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(VulnerabilityComponent body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(VulnerabilityComponent 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, VulnerabilityComponent.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property components for security + /// + /// Configuration 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 VulnerabilityComponentItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read the properties and relationships of a vulnerabilityComponent 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 VulnerabilityComponentItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property components in security + /// + /// 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(VulnerabilityComponent body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(VulnerabilityComponent 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 VulnerabilityComponentItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class VulnerabilityComponentItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new VulnerabilityComponentItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public VulnerabilityComponentItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read the properties and relationships of a vulnerabilityComponent object. + /// + public class VulnerabilityComponentItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 VulnerabilityComponentItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public VulnerabilityComponentItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new VulnerabilityComponentItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new VulnerabilityComponentItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public VulnerabilityComponentItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class VulnerabilityComponentItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new VulnerabilityComponentItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public VulnerabilityComponentItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/Item/VulnerabilityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/Item/VulnerabilityItemRequestBuilder.cs new file mode 100644 index 00000000000..c42a91c6158 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/Item/VulnerabilityItemRequestBuilder.cs @@ -0,0 +1,254 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.Vulnerabilities.Item.Articles; +using Microsoft.Graph.Security.ThreatIntelligence.Vulnerabilities.Item.Components; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ThreatIntelligence.Vulnerabilities.Item { + /// + /// Provides operations to manage the vulnerabilities property of the microsoft.graph.security.threatIntelligence entity. + /// + public class VulnerabilityItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the articles property of the microsoft.graph.security.vulnerability entity. + public ArticlesRequestBuilder Articles { get => + new ArticlesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the components property of the microsoft.graph.security.vulnerability entity. + public ComponentsRequestBuilder Components { get => + new ComponentsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new VulnerabilityItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public VulnerabilityItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/vulnerabilities/{vulnerability%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new VulnerabilityItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public VulnerabilityItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/vulnerabilities/{vulnerability%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property vulnerabilities for security + /// + /// Cancellation token to use when cancelling requests + /// Configuration for 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); + } + /// + /// Read the properties and relationships of a vulnerability 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, Vulnerability.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property vulnerabilities in security + /// + /// 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(Vulnerability body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Vulnerability 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, Vulnerability.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property vulnerabilities for security + /// + /// Configuration 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 VulnerabilityItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read the properties and relationships of a vulnerability 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 VulnerabilityItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property vulnerabilities in security + /// + /// 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(Vulnerability body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Vulnerability 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 VulnerabilityItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class VulnerabilityItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new VulnerabilityItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public VulnerabilityItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read the properties and relationships of a vulnerability object. + /// + public class VulnerabilityItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 VulnerabilityItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public VulnerabilityItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new VulnerabilityItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new VulnerabilityItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public VulnerabilityItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class VulnerabilityItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new VulnerabilityItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public VulnerabilityItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/VulnerabilitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/VulnerabilitiesRequestBuilder.cs new file mode 100644 index 00000000000..e008c24e863 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Security/ThreatIntelligence/Vulnerabilities/VulnerabilitiesRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models.Security; +using Microsoft.Graph.Security.ThreatIntelligence.Vulnerabilities.Count; +using Microsoft.Graph.Security.ThreatIntelligence.Vulnerabilities.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.Security.ThreatIntelligence.Vulnerabilities { + /// + /// Provides operations to manage the vulnerabilities property of the microsoft.graph.security.threatIntelligence entity. + /// + public class VulnerabilitiesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the vulnerabilities property of the microsoft.graph.security.threatIntelligence entity. + public VulnerabilityItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("vulnerability%2Did", position); + return new VulnerabilityItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new VulnerabilitiesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public VulnerabilitiesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/vulnerabilities{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new VulnerabilitiesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public VulnerabilitiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/security/threatIntelligence/vulnerabilities{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Read the properties and relationships of a vulnerability object. + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, VulnerabilityCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to vulnerabilities for security + /// + /// 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(Vulnerability body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Vulnerability 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, Vulnerability.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Read the properties and relationships of a vulnerability 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 VulnerabilitiesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to vulnerabilities for security + /// + /// 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(Vulnerability body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Vulnerability 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 VulnerabilitiesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read the properties and relationships of a vulnerability object. + /// + public class VulnerabilitiesRequestBuilderGetQueryParameters { + /// 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 VulnerabilitiesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public VulnerabilitiesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new VulnerabilitiesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new vulnerabilitiesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public VulnerabilitiesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class VulnerabilitiesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new vulnerabilitiesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public VulnerabilitiesRequestBuilderPostRequestConfiguration() { + 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 12c1a53e059..9a634320542 100644 --- a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/ListItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/ListItemRequestBuilder.cs @@ -87,8 +87,8 @@ public async Task DeleteAsync(Action - /// Returns the metadata for a [list][]. - /// Find more info here + /// Get a list of rich long-running operations associated with 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. @@ -152,7 +152,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Returns the metadata for a [list][]. + /// Get a list of rich long-running operations associated with a list. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -222,7 +222,7 @@ public ListItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Returns the metadata for a [list][]. + /// Get a list of rich long-running operations associated with a list. /// public class ListItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Sites/Item/Onenote/Pages/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/Onenote/Pages/Item/Content/ContentRequestBuilder.cs index b564da1cee9..d2ad4935c08 100644 --- a/src/Microsoft.Graph/Generated/Sites/Item/Onenote/Pages/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Sites/Item/Onenote/Pages/Item/Content/ContentRequestBuilder.cs @@ -29,6 +29,7 @@ public ContentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba } /// /// The page's HTML content. + /// 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/Sites/Item/Onenote/Pages/PagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/Onenote/Pages/PagesRequestBuilder.cs index 8706896fb52..43a946667ef 100644 --- a/src/Microsoft.Graph/Generated/Sites/Item/Onenote/Pages/PagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Sites/Item/Onenote/Pages/PagesRequestBuilder.cs @@ -40,7 +40,8 @@ public PagesRequestBuilder(Dictionary pathParameters, IRequestAd public PagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites/{site%2Did}/onenote/pages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// Retrieve the properties and relationships of a page object. **Getting page information** Access a page's metadata by page identifier: **Getting page content** You can use the page's `content` endpoint to get the HTML content of a page: The `includeIDs=true` query option is used to update pages. + /// Retrieve a list of page objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -59,7 +60,8 @@ public async Task GetAsync(Action(requestInfo, OnenotePageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create new navigation property to pages for sites + /// Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the `sectionName` query parameter. Example: `../onenote/pages?sectionName=My%20section` The `POST /onenote/pages` operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -80,7 +82,7 @@ public async Task PostAsync(OnenotePage body, Action(requestInfo, OnenotePage.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Retrieve the properties and relationships of a page object. **Getting page information** Access a page's metadata by page identifier: **Getting page content** You can use the page's `content` endpoint to get the HTML content of a page: The `includeIDs=true` query option is used to update pages. + /// Retrieve a list of page objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -106,7 +108,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create new navigation property to pages for sites + /// Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the `sectionName` query parameter. Example: `../onenote/pages?sectionName=My%20section` The `POST /onenote/pages` operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. @@ -134,7 +136,7 @@ public RequestInformation ToPostRequestInformation(OnenotePage body, Action - /// Retrieve the properties and relationships of a page object. **Getting page information** Access a page's metadata by page identifier: **Getting page content** You can use the page's `content` endpoint to get the HTML content of a page: The `includeIDs=true` query option is used to update pages. + /// Retrieve a list of page objects. /// public class PagesRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index 57ce78fb64d..33acdc21636 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Send a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new reply to a chatMessage in a specified channel. + /// Send a new reply to a chatMessage in a specified channel. /// /// 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 a1880dc674b..240fc535b73 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 @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teams/Item/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs b/src/Microsoft.Graph/Generated/Teams/Item/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs new file mode 100644 index 00000000000..20294d29d9d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Teams/Item/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs @@ -0,0 +1,64 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Teams.Item.InstalledApps.Item.Upgrade { + public class UpgradePostRequestBody : 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 consentedPermissionSet property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public TeamsAppPermissionSet? ConsentedPermissionSet { + get { return BackingStore?.Get("consentedPermissionSet"); } + set { BackingStore?.Set("consentedPermissionSet", value); } + } +#nullable restore +#else + public TeamsAppPermissionSet ConsentedPermissionSet { + get { return BackingStore?.Get("consentedPermissionSet"); } + set { BackingStore?.Set("consentedPermissionSet", value); } + } +#endif + /// + /// Instantiates a new upgradePostRequestBody and sets the default values. + /// + public UpgradePostRequestBody() { + 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 UpgradePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UpgradePostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"consentedPermissionSet", n => { ConsentedPermissionSet = n.GetObjectValue(TeamsAppPermissionSet.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("consentedPermissionSet", ConsentedPermissionSet); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Teams/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs index bfc35673a6e..beac094ef29 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs @@ -30,16 +30,18 @@ public UpgradeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Upgrade an app installation within a chat. /// 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(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(UpgradePostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(UpgradePostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - var requestInfo = ToPostRequestInformation(requestConfiguration); + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { {"4XX", ODataError.CreateFromDiscriminatorValue}, {"5XX", ODataError.CreateFromDiscriminatorValue}, @@ -49,19 +51,22 @@ public async Task PostAsync(Action /// Upgrade an app installation within a chat. /// + /// 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(Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(UpgradePostRequestBody body, Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(UpgradePostRequestBody 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 UpgradeRequestBuilderPostRequestConfiguration(); requestConfiguration.Invoke(requestConfig); diff --git a/src/Microsoft.Graph/Generated/Teams/Item/Photo/PhotoRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/Photo/PhotoRequestBuilder.cs index 01e9c28ddea..64dba006d7e 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/Photo/PhotoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/Photo/PhotoRequestBuilder.cs @@ -52,7 +52,8 @@ public async Task DeleteAsync(Action - /// The profile photo for the team. + /// Get the specified profilePhoto or its metadata (**profilePhoto** properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -116,7 +117,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// The profile photo for the team. + /// Get the specified profilePhoto or its metadata (**profilePhoto** properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -186,7 +187,7 @@ public PhotoRequestBuilderDeleteRequestConfiguration() { } } /// - /// The profile photo for the team. + /// Get the specified profilePhoto or its metadata (**profilePhoto** properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. /// public class PhotoRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Teams/Item/Photo/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/Photo/Value/ContentRequestBuilder.cs index 0a1a9590bf9..1ae2780a543 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/Photo/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/Photo/Value/ContentRequestBuilder.cs @@ -28,6 +28,7 @@ public ContentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba } /// /// Get media content for the navigation property photo from teams + /// 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/Teams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs index 75503809356..ea4eb0bf5c4 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Send a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new reply to a chatMessage in a specified channel. + /// Send a new reply to a chatMessage in a specified channel. /// /// 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 c73a9a6eeae..21aa351bf54 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// 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/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index e7f457c15b0..b6cd815dcf0 100644 --- a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Send a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new reply to a chatMessage in a specified channel. + /// Send a new reply to a chatMessage in a specified channel. /// /// 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 d3039965c29..3aab159971b 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 @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs b/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs new file mode 100644 index 00000000000..6979fdfd424 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs @@ -0,0 +1,64 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Users.Item.Chats.Item.InstalledApps.Item.Upgrade { + public class UpgradePostRequestBody : 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 consentedPermissionSet property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public TeamsAppPermissionSet? ConsentedPermissionSet { + get { return BackingStore?.Get("consentedPermissionSet"); } + set { BackingStore?.Set("consentedPermissionSet", value); } + } +#nullable restore +#else + public TeamsAppPermissionSet ConsentedPermissionSet { + get { return BackingStore?.Get("consentedPermissionSet"); } + set { BackingStore?.Set("consentedPermissionSet", value); } + } +#endif + /// + /// Instantiates a new upgradePostRequestBody and sets the default values. + /// + public UpgradePostRequestBody() { + 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 UpgradePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UpgradePostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"consentedPermissionSet", n => { ConsentedPermissionSet = n.GetObjectValue(TeamsAppPermissionSet.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("consentedPermissionSet", ConsentedPermissionSet); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs index a2470a6bd2a..7ed513d1b0d 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs @@ -30,16 +30,18 @@ public UpgradeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Upgrade an app installation within a chat. /// 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(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(UpgradePostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(UpgradePostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - var requestInfo = ToPostRequestInformation(requestConfiguration); + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { {"4XX", ODataError.CreateFromDiscriminatorValue}, {"5XX", ODataError.CreateFromDiscriminatorValue}, @@ -49,19 +51,22 @@ public async Task PostAsync(Action /// Upgrade an app installation within a chat. /// + /// 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(Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(UpgradePostRequestBody body, Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(UpgradePostRequestBody 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 UpgradeRequestBuilderPostRequestConfiguration(); requestConfiguration.Invoke(requestConfig); diff --git a/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Members/Item/ConversationMemberItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Members/Item/ConversationMemberItemRequestBuilder.cs index 5838eba9f0c..42406ad1c86 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Members/Item/ConversationMemberItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Members/Item/ConversationMemberItemRequestBuilder.cs @@ -48,8 +48,8 @@ public async Task DeleteAsync(Action - /// Retrieve a conversationMember from a chat. - /// Find more info here + /// Retrieve a conversationMember from a chat or channel. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -113,7 +113,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Retrieve a conversationMember from a chat. + /// Retrieve a conversationMember from a chat or channel. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -183,7 +183,7 @@ public ConversationMemberItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Retrieve a conversationMember from a chat. + /// Retrieve a conversationMember from a chat or channel. /// public class ConversationMemberItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index eed0ebe24d3..085680a1de8 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Send a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new reply to a chatMessage in a specified channel. + /// Send a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Messages/MessagesRequestBuilder.cs index 951b99649d0..e336fe61753 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Messages/MessagesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/EmployeeExperience/EmployeeExperienceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/EmployeeExperience/EmployeeExperienceRequestBuilder.cs new file mode 100644 index 00000000000..ab24fbf2a4b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/EmployeeExperience/EmployeeExperienceRequestBuilder.cs @@ -0,0 +1,248 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Users.Item.EmployeeExperience.LearningCourseActivities; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.EmployeeExperience { + /// + /// Provides operations to manage the employeeExperience property of the microsoft.graph.user entity. + /// + public class EmployeeExperienceRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the learningCourseActivities property of the microsoft.graph.employeeExperienceUser entity. + public LearningCourseActivitiesRequestBuilder LearningCourseActivities { get => + new LearningCourseActivitiesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new EmployeeExperienceRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public EmployeeExperienceRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/employeeExperience{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new EmployeeExperienceRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public EmployeeExperienceRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/employeeExperience{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property employeeExperience for users + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get employeeExperience from users + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, EmployeeExperienceUser.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property employeeExperience in users + /// + /// 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(EmployeeExperienceUser body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(EmployeeExperienceUser 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, EmployeeExperienceUser.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property employeeExperience for users + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation 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 EmployeeExperienceRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get employeeExperience from users + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new EmployeeExperienceRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property employeeExperience in users + /// + /// 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(EmployeeExperienceUser body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(EmployeeExperienceUser 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 EmployeeExperienceRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class EmployeeExperienceRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new employeeExperienceRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public EmployeeExperienceRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get employeeExperience from users + /// + public class EmployeeExperienceRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 EmployeeExperienceRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public EmployeeExperienceRequestBuilderGetQueryParameters QueryParameters { get; set; } = new EmployeeExperienceRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new employeeExperienceRequestBuilderGetRequestConfiguration and sets the default values. + /// + public EmployeeExperienceRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class EmployeeExperienceRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new employeeExperienceRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public EmployeeExperienceRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/EmployeeExperience/LearningCourseActivities/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/EmployeeExperience/LearningCourseActivities/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..395b3784063 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/EmployeeExperience/LearningCourseActivities/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Users.Item.EmployeeExperience.LearningCourseActivities.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}/employeeExperience/learningCourseActivities/$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}/employeeExperience/learningCourseActivities/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/EmployeeExperience/LearningCourseActivities/Item/LearningCourseActivityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/EmployeeExperience/LearningCourseActivities/Item/LearningCourseActivityItemRequestBuilder.cs new file mode 100644 index 00000000000..4bb1af798ef --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/EmployeeExperience/LearningCourseActivities/Item/LearningCourseActivityItemRequestBuilder.cs @@ -0,0 +1,120 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.EmployeeExperience.LearningCourseActivities.Item { + /// + /// Provides operations to manage the learningCourseActivities property of the microsoft.graph.employeeExperienceUser entity. + /// + public class LearningCourseActivityItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new LearningCourseActivityItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LearningCourseActivityItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/employeeExperience/learningCourseActivities/{learningCourseActivity%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new LearningCourseActivityItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LearningCourseActivityItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/employeeExperience/learningCourseActivities/{learningCourseActivity%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Get the specified learningCourseActivity object using either an ID or an **externalCourseActivityId** of the learning provider, or a **courseActivityId** of a user. + /// 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, LearningCourseActivity.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the specified learningCourseActivity object using either an ID or an **externalCourseActivityId** of the learning provider, or a **courseActivityId** of a user. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new LearningCourseActivityItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the specified learningCourseActivity object using either an ID or an **externalCourseActivityId** of the learning provider, or a **courseActivityId** of a user. + /// + public class LearningCourseActivityItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 LearningCourseActivityItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LearningCourseActivityItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LearningCourseActivityItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new LearningCourseActivityItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LearningCourseActivityItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/EmployeeExperience/LearningCourseActivities/LearningCourseActivitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/EmployeeExperience/LearningCourseActivities/LearningCourseActivitiesRequestBuilder.cs new file mode 100644 index 00000000000..46c269d3bce --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/EmployeeExperience/LearningCourseActivities/LearningCourseActivitiesRequestBuilder.cs @@ -0,0 +1,171 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Users.Item.EmployeeExperience.LearningCourseActivities.Count; +using Microsoft.Graph.Users.Item.EmployeeExperience.LearningCourseActivities.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.Users.Item.EmployeeExperience.LearningCourseActivities { + /// + /// Provides operations to manage the learningCourseActivities property of the microsoft.graph.employeeExperienceUser entity. + /// + public class LearningCourseActivitiesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the learningCourseActivities property of the microsoft.graph.employeeExperienceUser entity. + public LearningCourseActivityItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("learningCourseActivity%2Did", position); + return new LearningCourseActivityItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new LearningCourseActivitiesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LearningCourseActivitiesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/employeeExperience/learningCourseActivities{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new LearningCourseActivitiesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LearningCourseActivitiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/employeeExperience/learningCourseActivities{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get a list of the learningCourseActivity objects (assigned or self-initiated) for a user. + /// 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, LearningCourseActivityCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get a list of the learningCourseActivity objects (assigned or self-initiated) for a user. + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new LearningCourseActivitiesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get a list of the learningCourseActivity objects (assigned or self-initiated) for a user. + /// + public class LearningCourseActivitiesRequestBuilderGetQueryParameters { + /// 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 LearningCourseActivitiesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LearningCourseActivitiesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LearningCourseActivitiesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new learningCourseActivitiesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LearningCourseActivitiesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index 7310955e2e5..5d44e0b4a3f 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Send a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new reply to a chatMessage in a specified channel. + /// Send a new reply to a chatMessage in a specified channel. /// /// 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 5d17dfc8d94..36d21edda28 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 @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// 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/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs new file mode 100644 index 00000000000..f6ffefb24d3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs @@ -0,0 +1,64 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Users.Item.JoinedTeams.Item.InstalledApps.Item.Upgrade { + public class UpgradePostRequestBody : 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 consentedPermissionSet property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public TeamsAppPermissionSet? ConsentedPermissionSet { + get { return BackingStore?.Get("consentedPermissionSet"); } + set { BackingStore?.Set("consentedPermissionSet", value); } + } +#nullable restore +#else + public TeamsAppPermissionSet ConsentedPermissionSet { + get { return BackingStore?.Get("consentedPermissionSet"); } + set { BackingStore?.Set("consentedPermissionSet", value); } + } +#endif + /// + /// Instantiates a new upgradePostRequestBody and sets the default values. + /// + public UpgradePostRequestBody() { + 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 UpgradePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UpgradePostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"consentedPermissionSet", n => { ConsentedPermissionSet = n.GetObjectValue(TeamsAppPermissionSet.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("consentedPermissionSet", ConsentedPermissionSet); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs index b179a9c0995..8afd33136ee 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs @@ -30,16 +30,18 @@ public UpgradeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Upgrade an app installation within a chat. /// 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(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(UpgradePostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { + public async Task PostAsync(UpgradePostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - var requestInfo = ToPostRequestInformation(requestConfiguration); + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { {"4XX", ODataError.CreateFromDiscriminatorValue}, {"5XX", ODataError.CreateFromDiscriminatorValue}, @@ -49,19 +51,22 @@ public async Task PostAsync(Action /// Upgrade an app installation within a chat. /// + /// 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(Action? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(UpgradePostRequestBody body, Action? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(UpgradePostRequestBody 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 UpgradeRequestBuilderPostRequestConfiguration(); requestConfiguration.Invoke(requestConfig); diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Photo/PhotoRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Photo/PhotoRequestBuilder.cs index ee1762748cb..4fc953a4f97 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Photo/PhotoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Photo/PhotoRequestBuilder.cs @@ -52,7 +52,8 @@ public async Task DeleteAsync(Action - /// The profile photo for the team. + /// Get the specified profilePhoto or its metadata (**profilePhoto** properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -116,7 +117,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// The profile photo for the team. + /// Get the specified profilePhoto or its metadata (**profilePhoto** properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -186,7 +187,7 @@ public PhotoRequestBuilderDeleteRequestConfiguration() { } } /// - /// The profile photo for the team. + /// Get the specified profilePhoto or its metadata (**profilePhoto** properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. /// public class PhotoRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Photo/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Photo/Value/ContentRequestBuilder.cs index 24366d82dae..6f8ff387710 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Photo/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Photo/Value/ContentRequestBuilder.cs @@ -28,6 +28,7 @@ public ContentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba } /// /// Get media content for the navigation property photo from users + /// 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/JoinedTeams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs index 94e39b249dc..0c36bbbc723 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Send a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new reply to a chatMessage in a specified channel. + /// Send a new reply to a chatMessage in a specified channel. /// /// 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 ddf2a5045cd..a9b3d527337 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 @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// 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/ChildFoldersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/ChildFolders/ChildFoldersRequestBuilder.cs index 7c39ea82656..a9892a52285 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/ChildFolders/ChildFoldersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/ChildFolders/ChildFoldersRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, MailFolderCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Use this API to create a new child mailFolder. If you intend a new folder to be hidden, you must set the **isHidden** property to `true` on creation. - /// Find more info here + /// Create a new mailSearchFolder in the specified user's mailbox. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Use this API to create a new child mailFolder. If you intend a new folder to be hidden, you must set the **isHidden** property to `true` on creation. + /// Create a new mailSearchFolder in the specified user's mailbox. /// /// 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 351366f1734..62993250b8f 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 @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, AttachmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// 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 + /// 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 can add 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 /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// 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. + /// 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 can add 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. /// /// 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/MailFolderItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/MailFolderItemRequestBuilder.cs index 24a25466a3d..f6ad8c0db3e 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/MailFolderItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/MailFolderItemRequestBuilder.cs @@ -93,8 +93,8 @@ public async Task GetAsync(Action(requestInfo, MailFolder.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Update the properties of mailfolder object. - /// Find more info here + /// Update the writable properties of a mailSearchFolder object. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -165,7 +165,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the properties of mailfolder object. + /// Update the writable properties of a mailSearchFolder 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/MailFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs index c46dc680370..28482133c06 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 @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, AttachmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// 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 + /// 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 can add 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 /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// 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. + /// 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 can add 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. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/LogCollectionRequests/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/LogCollectionRequests/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..96538032bfc --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/LogCollectionRequests/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Users.Item.ManagedDevices.Item.LogCollectionRequests.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}/managedDevices/{managedDevice%2Did}/logCollectionRequests/$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}/managedDevices/{managedDevice%2Did}/logCollectionRequests/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlRequestBuilder.cs new file mode 100644 index 00000000000..afa715c3729 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlRequestBuilder.cs @@ -0,0 +1,90 @@ +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.ManagedDevices.Item.LogCollectionRequests.Item.CreateDownloadUrl { + /// + /// Provides operations to call the createDownloadUrl method. + /// + public class CreateDownloadUrlRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CreateDownloadUrlRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CreateDownloadUrlRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/managedDevices/{managedDevice%2Did}/logCollectionRequests/{deviceLogCollectionResponse%2Did}/createDownloadUrl", pathParameters) { + } + /// + /// Instantiates a new CreateDownloadUrlRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CreateDownloadUrlRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/managedDevices/{managedDevice%2Did}/logCollectionRequests/{deviceLogCollectionResponse%2Did}/createDownloadUrl", rawUrl) { + } + /// + /// Invoke action createDownloadUrl + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, CreateDownloadUrlResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke action createDownloadUrl + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new CreateDownloadUrlRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CreateDownloadUrlRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new createDownloadUrlRequestBuilderPostRequestConfiguration and sets the default values. + /// + public CreateDownloadUrlRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs b/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs new file mode 100644 index 00000000000..f0e8971b584 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs @@ -0,0 +1,63 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Users.Item.ManagedDevices.Item.LogCollectionRequests.Item.CreateDownloadUrl { + public class CreateDownloadUrlResponse : 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 value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public string Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Instantiates a new createDownloadUrlResponse and sets the default values. + /// + public CreateDownloadUrlResponse() { + 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 CreateDownloadUrlResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CreateDownloadUrlResponse(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"value", n => { Value = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/LogCollectionRequests/Item/DeviceLogCollectionResponseItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/LogCollectionRequests/Item/DeviceLogCollectionResponseItemRequestBuilder.cs new file mode 100644 index 00000000000..f5af9879dff --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/LogCollectionRequests/Item/DeviceLogCollectionResponseItemRequestBuilder.cs @@ -0,0 +1,248 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Users.Item.ManagedDevices.Item.LogCollectionRequests.Item.CreateDownloadUrl; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ManagedDevices.Item.LogCollectionRequests.Item { + /// + /// Provides operations to manage the logCollectionRequests property of the microsoft.graph.managedDevice entity. + /// + public class DeviceLogCollectionResponseItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the createDownloadUrl method. + public CreateDownloadUrlRequestBuilder CreateDownloadUrl { get => + new CreateDownloadUrlRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new DeviceLogCollectionResponseItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DeviceLogCollectionResponseItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/managedDevices/{managedDevice%2Did}/logCollectionRequests/{deviceLogCollectionResponse%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DeviceLogCollectionResponseItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DeviceLogCollectionResponseItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/managedDevices/{managedDevice%2Did}/logCollectionRequests/{deviceLogCollectionResponse%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property logCollectionRequests for users + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task 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); + } + /// + /// List of log collection requests + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DeviceLogCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property logCollectionRequests in users + /// + /// 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(DeviceLogCollectionResponse body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(DeviceLogCollectionResponse 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, DeviceLogCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property logCollectionRequests for users + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation 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 DeviceLogCollectionResponseItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// List of log collection requests + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DeviceLogCollectionResponseItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property logCollectionRequests in users + /// + /// 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(DeviceLogCollectionResponse body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(DeviceLogCollectionResponse 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 DeviceLogCollectionResponseItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DeviceLogCollectionResponseItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new DeviceLogCollectionResponseItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public DeviceLogCollectionResponseItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// List of log collection requests + /// + public class DeviceLogCollectionResponseItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 DeviceLogCollectionResponseItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DeviceLogCollectionResponseItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DeviceLogCollectionResponseItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new DeviceLogCollectionResponseItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DeviceLogCollectionResponseItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DeviceLogCollectionResponseItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new DeviceLogCollectionResponseItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public DeviceLogCollectionResponseItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/LogCollectionRequests/LogCollectionRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/LogCollectionRequests/LogCollectionRequestsRequestBuilder.cs new file mode 100644 index 00000000000..bdc316525e5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/LogCollectionRequests/LogCollectionRequestsRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Users.Item.ManagedDevices.Item.LogCollectionRequests.Count; +using Microsoft.Graph.Users.Item.ManagedDevices.Item.LogCollectionRequests.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.Users.Item.ManagedDevices.Item.LogCollectionRequests { + /// + /// Provides operations to manage the logCollectionRequests property of the microsoft.graph.managedDevice entity. + /// + public class LogCollectionRequestsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the logCollectionRequests property of the microsoft.graph.managedDevice entity. + public DeviceLogCollectionResponseItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("deviceLogCollectionResponse%2Did", position); + return new DeviceLogCollectionResponseItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new LogCollectionRequestsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LogCollectionRequestsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/managedDevices/{managedDevice%2Did}/logCollectionRequests{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new LogCollectionRequestsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LogCollectionRequestsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/managedDevices/{managedDevice%2Did}/logCollectionRequests{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List of log collection requests + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DeviceLogCollectionResponseCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to logCollectionRequests for users + /// + /// 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(DeviceLogCollectionResponse body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(DeviceLogCollectionResponse 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, DeviceLogCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// List of log collection requests + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new LogCollectionRequestsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to logCollectionRequests for users + /// + /// 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(DeviceLogCollectionResponse body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(DeviceLogCollectionResponse 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 LogCollectionRequestsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// List of log collection requests + /// + public class LogCollectionRequestsRequestBuilderGetQueryParameters { + /// 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 LogCollectionRequestsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LogCollectionRequestsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LogCollectionRequestsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new logCollectionRequestsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LogCollectionRequestsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class LogCollectionRequestsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new logCollectionRequestsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public LogCollectionRequestsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/ManagedDeviceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/ManagedDeviceItemRequestBuilder.cs index 9a298679a38..722244fb856 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/ManagedDeviceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/ManagedDeviceItemRequestBuilder.cs @@ -8,6 +8,7 @@ using Microsoft.Graph.Users.Item.ManagedDevices.Item.DeviceConfigurationStates; using Microsoft.Graph.Users.Item.ManagedDevices.Item.DisableLostMode; using Microsoft.Graph.Users.Item.ManagedDevices.Item.LocateDevice; +using Microsoft.Graph.Users.Item.ManagedDevices.Item.LogCollectionRequests; using Microsoft.Graph.Users.Item.ManagedDevices.Item.LogoutSharedAppleDeviceActiveUser; using Microsoft.Graph.Users.Item.ManagedDevices.Item.RebootNow; using Microsoft.Graph.Users.Item.ManagedDevices.Item.RecoverPasscode; @@ -21,6 +22,7 @@ using Microsoft.Graph.Users.Item.ManagedDevices.Item.Users; using Microsoft.Graph.Users.Item.ManagedDevices.Item.WindowsDefenderScan; using Microsoft.Graph.Users.Item.ManagedDevices.Item.WindowsDefenderUpdateSignatures; +using Microsoft.Graph.Users.Item.ManagedDevices.Item.WindowsProtectionState; using Microsoft.Graph.Users.Item.ManagedDevices.Item.Wipe; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; @@ -67,6 +69,10 @@ public class ManagedDeviceItemRequestBuilder : BaseRequestBuilder { public LocateDeviceRequestBuilder LocateDevice { get => new LocateDeviceRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the logCollectionRequests property of the microsoft.graph.managedDevice entity. + public LogCollectionRequestsRequestBuilder LogCollectionRequests { get => + new LogCollectionRequestsRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to call the logoutSharedAppleDeviceActiveUser method. public LogoutSharedAppleDeviceActiveUserRequestBuilder LogoutSharedAppleDeviceActiveUser { get => new LogoutSharedAppleDeviceActiveUserRequestBuilder(PathParameters, RequestAdapter); @@ -119,6 +125,10 @@ public class ManagedDeviceItemRequestBuilder : BaseRequestBuilder { public WindowsDefenderUpdateSignaturesRequestBuilder WindowsDefenderUpdateSignatures { get => new WindowsDefenderUpdateSignaturesRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the windowsProtectionState property of the microsoft.graph.managedDevice entity. + public WindowsProtectionStateRequestBuilder WindowsProtectionState { get => + new WindowsProtectionStateRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to call the wipe method. public WipeRequestBuilder Wipe { get => new WipeRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..4bb808da7b0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Users.Item.ManagedDevices.Item.WindowsProtectionState.DetectedMalwareState.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}/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState/$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}/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/DetectedMalwareStateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/DetectedMalwareStateRequestBuilder.cs new file mode 100644 index 00000000000..9e4fa2bf0fe --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/DetectedMalwareStateRequestBuilder.cs @@ -0,0 +1,237 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Users.Item.ManagedDevices.Item.WindowsProtectionState.DetectedMalwareState.Count; +using Microsoft.Graph.Users.Item.ManagedDevices.Item.WindowsProtectionState.DetectedMalwareState.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.Users.Item.ManagedDevices.Item.WindowsProtectionState.DetectedMalwareState { + /// + /// Provides operations to manage the detectedMalwareState property of the microsoft.graph.windowsProtectionState entity. + /// + public class DetectedMalwareStateRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the detectedMalwareState property of the microsoft.graph.windowsProtectionState entity. + public WindowsDeviceMalwareStateItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("windowsDeviceMalwareState%2Did", position); + return new WindowsDeviceMalwareStateItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new DetectedMalwareStateRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DetectedMalwareStateRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DetectedMalwareStateRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DetectedMalwareStateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// List properties and relationships of the windowsDeviceMalwareState 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, WindowsDeviceMalwareStateCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create a new windowsDeviceMalwareState 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(WindowsDeviceMalwareState body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(WindowsDeviceMalwareState 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, WindowsDeviceMalwareState.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// List properties and relationships of the windowsDeviceMalwareState 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 DetectedMalwareStateRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create a new windowsDeviceMalwareState 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(WindowsDeviceMalwareState body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(WindowsDeviceMalwareState 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 DetectedMalwareStateRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// List properties and relationships of the windowsDeviceMalwareState objects. + /// + public class DetectedMalwareStateRequestBuilderGetQueryParameters { + /// 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 DetectedMalwareStateRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DetectedMalwareStateRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DetectedMalwareStateRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new detectedMalwareStateRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DetectedMalwareStateRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DetectedMalwareStateRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new detectedMalwareStateRequestBuilderPostRequestConfiguration and sets the default values. + /// + public DetectedMalwareStateRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Item/WindowsDeviceMalwareStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Item/WindowsDeviceMalwareStateItemRequestBuilder.cs new file mode 100644 index 00000000000..4cc5e018b9c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Item/WindowsDeviceMalwareStateItemRequestBuilder.cs @@ -0,0 +1,246 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ManagedDevices.Item.WindowsProtectionState.DetectedMalwareState.Item { + /// + /// Provides operations to manage the detectedMalwareState property of the microsoft.graph.windowsProtectionState entity. + /// + public class WindowsDeviceMalwareStateItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new WindowsDeviceMalwareStateItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WindowsDeviceMalwareStateItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState/{windowsDeviceMalwareState%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new WindowsDeviceMalwareStateItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WindowsDeviceMalwareStateItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState/{windowsDeviceMalwareState%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Deletes a windowsDeviceMalwareState. + /// 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); + } + /// + /// Read properties and relationships of the windowsDeviceMalwareState 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, WindowsDeviceMalwareState.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the properties of a windowsDeviceMalwareState 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(WindowsDeviceMalwareState body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(WindowsDeviceMalwareState 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, WindowsDeviceMalwareState.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Deletes a windowsDeviceMalwareState. + /// + /// Configuration 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 WindowsDeviceMalwareStateItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the windowsDeviceMalwareState 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 WindowsDeviceMalwareStateItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a windowsDeviceMalwareState 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(WindowsDeviceMalwareState body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(WindowsDeviceMalwareState 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 WindowsDeviceMalwareStateItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsDeviceMalwareStateItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new WindowsDeviceMalwareStateItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public WindowsDeviceMalwareStateItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the windowsDeviceMalwareState object. + /// + public class WindowsDeviceMalwareStateItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 WindowsDeviceMalwareStateItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public WindowsDeviceMalwareStateItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new WindowsDeviceMalwareStateItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new WindowsDeviceMalwareStateItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public WindowsDeviceMalwareStateItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsDeviceMalwareStateItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new WindowsDeviceMalwareStateItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public WindowsDeviceMalwareStateItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/WindowsProtectionState/WindowsProtectionStateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/WindowsProtectionState/WindowsProtectionStateRequestBuilder.cs new file mode 100644 index 00000000000..b85fd2292c4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/ManagedDevices/Item/WindowsProtectionState/WindowsProtectionStateRequestBuilder.cs @@ -0,0 +1,250 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.Users.Item.ManagedDevices.Item.WindowsProtectionState.DetectedMalwareState; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.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.ManagedDevices.Item.WindowsProtectionState { + /// + /// Provides operations to manage the windowsProtectionState property of the microsoft.graph.managedDevice entity. + /// + public class WindowsProtectionStateRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the detectedMalwareState property of the microsoft.graph.windowsProtectionState entity. + public DetectedMalwareStateRequestBuilder DetectedMalwareState { get => + new DetectedMalwareStateRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new WindowsProtectionStateRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WindowsProtectionStateRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/managedDevices/{managedDevice%2Did}/windowsProtectionState{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new WindowsProtectionStateRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WindowsProtectionStateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/managedDevices/{managedDevice%2Did}/windowsProtectionState{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property windowsProtectionState for users + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task 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); + } + /// + /// Read properties and relationships of the windowsProtectionState 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, Microsoft.Graph.Models.WindowsProtectionState.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the properties of a windowsProtectionState 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(Microsoft.Graph.Models.WindowsProtectionState body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(Microsoft.Graph.Models.WindowsProtectionState 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.WindowsProtectionState.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property windowsProtectionState for users + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation 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 WindowsProtectionStateRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Read properties and relationships of the windowsProtectionState 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 WindowsProtectionStateRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the properties of a windowsProtectionState 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(Microsoft.Graph.Models.WindowsProtectionState body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.WindowsProtectionState 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 WindowsProtectionStateRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsProtectionStateRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new windowsProtectionStateRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public WindowsProtectionStateRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Read properties and relationships of the windowsProtectionState object. + /// + public class WindowsProtectionStateRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || 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 WindowsProtectionStateRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public WindowsProtectionStateRequestBuilderGetQueryParameters QueryParameters { get; set; } = new WindowsProtectionStateRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new windowsProtectionStateRequestBuilderGetRequestConfiguration and sets the default values. + /// + public WindowsProtectionStateRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class WindowsProtectionStateRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new windowsProtectionStateRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public WindowsProtectionStateRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} 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 5ded0bccdb6..c5edee5de8d 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 @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, AttachmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// 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 + /// 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 can add 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 /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// 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. + /// 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 can add 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. /// /// 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 9886b876256..9abdcb13fc1 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/MessageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/MessageItemRequestBuilder.cs @@ -88,8 +88,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 a message in the specified user's mailbox, or delete a relationship of the message. - /// Find more info here + /// Delete eventMessage. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -109,7 +109,7 @@ public async Task DeleteAsync(Action /// 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. @@ -128,8 +128,8 @@ public async Task DeleteAsync(Action(requestInfo, Microsoft.Graph.Models.Message.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// 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 @@ -150,7 +150,7 @@ public async Task DeleteAsync(Action(requestInfo, Microsoft.Graph.Models.Message.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Delete a message in the specified user's mailbox, or delete a relationship of the message. + /// Delete eventMessage. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -200,7 +200,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/Onenote/Pages/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Onenote/Pages/Item/Content/ContentRequestBuilder.cs index ed5cd07b14d..3727d88db0e 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Onenote/Pages/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Onenote/Pages/Item/Content/ContentRequestBuilder.cs @@ -29,6 +29,7 @@ public ContentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba } /// /// The page's HTML content. + /// 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/Onenote/Pages/PagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Onenote/Pages/PagesRequestBuilder.cs index 4f375204f0c..84eecac92f9 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Onenote/Pages/PagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Onenote/Pages/PagesRequestBuilder.cs @@ -40,7 +40,8 @@ public PagesRequestBuilder(Dictionary pathParameters, IRequestAd public PagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{user%2Did}/onenote/pages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// Retrieve the properties and relationships of a page object. **Getting page information** Access a page's metadata by page identifier: **Getting page content** You can use the page's `content` endpoint to get the HTML content of a page: The `includeIDs=true` query option is used to update pages. + /// Retrieve a list of page objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -59,7 +60,8 @@ public async Task GetAsync(Action(requestInfo, OnenotePageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create new navigation property to pages for users + /// Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the `sectionName` query parameter. Example: `../onenote/pages?sectionName=My%20section` The `POST /onenote/pages` operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -80,7 +82,7 @@ public async Task PostAsync(OnenotePage body, Action(requestInfo, OnenotePage.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Retrieve the properties and relationships of a page object. **Getting page information** Access a page's metadata by page identifier: **Getting page content** You can use the page's `content` endpoint to get the HTML content of a page: The `includeIDs=true` query option is used to update pages. + /// Retrieve a list of page objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -106,7 +108,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create new navigation property to pages for users + /// Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the `sectionName` query parameter. Example: `../onenote/pages?sectionName=My%20section` The `POST /onenote/pages` operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. @@ -134,7 +136,7 @@ public RequestInformation ToPostRequestInformation(OnenotePage body, Action - /// Retrieve the properties and relationships of a page object. **Getting page information** Access a page's metadata by page identifier: **Getting page content** You can use the page's `content` endpoint to get the HTML content of a page: The `includeIDs=true` query option is used to update pages. + /// Retrieve a list of page objects. /// public class PagesRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Users/Item/Photo/PhotoRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Photo/PhotoRequestBuilder.cs index 6e29e8fdc1e..8596846864b 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Photo/PhotoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Photo/PhotoRequestBuilder.cs @@ -52,7 +52,8 @@ public async Task DeleteAsync(Action - /// The user's profile photo. Read-only. + /// Get the specified profilePhoto or its metadata (**profilePhoto** properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -116,7 +117,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// The user's profile photo. Read-only. + /// Get the specified profilePhoto or its metadata (**profilePhoto** properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -186,7 +187,7 @@ public PhotoRequestBuilderDeleteRequestConfiguration() { } } /// - /// The user's profile photo. Read-only. + /// Get the specified profilePhoto or its metadata (**profilePhoto** properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. /// public class PhotoRequestBuilderGetQueryParameters { /// Select properties to be returned diff --git a/src/Microsoft.Graph/Generated/Users/Item/Photo/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Photo/Value/ContentRequestBuilder.cs index fd6ab6a795f..ee978254350 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Photo/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Photo/Value/ContentRequestBuilder.cs @@ -28,6 +28,7 @@ public ContentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba } /// /// Get media content for the navigation property photo from users + /// 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/UserItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/UserItemRequestBuilder.cs index 245e189dcec..4f0c7a3bd79 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/UserItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/UserItemRequestBuilder.cs @@ -20,6 +20,7 @@ using Microsoft.Graph.Users.Item.DirectReports; using Microsoft.Graph.Users.Item.Drive; using Microsoft.Graph.Users.Item.Drives; +using Microsoft.Graph.Users.Item.EmployeeExperience; using Microsoft.Graph.Users.Item.Events; using Microsoft.Graph.Users.Item.ExportDeviceAndAppManagementData; using Microsoft.Graph.Users.Item.ExportDeviceAndAppManagementDataWithSkipWithTop; @@ -162,6 +163,10 @@ public class UserItemRequestBuilder : BaseRequestBuilder { public DrivesRequestBuilder Drives { get => new DrivesRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the employeeExperience property of the microsoft.graph.user entity. + public EmployeeExperienceRequestBuilder EmployeeExperience { get => + new EmployeeExperienceRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the events property of the microsoft.graph.user entity. public EventsRequestBuilder Events { get => new EventsRequestBuilder(PathParameters, RequestAdapter); @@ -366,7 +371,7 @@ public UserItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b } /// /// Deletes a user. - /// 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. @@ -395,8 +400,8 @@ public ExportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder ExportDevic return new ExportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder(PathParameters, RequestAdapter, skip, top); } /// - /// Read properties and relationships of the user object. - /// 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. @@ -416,7 +421,7 @@ public ExportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder ExportDevic } /// /// Update the properties of a user object. - /// Find more info here + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -471,7 +476,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Read properties and relationships of the user object. + /// 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 @@ -541,7 +546,7 @@ public UserItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Read properties and relationships of the user object. + /// Retrieve the properties and relationships of 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 40871b52478..66ec2d31bed 100644 --- a/src/Microsoft.Graph/Generated/Users/UsersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/UsersRequestBuilder.cs @@ -61,7 +61,7 @@ public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base } /// /// List properties and relationships of the user 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. @@ -80,8 +80,8 @@ public async Task GetAsync(Action(requestInfo, UserCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// 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 @@ -128,7 +128,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. diff --git a/src/Microsoft.Graph/Generated/kiota-lock.json b/src/Microsoft.Graph/Generated/kiota-lock.json index a2e0fe4cac0..73de003ea13 100644 --- a/src/Microsoft.Graph/Generated/kiota-lock.json +++ b/src/Microsoft.Graph/Generated/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "AF51C594B64DDD252D88069DF2B98CA547E18404412B7AB9EBC235E8875019E9866F237F4E9BD54565EB05CCBD22F81C55CFC358443289ABB15B9A2232662084", + "descriptionHash": "693121BF0B64BA7F6C9A104A4EB3BBDBF8A7A4F55D32BDE04DD407B152688B253928EB3C7AE64E36ECA761B3E59D78D51983A0DF74BC7E60019AF42571E3346E", "descriptionLocation": "/mnt/vss/_work/1/s/msgraph-metadata/clean_v10_openapi/openapi.yaml", "lockFileVersion": "1.0.0", "kiotaVersion": "1.3.0", diff --git a/src/Microsoft.Graph/Microsoft.Graph.csproj b/src/Microsoft.Graph/Microsoft.Graph.csproj index 0c61e0f3a2d..91d8bebbed5 100644 --- a/src/Microsoft.Graph/Microsoft.Graph.csproj +++ b/src/Microsoft.Graph/Microsoft.Graph.csproj @@ -22,7 +22,7 @@ false 35MSSharedLib1024.snk true - 5.16.0 + 5.17.0