From b77ec601165474da14391428991d1c5676fc7845 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 10 Sep 2024 07:09:18 +0000 Subject: [PATCH] CodeGen from PR 30487 in Azure/azure-rest-api-specs Merge 7b058e0e5b2762184191d28d1c59568bea14089d into 1ad29756bd141a47cac770140105a706d065ae1b --- ...ceManager.SecurityCenter.netstandard2.0.cs | 690 +--- ...aptiveApplicationControlGroupCollection.cs | 276 -- ...AdaptiveApplicationControlGroupResource.cs | 260 -- ...mple_AdaptiveNetworkHardeningCollection.cs | 172 - ...Sample_AdaptiveNetworkHardeningResource.cs | 114 - ...le_CustomAssessmentAutomationCollection.cs | 205 -- ...mple_CustomAssessmentAutomationResource.cs | 150 - ...e_CustomEntityStoreAssignmentCollection.cs | 200 -- ...ple_CustomEntityStoreAssignmentResource.cs | 145 - ...ple_DefenderForStorageSettingCollection.cs | 24 +- ...ample_DefenderForStorageSettingResource.cs | 24 +- .../Sample_DevOpsConfigurationResource.cs | 53 +- .../Samples/Sample_DevOpsOrgCollection.cs | 10 +- .../Samples/Sample_DevOpsOrgResource.cs | 4 +- .../Samples/Sample_DevOpsProjectCollection.cs | 10 +- .../Samples/Sample_DevOpsProjectResource.cs | 4 +- .../Sample_DevOpsRepositoryCollection.cs | 10 +- .../Sample_DevOpsRepositoryResource.cs | 4 +- ...Sample_SecurityCloudConnectorCollection.cs | 2 +- .../Sample_SecurityCloudConnectorResource.cs | 2 +- ..._SecurityConnectorGitHubOwnerCollection.cs | 8 +- ...le_SecurityConnectorGitHubOwnerResource.cs | 2 +- ...rityConnectorGitHubRepositoryCollection.cs | 8 +- ...curityConnectorGitHubRepositoryResource.cs | 2 +- ..._SecurityConnectorGitLabGroupCollection.cs | 10 +- ...le_SecurityConnectorGitLabGroupResource.cs | 2 +- ...ecurityConnectorGitLabProjectCollection.cs | 8 +- ..._SecurityConnectorGitLabProjectResource.cs | 2 +- .../Sample_SensitivitySettingResource.cs | 4 +- ...aptiveApplicationControlGroupCollection.cs | 419 --- ...plicationControlGroupData.Serialization.cs | 355 --- .../AdaptiveApplicationControlGroupData.cs | 107 - ...ationControlGroupResource.Serialization.cs | 26 - ...AdaptiveApplicationControlGroupResource.cs | 354 --- .../AdaptiveNetworkHardeningCollection.cs | 407 --- ...ptiveNetworkHardeningData.Serialization.cs | 249 -- .../Generated/AdaptiveNetworkHardeningData.cs | 85 - ...eNetworkHardeningResource.Serialization.cs | 26 - .../AdaptiveNetworkHardeningResource.cs | 268 -- .../ArmSecurityCenterModelFactory.cs | 2771 ++++++++--------- .../CustomAssessmentAutomationCollection.cs | 499 --- ...mAssessmentAutomationData.Serialization.cs | 273 -- .../CustomAssessmentAutomationData.cs | 99 - ...essmentAutomationResource.Serialization.cs | 26 - .../CustomAssessmentAutomationResource.cs | 356 --- .../CustomEntityStoreAssignmentCollection.cs | 499 --- ...EntityStoreAssignmentData.Serialization.cs | 204 -- .../CustomEntityStoreAssignmentData.cs | 78 - ...tyStoreAssignmentResource.Serialization.cs | 26 - .../CustomEntityStoreAssignmentResource.cs | 356 --- ...nderForStorageSettingData.Serialization.cs | 204 +- .../DefenderForStorageSettingData.cs | 38 +- .../Generated/DevOpsConfigurationResource.cs | 44 +- .../src/Generated/DevOpsOrgCollection.cs | 20 +- .../src/Generated/DevOpsOrgResource.cs | 12 +- .../src/Generated/DevOpsProjectCollection.cs | 20 +- .../src/Generated/DevOpsProjectResource.cs | 12 +- .../Generated/DevOpsRepositoryCollection.cs | 20 +- .../src/Generated/DevOpsRepositoryResource.cs | 8 +- .../MockableSecurityCenterArmClient.cs | 240 +- ...ableSecurityCenterResourceGroupResource.cs | 218 -- ...kableSecurityCenterSubscriptionResource.cs | 194 -- .../Extensions/SecurityCenterExtensions.cs | 917 +----- ...aptiveApplicationControlEnforcementMode.cs | 54 - ...tiveApplicationControlGroupSourceSystem.cs | 60 - .../Models/AdaptiveApplicationControlIssue.cs | 63 - .../AdaptiveApplicationControlIssueSummary.cs | 69 - ...rkHardeningEnforceContent.Serialization.cs | 147 - .../AdaptiveNetworkHardeningEnforceContent.cs | 83 - ...tiveNetworkHardeningsList.Serialization.cs | 147 - ...tionCreateOrUpdateContent.Serialization.cs | 260 -- ...sessmentAutomationCreateOrUpdateContent.cs | 91 - ...ustomAssessmentAutomationSupportedCloud.cs | 51 - ...mentAutomationsListResult.Serialization.cs | 147 - .../Models/CustomAssessmentSeverity.cs | 54 - ...mentCreateOrUpdateContent.Serialization.cs | 137 - ...toreAssignmentsListResult.Serialization.cs | 147 - ...rStorageSettingProperties.Serialization.cs | 171 + .../DefenderForStorageSettingProperties.cs | 77 + .../Models/DevOpsCapability.Serialization.cs | 133 + ...tionsListResult.cs => DevOpsCapability.cs} | 27 +- ...psConfigurationProperties.Serialization.cs | 26 + .../Models/DevOpsConfigurationProperties.cs | 7 +- ...tiveNetworkSecurityGroups.Serialization.cs | 147 - .../Models/EffectiveNetworkSecurityGroups.cs | 70 - ...vitySettingsListResponse.Serialization.cs} | 44 +- ... => GetSensitivitySettingsListResponse.cs} | 16 +- ...MalwareScanningProperties.Serialization.cs | 156 + ...Result.cs => MalwareScanningProperties.cs} | 34 +- ...cs => OnUploadProperties.Serialization.cs} | 66 +- ...UpdateContent.cs => OnUploadProperties.cs} | 24 +- .../PathRecommendation.Serialization.cs | 272 -- .../Generated/Models/PathRecommendation.cs | 99 - .../Models/PathRecommendationFileType.cs | 63 - .../Generated/Models/RecommendationAction.cs | 54 - .../Generated/Models/RecommendationStatus.cs | 57 - .../RecommendedSecurityRule.Serialization.cs | 208 -- .../Models/RecommendedSecurityRule.cs | 83 - .../SecurityCenterConfigurationStatus.cs | 60 - ...yCenterFileProtectionMode.Serialization.cs | 171 - .../SecurityCenterFileProtectionMode.cs | 77 - ...curityCenterPublisherInfo.Serialization.cs | 155 - .../Models/SecurityCenterPublisherInfo.cs | 77 - ...SecurityCenterVmEnforcementSupportState.cs | 54 - .../Models/SecurityTrafficDirection.cs | 51 - .../Models/SecurityTransportProtocol.cs | 51 - ...eDataDiscoveryProperties.Serialization.cs} | 62 +- ...cs => SensitiveDataDiscoveryProperties.cs} | 29 +- .../Generated/Models/UserRecommendation.cs | 69 - .../Models/VmRecommendation.Serialization.cs | 171 - .../src/Generated/Models/VmRecommendation.cs | 78 - ...aptiveApplicationControlsRestOperations.cs | 413 --- ...AdaptiveNetworkHardeningsRestOperations.cs | 481 --- .../AzureDevOpsOrgsRestOperations.cs | 2 +- .../AzureDevOpsProjectsRestOperations.cs | 2 +- .../AzureDevOpsReposRestOperations.cs | 2 +- ...stomAssessmentAutomationsRestOperations.cs | 641 ---- ...tomEntityStoreAssignmentsRestOperations.cs | 641 ---- .../DevOpsConfigurationsRestOperations.cs | 2 +- .../DevOpsOperationResultsRestOperations.cs | 2 +- .../GitHubOwnersRestOperations.cs | 2 +- .../GitHubReposRestOperations.cs | 2 +- .../GitLabGroupsRestOperations.cs | 2 +- .../GitLabProjectsRestOperations.cs | 2 +- .../GitLabSubgroupsRestOperations.cs | 2 +- ...s => SensitivitySettingsRestOperations.cs} | 98 +- .../SecurityCenterLocationResource.cs | 69 - .../SecurityConnectorGitHubOwnerCollection.cs | 16 +- .../SecurityConnectorGitHubOwnerResource.cs | 8 +- ...rityConnectorGitHubRepositoryCollection.cs | 16 +- ...curityConnectorGitHubRepositoryResource.cs | 4 +- .../SecurityConnectorGitLabGroupCollection.cs | 20 +- .../SecurityConnectorGitLabGroupResource.cs | 8 +- ...ecurityConnectorGitLabProjectCollection.cs | 16 +- .../SecurityConnectorGitLabProjectResource.cs | 4 +- .../Generated/SensitivitySettingResource.cs | 28 +- .../src/autorest.md | 2 +- 137 files changed, 2736 insertions(+), 16033 deletions(-) delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_AdaptiveApplicationControlGroupCollection.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_AdaptiveApplicationControlGroupResource.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_AdaptiveNetworkHardeningCollection.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_AdaptiveNetworkHardeningResource.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_CustomAssessmentAutomationCollection.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_CustomAssessmentAutomationResource.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_CustomEntityStoreAssignmentCollection.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_CustomEntityStoreAssignmentResource.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupCollection.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupData.Serialization.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupData.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupResource.Serialization.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupResource.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningCollection.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningData.Serialization.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningData.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningResource.Serialization.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningResource.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationCollection.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationData.Serialization.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationData.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationResource.Serialization.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationResource.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentCollection.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentData.Serialization.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentData.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentResource.Serialization.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentResource.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlEnforcementMode.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlGroupSourceSystem.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlIssue.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlIssueSummary.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningEnforceContent.Serialization.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningEnforceContent.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningsList.Serialization.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationCreateOrUpdateContent.Serialization.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationCreateOrUpdateContent.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationSupportedCloud.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationsListResult.Serialization.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentSeverity.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentCreateOrUpdateContent.Serialization.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentsListResult.Serialization.cs create mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForStorageSettingProperties.Serialization.cs create mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForStorageSettingProperties.cs create mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsCapability.Serialization.cs rename sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/{CustomAssessmentAutomationsListResult.cs => DevOpsCapability.cs} (63%) delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EffectiveNetworkSecurityGroups.Serialization.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EffectiveNetworkSecurityGroups.cs rename sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/{AdaptiveApplicationControlGroups.Serialization.cs => GetSensitivitySettingsListResponse.Serialization.cs} (57%) rename sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/{AdaptiveApplicationControlGroups.cs => GetSensitivitySettingsListResponse.cs} (70%) create mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MalwareScanningProperties.Serialization.cs rename sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/{CustomEntityStoreAssignmentsListResult.cs => MalwareScanningProperties.cs} (52%) rename sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/{UserRecommendation.Serialization.cs => OnUploadProperties.Serialization.cs} (61%) rename sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/{CustomEntityStoreAssignmentCreateOrUpdateContent.cs => OnUploadProperties.cs} (62%) delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PathRecommendation.Serialization.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PathRecommendation.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PathRecommendationFileType.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendationAction.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendationStatus.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendedSecurityRule.Serialization.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendedSecurityRule.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterConfigurationStatus.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterFileProtectionMode.Serialization.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterFileProtectionMode.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterPublisherInfo.Serialization.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterPublisherInfo.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterVmEnforcementSupportState.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTrafficDirection.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTransportProtocol.cs rename sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/{AdaptiveApplicationControlIssueSummary.Serialization.cs => SensitiveDataDiscoveryProperties.Serialization.cs} (51%) rename sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/{AdaptiveNetworkHardeningsList.cs => SensitiveDataDiscoveryProperties.cs} (59%) delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserRecommendation.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VmRecommendation.Serialization.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VmRecommendation.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/AdaptiveApplicationControlsRestOperations.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/AdaptiveNetworkHardeningsRestOperations.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/CustomAssessmentAutomationsRestOperations.cs delete mode 100644 sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/CustomEntityStoreAssignmentsRestOperations.cs rename sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/{SecurityCenterRestOperations.cs => SensitivitySettingsRestOperations.cs} (61%) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/api/Azure.ResourceManager.SecurityCenter.netstandard2.0.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/api/Azure.ResourceManager.SecurityCenter.netstandard2.0.cs index b5868ccf9142..d8f89c63c2a9 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/api/Azure.ResourceManager.SecurityCenter.netstandard2.0.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/api/Azure.ResourceManager.SecurityCenter.netstandard2.0.cs @@ -1,98 +1,5 @@ namespace Azure.ResourceManager.SecurityCenter { - public partial class AdaptiveApplicationControlGroupCollection : Azure.ResourceManager.ArmCollection - { - protected AdaptiveApplicationControlGroupCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string groupName, Azure.ResourceManager.SecurityCenter.AdaptiveApplicationControlGroupData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string groupName, Azure.ResourceManager.SecurityCenter.AdaptiveApplicationControlGroupData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class AdaptiveApplicationControlGroupData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AdaptiveApplicationControlGroupData() { } - public Azure.ResourceManager.SecurityCenter.Models.SecurityCenterConfigurationStatus? ConfigurationStatus { get { throw null; } } - public Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode? EnforcementMode { get { throw null; } set { } } - public System.Collections.Generic.IReadOnlyList Issues { get { throw null; } } - public Azure.Core.AzureLocation? Location { get { throw null; } } - public System.Collections.Generic.IList PathRecommendations { get { throw null; } } - public Azure.ResourceManager.SecurityCenter.Models.SecurityCenterFileProtectionMode ProtectionMode { get { throw null; } set { } } - public Azure.ResourceManager.SecurityCenter.Models.RecommendationStatus? RecommendationStatus { get { throw null; } } - public Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlGroupSourceSystem? SourceSystem { get { throw null; } } - public System.Collections.Generic.IList VmRecommendations { get { throw null; } } - Azure.ResourceManager.SecurityCenter.AdaptiveApplicationControlGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SecurityCenter.AdaptiveApplicationControlGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class AdaptiveApplicationControlGroupResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected AdaptiveApplicationControlGroupResource() { } - public virtual Azure.ResourceManager.SecurityCenter.AdaptiveApplicationControlGroupData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, Azure.Core.AzureLocation ascLocation, string groupName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.SecurityCenter.AdaptiveApplicationControlGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SecurityCenter.AdaptiveApplicationControlGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.SecurityCenter.AdaptiveApplicationControlGroupData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.SecurityCenter.AdaptiveApplicationControlGroupData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class AdaptiveNetworkHardeningCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected AdaptiveNetworkHardeningCollection() { } - public virtual Azure.Response Exists(string adaptiveNetworkHardeningResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string adaptiveNetworkHardeningResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string adaptiveNetworkHardeningResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string adaptiveNetworkHardeningResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string adaptiveNetworkHardeningResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string adaptiveNetworkHardeningResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class AdaptiveNetworkHardeningData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AdaptiveNetworkHardeningData() { } - public System.Collections.Generic.IList EffectiveNetworkSecurityGroups { get { throw null; } } - public System.Collections.Generic.IList Rules { get { throw null; } } - public System.DateTimeOffset? RulesCalculatedOn { get { throw null; } set { } } - Azure.ResourceManager.SecurityCenter.AdaptiveNetworkHardeningData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SecurityCenter.AdaptiveNetworkHardeningData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class AdaptiveNetworkHardeningResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected AdaptiveNetworkHardeningResource() { } - public virtual Azure.ResourceManager.SecurityCenter.AdaptiveNetworkHardeningData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName, string adaptiveNetworkHardeningResourceName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Enforce(Azure.WaitUntil waitUntil, Azure.ResourceManager.SecurityCenter.Models.AdaptiveNetworkHardeningEnforceContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task EnforceAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.SecurityCenter.Models.AdaptiveNetworkHardeningEnforceContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.SecurityCenter.AdaptiveNetworkHardeningData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SecurityCenter.AdaptiveNetworkHardeningData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class AdvancedThreatProtectionSettingData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AdvancedThreatProtectionSettingData() { } @@ -204,105 +111,6 @@ protected ComplianceResultResource() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CustomAssessmentAutomationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected CustomAssessmentAutomationCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string customAssessmentAutomationName, Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string customAssessmentAutomationName, Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string customAssessmentAutomationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string customAssessmentAutomationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string customAssessmentAutomationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string customAssessmentAutomationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string customAssessmentAutomationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string customAssessmentAutomationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class CustomAssessmentAutomationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomAssessmentAutomationData() { } - public string AssessmentKey { get { throw null; } set { } } - public string CompressedQuery { get { throw null; } set { } } - public string Description { get { throw null; } set { } } - public string DisplayName { get { throw null; } set { } } - public string RemediationDescription { get { throw null; } set { } } - public Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentSeverity? Severity { get { throw null; } set { } } - public Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationSupportedCloud? SupportedCloud { get { throw null; } set { } } - Azure.ResourceManager.SecurityCenter.CustomAssessmentAutomationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SecurityCenter.CustomAssessmentAutomationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomAssessmentAutomationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected CustomAssessmentAutomationResource() { } - public virtual Azure.ResourceManager.SecurityCenter.CustomAssessmentAutomationData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string customAssessmentAutomationName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.SecurityCenter.CustomAssessmentAutomationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SecurityCenter.CustomAssessmentAutomationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class CustomEntityStoreAssignmentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected CustomEntityStoreAssignmentCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string customEntityStoreAssignmentName, Azure.ResourceManager.SecurityCenter.Models.CustomEntityStoreAssignmentCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string customEntityStoreAssignmentName, Azure.ResourceManager.SecurityCenter.Models.CustomEntityStoreAssignmentCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string customEntityStoreAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string customEntityStoreAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string customEntityStoreAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string customEntityStoreAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string customEntityStoreAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string customEntityStoreAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class CustomEntityStoreAssignmentData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomEntityStoreAssignmentData() { } - public string EntityStoreDatabaseLink { get { throw null; } set { } } - public string Principal { get { throw null; } set { } } - Azure.ResourceManager.SecurityCenter.CustomEntityStoreAssignmentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SecurityCenter.CustomEntityStoreAssignmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomEntityStoreAssignmentResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected CustomEntityStoreAssignmentResource() { } - public virtual Azure.ResourceManager.SecurityCenter.CustomEntityStoreAssignmentData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string customEntityStoreAssignmentName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.SecurityCenter.CustomEntityStoreAssignmentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SecurityCenter.CustomEntityStoreAssignmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.SecurityCenter.Models.CustomEntityStoreAssignmentCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.SecurityCenter.Models.CustomEntityStoreAssignmentCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } public partial class DefenderForStorageSettingCollection : Azure.ResourceManager.ArmCollection { protected DefenderForStorageSettingCollection() { } @@ -318,14 +126,7 @@ protected DefenderForStorageSettingCollection() { } public partial class DefenderForStorageSettingData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DefenderForStorageSettingData() { } - public int? CapGBPerMonth { get { throw null; } set { } } - public bool? IsEnabled { get { throw null; } set { } } - public bool? IsMalwareScanningOnUploadEnabled { get { throw null; } set { } } - public bool? IsOverrideSubscriptionLevelSettingsEnabled { get { throw null; } set { } } - public bool? IsSensitiveDataDiscoveryEnabled { get { throw null; } set { } } - public Azure.ResourceManager.SecurityCenter.Models.ExtensionOperationStatus MalwareScanningOperationStatus { get { throw null; } } - public Azure.Core.ResourceIdentifier ScanResultsEventGridTopicResourceId { get { throw null; } set { } } - public Azure.ResourceManager.SecurityCenter.Models.ExtensionOperationStatus SensitiveDataDiscoveryOperationStatus { get { throw null; } } + public Azure.ResourceManager.SecurityCenter.Models.DefenderForStorageSettingProperties Properties { get { throw null; } set { } } Azure.ResourceManager.SecurityCenter.DefenderForStorageSettingData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.DefenderForStorageSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1506,13 +1307,6 @@ public static partial class SecurityCenterExtensions { public static Azure.Response CreateOrUpdateInformationProtectionPolicy(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, Azure.ResourceManager.SecurityCenter.Models.InformationProtectionPolicyName informationProtectionPolicyName, Azure.ResourceManager.SecurityCenter.Models.InformationProtectionPolicy informationProtectionPolicy, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> CreateOrUpdateInformationProtectionPolicyAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, Azure.ResourceManager.SecurityCenter.Models.InformationProtectionPolicyName informationProtectionPolicyName, Azure.ResourceManager.SecurityCenter.Models.InformationProtectionPolicy informationProtectionPolicy, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.SecurityCenter.AdaptiveApplicationControlGroupResource GetAdaptiveApplicationControlGroupResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Pageable GetAdaptiveApplicationControlGroups(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, bool? includePathRecommendations = default(bool?), bool? summary = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetAdaptiveApplicationControlGroupsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, bool? includePathRecommendations = default(bool?), bool? summary = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Response GetAdaptiveNetworkHardening(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string resourceNamespace, string resourceType, string resourceName, string adaptiveNetworkHardeningResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetAdaptiveNetworkHardeningAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string resourceNamespace, string resourceType, string resourceName, string adaptiveNetworkHardeningResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.SecurityCenter.AdaptiveNetworkHardeningResource GetAdaptiveNetworkHardeningResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.SecurityCenter.AdaptiveNetworkHardeningCollection GetAdaptiveNetworkHardenings(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string resourceNamespace, string resourceType, string resourceName) { throw null; } public static Azure.ResourceManager.SecurityCenter.AdvancedThreatProtectionSettingResource GetAdvancedThreatProtectionSetting(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope) { throw null; } public static Azure.ResourceManager.SecurityCenter.AdvancedThreatProtectionSettingResource GetAdvancedThreatProtectionSettingResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Pageable GetAlerts(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1535,18 +1329,6 @@ public static partial class SecurityCenterExtensions public static System.Threading.Tasks.Task> GetComplianceResultAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string complianceResultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.SecurityCenter.ComplianceResultResource GetComplianceResultResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.SecurityCenter.ComplianceResultCollection GetComplianceResults(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope) { throw null; } - public static Azure.Response GetCustomAssessmentAutomation(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string customAssessmentAutomationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetCustomAssessmentAutomationAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string customAssessmentAutomationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.SecurityCenter.CustomAssessmentAutomationResource GetCustomAssessmentAutomationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.SecurityCenter.CustomAssessmentAutomationCollection GetCustomAssessmentAutomations(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetCustomAssessmentAutomations(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetCustomAssessmentAutomationsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Response GetCustomEntityStoreAssignment(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string customEntityStoreAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetCustomEntityStoreAssignmentAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string customEntityStoreAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.SecurityCenter.CustomEntityStoreAssignmentResource GetCustomEntityStoreAssignmentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.SecurityCenter.CustomEntityStoreAssignmentCollection GetCustomEntityStoreAssignments(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetCustomEntityStoreAssignments(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetCustomEntityStoreAssignmentsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetDefenderForStorageSetting(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, Azure.ResourceManager.SecurityCenter.Models.DefenderForStorageSettingName settingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetDefenderForStorageSettingAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, Azure.ResourceManager.SecurityCenter.Models.DefenderForStorageSettingName settingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.SecurityCenter.DefenderForStorageSettingResource GetDefenderForStorageSettingResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -1785,9 +1567,6 @@ protected SecurityCenterLocationResource() { } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, Azure.Core.AzureLocation ascLocation) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetAdaptiveApplicationControlGroup(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAdaptiveApplicationControlGroupAsync(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.SecurityCenter.AdaptiveApplicationControlGroupCollection GetAdaptiveApplicationControlGroups() { throw null; } public virtual Azure.Pageable GetAllowedConnectionsByHomeRegion(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetAllowedConnectionsByHomeRegionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetAllSecuritySolutionsReferenceDataByHomeRegion(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -3037,8 +2816,6 @@ public partial class MockableSecurityCenterArmClient : Azure.ResourceManager.Arm protected MockableSecurityCenterArmClient() { } public virtual Azure.Response CreateOrUpdateInformationProtectionPolicy(Azure.Core.ResourceIdentifier scope, Azure.ResourceManager.SecurityCenter.Models.InformationProtectionPolicyName informationProtectionPolicyName, Azure.ResourceManager.SecurityCenter.Models.InformationProtectionPolicy informationProtectionPolicy, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateOrUpdateInformationProtectionPolicyAsync(Azure.Core.ResourceIdentifier scope, Azure.ResourceManager.SecurityCenter.Models.InformationProtectionPolicyName informationProtectionPolicyName, Azure.ResourceManager.SecurityCenter.Models.InformationProtectionPolicy informationProtectionPolicy, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.SecurityCenter.AdaptiveApplicationControlGroupResource GetAdaptiveApplicationControlGroupResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.SecurityCenter.AdaptiveNetworkHardeningResource GetAdaptiveNetworkHardeningResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.SecurityCenter.AdvancedThreatProtectionSettingResource GetAdvancedThreatProtectionSetting(Azure.Core.ResourceIdentifier scope) { throw null; } public virtual Azure.ResourceManager.SecurityCenter.AdvancedThreatProtectionSettingResource GetAdvancedThreatProtectionSettingResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.SecurityCenter.AutoProvisioningSettingResource GetAutoProvisioningSettingResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -3046,8 +2823,6 @@ protected MockableSecurityCenterArmClient() { } public virtual System.Threading.Tasks.Task> GetComplianceResultAsync(Azure.Core.ResourceIdentifier scope, string complianceResultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.SecurityCenter.ComplianceResultResource GetComplianceResultResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.SecurityCenter.ComplianceResultCollection GetComplianceResults(Azure.Core.ResourceIdentifier scope) { throw null; } - public virtual Azure.ResourceManager.SecurityCenter.CustomAssessmentAutomationResource GetCustomAssessmentAutomationResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.SecurityCenter.CustomEntityStoreAssignmentResource GetCustomEntityStoreAssignmentResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.Response GetDefenderForStorageSetting(Azure.Core.ResourceIdentifier scope, Azure.ResourceManager.SecurityCenter.Models.DefenderForStorageSettingName settingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDefenderForStorageSettingAsync(Azure.Core.ResourceIdentifier scope, Azure.ResourceManager.SecurityCenter.Models.DefenderForStorageSettingName settingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.SecurityCenter.DefenderForStorageSettingResource GetDefenderForStorageSettingResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -3138,19 +2913,10 @@ protected MockableSecurityCenterArmClient() { } public partial class MockableSecurityCenterResourceGroupResource : Azure.ResourceManager.ArmResource { protected MockableSecurityCenterResourceGroupResource() { } - public virtual Azure.Response GetAdaptiveNetworkHardening(string resourceNamespace, string resourceType, string resourceName, string adaptiveNetworkHardeningResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAdaptiveNetworkHardeningAsync(string resourceNamespace, string resourceType, string resourceName, string adaptiveNetworkHardeningResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.SecurityCenter.AdaptiveNetworkHardeningCollection GetAdaptiveNetworkHardenings(string resourceNamespace, string resourceType, string resourceName) { throw null; } public virtual Azure.Pageable GetAlertsByResourceGroup(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetAlertsByResourceGroupAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetAllowedConnection(Azure.Core.AzureLocation ascLocation, Azure.ResourceManager.SecurityCenter.Models.SecurityCenterConnectionType connectionType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAllowedConnectionAsync(Azure.Core.AzureLocation ascLocation, Azure.ResourceManager.SecurityCenter.Models.SecurityCenterConnectionType connectionType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetCustomAssessmentAutomation(string customAssessmentAutomationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetCustomAssessmentAutomationAsync(string customAssessmentAutomationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.SecurityCenter.CustomAssessmentAutomationCollection GetCustomAssessmentAutomations() { throw null; } - public virtual Azure.Response GetCustomEntityStoreAssignment(string customEntityStoreAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetCustomEntityStoreAssignmentAsync(string customEntityStoreAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.SecurityCenter.CustomEntityStoreAssignmentCollection GetCustomEntityStoreAssignments() { throw null; } public virtual Azure.Response GetDiscoveredSecuritySolution(Azure.Core.AzureLocation ascLocation, string discoveredSecuritySolutionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDiscoveredSecuritySolutionAsync(Azure.Core.AzureLocation ascLocation, string discoveredSecuritySolutionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetExternalSecuritySolution(Azure.Core.AzureLocation ascLocation, string externalSecuritySolutionsName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -3194,8 +2960,6 @@ protected MockableSecurityCenterResourceGroupResource() { } public partial class MockableSecurityCenterSubscriptionResource : Azure.ResourceManager.ArmResource { protected MockableSecurityCenterSubscriptionResource() { } - public virtual Azure.Pageable GetAdaptiveApplicationControlGroups(bool? includePathRecommendations = default(bool?), bool? summary = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAdaptiveApplicationControlGroupsAsync(bool? includePathRecommendations = default(bool?), bool? summary = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetAlerts(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetAlertsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetAllowedConnections(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -3206,10 +2970,6 @@ protected MockableSecurityCenterSubscriptionResource() { } public virtual Azure.Response GetAutoProvisioningSetting(string settingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAutoProvisioningSettingAsync(string settingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.SecurityCenter.AutoProvisioningSettingCollection GetAutoProvisioningSettings() { throw null; } - public virtual Azure.Pageable GetCustomAssessmentAutomations(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetCustomAssessmentAutomationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetCustomEntityStoreAssignments(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetCustomEntityStoreAssignmentsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetDiscoveredSecuritySolutions(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetDiscoveredSecuritySolutionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetExternalSecuritySolutions(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -3379,90 +3139,6 @@ public partial class ActiveConnectionsNotInAllowedRange : Azure.ResourceManager. System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct AdaptiveApplicationControlEnforcementMode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AdaptiveApplicationControlEnforcementMode(string value) { throw null; } - public static Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode Audit { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode Enforce { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode None { get { throw null; } } - public bool Equals(Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode left, Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode right) { throw null; } - public static implicit operator Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode left, Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct AdaptiveApplicationControlGroupSourceSystem : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AdaptiveApplicationControlGroupSourceSystem(string value) { throw null; } - public static Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlGroupSourceSystem AzureAppLocker { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlGroupSourceSystem AzureAuditD { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlGroupSourceSystem NonAzureAppLocker { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlGroupSourceSystem NonAzureAuditD { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlGroupSourceSystem None { get { throw null; } } - public bool Equals(Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlGroupSourceSystem other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlGroupSourceSystem left, Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlGroupSourceSystem right) { throw null; } - public static implicit operator Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlGroupSourceSystem (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlGroupSourceSystem left, Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlGroupSourceSystem right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct AdaptiveApplicationControlIssue : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AdaptiveApplicationControlIssue(string value) { throw null; } - public static Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssue ExecutableViolationsAudited { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssue MsiAndScriptViolationsAudited { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssue MsiAndScriptViolationsBlocked { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssue RulesViolatedManually { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssue ViolationsAudited { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssue ViolationsBlocked { get { throw null; } } - public bool Equals(Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssue other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssue left, Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssue right) { throw null; } - public static implicit operator Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssue (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssue left, Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssue right) { throw null; } - public override string ToString() { throw null; } - } - public partial class AdaptiveApplicationControlIssueSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal AdaptiveApplicationControlIssueSummary() { } - public Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssue? Issue { get { throw null; } } - public float? NumberOfVms { get { throw null; } } - Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssueSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssueSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class AdaptiveNetworkHardeningEnforceContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AdaptiveNetworkHardeningEnforceContent(System.Collections.Generic.IEnumerable rules, System.Collections.Generic.IEnumerable networkSecurityGroups) { } - public System.Collections.Generic.IList NetworkSecurityGroups { get { throw null; } } - public System.Collections.Generic.IList Rules { get { throw null; } } - Azure.ResourceManager.SecurityCenter.Models.AdaptiveNetworkHardeningEnforceContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SecurityCenter.Models.AdaptiveNetworkHardeningEnforceContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AdditionalWorkspaceDataType : System.IEquatable { private readonly object _dummy; @@ -3585,9 +3261,6 @@ public static partial class ArmSecurityCenterModelFactory { public static Azure.ResourceManager.SecurityCenter.Models.AadExternalSecuritySolution AadExternalSecuritySolution(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.SecurityCenter.Models.AadSolutionProperties properties = null) { throw null; } public static Azure.ResourceManager.SecurityCenter.Models.ActiveConnectionsNotInAllowedRange ActiveConnectionsNotInAllowedRange(string displayName = null, string description = null, bool isEnabled = false, int minThreshold = 0, int maxThreshold = 0, System.TimeSpan timeWindowSize = default(System.TimeSpan)) { throw null; } - public static Azure.ResourceManager.SecurityCenter.AdaptiveApplicationControlGroupData AdaptiveApplicationControlGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode? enforcementMode = default(Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode?), Azure.ResourceManager.SecurityCenter.Models.SecurityCenterFileProtectionMode protectionMode = null, Azure.ResourceManager.SecurityCenter.Models.SecurityCenterConfigurationStatus? configurationStatus = default(Azure.ResourceManager.SecurityCenter.Models.SecurityCenterConfigurationStatus?), Azure.ResourceManager.SecurityCenter.Models.RecommendationStatus? recommendationStatus = default(Azure.ResourceManager.SecurityCenter.Models.RecommendationStatus?), System.Collections.Generic.IEnumerable issues = null, Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlGroupSourceSystem? sourceSystem = default(Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlGroupSourceSystem?), System.Collections.Generic.IEnumerable vmRecommendations = null, System.Collections.Generic.IEnumerable pathRecommendations = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?)) { throw null; } - public static Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssueSummary AdaptiveApplicationControlIssueSummary(Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssue? issue = default(Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssue?), float? numberOfVms = default(float?)) { throw null; } - public static Azure.ResourceManager.SecurityCenter.AdaptiveNetworkHardeningData AdaptiveNetworkHardeningData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable rules = null, System.DateTimeOffset? rulesCalculatedOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable effectiveNetworkSecurityGroups = null) { throw null; } public static Azure.ResourceManager.SecurityCenter.AdvancedThreatProtectionSettingData AdvancedThreatProtectionSettingData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isEnabled = default(bool?)) { throw null; } public static Azure.ResourceManager.SecurityCenter.Models.AllowlistCustomAlertRule AllowlistCustomAlertRule(string displayName = null, string description = null, bool isEnabled = false, Azure.ResourceManager.SecurityCenter.Models.SecurityValueType? valueType = default(Azure.ResourceManager.SecurityCenter.Models.SecurityValueType?), System.Collections.Generic.IEnumerable allowlistValues = null) { throw null; } public static Azure.ResourceManager.SecurityCenter.Models.AmqpC2DMessagesNotInAllowedRange AmqpC2DMessagesNotInAllowedRange(string displayName = null, string description = null, bool isEnabled = false, int minThreshold = 0, int maxThreshold = 0, System.TimeSpan timeWindowSize = default(System.TimeSpan)) { throw null; } @@ -3617,9 +3290,6 @@ public static partial class ArmSecurityCenterModelFactory public static Azure.ResourceManager.SecurityCenter.Models.CspmMonitorGithubOffering CspmMonitorGithubOffering(string description = null) { throw null; } public static Azure.ResourceManager.SecurityCenter.Models.CspmMonitorGitLabOffering CspmMonitorGitLabOffering(string description = null) { throw null; } public static Azure.ResourceManager.SecurityCenter.Models.CustomAlertRule CustomAlertRule(string displayName = null, string description = null, bool isEnabled = false, string ruleType = null) { throw null; } - public static Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationCreateOrUpdateContent CustomAssessmentAutomationCreateOrUpdateContent(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string compressedQuery = null, Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationSupportedCloud? supportedCloud = default(Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationSupportedCloud?), Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentSeverity? severity = default(Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentSeverity?), string displayName = null, string description = null, string remediationDescription = null) { throw null; } - public static Azure.ResourceManager.SecurityCenter.CustomAssessmentAutomationData CustomAssessmentAutomationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string compressedQuery = null, Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationSupportedCloud? supportedCloud = default(Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationSupportedCloud?), Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentSeverity? severity = default(Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentSeverity?), string displayName = null, string description = null, string remediationDescription = null, string assessmentKey = null) { throw null; } - public static Azure.ResourceManager.SecurityCenter.CustomEntityStoreAssignmentData CustomEntityStoreAssignmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string principal = null, string entityStoreDatabaseLink = null) { throw null; } public static Azure.ResourceManager.SecurityCenter.Models.DataExportSettings DataExportSettings(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isEnabled = default(bool?)) { throw null; } public static Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOffering DefenderCspmAwsOffering(string description = null, Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingVmScanners vmScanners = null, Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingDataSensitivityDiscovery dataSensitivityDiscovery = null, Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingDatabasesDspm databasesDspm = null, Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingCiem ciem = null, Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingMdcContainersImageAssessment mdcContainersImageAssessment = null, Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S mdcContainersAgentlessDiscoveryK8S = null) { throw null; } public static Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOffering DefenderCspmGcpOffering(string description = null, Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingCiemDiscovery ciemDiscovery = null, Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingVmScanners vmScanners = null, Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingDataSensitivityDiscovery dataSensitivityDiscovery = null, Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingMdcContainersImageAssessment mdcContainersImageAssessment = null, Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S mdcContainersAgentlessDiscoveryK8S = null) { throw null; } @@ -3632,11 +3302,12 @@ public static partial class ArmSecurityCenterModelFactory public static Azure.ResourceManager.SecurityCenter.Models.DefenderForDevOpsGitLabOffering DefenderForDevOpsGitLabOffering(string description = null) { throw null; } public static Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOffering DefenderForServersAwsOffering(string description = null, string defenderForServersCloudRoleArn = null, Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingArcAutoProvisioning arcAutoProvisioning = null, Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning vaAutoProvisioning = null, Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingMdeAutoProvisioning mdeAutoProvisioning = null, Azure.ResourceManager.SecurityCenter.Models.AvailableSubPlanType? availableSubPlanType = default(Azure.ResourceManager.SecurityCenter.Models.AvailableSubPlanType?), Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingVmScanners vmScanners = null) { throw null; } public static Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOffering DefenderForServersGcpOffering(string description = null, Azure.ResourceManager.SecurityCenter.Models.GcpDefenderForServersInfo defenderForServers = null, Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingArcAutoProvisioning arcAutoProvisioning = null, Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning vulnerabilityAssessmentAutoProvisioning = null, Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingMdeAutoProvisioning mdeAutoProvisioning = null, Azure.ResourceManager.SecurityCenter.Models.AvailableSubPlanType? availableSubPlanType = default(Azure.ResourceManager.SecurityCenter.Models.AvailableSubPlanType?), Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingVmScanners vmScanners = null) { throw null; } - public static Azure.ResourceManager.SecurityCenter.DefenderForStorageSettingData DefenderForStorageSettingData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isEnabled = default(bool?), bool? isOverrideSubscriptionLevelSettingsEnabled = default(bool?), bool? isSensitiveDataDiscoveryEnabled = default(bool?), Azure.ResourceManager.SecurityCenter.Models.ExtensionOperationStatus sensitiveDataDiscoveryOperationStatus = null, Azure.Core.ResourceIdentifier scanResultsEventGridTopicResourceId = null, Azure.ResourceManager.SecurityCenter.Models.ExtensionOperationStatus malwareScanningOperationStatus = null, bool? isMalwareScanningOnUploadEnabled = default(bool?), int? capGBPerMonth = default(int?)) { throw null; } + public static Azure.ResourceManager.SecurityCenter.DefenderForStorageSettingData DefenderForStorageSettingData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.SecurityCenter.Models.DefenderForStorageSettingProperties properties = null) { throw null; } public static Azure.ResourceManager.SecurityCenter.Models.DenylistCustomAlertRule DenylistCustomAlertRule(string displayName = null, string description = null, bool isEnabled = false, Azure.ResourceManager.SecurityCenter.Models.SecurityValueType? valueType = default(Azure.ResourceManager.SecurityCenter.Models.SecurityValueType?), System.Collections.Generic.IEnumerable denylistValues = null) { throw null; } public static Azure.ResourceManager.SecurityCenter.DeviceSecurityGroupData DeviceSecurityGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable thresholdRules = null, System.Collections.Generic.IEnumerable timeWindowRules = null, System.Collections.Generic.IEnumerable allowlistRules = null, System.Collections.Generic.IEnumerable denylistRules = null) { throw null; } + public static Azure.ResourceManager.SecurityCenter.Models.DevOpsCapability DevOpsCapability(string name = null, string value = null) { throw null; } public static Azure.ResourceManager.SecurityCenter.DevOpsConfigurationData DevOpsConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.SecurityCenter.Models.DevOpsConfigurationProperties properties = null) { throw null; } - public static Azure.ResourceManager.SecurityCenter.Models.DevOpsConfigurationProperties DevOpsConfigurationProperties(string provisioningStatusMessage = null, System.DateTimeOffset? provisioningStatusUpdateTimeUtc = default(System.DateTimeOffset?), Azure.ResourceManager.SecurityCenter.Models.DevOpsProvisioningState? provisioningState = default(Azure.ResourceManager.SecurityCenter.Models.DevOpsProvisioningState?), string authorizationCode = null, Azure.ResourceManager.SecurityCenter.Models.DevOpsAutoDiscovery? autoDiscovery = default(Azure.ResourceManager.SecurityCenter.Models.DevOpsAutoDiscovery?), System.Collections.Generic.IEnumerable topLevelInventoryList = null) { throw null; } + public static Azure.ResourceManager.SecurityCenter.Models.DevOpsConfigurationProperties DevOpsConfigurationProperties(string provisioningStatusMessage = null, System.DateTimeOffset? provisioningStatusUpdateTimeUtc = default(System.DateTimeOffset?), Azure.ResourceManager.SecurityCenter.Models.DevOpsProvisioningState? provisioningState = default(Azure.ResourceManager.SecurityCenter.Models.DevOpsProvisioningState?), string authorizationCode = null, Azure.ResourceManager.SecurityCenter.Models.DevOpsAutoDiscovery? autoDiscovery = default(Azure.ResourceManager.SecurityCenter.Models.DevOpsAutoDiscovery?), System.Collections.Generic.IEnumerable topLevelInventoryList = null, System.Collections.Generic.IEnumerable capabilities = null) { throw null; } public static Azure.ResourceManager.SecurityCenter.DevOpsOrgData DevOpsOrgData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.SecurityCenter.Models.DevOpsOrgProperties properties = null) { throw null; } public static Azure.ResourceManager.SecurityCenter.Models.DevOpsOrgProperties DevOpsOrgProperties(string provisioningStatusMessage = null, System.DateTimeOffset? provisioningStatusUpdatedOn = default(System.DateTimeOffset?), Azure.ResourceManager.SecurityCenter.Models.DevOpsProvisioningState? provisioningState = default(Azure.ResourceManager.SecurityCenter.Models.DevOpsProvisioningState?), Azure.ResourceManager.SecurityCenter.Models.ResourceOnboardingState? onboardingState = default(Azure.ResourceManager.SecurityCenter.Models.ResourceOnboardingState?), Azure.ResourceManager.SecurityCenter.Models.ActionableRemediation actionableRemediation = null) { throw null; } public static Azure.ResourceManager.SecurityCenter.DevOpsProjectData DevOpsProjectData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.SecurityCenter.Models.DevOpsProjectProperties properties = null) { throw null; } @@ -3679,6 +3350,7 @@ public static partial class ArmSecurityCenterModelFactory public static Azure.ResourceManager.SecurityCenter.Models.ListCustomAlertRule ListCustomAlertRule(string displayName = null, string description = null, bool isEnabled = false, Azure.ResourceManager.SecurityCenter.Models.SecurityValueType? valueType = default(Azure.ResourceManager.SecurityCenter.Models.SecurityValueType?)) { throw null; } public static Azure.ResourceManager.SecurityCenter.Models.LocalUserNotAllowed LocalUserNotAllowed(string displayName = null, string description = null, bool isEnabled = false, Azure.ResourceManager.SecurityCenter.Models.SecurityValueType? valueType = default(Azure.ResourceManager.SecurityCenter.Models.SecurityValueType?), System.Collections.Generic.IEnumerable allowlistValues = null) { throw null; } public static Azure.ResourceManager.SecurityCenter.Models.LogAnalyticsIdentifier LogAnalyticsIdentifier(System.Guid? workspaceId = default(System.Guid?), string workspaceSubscriptionId = null, string workspaceResourceGroup = null, System.Guid? agentId = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.SecurityCenter.Models.MalwareScanningProperties MalwareScanningProperties(Azure.ResourceManager.SecurityCenter.Models.OnUploadProperties onUpload = null, Azure.Core.ResourceIdentifier scanResultsEventGridTopicResourceId = null, Azure.ResourceManager.SecurityCenter.Models.ExtensionOperationStatus operationStatus = null) { throw null; } public static Azure.ResourceManager.SecurityCenter.Models.MdeOnboarding MdeOnboarding(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, byte[] onboardingPackageWindows = null, byte[] onboardingPackageLinux = null) { throw null; } public static Azure.ResourceManager.SecurityCenter.Models.MipSensitivityLabel MipSensitivityLabel(string name = null, System.Guid? id = default(System.Guid?), float? order = default(float?)) { throw null; } public static Azure.ResourceManager.SecurityCenter.Models.MqttC2DMessagesNotInAllowedRange MqttC2DMessagesNotInAllowedRange(string displayName = null, string description = null, bool isEnabled = false, int minThreshold = 0, int maxThreshold = 0, System.TimeSpan timeWindowSize = default(System.TimeSpan)) { throw null; } @@ -3738,6 +3410,7 @@ public static partial class ArmSecurityCenterModelFactory public static Azure.ResourceManager.SecurityCenter.Models.SecurityTaskProperties SecurityTaskProperties(string name = null, System.Collections.Generic.IDictionary additionalProperties = null) { throw null; } public static Azure.ResourceManager.SecurityCenter.Models.SecurityTopologyResource SecurityTopologyResource(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? calculatedOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable topologyResources = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?)) { throw null; } public static Azure.ResourceManager.SecurityCenter.SecurityWorkspaceSettingData SecurityWorkspaceSettingData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier workspaceId = null, string scope = null) { throw null; } + public static Azure.ResourceManager.SecurityCenter.Models.SensitiveDataDiscoveryProperties SensitiveDataDiscoveryProperties(bool? isEnabled = default(bool?), Azure.ResourceManager.SecurityCenter.Models.ExtensionOperationStatus operationStatus = null) { throw null; } public static Azure.ResourceManager.SecurityCenter.SensitivitySettingData SensitivitySettingData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.SecurityCenter.Models.SensitivitySettingsProperties properties = null) { throw null; } public static Azure.ResourceManager.SecurityCenter.Models.SensitivitySettingsProperties SensitivitySettingsProperties(System.Collections.Generic.IEnumerable sensitiveInfoTypesIds = null, float? sensitivityThresholdLabelOrder = default(float?), System.Guid? sensitivityThresholdLabelId = default(System.Guid?), Azure.ResourceManager.SecurityCenter.Models.GetSensitivitySettingsResponsePropertiesMipInformation mipInformation = null) { throw null; } public static Azure.ResourceManager.SecurityCenter.ServerVulnerabilityAssessmentData ServerVulnerabilityAssessmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.SecurityCenter.Models.ServerVulnerabilityAssessmentPropertiesProvisioningState? provisioningState = default(Azure.ResourceManager.SecurityCenter.Models.ServerVulnerabilityAssessmentPropertiesProvisioningState?)) { throw null; } @@ -4206,68 +3879,6 @@ protected CustomAlertRule(bool isEnabled) { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CustomAssessmentAutomationCreateOrUpdateContent : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomAssessmentAutomationCreateOrUpdateContent() { } - public string CompressedQuery { get { throw null; } set { } } - public string Description { get { throw null; } set { } } - public string DisplayName { get { throw null; } set { } } - public string RemediationDescription { get { throw null; } set { } } - public Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentSeverity? Severity { get { throw null; } set { } } - public Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationSupportedCloud? SupportedCloud { get { throw null; } set { } } - Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationCreateOrUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct CustomAssessmentAutomationSupportedCloud : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public CustomAssessmentAutomationSupportedCloud(string value) { throw null; } - public static Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationSupportedCloud Aws { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationSupportedCloud Gcp { get { throw null; } } - public bool Equals(Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationSupportedCloud other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationSupportedCloud left, Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationSupportedCloud right) { throw null; } - public static implicit operator Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationSupportedCloud (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationSupportedCloud left, Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationSupportedCloud right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct CustomAssessmentSeverity : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public CustomAssessmentSeverity(string value) { throw null; } - public static Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentSeverity High { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentSeverity Low { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentSeverity Medium { get { throw null; } } - public bool Equals(Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentSeverity other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentSeverity left, Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentSeverity right) { throw null; } - public static implicit operator Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentSeverity (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentSeverity left, Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentSeverity right) { throw null; } - public override string ToString() { throw null; } - } - public partial class CustomEntityStoreAssignmentCreateOrUpdateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomEntityStoreAssignmentCreateOrUpdateContent() { } - public string Principal { get { throw null; } set { } } - Azure.ResourceManager.SecurityCenter.Models.CustomEntityStoreAssignmentCreateOrUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SecurityCenter.Models.CustomEntityStoreAssignmentCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class DataExportSettings : Azure.ResourceManager.SecurityCenter.SecuritySettingData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DataExportSettings() { } @@ -4887,6 +4498,19 @@ public DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning() { public static bool operator !=(Azure.ResourceManager.SecurityCenter.Models.DefenderForStorageSettingName left, Azure.ResourceManager.SecurityCenter.Models.DefenderForStorageSettingName right) { throw null; } public override string ToString() { throw null; } } + public partial class DefenderForStorageSettingProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DefenderForStorageSettingProperties() { } + public bool? IsEnabled { get { throw null; } set { } } + public Azure.ResourceManager.SecurityCenter.Models.MalwareScanningProperties MalwareScanning { get { throw null; } set { } } + public bool? OverrideSubscriptionLevelSettings { get { throw null; } set { } } + public Azure.ResourceManager.SecurityCenter.Models.SensitiveDataDiscoveryProperties SensitiveDataDiscovery { get { throw null; } set { } } + Azure.ResourceManager.SecurityCenter.Models.DefenderForStorageSettingProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecurityCenter.Models.DefenderForStorageSettingProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DenylistCustomAlertRule : Azure.ResourceManager.SecurityCenter.Models.ListCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DenylistCustomAlertRule(bool isEnabled, System.Collections.Generic.IEnumerable denylistValues) : base (default(bool)) { } @@ -4916,11 +4540,23 @@ public DenylistCustomAlertRule(bool isEnabled, System.Collections.Generic.IEnume public static bool operator !=(Azure.ResourceManager.SecurityCenter.Models.DevOpsAutoDiscovery left, Azure.ResourceManager.SecurityCenter.Models.DevOpsAutoDiscovery right) { throw null; } public override string ToString() { throw null; } } + public partial class DevOpsCapability : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DevOpsCapability() { } + public string Name { get { throw null; } } + public string Value { get { throw null; } } + Azure.ResourceManager.SecurityCenter.Models.DevOpsCapability System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecurityCenter.Models.DevOpsCapability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DevOpsConfigurationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevOpsConfigurationProperties() { } public string AuthorizationCode { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.DevOpsAutoDiscovery? AutoDiscovery { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList Capabilities { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.DevOpsProvisioningState? ProvisioningState { get { throw null; } set { } } public string ProvisioningStatusMessage { get { throw null; } } public System.DateTimeOffset? ProvisioningStatusUpdateTimeUtc { get { throw null; } } @@ -5026,17 +4662,6 @@ public DiscoveredSecuritySolution(Azure.ResourceManager.SecurityCenter.Models.Se string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class EffectiveNetworkSecurityGroups : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public EffectiveNetworkSecurityGroups() { } - public string NetworkInterface { get { throw null; } set { } } - public System.Collections.Generic.IList NetworkSecurityGroups { get { throw null; } } - Azure.ResourceManager.SecurityCenter.Models.EffectiveNetworkSecurityGroups System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SecurityCenter.Models.EffectiveNetworkSecurityGroups System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct EndOfSupportStatus : System.IEquatable { @@ -6037,6 +5662,18 @@ internal LogAnalyticsIdentifier() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class MalwareScanningProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MalwareScanningProperties() { } + public Azure.ResourceManager.SecurityCenter.Models.OnUploadProperties OnUpload { get { throw null; } set { } } + public Azure.ResourceManager.SecurityCenter.Models.ExtensionOperationStatus OperationStatus { get { throw null; } } + public Azure.Core.ResourceIdentifier ScanResultsEventGridTopicResourceId { get { throw null; } set { } } + Azure.ResourceManager.SecurityCenter.Models.MalwareScanningProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecurityCenter.Models.MalwareScanningProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class MdeOnboarding : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MdeOnboarding() { } @@ -6131,6 +5768,17 @@ public partial class OnPremiseSqlResourceDetails : Azure.ResourceManager.Securit string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class OnUploadProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OnUploadProperties() { } + public int? CapGBPerMonth { get { throw null; } set { } } + public bool? IsEnabled { get { throw null; } set { } } + Azure.ResourceManager.SecurityCenter.Models.OnUploadProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecurityCenter.Models.OnUploadProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class OperationStatusAutoGenerated : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal OperationStatusAutoGenerated() { } @@ -6142,46 +5790,6 @@ internal OperationStatusAutoGenerated() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class PathRecommendation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public PathRecommendation() { } - public Azure.ResourceManager.SecurityCenter.Models.RecommendationAction? Action { get { throw null; } set { } } - public Azure.ResourceManager.SecurityCenter.Models.SecurityCenterConfigurationStatus? ConfigurationStatus { get { throw null; } set { } } - public Azure.ResourceManager.SecurityCenter.Models.PathRecommendationFileType? FileType { get { throw null; } set { } } - public Azure.ResourceManager.SecurityCenter.Models.IotSecurityRecommendationType? IotSecurityRecommendationType { get { throw null; } set { } } - public bool? IsCommon { get { throw null; } set { } } - public string Path { get { throw null; } set { } } - public Azure.ResourceManager.SecurityCenter.Models.SecurityCenterPublisherInfo PublisherInfo { get { throw null; } set { } } - public System.Collections.Generic.IList Usernames { get { throw null; } } - public System.Collections.Generic.IList UserSids { get { throw null; } } - Azure.ResourceManager.SecurityCenter.Models.PathRecommendation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SecurityCenter.Models.PathRecommendation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct PathRecommendationFileType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public PathRecommendationFileType(string value) { throw null; } - public static Azure.ResourceManager.SecurityCenter.Models.PathRecommendationFileType Dll { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.PathRecommendationFileType Exe { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.PathRecommendationFileType Executable { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.PathRecommendationFileType Msi { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.PathRecommendationFileType Script { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.PathRecommendationFileType Unknown { get { throw null; } } - public bool Equals(Azure.ResourceManager.SecurityCenter.Models.PathRecommendationFileType other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.SecurityCenter.Models.PathRecommendationFileType left, Azure.ResourceManager.SecurityCenter.Models.PathRecommendationFileType right) { throw null; } - public static implicit operator Azure.ResourceManager.SecurityCenter.Models.PathRecommendationFileType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.SecurityCenter.Models.PathRecommendationFileType left, Azure.ResourceManager.SecurityCenter.Models.PathRecommendationFileType right) { throw null; } - public override string ToString() { throw null; } - } public partial class PlanExtension : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public PlanExtension(string name, Azure.ResourceManager.SecurityCenter.Models.IsExtensionEnabled isEnabled) { } @@ -6225,25 +5833,6 @@ public partial class QueuePurgesNotInAllowedRange : Azure.ResourceManager.Securi System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct RecommendationAction : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RecommendationAction(string value) { throw null; } - public static Azure.ResourceManager.SecurityCenter.Models.RecommendationAction Add { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.RecommendationAction Recommended { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.RecommendationAction Remove { get { throw null; } } - public bool Equals(Azure.ResourceManager.SecurityCenter.Models.RecommendationAction other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.SecurityCenter.Models.RecommendationAction left, Azure.ResourceManager.SecurityCenter.Models.RecommendationAction right) { throw null; } - public static implicit operator Azure.ResourceManager.SecurityCenter.Models.RecommendationAction (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.SecurityCenter.Models.RecommendationAction left, Azure.ResourceManager.SecurityCenter.Models.RecommendationAction right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RecommendationConfigStatus : System.IEquatable { private readonly object _dummy; @@ -6274,40 +5863,6 @@ public RecommendationConfigurationProperties(Azure.ResourceManager.SecurityCente System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct RecommendationStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RecommendationStatus(string value) { throw null; } - public static Azure.ResourceManager.SecurityCenter.Models.RecommendationStatus NoStatus { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.RecommendationStatus NotAvailable { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.RecommendationStatus NotRecommended { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.RecommendationStatus Recommended { get { throw null; } } - public bool Equals(Azure.ResourceManager.SecurityCenter.Models.RecommendationStatus other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.SecurityCenter.Models.RecommendationStatus left, Azure.ResourceManager.SecurityCenter.Models.RecommendationStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.SecurityCenter.Models.RecommendationStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.SecurityCenter.Models.RecommendationStatus left, Azure.ResourceManager.SecurityCenter.Models.RecommendationStatus right) { throw null; } - public override string ToString() { throw null; } - } - public partial class RecommendedSecurityRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public RecommendedSecurityRule() { } - public int? DestinationPort { get { throw null; } set { } } - public Azure.ResourceManager.SecurityCenter.Models.SecurityTrafficDirection? Direction { get { throw null; } set { } } - public System.Collections.Generic.IList IPAddresses { get { throw null; } } - public string Name { get { throw null; } set { } } - public System.Collections.Generic.IList Protocols { get { throw null; } } - Azure.ResourceManager.SecurityCenter.Models.RecommendedSecurityRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SecurityCenter.Models.RecommendedSecurityRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RegulatoryComplianceState : System.IEquatable { private readonly object _dummy; @@ -7224,27 +6779,6 @@ protected SecurityCenterCloudOffering() { } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SecurityCenterConfigurationStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public SecurityCenterConfigurationStatus(string value) { throw null; } - public static Azure.ResourceManager.SecurityCenter.Models.SecurityCenterConfigurationStatus Configured { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.SecurityCenterConfigurationStatus Failed { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.SecurityCenterConfigurationStatus InProgress { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.SecurityCenterConfigurationStatus NoStatus { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.SecurityCenterConfigurationStatus NotConfigured { get { throw null; } } - public bool Equals(Azure.ResourceManager.SecurityCenter.Models.SecurityCenterConfigurationStatus other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.SecurityCenter.Models.SecurityCenterConfigurationStatus left, Azure.ResourceManager.SecurityCenter.Models.SecurityCenterConfigurationStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.SecurityCenter.Models.SecurityCenterConfigurationStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.SecurityCenter.Models.SecurityCenterConfigurationStatus left, Azure.ResourceManager.SecurityCenter.Models.SecurityCenterConfigurationStatus right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SecurityCenterConnectionType : System.IEquatable { private readonly object _dummy; @@ -7262,19 +6796,6 @@ protected SecurityCenterCloudOffering() { } public static bool operator !=(Azure.ResourceManager.SecurityCenter.Models.SecurityCenterConnectionType left, Azure.ResourceManager.SecurityCenter.Models.SecurityCenterConnectionType right) { throw null; } public override string ToString() { throw null; } } - public partial class SecurityCenterFileProtectionMode : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SecurityCenterFileProtectionMode() { } - public Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode? Exe { get { throw null; } set { } } - public Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode? Executable { get { throw null; } set { } } - public Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode? Msi { get { throw null; } set { } } - public Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode? Script { get { throw null; } set { } } - Azure.ResourceManager.SecurityCenter.Models.SecurityCenterFileProtectionMode System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SecurityCenter.Models.SecurityCenterFileProtectionMode System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SecurityCenterPricingTier : System.IEquatable { @@ -7293,19 +6814,6 @@ public SecurityCenterFileProtectionMode() { } public static bool operator !=(Azure.ResourceManager.SecurityCenter.Models.SecurityCenterPricingTier left, Azure.ResourceManager.SecurityCenter.Models.SecurityCenterPricingTier right) { throw null; } public override string ToString() { throw null; } } - public partial class SecurityCenterPublisherInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SecurityCenterPublisherInfo() { } - public string BinaryName { get { throw null; } set { } } - public string ProductName { get { throw null; } set { } } - public string PublisherName { get { throw null; } set { } } - public string Version { get { throw null; } set { } } - Azure.ResourceManager.SecurityCenter.Models.SecurityCenterPublisherInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SecurityCenter.Models.SecurityCenterPublisherInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public abstract partial class SecurityCenterResourceDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected SecurityCenterResourceDetails() { } @@ -7325,25 +6833,6 @@ public SecurityCenterTagsResourceInfo() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SecurityCenterVmEnforcementSupportState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public SecurityCenterVmEnforcementSupportState(string value) { throw null; } - public static Azure.ResourceManager.SecurityCenter.Models.SecurityCenterVmEnforcementSupportState NotSupported { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.SecurityCenterVmEnforcementSupportState Supported { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.SecurityCenterVmEnforcementSupportState Unknown { get { throw null; } } - public bool Equals(Azure.ResourceManager.SecurityCenter.Models.SecurityCenterVmEnforcementSupportState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.SecurityCenter.Models.SecurityCenterVmEnforcementSupportState left, Azure.ResourceManager.SecurityCenter.Models.SecurityCenterVmEnforcementSupportState right) { throw null; } - public static implicit operator Azure.ResourceManager.SecurityCenter.Models.SecurityCenterVmEnforcementSupportState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.SecurityCenter.Models.SecurityCenterVmEnforcementSupportState left, Azure.ResourceManager.SecurityCenter.Models.SecurityCenterVmEnforcementSupportState right) { throw null; } - public override string ToString() { throw null; } - } public abstract partial class SecurityConnectorEnvironment : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected SecurityConnectorEnvironment() { } @@ -7722,42 +7211,6 @@ public SecurityTopologyResource() { } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SecurityTrafficDirection : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public SecurityTrafficDirection(string value) { throw null; } - public static Azure.ResourceManager.SecurityCenter.Models.SecurityTrafficDirection Inbound { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.SecurityTrafficDirection Outbound { get { throw null; } } - public bool Equals(Azure.ResourceManager.SecurityCenter.Models.SecurityTrafficDirection other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.SecurityCenter.Models.SecurityTrafficDirection left, Azure.ResourceManager.SecurityCenter.Models.SecurityTrafficDirection right) { throw null; } - public static implicit operator Azure.ResourceManager.SecurityCenter.Models.SecurityTrafficDirection (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.SecurityCenter.Models.SecurityTrafficDirection left, Azure.ResourceManager.SecurityCenter.Models.SecurityTrafficDirection right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SecurityTransportProtocol : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public SecurityTransportProtocol(string value) { throw null; } - public static Azure.ResourceManager.SecurityCenter.Models.SecurityTransportProtocol Tcp { get { throw null; } } - public static Azure.ResourceManager.SecurityCenter.Models.SecurityTransportProtocol Udp { get { throw null; } } - public bool Equals(Azure.ResourceManager.SecurityCenter.Models.SecurityTransportProtocol other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.SecurityCenter.Models.SecurityTransportProtocol left, Azure.ResourceManager.SecurityCenter.Models.SecurityTransportProtocol right) { throw null; } - public static implicit operator Azure.ResourceManager.SecurityCenter.Models.SecurityTransportProtocol (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.SecurityCenter.Models.SecurityTransportProtocol left, Azure.ResourceManager.SecurityCenter.Models.SecurityTransportProtocol right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SecurityValueType : System.IEquatable { private readonly object _dummy; @@ -7775,6 +7228,17 @@ public SecurityTopologyResource() { } public static bool operator !=(Azure.ResourceManager.SecurityCenter.Models.SecurityValueType left, Azure.ResourceManager.SecurityCenter.Models.SecurityValueType right) { throw null; } public override string ToString() { throw null; } } + public partial class SensitiveDataDiscoveryProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SensitiveDataDiscoveryProperties() { } + public bool? IsEnabled { get { throw null; } set { } } + public Azure.ResourceManager.SecurityCenter.Models.ExtensionOperationStatus OperationStatus { get { throw null; } } + Azure.ResourceManager.SecurityCenter.Models.SensitiveDataDiscoveryProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecurityCenter.Models.SensitiveDataDiscoveryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SensitivityLabel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SensitivityLabel() { } @@ -8230,17 +7694,6 @@ public UserDefinedResourcesProperties(string query, System.Collections.Generic.I string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class UserRecommendation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public UserRecommendation() { } - public Azure.ResourceManager.SecurityCenter.Models.RecommendationAction? RecommendationAction { get { throw null; } set { } } - public string Username { get { throw null; } set { } } - Azure.ResourceManager.SecurityCenter.Models.UserRecommendation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SecurityCenter.Models.UserRecommendation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class VendorReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal VendorReference() { } @@ -8252,19 +7705,6 @@ internal VendorReference() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class VmRecommendation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public VmRecommendation() { } - public Azure.ResourceManager.SecurityCenter.Models.SecurityCenterConfigurationStatus? ConfigurationStatus { get { throw null; } set { } } - public Azure.ResourceManager.SecurityCenter.Models.SecurityCenterVmEnforcementSupportState? EnforcementSupport { get { throw null; } set { } } - public Azure.ResourceManager.SecurityCenter.Models.RecommendationAction? RecommendationAction { get { throw null; } set { } } - public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } - Azure.ResourceManager.SecurityCenter.Models.VmRecommendation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SecurityCenter.Models.VmRecommendation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct VulnerabilityAssessmentAutoProvisioningType : System.IEquatable { diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_AdaptiveApplicationControlGroupCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_AdaptiveApplicationControlGroupCollection.cs deleted file mode 100644 index b3848fdf9c3b..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_AdaptiveApplicationControlGroupCollection.cs +++ /dev/null @@ -1,276 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.SecurityCenter.Models; - -namespace Azure.ResourceManager.SecurityCenter.Samples -{ - public partial class Sample_AdaptiveApplicationControlGroupCollection - { - // Gets a configured application control VM/server group - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetsAConfiguredApplicationControlVMServerGroup() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ApplicationWhitelistings/GetAdaptiveApplicationControlsGroup_example.json - // this example is just showing the usage of "AdaptiveApplicationControls_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SecurityCenterLocationResource created on azure - // for more information of creating SecurityCenterLocationResource, please refer to the document of SecurityCenterLocationResource - string subscriptionId = "20ff7fc3-e762-44dd-bd96-b71116dcdc23"; - AzureLocation ascLocation = new AzureLocation("centralus"); - ResourceIdentifier securityCenterLocationResourceId = SecurityCenterLocationResource.CreateResourceIdentifier(subscriptionId, ascLocation); - SecurityCenterLocationResource securityCenterLocation = client.GetSecurityCenterLocationResource(securityCenterLocationResourceId); - - // get the collection of this AdaptiveApplicationControlGroupResource - AdaptiveApplicationControlGroupCollection collection = securityCenterLocation.GetAdaptiveApplicationControlGroups(); - - // invoke the operation - string groupName = "ERELGROUP1"; - AdaptiveApplicationControlGroupResource result = await collection.GetAsync(groupName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - AdaptiveApplicationControlGroupData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Gets a configured application control VM/server group - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetsAConfiguredApplicationControlVMServerGroup() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ApplicationWhitelistings/GetAdaptiveApplicationControlsGroup_example.json - // this example is just showing the usage of "AdaptiveApplicationControls_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SecurityCenterLocationResource created on azure - // for more information of creating SecurityCenterLocationResource, please refer to the document of SecurityCenterLocationResource - string subscriptionId = "20ff7fc3-e762-44dd-bd96-b71116dcdc23"; - AzureLocation ascLocation = new AzureLocation("centralus"); - ResourceIdentifier securityCenterLocationResourceId = SecurityCenterLocationResource.CreateResourceIdentifier(subscriptionId, ascLocation); - SecurityCenterLocationResource securityCenterLocation = client.GetSecurityCenterLocationResource(securityCenterLocationResourceId); - - // get the collection of this AdaptiveApplicationControlGroupResource - AdaptiveApplicationControlGroupCollection collection = securityCenterLocation.GetAdaptiveApplicationControlGroups(); - - // invoke the operation - string groupName = "ERELGROUP1"; - bool result = await collection.ExistsAsync(groupName); - - Console.WriteLine($"Succeeded: {result}"); - } - - // Gets a configured application control VM/server group - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetsAConfiguredApplicationControlVMServerGroup() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ApplicationWhitelistings/GetAdaptiveApplicationControlsGroup_example.json - // this example is just showing the usage of "AdaptiveApplicationControls_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SecurityCenterLocationResource created on azure - // for more information of creating SecurityCenterLocationResource, please refer to the document of SecurityCenterLocationResource - string subscriptionId = "20ff7fc3-e762-44dd-bd96-b71116dcdc23"; - AzureLocation ascLocation = new AzureLocation("centralus"); - ResourceIdentifier securityCenterLocationResourceId = SecurityCenterLocationResource.CreateResourceIdentifier(subscriptionId, ascLocation); - SecurityCenterLocationResource securityCenterLocation = client.GetSecurityCenterLocationResource(securityCenterLocationResourceId); - - // get the collection of this AdaptiveApplicationControlGroupResource - AdaptiveApplicationControlGroupCollection collection = securityCenterLocation.GetAdaptiveApplicationControlGroups(); - - // invoke the operation - string groupName = "ERELGROUP1"; - NullableResponse response = await collection.GetIfExistsAsync(groupName); - AdaptiveApplicationControlGroupResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine($"Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - AdaptiveApplicationControlGroupData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - - // Update an application control machine group by adding a new application - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_UpdateAnApplicationControlMachineGroupByAddingANewApplication() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ApplicationWhitelistings/PutAdaptiveApplicationControls_example.json - // this example is just showing the usage of "AdaptiveApplicationControls_Put" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SecurityCenterLocationResource created on azure - // for more information of creating SecurityCenterLocationResource, please refer to the document of SecurityCenterLocationResource - string subscriptionId = "20ff7fc3-e762-44dd-bd96-b71116dcdc23"; - AzureLocation ascLocation = new AzureLocation("centralus"); - ResourceIdentifier securityCenterLocationResourceId = SecurityCenterLocationResource.CreateResourceIdentifier(subscriptionId, ascLocation); - SecurityCenterLocationResource securityCenterLocation = client.GetSecurityCenterLocationResource(securityCenterLocationResourceId); - - // get the collection of this AdaptiveApplicationControlGroupResource - AdaptiveApplicationControlGroupCollection collection = securityCenterLocation.GetAdaptiveApplicationControlGroups(); - - // invoke the operation - string groupName = "ERELGROUP1"; - AdaptiveApplicationControlGroupData data = new AdaptiveApplicationControlGroupData() - { - EnforcementMode = AdaptiveApplicationControlEnforcementMode.Audit, - ProtectionMode = new SecurityCenterFileProtectionMode() - { - Exe = AdaptiveApplicationControlEnforcementMode.Audit, - Msi = AdaptiveApplicationControlEnforcementMode.None, - Script = AdaptiveApplicationControlEnforcementMode.None, - }, - VmRecommendations = -{ -new VmRecommendation() -{ -ConfigurationStatus = SecurityCenterConfigurationStatus.Configured, -RecommendationAction = RecommendationAction.Recommended, -ResourceId = new ResourceIdentifier("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/erelh-stable/providers/microsoft.compute/virtualmachines/erelh-16090"), -EnforcementSupport = SecurityCenterVmEnforcementSupportState.Supported, -},new VmRecommendation() -{ -ConfigurationStatus = SecurityCenterConfigurationStatus.Configured, -RecommendationAction = RecommendationAction.Recommended, -ResourceId = new ResourceIdentifier("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/matanvs/providers/microsoft.compute/virtualmachines/matanvs19"), -EnforcementSupport = SecurityCenterVmEnforcementSupportState.Supported, -} -}, - PathRecommendations = -{ -new PathRecommendation() -{ -Path = "[Exe] O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US\\*\\*\\0.0.0.0", -Action = RecommendationAction.Recommended, -IotSecurityRecommendationType = new IotSecurityRecommendationType("PublisherSignature"), -PublisherInfo = new SecurityCenterPublisherInfo() -{ -PublisherName = "O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US", -ProductName = "*", -BinaryName = "*", -Version = "0.0.0.0", -}, -IsCommon = true, -UserSids = -{ -"S-1-1-0" -}, -Usernames = -{ -new UserRecommendation() -{ -Username = "Everyone", -RecommendationAction = RecommendationAction.Recommended, -} -}, -FileType = PathRecommendationFileType.Exe, -ConfigurationStatus = SecurityCenterConfigurationStatus.Configured, -},new PathRecommendation() -{ -Path = "%OSDRIVE%\\WINDOWSAZURE\\SECAGENT\\WASECAGENTPROV.EXE", -Action = RecommendationAction.Recommended, -IotSecurityRecommendationType = new IotSecurityRecommendationType("ProductSignature"), -PublisherInfo = new SecurityCenterPublisherInfo() -{ -PublisherName = "CN=MICROSOFT AZURE DEPENDENCY CODE SIGN", -ProductName = "MICROSOFT® COREXT", -BinaryName = "*", -Version = "0.0.0.0", -}, -IsCommon = true, -UserSids = -{ -"S-1-1-0" -}, -Usernames = -{ -new UserRecommendation() -{ -Username = "NT AUTHORITY\\SYSTEM", -RecommendationAction = RecommendationAction.Recommended, -} -}, -FileType = PathRecommendationFileType.Exe, -ConfigurationStatus = SecurityCenterConfigurationStatus.Configured, -},new PathRecommendation() -{ -Path = "%OSDRIVE%\\WINDOWSAZURE\\PACKAGES_201973_7415\\COLLECTGUESTLOGS.EXE", -Action = RecommendationAction.Recommended, -IotSecurityRecommendationType = new IotSecurityRecommendationType("PublisherSignature"), -PublisherInfo = new SecurityCenterPublisherInfo() -{ -PublisherName = "CN=MICROSOFT AZURE DEPENDENCY CODE SIGN", -ProductName = "*", -BinaryName = "*", -Version = "0.0.0.0", -}, -IsCommon = true, -UserSids = -{ -"S-1-1-0" -}, -Usernames = -{ -new UserRecommendation() -{ -Username = "NT AUTHORITY\\SYSTEM", -RecommendationAction = RecommendationAction.Recommended, -} -}, -FileType = PathRecommendationFileType.Exe, -ConfigurationStatus = SecurityCenterConfigurationStatus.Configured, -},new PathRecommendation() -{ -Path = "C:\\directory\\file.exe", -Action = RecommendationAction.Add, -IotSecurityRecommendationType = new IotSecurityRecommendationType("File"), -IsCommon = true, -} -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, groupName, data); - AdaptiveApplicationControlGroupResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - AdaptiveApplicationControlGroupData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_AdaptiveApplicationControlGroupResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_AdaptiveApplicationControlGroupResource.cs deleted file mode 100644 index 500d1d0c1142..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_AdaptiveApplicationControlGroupResource.cs +++ /dev/null @@ -1,260 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.Resources; -using Azure.ResourceManager.SecurityCenter.Models; - -namespace Azure.ResourceManager.SecurityCenter.Samples -{ - public partial class Sample_AdaptiveApplicationControlGroupResource - { - // Gets a list of application control groups of machines for the subscription - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAdaptiveApplicationControlGroups_GetsAListOfApplicationControlGroupsOfMachinesForTheSubscription() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ApplicationWhitelistings/GetAdaptiveApplicationControlsSubscription_example.json - // this example is just showing the usage of "AdaptiveApplicationControls_List" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "20ff7fc3-e762-44dd-bd96-b71116dcdc23"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - bool? includePathRecommendations = true; - bool? summary = false; - await foreach (AdaptiveApplicationControlGroupResource item in subscriptionResource.GetAdaptiveApplicationControlGroupsAsync(includePathRecommendations: includePathRecommendations, summary: summary)) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - AdaptiveApplicationControlGroupData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - - // Gets a configured application control VM/server group - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetsAConfiguredApplicationControlVMServerGroup() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ApplicationWhitelistings/GetAdaptiveApplicationControlsGroup_example.json - // this example is just showing the usage of "AdaptiveApplicationControls_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this AdaptiveApplicationControlGroupResource created on azure - // for more information of creating AdaptiveApplicationControlGroupResource, please refer to the document of AdaptiveApplicationControlGroupResource - string subscriptionId = "20ff7fc3-e762-44dd-bd96-b71116dcdc23"; - AzureLocation ascLocation = new AzureLocation("centralus"); - string groupName = "ERELGROUP1"; - ResourceIdentifier adaptiveApplicationControlGroupResourceId = AdaptiveApplicationControlGroupResource.CreateResourceIdentifier(subscriptionId, ascLocation, groupName); - AdaptiveApplicationControlGroupResource adaptiveApplicationControlGroup = client.GetAdaptiveApplicationControlGroupResource(adaptiveApplicationControlGroupResourceId); - - // invoke the operation - AdaptiveApplicationControlGroupResource result = await adaptiveApplicationControlGroup.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - AdaptiveApplicationControlGroupData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Update an application control machine group by adding a new application - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_UpdateAnApplicationControlMachineGroupByAddingANewApplication() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ApplicationWhitelistings/PutAdaptiveApplicationControls_example.json - // this example is just showing the usage of "AdaptiveApplicationControls_Put" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this AdaptiveApplicationControlGroupResource created on azure - // for more information of creating AdaptiveApplicationControlGroupResource, please refer to the document of AdaptiveApplicationControlGroupResource - string subscriptionId = "20ff7fc3-e762-44dd-bd96-b71116dcdc23"; - AzureLocation ascLocation = new AzureLocation("centralus"); - string groupName = "ERELGROUP1"; - ResourceIdentifier adaptiveApplicationControlGroupResourceId = AdaptiveApplicationControlGroupResource.CreateResourceIdentifier(subscriptionId, ascLocation, groupName); - AdaptiveApplicationControlGroupResource adaptiveApplicationControlGroup = client.GetAdaptiveApplicationControlGroupResource(adaptiveApplicationControlGroupResourceId); - - // invoke the operation - AdaptiveApplicationControlGroupData data = new AdaptiveApplicationControlGroupData() - { - EnforcementMode = AdaptiveApplicationControlEnforcementMode.Audit, - ProtectionMode = new SecurityCenterFileProtectionMode() - { - Exe = AdaptiveApplicationControlEnforcementMode.Audit, - Msi = AdaptiveApplicationControlEnforcementMode.None, - Script = AdaptiveApplicationControlEnforcementMode.None, - }, - VmRecommendations = -{ -new VmRecommendation() -{ -ConfigurationStatus = SecurityCenterConfigurationStatus.Configured, -RecommendationAction = RecommendationAction.Recommended, -ResourceId = new ResourceIdentifier("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/erelh-stable/providers/microsoft.compute/virtualmachines/erelh-16090"), -EnforcementSupport = SecurityCenterVmEnforcementSupportState.Supported, -},new VmRecommendation() -{ -ConfigurationStatus = SecurityCenterConfigurationStatus.Configured, -RecommendationAction = RecommendationAction.Recommended, -ResourceId = new ResourceIdentifier("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/matanvs/providers/microsoft.compute/virtualmachines/matanvs19"), -EnforcementSupport = SecurityCenterVmEnforcementSupportState.Supported, -} -}, - PathRecommendations = -{ -new PathRecommendation() -{ -Path = "[Exe] O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US\\*\\*\\0.0.0.0", -Action = RecommendationAction.Recommended, -IotSecurityRecommendationType = new IotSecurityRecommendationType("PublisherSignature"), -PublisherInfo = new SecurityCenterPublisherInfo() -{ -PublisherName = "O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US", -ProductName = "*", -BinaryName = "*", -Version = "0.0.0.0", -}, -IsCommon = true, -UserSids = -{ -"S-1-1-0" -}, -Usernames = -{ -new UserRecommendation() -{ -Username = "Everyone", -RecommendationAction = RecommendationAction.Recommended, -} -}, -FileType = PathRecommendationFileType.Exe, -ConfigurationStatus = SecurityCenterConfigurationStatus.Configured, -},new PathRecommendation() -{ -Path = "%OSDRIVE%\\WINDOWSAZURE\\SECAGENT\\WASECAGENTPROV.EXE", -Action = RecommendationAction.Recommended, -IotSecurityRecommendationType = new IotSecurityRecommendationType("ProductSignature"), -PublisherInfo = new SecurityCenterPublisherInfo() -{ -PublisherName = "CN=MICROSOFT AZURE DEPENDENCY CODE SIGN", -ProductName = "MICROSOFT® COREXT", -BinaryName = "*", -Version = "0.0.0.0", -}, -IsCommon = true, -UserSids = -{ -"S-1-1-0" -}, -Usernames = -{ -new UserRecommendation() -{ -Username = "NT AUTHORITY\\SYSTEM", -RecommendationAction = RecommendationAction.Recommended, -} -}, -FileType = PathRecommendationFileType.Exe, -ConfigurationStatus = SecurityCenterConfigurationStatus.Configured, -},new PathRecommendation() -{ -Path = "%OSDRIVE%\\WINDOWSAZURE\\PACKAGES_201973_7415\\COLLECTGUESTLOGS.EXE", -Action = RecommendationAction.Recommended, -IotSecurityRecommendationType = new IotSecurityRecommendationType("PublisherSignature"), -PublisherInfo = new SecurityCenterPublisherInfo() -{ -PublisherName = "CN=MICROSOFT AZURE DEPENDENCY CODE SIGN", -ProductName = "*", -BinaryName = "*", -Version = "0.0.0.0", -}, -IsCommon = true, -UserSids = -{ -"S-1-1-0" -}, -Usernames = -{ -new UserRecommendation() -{ -Username = "NT AUTHORITY\\SYSTEM", -RecommendationAction = RecommendationAction.Recommended, -} -}, -FileType = PathRecommendationFileType.Exe, -ConfigurationStatus = SecurityCenterConfigurationStatus.Configured, -},new PathRecommendation() -{ -Path = "C:\\directory\\file.exe", -Action = RecommendationAction.Add, -IotSecurityRecommendationType = new IotSecurityRecommendationType("File"), -IsCommon = true, -} -}, - }; - ArmOperation lro = await adaptiveApplicationControlGroup.UpdateAsync(WaitUntil.Completed, data); - AdaptiveApplicationControlGroupResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - AdaptiveApplicationControlGroupData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Delete an application control machine group - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteAnApplicationControlMachineGroup() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ApplicationWhitelistings/DeleteAdaptiveApplicationControls_example.json - // this example is just showing the usage of "AdaptiveApplicationControls_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this AdaptiveApplicationControlGroupResource created on azure - // for more information of creating AdaptiveApplicationControlGroupResource, please refer to the document of AdaptiveApplicationControlGroupResource - string subscriptionId = "20ff7fc3-e762-44dd-bd96-b71116dcdc23"; - AzureLocation ascLocation = new AzureLocation("centralus"); - string groupName = "GROUP1"; - ResourceIdentifier adaptiveApplicationControlGroupResourceId = AdaptiveApplicationControlGroupResource.CreateResourceIdentifier(subscriptionId, ascLocation, groupName); - AdaptiveApplicationControlGroupResource adaptiveApplicationControlGroup = client.GetAdaptiveApplicationControlGroupResource(adaptiveApplicationControlGroupResourceId); - - // invoke the operation - await adaptiveApplicationControlGroup.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_AdaptiveNetworkHardeningCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_AdaptiveNetworkHardeningCollection.cs deleted file mode 100644 index 70d11063a46b..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_AdaptiveNetworkHardeningCollection.cs +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.SecurityCenter.Samples -{ - public partial class Sample_AdaptiveNetworkHardeningCollection - { - // List Adaptive Network Hardenings resources of an extended resource - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListAdaptiveNetworkHardeningsResourcesOfAnExtendedResource() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AdaptiveNetworkHardenings/ListByExtendedResourceAdaptiveNetworkHardenings_example.json - // this example is just showing the usage of "AdaptiveNetworkHardenings_ListByExtendedResource" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "20ff7fc3-e762-44dd-bd96-b71116dcdc23"; - string resourceGroupName = "rg1"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this AdaptiveNetworkHardeningResource - string resourceNamespace = "Microsoft.Compute"; - string resourceType = "virtualMachines"; - string resourceName = "vm1"; - AdaptiveNetworkHardeningCollection collection = resourceGroupResource.GetAdaptiveNetworkHardenings(resourceNamespace, resourceType, resourceName); - - // invoke the operation and iterate over the result - await foreach (AdaptiveNetworkHardeningResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - AdaptiveNetworkHardeningData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - - // Get a single Adaptive Network Hardening resource - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetASingleAdaptiveNetworkHardeningResource() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AdaptiveNetworkHardenings/GetAdaptiveNetworkHardening_example.json - // this example is just showing the usage of "AdaptiveNetworkHardenings_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "20ff7fc3-e762-44dd-bd96-b71116dcdc23"; - string resourceGroupName = "rg1"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this AdaptiveNetworkHardeningResource - string resourceNamespace = "Microsoft.Compute"; - string resourceType = "virtualMachines"; - string resourceName = "vm1"; - AdaptiveNetworkHardeningCollection collection = resourceGroupResource.GetAdaptiveNetworkHardenings(resourceNamespace, resourceType, resourceName); - - // invoke the operation - string adaptiveNetworkHardeningResourceName = "default"; - AdaptiveNetworkHardeningResource result = await collection.GetAsync(adaptiveNetworkHardeningResourceName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - AdaptiveNetworkHardeningData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get a single Adaptive Network Hardening resource - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetASingleAdaptiveNetworkHardeningResource() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AdaptiveNetworkHardenings/GetAdaptiveNetworkHardening_example.json - // this example is just showing the usage of "AdaptiveNetworkHardenings_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "20ff7fc3-e762-44dd-bd96-b71116dcdc23"; - string resourceGroupName = "rg1"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this AdaptiveNetworkHardeningResource - string resourceNamespace = "Microsoft.Compute"; - string resourceType = "virtualMachines"; - string resourceName = "vm1"; - AdaptiveNetworkHardeningCollection collection = resourceGroupResource.GetAdaptiveNetworkHardenings(resourceNamespace, resourceType, resourceName); - - // invoke the operation - string adaptiveNetworkHardeningResourceName = "default"; - bool result = await collection.ExistsAsync(adaptiveNetworkHardeningResourceName); - - Console.WriteLine($"Succeeded: {result}"); - } - - // Get a single Adaptive Network Hardening resource - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetASingleAdaptiveNetworkHardeningResource() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AdaptiveNetworkHardenings/GetAdaptiveNetworkHardening_example.json - // this example is just showing the usage of "AdaptiveNetworkHardenings_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "20ff7fc3-e762-44dd-bd96-b71116dcdc23"; - string resourceGroupName = "rg1"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this AdaptiveNetworkHardeningResource - string resourceNamespace = "Microsoft.Compute"; - string resourceType = "virtualMachines"; - string resourceName = "vm1"; - AdaptiveNetworkHardeningCollection collection = resourceGroupResource.GetAdaptiveNetworkHardenings(resourceNamespace, resourceType, resourceName); - - // invoke the operation - string adaptiveNetworkHardeningResourceName = "default"; - NullableResponse response = await collection.GetIfExistsAsync(adaptiveNetworkHardeningResourceName); - AdaptiveNetworkHardeningResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine($"Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - AdaptiveNetworkHardeningData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_AdaptiveNetworkHardeningResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_AdaptiveNetworkHardeningResource.cs deleted file mode 100644 index 33cdf1dc3b10..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_AdaptiveNetworkHardeningResource.cs +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.SecurityCenter.Models; - -namespace Azure.ResourceManager.SecurityCenter.Samples -{ - public partial class Sample_AdaptiveNetworkHardeningResource - { - // Get a single Adaptive Network Hardening resource - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetASingleAdaptiveNetworkHardeningResource() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AdaptiveNetworkHardenings/GetAdaptiveNetworkHardening_example.json - // this example is just showing the usage of "AdaptiveNetworkHardenings_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this AdaptiveNetworkHardeningResource created on azure - // for more information of creating AdaptiveNetworkHardeningResource, please refer to the document of AdaptiveNetworkHardeningResource - string subscriptionId = "20ff7fc3-e762-44dd-bd96-b71116dcdc23"; - string resourceGroupName = "rg1"; - string resourceNamespace = "Microsoft.Compute"; - string resourceType = "virtualMachines"; - string resourceName = "vm1"; - string adaptiveNetworkHardeningResourceName = "default"; - ResourceIdentifier adaptiveNetworkHardeningResourceId = AdaptiveNetworkHardeningResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceNamespace, resourceType, resourceName, adaptiveNetworkHardeningResourceName); - AdaptiveNetworkHardeningResource adaptiveNetworkHardening = client.GetAdaptiveNetworkHardeningResource(adaptiveNetworkHardeningResourceId); - - // invoke the operation - AdaptiveNetworkHardeningResource result = await adaptiveNetworkHardening.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - AdaptiveNetworkHardeningData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Enforces the given rules on the NSG(s) listed in the request - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Enforce_EnforcesTheGivenRulesOnTheNSGSListedInTheRequest() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AdaptiveNetworkHardenings/EnforceAdaptiveNetworkHardeningRules_example.json - // this example is just showing the usage of "AdaptiveNetworkHardenings_Enforce" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this AdaptiveNetworkHardeningResource created on azure - // for more information of creating AdaptiveNetworkHardeningResource, please refer to the document of AdaptiveNetworkHardeningResource - string subscriptionId = "20ff7fc3-e762-44dd-bd96-b71116dcdc23"; - string resourceGroupName = "rg1"; - string resourceNamespace = "Microsoft.Compute"; - string resourceType = "virtualMachines"; - string resourceName = "vm1"; - string adaptiveNetworkHardeningResourceName = "default"; - ResourceIdentifier adaptiveNetworkHardeningResourceId = AdaptiveNetworkHardeningResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceNamespace, resourceType, resourceName, adaptiveNetworkHardeningResourceName); - AdaptiveNetworkHardeningResource adaptiveNetworkHardening = client.GetAdaptiveNetworkHardeningResource(adaptiveNetworkHardeningResourceId); - - // invoke the operation - AdaptiveNetworkHardeningEnforceContent content = new AdaptiveNetworkHardeningEnforceContent(new RecommendedSecurityRule[] - { -new RecommendedSecurityRule() -{ -Name = "rule1", -Direction = SecurityTrafficDirection.Inbound, -DestinationPort = 3389, -Protocols = -{ -SecurityTransportProtocol.Tcp -}, -IPAddresses = -{ -"100.10.1.1","200.20.2.2","81.199.3.0/24" -}, -},new RecommendedSecurityRule() -{ -Name = "rule2", -Direction = SecurityTrafficDirection.Inbound, -DestinationPort = 22, -Protocols = -{ -SecurityTransportProtocol.Tcp -}, -IPAddresses = -{ -}, -} - }, new string[] - { -"/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1","/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg2/providers/Microsoft.Network/networkSecurityGroups/nsg2" - }); - await adaptiveNetworkHardening.EnforceAsync(WaitUntil.Completed, content); - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_CustomAssessmentAutomationCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_CustomAssessmentAutomationCollection.cs deleted file mode 100644 index 79635d7a6ade..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_CustomAssessmentAutomationCollection.cs +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.Resources; -using Azure.ResourceManager.SecurityCenter.Models; - -namespace Azure.ResourceManager.SecurityCenter.Samples -{ - public partial class Sample_CustomAssessmentAutomationCollection - { - // Get a Custom Assessment Automation - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetACustomAssessmentAutomation() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomAssessmentAutomations/customAssessmentAutomationGet_example.json - // this example is just showing the usage of "CustomAssessmentAutomations_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "e5d1b86c-3051-44d5-8802-aa65d45a279b"; - string resourceGroupName = "TestResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this CustomAssessmentAutomationResource - CustomAssessmentAutomationCollection collection = resourceGroupResource.GetCustomAssessmentAutomations(); - - // invoke the operation - string customAssessmentAutomationName = "MyCustomAssessmentAutomation"; - CustomAssessmentAutomationResource result = await collection.GetAsync(customAssessmentAutomationName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - CustomAssessmentAutomationData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get a Custom Assessment Automation - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetACustomAssessmentAutomation() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomAssessmentAutomations/customAssessmentAutomationGet_example.json - // this example is just showing the usage of "CustomAssessmentAutomations_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "e5d1b86c-3051-44d5-8802-aa65d45a279b"; - string resourceGroupName = "TestResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this CustomAssessmentAutomationResource - CustomAssessmentAutomationCollection collection = resourceGroupResource.GetCustomAssessmentAutomations(); - - // invoke the operation - string customAssessmentAutomationName = "MyCustomAssessmentAutomation"; - bool result = await collection.ExistsAsync(customAssessmentAutomationName); - - Console.WriteLine($"Succeeded: {result}"); - } - - // Get a Custom Assessment Automation - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetACustomAssessmentAutomation() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomAssessmentAutomations/customAssessmentAutomationGet_example.json - // this example is just showing the usage of "CustomAssessmentAutomations_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "e5d1b86c-3051-44d5-8802-aa65d45a279b"; - string resourceGroupName = "TestResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this CustomAssessmentAutomationResource - CustomAssessmentAutomationCollection collection = resourceGroupResource.GetCustomAssessmentAutomations(); - - // invoke the operation - string customAssessmentAutomationName = "MyCustomAssessmentAutomation"; - NullableResponse response = await collection.GetIfExistsAsync(customAssessmentAutomationName); - CustomAssessmentAutomationResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine($"Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - CustomAssessmentAutomationData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - - // Create a Custom Assessment Automation - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateACustomAssessmentAutomation() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomAssessmentAutomations/customAssessmentAutomationCreate_example.json - // this example is just showing the usage of "CustomAssessmentAutomations_Create" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "e5d1b86c-3051-44d5-8802-aa65d45a279b"; - string resourceGroupName = "TestResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this CustomAssessmentAutomationResource - CustomAssessmentAutomationCollection collection = resourceGroupResource.GetCustomAssessmentAutomations(); - - // invoke the operation - string customAssessmentAutomationName = "MyCustomAssessmentAutomation"; - CustomAssessmentAutomationCreateOrUpdateContent content = new CustomAssessmentAutomationCreateOrUpdateContent() - { - CompressedQuery = "DQAKAEkAYQBtAF8ARwByAG8AdQBwAA0ACgB8ACAAZQB4AHQAZQBuAGQAIABIAGUAYQBsAHQAaABTAHQAYQB0AHUAcwAgAD0AIABpAGYAZgAoAHQAbwBzAHQAcgBpAG4AZwAoAFIAZQBjAG8AcgBkAC4AVQBzAGUAcgBOAGEAbQBlACkAIABjAG8AbgB0AGEAaQBuAHMAIAAnAHUAcwBlAHIAJwAsACAAJwBVAE4ASABFAEEATABUAEgAWQAnACwAIAAnAEgARQBBAEwAVABIAFkAJwApAA0ACgA=", - SupportedCloud = CustomAssessmentAutomationSupportedCloud.Aws, - Severity = CustomAssessmentSeverity.Medium, - DisplayName = "Password Policy", - Description = "Data should be encrypted", - RemediationDescription = "Encrypt store by...", - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, customAssessmentAutomationName, content); - CustomAssessmentAutomationResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - CustomAssessmentAutomationData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // List Custom Assessment Automations in a subscription and a resource group - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListCustomAssessmentAutomationsInASubscriptionAndAResourceGroup() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomAssessmentAutomations/customAssessmentAutomationListByResourceGroup_example.json - // this example is just showing the usage of "CustomAssessmentAutomations_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "e5d1b86c-3051-44d5-8802-aa65d45a279b"; - string resourceGroupName = "TestResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this CustomAssessmentAutomationResource - CustomAssessmentAutomationCollection collection = resourceGroupResource.GetCustomAssessmentAutomations(); - - // invoke the operation and iterate over the result - await foreach (CustomAssessmentAutomationResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - CustomAssessmentAutomationData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_CustomAssessmentAutomationResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_CustomAssessmentAutomationResource.cs deleted file mode 100644 index e5a06789977e..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_CustomAssessmentAutomationResource.cs +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.Resources; -using Azure.ResourceManager.SecurityCenter.Models; - -namespace Azure.ResourceManager.SecurityCenter.Samples -{ - public partial class Sample_CustomAssessmentAutomationResource - { - // Get a Custom Assessment Automation - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetACustomAssessmentAutomation() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomAssessmentAutomations/customAssessmentAutomationGet_example.json - // this example is just showing the usage of "CustomAssessmentAutomations_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this CustomAssessmentAutomationResource created on azure - // for more information of creating CustomAssessmentAutomationResource, please refer to the document of CustomAssessmentAutomationResource - string subscriptionId = "e5d1b86c-3051-44d5-8802-aa65d45a279b"; - string resourceGroupName = "TestResourceGroup"; - string customAssessmentAutomationName = "MyCustomAssessmentAutomation"; - ResourceIdentifier customAssessmentAutomationResourceId = CustomAssessmentAutomationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, customAssessmentAutomationName); - CustomAssessmentAutomationResource customAssessmentAutomation = client.GetCustomAssessmentAutomationResource(customAssessmentAutomationResourceId); - - // invoke the operation - CustomAssessmentAutomationResource result = await customAssessmentAutomation.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - CustomAssessmentAutomationData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Create a Custom Assessment Automation - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateACustomAssessmentAutomation() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomAssessmentAutomations/customAssessmentAutomationCreate_example.json - // this example is just showing the usage of "CustomAssessmentAutomations_Create" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this CustomAssessmentAutomationResource created on azure - // for more information of creating CustomAssessmentAutomationResource, please refer to the document of CustomAssessmentAutomationResource - string subscriptionId = "e5d1b86c-3051-44d5-8802-aa65d45a279b"; - string resourceGroupName = "TestResourceGroup"; - string customAssessmentAutomationName = "MyCustomAssessmentAutomation"; - ResourceIdentifier customAssessmentAutomationResourceId = CustomAssessmentAutomationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, customAssessmentAutomationName); - CustomAssessmentAutomationResource customAssessmentAutomation = client.GetCustomAssessmentAutomationResource(customAssessmentAutomationResourceId); - - // invoke the operation - CustomAssessmentAutomationCreateOrUpdateContent content = new CustomAssessmentAutomationCreateOrUpdateContent() - { - CompressedQuery = "DQAKAEkAYQBtAF8ARwByAG8AdQBwAA0ACgB8ACAAZQB4AHQAZQBuAGQAIABIAGUAYQBsAHQAaABTAHQAYQB0AHUAcwAgAD0AIABpAGYAZgAoAHQAbwBzAHQAcgBpAG4AZwAoAFIAZQBjAG8AcgBkAC4AVQBzAGUAcgBOAGEAbQBlACkAIABjAG8AbgB0AGEAaQBuAHMAIAAnAHUAcwBlAHIAJwAsACAAJwBVAE4ASABFAEEATABUAEgAWQAnACwAIAAnAEgARQBBAEwAVABIAFkAJwApAA0ACgA=", - SupportedCloud = CustomAssessmentAutomationSupportedCloud.Aws, - Severity = CustomAssessmentSeverity.Medium, - DisplayName = "Password Policy", - Description = "Data should be encrypted", - RemediationDescription = "Encrypt store by...", - }; - ArmOperation lro = await customAssessmentAutomation.UpdateAsync(WaitUntil.Completed, content); - CustomAssessmentAutomationResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - CustomAssessmentAutomationData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Delete a Custom Assessment Automation - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteACustomAssessmentAutomation() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomAssessmentAutomations/customAssessmentAutomationDelete_example.json - // this example is just showing the usage of "CustomAssessmentAutomations_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this CustomAssessmentAutomationResource created on azure - // for more information of creating CustomAssessmentAutomationResource, please refer to the document of CustomAssessmentAutomationResource - string subscriptionId = "e5d1b86c-3051-44d5-8802-aa65d45a279b"; - string resourceGroupName = "TestResourceGroup"; - string customAssessmentAutomationName = "MyCustomAssessmentAutomation"; - ResourceIdentifier customAssessmentAutomationResourceId = CustomAssessmentAutomationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, customAssessmentAutomationName); - CustomAssessmentAutomationResource customAssessmentAutomation = client.GetCustomAssessmentAutomationResource(customAssessmentAutomationResourceId); - - // invoke the operation - await customAssessmentAutomation.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - - // List Custom Assessment Automations in a subscription - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetCustomAssessmentAutomations_ListCustomAssessmentAutomationsInASubscription() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomAssessmentAutomations/customAssessmentAutomationListBySubscription_example.json - // this example is just showing the usage of "CustomAssessmentAutomations_ListBySubscription" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "e5d1b86c-3051-44d5-8802-aa65d45a279b"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (CustomAssessmentAutomationResource item in subscriptionResource.GetCustomAssessmentAutomationsAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - CustomAssessmentAutomationData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_CustomEntityStoreAssignmentCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_CustomEntityStoreAssignmentCollection.cs deleted file mode 100644 index 74cea7669102..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_CustomEntityStoreAssignmentCollection.cs +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.Resources; -using Azure.ResourceManager.SecurityCenter.Models; - -namespace Azure.ResourceManager.SecurityCenter.Samples -{ - public partial class Sample_CustomEntityStoreAssignmentCollection - { - // Get a custom entity store assignment - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetACustomEntityStoreAssignment() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentGet_example.json - // this example is just showing the usage of "CustomEntityStoreAssignments_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "e5d1b86c-3051-44d5-8802-aa65d45a279b"; - string resourceGroupName = "TestResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this CustomEntityStoreAssignmentResource - CustomEntityStoreAssignmentCollection collection = resourceGroupResource.GetCustomEntityStoreAssignments(); - - // invoke the operation - string customEntityStoreAssignmentName = "33e7cc6e-a139-4723-a0e5-76993aee0771"; - CustomEntityStoreAssignmentResource result = await collection.GetAsync(customEntityStoreAssignmentName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - CustomEntityStoreAssignmentData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get a custom entity store assignment - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetACustomEntityStoreAssignment() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentGet_example.json - // this example is just showing the usage of "CustomEntityStoreAssignments_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "e5d1b86c-3051-44d5-8802-aa65d45a279b"; - string resourceGroupName = "TestResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this CustomEntityStoreAssignmentResource - CustomEntityStoreAssignmentCollection collection = resourceGroupResource.GetCustomEntityStoreAssignments(); - - // invoke the operation - string customEntityStoreAssignmentName = "33e7cc6e-a139-4723-a0e5-76993aee0771"; - bool result = await collection.ExistsAsync(customEntityStoreAssignmentName); - - Console.WriteLine($"Succeeded: {result}"); - } - - // Get a custom entity store assignment - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetACustomEntityStoreAssignment() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentGet_example.json - // this example is just showing the usage of "CustomEntityStoreAssignments_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "e5d1b86c-3051-44d5-8802-aa65d45a279b"; - string resourceGroupName = "TestResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this CustomEntityStoreAssignmentResource - CustomEntityStoreAssignmentCollection collection = resourceGroupResource.GetCustomEntityStoreAssignments(); - - // invoke the operation - string customEntityStoreAssignmentName = "33e7cc6e-a139-4723-a0e5-76993aee0771"; - NullableResponse response = await collection.GetIfExistsAsync(customEntityStoreAssignmentName); - CustomEntityStoreAssignmentResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine($"Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - CustomEntityStoreAssignmentData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - - // Create a custom entity store assignment - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateACustomEntityStoreAssignment() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentCreate_example.json - // this example is just showing the usage of "CustomEntityStoreAssignments_Create" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "e5d1b86c-3051-44d5-8802-aa65d45a279b"; - string resourceGroupName = "TestResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this CustomEntityStoreAssignmentResource - CustomEntityStoreAssignmentCollection collection = resourceGroupResource.GetCustomEntityStoreAssignments(); - - // invoke the operation - string customEntityStoreAssignmentName = "33e7cc6e-a139-4723-a0e5-76993aee0771"; - CustomEntityStoreAssignmentCreateOrUpdateContent content = new CustomEntityStoreAssignmentCreateOrUpdateContent() - { - Principal = "aaduser=f3923a3e-ad57-4752-b1a9-fbf3c8e5e082;72f988bf-86f1-41af-91ab-2d7cd011db47", - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, customEntityStoreAssignmentName, content); - CustomEntityStoreAssignmentResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - CustomEntityStoreAssignmentData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // List custom entity store assignments in a subscription and a resource group - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListCustomEntityStoreAssignmentsInASubscriptionAndAResourceGroup() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentListByResourceGroup_example.json - // this example is just showing the usage of "CustomEntityStoreAssignments_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "e5d1b86c-3051-44d5-8802-aa65d45a279b"; - string resourceGroupName = "TestResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this CustomEntityStoreAssignmentResource - CustomEntityStoreAssignmentCollection collection = resourceGroupResource.GetCustomEntityStoreAssignments(); - - // invoke the operation and iterate over the result - await foreach (CustomEntityStoreAssignmentResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - CustomEntityStoreAssignmentData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_CustomEntityStoreAssignmentResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_CustomEntityStoreAssignmentResource.cs deleted file mode 100644 index 09f19b472620..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_CustomEntityStoreAssignmentResource.cs +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.Resources; -using Azure.ResourceManager.SecurityCenter.Models; - -namespace Azure.ResourceManager.SecurityCenter.Samples -{ - public partial class Sample_CustomEntityStoreAssignmentResource - { - // Get a custom entity store assignment - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetACustomEntityStoreAssignment() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentGet_example.json - // this example is just showing the usage of "CustomEntityStoreAssignments_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this CustomEntityStoreAssignmentResource created on azure - // for more information of creating CustomEntityStoreAssignmentResource, please refer to the document of CustomEntityStoreAssignmentResource - string subscriptionId = "e5d1b86c-3051-44d5-8802-aa65d45a279b"; - string resourceGroupName = "TestResourceGroup"; - string customEntityStoreAssignmentName = "33e7cc6e-a139-4723-a0e5-76993aee0771"; - ResourceIdentifier customEntityStoreAssignmentResourceId = CustomEntityStoreAssignmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, customEntityStoreAssignmentName); - CustomEntityStoreAssignmentResource customEntityStoreAssignment = client.GetCustomEntityStoreAssignmentResource(customEntityStoreAssignmentResourceId); - - // invoke the operation - CustomEntityStoreAssignmentResource result = await customEntityStoreAssignment.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - CustomEntityStoreAssignmentData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Create a custom entity store assignment - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateACustomEntityStoreAssignment() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentCreate_example.json - // this example is just showing the usage of "CustomEntityStoreAssignments_Create" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this CustomEntityStoreAssignmentResource created on azure - // for more information of creating CustomEntityStoreAssignmentResource, please refer to the document of CustomEntityStoreAssignmentResource - string subscriptionId = "e5d1b86c-3051-44d5-8802-aa65d45a279b"; - string resourceGroupName = "TestResourceGroup"; - string customEntityStoreAssignmentName = "33e7cc6e-a139-4723-a0e5-76993aee0771"; - ResourceIdentifier customEntityStoreAssignmentResourceId = CustomEntityStoreAssignmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, customEntityStoreAssignmentName); - CustomEntityStoreAssignmentResource customEntityStoreAssignment = client.GetCustomEntityStoreAssignmentResource(customEntityStoreAssignmentResourceId); - - // invoke the operation - CustomEntityStoreAssignmentCreateOrUpdateContent content = new CustomEntityStoreAssignmentCreateOrUpdateContent() - { - Principal = "aaduser=f3923a3e-ad57-4752-b1a9-fbf3c8e5e082;72f988bf-86f1-41af-91ab-2d7cd011db47", - }; - ArmOperation lro = await customEntityStoreAssignment.UpdateAsync(WaitUntil.Completed, content); - CustomEntityStoreAssignmentResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - CustomEntityStoreAssignmentData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Delete a custom entity store assignment - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteACustomEntityStoreAssignment() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentDelete_example.json - // this example is just showing the usage of "CustomEntityStoreAssignments_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this CustomEntityStoreAssignmentResource created on azure - // for more information of creating CustomEntityStoreAssignmentResource, please refer to the document of CustomEntityStoreAssignmentResource - string subscriptionId = "e5d1b86c-3051-44d5-8802-aa65d45a279b"; - string resourceGroupName = "TestResourceGroup"; - string customEntityStoreAssignmentName = "33e7cc6e-a139-4723-a0e5-76993aee0771"; - ResourceIdentifier customEntityStoreAssignmentResourceId = CustomEntityStoreAssignmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, customEntityStoreAssignmentName); - CustomEntityStoreAssignmentResource customEntityStoreAssignment = client.GetCustomEntityStoreAssignmentResource(customEntityStoreAssignmentResourceId); - - // invoke the operation - await customEntityStoreAssignment.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - - // List custom entity store assignments in a subscription - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetCustomEntityStoreAssignments_ListCustomEntityStoreAssignmentsInASubscription() - { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2021-07-01-preview/examples/CustomEntityStoreAssignments/customEntityStoreAssignmentListBySubscription_example.json - // this example is just showing the usage of "CustomEntityStoreAssignments_ListBySubscription" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "e5d1b86c-3051-44d5-8802-aa65d45a279b"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (CustomEntityStoreAssignmentResource item in subscriptionResource.GetCustomEntityStoreAssignmentsAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - CustomEntityStoreAssignmentData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DefenderForStorageSettingCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DefenderForStorageSettingCollection.cs index f3fdd1b02138..192b1901c5a0 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DefenderForStorageSettingCollection.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DefenderForStorageSettingCollection.cs @@ -140,12 +140,24 @@ public async Task CreateOrUpdate_CreatesOrUpdatesTheDefenderForStorageSettingsOn DefenderForStorageSettingName settingName = DefenderForStorageSettingName.Current; DefenderForStorageSettingData data = new DefenderForStorageSettingData() { - IsEnabled = true, - IsOverrideSubscriptionLevelSettingsEnabled = true, - IsSensitiveDataDiscoveryEnabled = true, - ScanResultsEventGridTopicResourceId = new ResourceIdentifier("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.EventGrid/topics/sampletopic"), - IsMalwareScanningOnUploadEnabled = true, - CapGBPerMonth = -1, + Properties = new DefenderForStorageSettingProperties() + { + IsEnabled = true, + MalwareScanning = new MalwareScanningProperties() + { + OnUpload = new OnUploadProperties() + { + IsEnabled = true, + CapGBPerMonth = -1, + }, + ScanResultsEventGridTopicResourceId = new ResourceIdentifier("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.EventGrid/topics/sampletopic"), + }, + SensitiveDataDiscovery = new SensitiveDataDiscoveryProperties() + { + IsEnabled = true, + }, + OverrideSubscriptionLevelSettings = true, + }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, settingName, data); DefenderForStorageSettingResource result = lro.Value; diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DefenderForStorageSettingResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DefenderForStorageSettingResource.cs index a72977a3f78e..01fb2f9faf56 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DefenderForStorageSettingResource.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DefenderForStorageSettingResource.cs @@ -70,12 +70,24 @@ public async Task Update_CreatesOrUpdatesTheDefenderForStorageSettingsOnASpecifi DefenderForStorageSettingName settingName0 = DefenderForStorageSettingName.Current; DefenderForStorageSettingData data = new DefenderForStorageSettingData() { - IsEnabled = true, - IsOverrideSubscriptionLevelSettingsEnabled = true, - IsSensitiveDataDiscoveryEnabled = true, - ScanResultsEventGridTopicResourceId = new ResourceIdentifier("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.EventGrid/topics/sampletopic"), - IsMalwareScanningOnUploadEnabled = true, - CapGBPerMonth = -1, + Properties = new DefenderForStorageSettingProperties() + { + IsEnabled = true, + MalwareScanning = new MalwareScanningProperties() + { + OnUpload = new OnUploadProperties() + { + IsEnabled = true, + CapGBPerMonth = -1, + }, + ScanResultsEventGridTopicResourceId = new ResourceIdentifier("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/SampleRG/providers/Microsoft.EventGrid/topics/sampletopic"), + }, + SensitiveDataDiscovery = new SensitiveDataDiscoveryProperties() + { + IsEnabled = true, + }, + OverrideSubscriptionLevelSettings = true, + }, }; ArmOperation lro = await defenderForStorageSetting.UpdateAsync(WaitUntil.Completed, settingName0, data); DefenderForStorageSettingResource result = lro.Value; diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsConfigurationResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsConfigurationResource.cs index 3675bf5eab19..f04763c81e98 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsConfigurationResource.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsConfigurationResource.cs @@ -21,7 +21,7 @@ public partial class Sample_DevOpsConfigurationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAvailableDevOpsOrgs_ListAvailableAzureDevOpsOrgs() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/ListAvailableAzureDevOpsOrgs_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/ListAvailableAzureDevOpsOrgs_example.json // this example is just showing the usage of "AzureDevOpsOrgs_ListAvailable" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,38 @@ public async Task GetAvailableDevOpsOrgs_ListAvailableAzureDevOpsOrgs() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDevOpsConfigurations() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetDevOpsConfigurations_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetDevOpsConfigurations_example.json + // this example is just showing the usage of "DevOpsConfigurations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DevOpsConfigurationResource created on azure + // for more information of creating DevOpsConfigurationResource, please refer to the document of DevOpsConfigurationResource + string subscriptionId = "0806e1cd-cfda-4ff8-b99c-2b0af42cffd3"; + string resourceGroupName = "myRg"; + string securityConnectorName = "mySecurityConnectorName"; + ResourceIdentifier devOpsConfigurationResourceId = DevOpsConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, securityConnectorName); + DevOpsConfigurationResource devOpsConfiguration = client.GetDevOpsConfigurationResource(devOpsConfigurationResourceId); + + // invoke the operation + DevOpsConfigurationResource result = await devOpsConfiguration.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DevOpsConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get_DevOpsConfigurations_WithCapabilities + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetDevOpsConfigurationsWithCapabilities() + { + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetDevOpsConfigurationsWithCapabilities_example.json // this example is just showing the usage of "DevOpsConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +117,7 @@ public async Task Get_GetDevOpsConfigurations() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateDevOpsConfigurationsOnboardCurrentAndFuture() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardCurrentAndFuture_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardCurrentAndFuture_example.json // this example is just showing the usage of "DevOpsConfigurations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +157,7 @@ public async Task CreateOrUpdate_CreateOrUpdateDevOpsConfigurationsOnboardCurren [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateDevOpsConfigurationsOnboardCurrentOnly() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardCurrentOnly_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardCurrentOnly_example.json // this example is just showing the usage of "DevOpsConfigurations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +197,7 @@ public async Task CreateOrUpdate_CreateOrUpdateDevOpsConfigurationsOnboardCurren [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateDevOpsConfigurationsOnboardSelected() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardSelected_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/CreateOrUpdateDevOpsConfigurationsOnboardSelected_example.json // this example is just showing the usage of "DevOpsConfigurations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -210,7 +241,7 @@ public async Task CreateOrUpdate_CreateOrUpdateDevOpsConfigurationsOnboardSelect [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateDevOpsConfigurations() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/UpdateDevOpsConfigurations_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/UpdateDevOpsConfigurations_example.json // this example is just showing the usage of "DevOpsConfigurations_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -249,7 +280,7 @@ public async Task Update_UpdateDevOpsConfigurations() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteDevOpsConfigurations() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/DeleteDevOpsConfigurations_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/DeleteDevOpsConfigurations_example.json // this example is just showing the usage of "DevOpsConfigurations_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -276,7 +307,7 @@ public async Task Delete_DeleteDevOpsConfigurations() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAvailableGitHubOwners_ListAvailableGitHubOwners() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/ListAvailableGitHubOwners_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/ListAvailableGitHubOwners_example.json // this example is just showing the usage of "GitHubOwners_ListAvailable" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -310,7 +341,7 @@ public async Task GetAvailableGitHubOwners_ListAvailableGitHubOwners() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAvailableGitLabGroups_ListAvailableGitLabGroups() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/ListAvailableGitLabGroups_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/ListAvailableGitLabGroups_example.json // this example is just showing the usage of "GitLabGroups_ListAvailable" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -344,7 +375,7 @@ public async Task GetAvailableGitLabGroups_ListAvailableGitLabGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetDevOpsOperationResult_GetDevOpsOperationResultsFailed() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetDevOpsOperationResultsFailed_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetDevOpsOperationResultsFailed_example.json // this example is just showing the usage of "DevOpsOperationResults_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -372,7 +403,7 @@ public async Task GetDevOpsOperationResult_GetDevOpsOperationResultsFailed() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetDevOpsOperationResult_GetDevOpsOperationResultsSucceeded() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetDevOpsOperationResultsSucceeded_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetDevOpsOperationResultsSucceeded_example.json // this example is just showing the usage of "DevOpsOperationResults_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsOrgCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsOrgCollection.cs index 10ddf557c350..11df1242378c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsOrgCollection.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsOrgCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_DevOpsOrgCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAzureDevOpsOrgs() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/ListAzureDevOpsOrgs_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/ListAzureDevOpsOrgs_example.json // this example is just showing the usage of "AzureDevOpsOrgs_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListAzureDevOpsOrgs() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureDevOpsOrgs() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsOrgs_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetAzureDevOpsOrgs_example.json // this example is just showing the usage of "AzureDevOpsOrgs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_GetAzureDevOpsOrgs() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAzureDevOpsOrgs() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsOrgs_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetAzureDevOpsOrgs_example.json // this example is just showing the usage of "AzureDevOpsOrgs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_GetAzureDevOpsOrgs() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAzureDevOpsOrgs() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsOrgs_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetAzureDevOpsOrgs_example.json // this example is just showing the usage of "AzureDevOpsOrgs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_GetAzureDevOpsOrgs() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateAzureDevOpsOrgs() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsOrgs_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsOrgs_example.json // this example is just showing the usage of "AzureDevOpsOrgs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsOrgResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsOrgResource.cs index f1ba8819db36..c5bff2d23d8c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsOrgResource.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsOrgResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DevOpsOrgResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureDevOpsOrgs() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsOrgs_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetAzureDevOpsOrgs_example.json // this example is just showing the usage of "AzureDevOpsOrgs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetAzureDevOpsOrgs() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAzureDevOpsOrgs() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/UpdateAzureDevOpsOrgs_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/UpdateAzureDevOpsOrgs_example.json // this example is just showing the usage of "AzureDevOpsOrgs_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsProjectCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsProjectCollection.cs index 2a9f75b0d2bf..04abead46163 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsProjectCollection.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsProjectCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_DevOpsProjectCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAzureDevOpsProjects() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/ListAzureDevOpsProjects_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/ListAzureDevOpsProjects_example.json // this example is just showing the usage of "AzureDevOpsProjects_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_ListAzureDevOpsProjects() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureDevOpsProjects() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsProjects_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetAzureDevOpsProjects_example.json // this example is just showing the usage of "AzureDevOpsProjects_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task Get_GetAzureDevOpsProjects() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAzureDevOpsProjects() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsProjects_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetAzureDevOpsProjects_example.json // this example is just showing the usage of "AzureDevOpsProjects_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_GetAzureDevOpsProjects() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAzureDevOpsProjects() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsProjects_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetAzureDevOpsProjects_example.json // this example is just showing the usage of "AzureDevOpsProjects_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task GetIfExists_GetAzureDevOpsProjects() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateAzureDevOpsProjects() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsProjects_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsProjects_example.json // this example is just showing the usage of "AzureDevOpsProjects_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsProjectResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsProjectResource.cs index 5aa9f9d5c5cd..a7621a509b0d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsProjectResource.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsProjectResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DevOpsProjectResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureDevOpsProjects() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsProjects_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetAzureDevOpsProjects_example.json // this example is just showing the usage of "AzureDevOpsProjects_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_GetAzureDevOpsProjects() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAzureDevOpsProjects() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/UpdateAzureDevOpsProjects_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/UpdateAzureDevOpsProjects_example.json // this example is just showing the usage of "AzureDevOpsProjects_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsRepositoryCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsRepositoryCollection.cs index 9d5dd779aef6..9921b0f2e5b9 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsRepositoryCollection.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsRepositoryCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_DevOpsRepositoryCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAzureDevOpsRepos() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/ListAzureDevOpsRepos_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/ListAzureDevOpsRepos_example.json // this example is just showing the usage of "AzureDevOpsRepos_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task GetAll_ListAzureDevOpsRepos() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureDevOpsRepos() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsRepos_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetAzureDevOpsRepos_example.json // this example is just showing the usage of "AzureDevOpsRepos_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +96,7 @@ public async Task Get_GetAzureDevOpsRepos() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAzureDevOpsRepos() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsRepos_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetAzureDevOpsRepos_example.json // this example is just showing the usage of "AzureDevOpsRepos_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task Exists_GetAzureDevOpsRepos() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAzureDevOpsRepos() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsRepos_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetAzureDevOpsRepos_example.json // this example is just showing the usage of "AzureDevOpsRepos_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task GetIfExists_GetAzureDevOpsRepos() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateAzureDevOpsRepos() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsRepos_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/CreateOrUpdateAzureDevOpsRepos_example.json // this example is just showing the usage of "AzureDevOpsRepos_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsRepositoryResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsRepositoryResource.cs index 000b2ee12a64..dbc4e3a55a00 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsRepositoryResource.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_DevOpsRepositoryResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DevOpsRepositoryResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureDevOpsRepos() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetAzureDevOpsRepos_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetAzureDevOpsRepos_example.json // this example is just showing the usage of "AzureDevOpsRepos_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetAzureDevOpsRepos() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAzureDevOpsRepos() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/UpdateAzureDevOpsRepos_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/UpdateAzureDevOpsRepos_example.json // this example is just showing the usage of "AzureDevOpsRepos_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityCloudConnectorCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityCloudConnectorCollection.cs index 645e8afc5b50..dfff3dbc2b6a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityCloudConnectorCollection.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityCloudConnectorCollection.cs @@ -248,7 +248,7 @@ public async Task CreateOrUpdate_AwsCredCreateACloudAccountConnectorForASubscrip Secret = "", }, }, - AuthenticationDetails = new AwsCredsAuthenticationDetailsProperties("AKIARPZCNODDNAEQFSOE", ""), + AuthenticationDetails = new AwsCredsAuthenticationDetailsProperties("", ""), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, connectorName, data); SecurityCloudConnectorResource result = lro.Value; diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityCloudConnectorResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityCloudConnectorResource.cs index fbc5bbcdb179..28852d4c0668 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityCloudConnectorResource.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityCloudConnectorResource.cs @@ -133,7 +133,7 @@ public async Task Update_AwsCredCreateACloudAccountConnectorForASubscription() Secret = "", }, }, - AuthenticationDetails = new AwsCredsAuthenticationDetailsProperties("AKIARPZCNODDNAEQFSOE", ""), + AuthenticationDetails = new AwsCredsAuthenticationDetailsProperties("", ""), }; ArmOperation lro = await securityCloudConnector.UpdateAsync(WaitUntil.Completed, data); SecurityCloudConnectorResource result = lro.Value; diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitHubOwnerCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitHubOwnerCollection.cs index 0e36c59f5d6f..0863a311ab8c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitHubOwnerCollection.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitHubOwnerCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SecurityConnectorGitHubOwnerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListGitHubOwners() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/ListGitHubOwners_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/ListGitHubOwners_example.json // this example is just showing the usage of "GitHubOwners_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListGitHubOwners() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetGitHubOwners() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetGitHubOwners_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetGitHubOwners_example.json // this example is just showing the usage of "GitHubOwners_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetGitHubOwners() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetGitHubOwners() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetGitHubOwners_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetGitHubOwners_example.json // this example is just showing the usage of "GitHubOwners_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_GetGitHubOwners() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetGitHubOwners() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetGitHubOwners_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetGitHubOwners_example.json // this example is just showing the usage of "GitHubOwners_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitHubOwnerResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitHubOwnerResource.cs index d9e0e41fc05d..4276d52215e0 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitHubOwnerResource.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitHubOwnerResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SecurityConnectorGitHubOwnerResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetGitHubOwners() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetGitHubOwners_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetGitHubOwners_example.json // this example is just showing the usage of "GitHubOwners_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitHubRepositoryCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitHubRepositoryCollection.cs index 69f931cde7db..4be3cd7eee01 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitHubRepositoryCollection.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitHubRepositoryCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SecurityConnectorGitHubRepositoryCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListGitHubRepos() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/ListGitHubRepos_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/ListGitHubRepos_example.json // this example is just showing the usage of "GitHubRepos_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListGitHubRepos() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetGitHubRepos() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetGitHubRepos_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetGitHubRepos_example.json // this example is just showing the usage of "GitHubRepos_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_GetGitHubRepos() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetGitHubRepos() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetGitHubRepos_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetGitHubRepos_example.json // this example is just showing the usage of "GitHubRepos_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Exists_GetGitHubRepos() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetGitHubRepos() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetGitHubRepos_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetGitHubRepos_example.json // this example is just showing the usage of "GitHubRepos_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitHubRepositoryResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitHubRepositoryResource.cs index ec3115cb617f..1a0dc20c9d18 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitHubRepositoryResource.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitHubRepositoryResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SecurityConnectorGitHubRepositoryResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetGitHubRepos() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetGitHubRepos_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetGitHubRepos_example.json // this example is just showing the usage of "GitHubRepos_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitLabGroupCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitLabGroupCollection.cs index 6fadce716e6a..d77c69b18d6c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitLabGroupCollection.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitLabGroupCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SecurityConnectorGitLabGroupCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListGitLabGroups() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/ListGitLabGroups_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/ListGitLabGroups_example.json // this example is just showing the usage of "GitLabGroups_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListGitLabGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetGitLabGroups() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetGitLabGroups_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetGitLabGroups_example.json // this example is just showing the usage of "GitLabGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetGitLabGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetGitLabGroups() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetGitLabGroups_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetGitLabGroups_example.json // this example is just showing the usage of "GitLabGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_GetGitLabGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetGitLabGroups() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetGitLabGroups_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetGitLabGroups_example.json // this example is just showing the usage of "GitLabGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -165,7 +165,7 @@ public async Task GetIfExists_GetGitLabGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetGitLabSubgroups_ListGitLabSubgroups() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/ListGitLabSubgroups_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/ListGitLabSubgroups_example.json // this example is just showing the usage of "GitLabSubgroups_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitLabGroupResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitLabGroupResource.cs index 7e9f66c11bd9..463db638742f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitLabGroupResource.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitLabGroupResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SecurityConnectorGitLabGroupResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetGitLabGroups() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetGitLabGroups_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetGitLabGroups_example.json // this example is just showing the usage of "GitLabGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitLabProjectCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitLabProjectCollection.cs index 137217a9b927..c67e582f2318 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitLabProjectCollection.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitLabProjectCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SecurityConnectorGitLabProjectCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListGitLabProjects() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/ListGitLabProjects_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/ListGitLabProjects_example.json // this example is just showing the usage of "GitLabProjects_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListGitLabProjects() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetGitLabProjects() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetGitLabProjects_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetGitLabProjects_example.json // this example is just showing the usage of "GitLabProjects_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_GetGitLabProjects() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetGitLabProjects() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetGitLabProjects_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetGitLabProjects_example.json // this example is just showing the usage of "GitLabProjects_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Exists_GetGitLabProjects() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetGitLabProjects() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetGitLabProjects_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetGitLabProjects_example.json // this example is just showing the usage of "GitLabProjects_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitLabProjectResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitLabProjectResource.cs index 836400a24fed..05fe2c191958 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitLabProjectResource.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SecurityConnectorGitLabProjectResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SecurityConnectorGitLabProjectResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetGitLabProjects() { - // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-09-01-preview/examples/SecurityConnectorsDevOps/GetGitLabProjects_example.json + // Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2024-04-01/examples/SecurityConnectorsDevOps/GetGitLabProjects_example.json // this example is just showing the usage of "GitLabProjects_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SensitivitySettingResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SensitivitySettingResource.cs index 6acb489b3eac..2bf259d01c84 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SensitivitySettingResource.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/samples/Generated/Samples/Sample_SensitivitySettingResource.cs @@ -21,7 +21,7 @@ public partial class Sample_SensitivitySettingResource public async Task CreateOrUpdate_UpdateSensitivitySettings() { // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-02-15-preview/examples/SensitivitySettings/PutSensitivitySettings_example.json - // this example is just showing the usage of "UpdateSensitivitySettings" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "SensitivitySettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -58,7 +58,7 @@ public async Task CreateOrUpdate_UpdateSensitivitySettings() public async Task Get_GetSensitivitySettings() { // Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-02-15-preview/examples/SensitivitySettings/GetSensitivitySettings_example.json - // this example is just showing the usage of "GetSensitivitySettings" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "SensitivitySettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupCollection.cs deleted file mode 100644 index dea129afbba2..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupCollection.cs +++ /dev/null @@ -1,419 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.SecurityCenter -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get an instance call the GetAdaptiveApplicationControlGroups method from an instance of . - /// - public partial class AdaptiveApplicationControlGroupCollection : ArmCollection - { - private readonly ClientDiagnostics _adaptiveApplicationControlGroupAdaptiveApplicationControlsClientDiagnostics; - private readonly AdaptiveApplicationControlsRestOperations _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient; - - /// Initializes a new instance of the class for mocking. - protected AdaptiveApplicationControlGroupCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal AdaptiveApplicationControlGroupCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _adaptiveApplicationControlGroupAdaptiveApplicationControlsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SecurityCenter", AdaptiveApplicationControlGroupResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(AdaptiveApplicationControlGroupResource.ResourceType, out string adaptiveApplicationControlGroupAdaptiveApplicationControlsApiVersion); - _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient = new AdaptiveApplicationControlsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, adaptiveApplicationControlGroupAdaptiveApplicationControlsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != SecurityCenterLocationResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SecurityCenterLocationResource.ResourceType), nameof(id)); - } - - /// - /// Update an application control machine group - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName} - /// - /// - /// Operation Id - /// AdaptiveApplicationControls_Put - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of an application control machine group. - /// The to use. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string groupName, AdaptiveApplicationControlGroupData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _adaptiveApplicationControlGroupAdaptiveApplicationControlsClientDiagnostics.CreateScope("AdaptiveApplicationControlGroupCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient.PutAsync(Id.SubscriptionId, new AzureLocation(Id.Name), groupName, data, cancellationToken).ConfigureAwait(false); - var uri = _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient.CreatePutRequestUri(Id.SubscriptionId, new AzureLocation(Id.Name), groupName, data); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new SecurityCenterArmOperation(Response.FromValue(new AdaptiveApplicationControlGroupResource(Client, response), response.GetRawResponse()), rehydrationToken); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update an application control machine group - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName} - /// - /// - /// Operation Id - /// AdaptiveApplicationControls_Put - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of an application control machine group. - /// The to use. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string groupName, AdaptiveApplicationControlGroupData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _adaptiveApplicationControlGroupAdaptiveApplicationControlsClientDiagnostics.CreateScope("AdaptiveApplicationControlGroupCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient.Put(Id.SubscriptionId, new AzureLocation(Id.Name), groupName, data, cancellationToken); - var uri = _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient.CreatePutRequestUri(Id.SubscriptionId, new AzureLocation(Id.Name), groupName, data); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new SecurityCenterArmOperation(Response.FromValue(new AdaptiveApplicationControlGroupResource(Client, response), response.GetRawResponse()), rehydrationToken); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets an application control VM/server group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName} - /// - /// - /// Operation Id - /// AdaptiveApplicationControls_Get - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of an application control machine group. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string groupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - - using var scope = _adaptiveApplicationControlGroupAdaptiveApplicationControlsClientDiagnostics.CreateScope("AdaptiveApplicationControlGroupCollection.Get"); - scope.Start(); - try - { - var response = await _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(Id.Name), groupName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new AdaptiveApplicationControlGroupResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets an application control VM/server group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName} - /// - /// - /// Operation Id - /// AdaptiveApplicationControls_Get - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of an application control machine group. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string groupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - - using var scope = _adaptiveApplicationControlGroupAdaptiveApplicationControlsClientDiagnostics.CreateScope("AdaptiveApplicationControlGroupCollection.Get"); - scope.Start(); - try - { - var response = _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient.Get(Id.SubscriptionId, new AzureLocation(Id.Name), groupName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new AdaptiveApplicationControlGroupResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName} - /// - /// - /// Operation Id - /// AdaptiveApplicationControls_Get - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of an application control machine group. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string groupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - - using var scope = _adaptiveApplicationControlGroupAdaptiveApplicationControlsClientDiagnostics.CreateScope("AdaptiveApplicationControlGroupCollection.Exists"); - scope.Start(); - try - { - var response = await _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(Id.Name), groupName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName} - /// - /// - /// Operation Id - /// AdaptiveApplicationControls_Get - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of an application control machine group. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string groupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - - using var scope = _adaptiveApplicationControlGroupAdaptiveApplicationControlsClientDiagnostics.CreateScope("AdaptiveApplicationControlGroupCollection.Exists"); - scope.Start(); - try - { - var response = _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient.Get(Id.SubscriptionId, new AzureLocation(Id.Name), groupName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName} - /// - /// - /// Operation Id - /// AdaptiveApplicationControls_Get - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of an application control machine group. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string groupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - - using var scope = _adaptiveApplicationControlGroupAdaptiveApplicationControlsClientDiagnostics.CreateScope("AdaptiveApplicationControlGroupCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(Id.Name), groupName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new AdaptiveApplicationControlGroupResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName} - /// - /// - /// Operation Id - /// AdaptiveApplicationControls_Get - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of an application control machine group. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string groupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - - using var scope = _adaptiveApplicationControlGroupAdaptiveApplicationControlsClientDiagnostics.CreateScope("AdaptiveApplicationControlGroupCollection.GetIfExists"); - scope.Start(); - try - { - var response = _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient.Get(Id.SubscriptionId, new AzureLocation(Id.Name), groupName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new AdaptiveApplicationControlGroupResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupData.Serialization.cs deleted file mode 100644 index fc05f27b6e5d..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupData.Serialization.cs +++ /dev/null @@ -1,355 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; -using Azure.ResourceManager.SecurityCenter.Models; - -namespace Azure.ResourceManager.SecurityCenter -{ - public partial class AdaptiveApplicationControlGroupData : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(AdaptiveApplicationControlGroupData)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(EnforcementMode)) - { - writer.WritePropertyName("enforcementMode"u8); - writer.WriteStringValue(EnforcementMode.Value.ToString()); - } - if (Optional.IsDefined(ProtectionMode)) - { - writer.WritePropertyName("protectionMode"u8); - writer.WriteObjectValue(ProtectionMode, options); - } - if (options.Format != "W" && Optional.IsDefined(ConfigurationStatus)) - { - writer.WritePropertyName("configurationStatus"u8); - writer.WriteStringValue(ConfigurationStatus.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(RecommendationStatus)) - { - writer.WritePropertyName("recommendationStatus"u8); - writer.WriteStringValue(RecommendationStatus.Value.ToString()); - } - if (options.Format != "W" && Optional.IsCollectionDefined(Issues)) - { - writer.WritePropertyName("issues"u8); - writer.WriteStartArray(); - foreach (var item in Issues) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && Optional.IsDefined(SourceSystem)) - { - writer.WritePropertyName("sourceSystem"u8); - writer.WriteStringValue(SourceSystem.Value.ToString()); - } - if (Optional.IsCollectionDefined(VmRecommendations)) - { - writer.WritePropertyName("vmRecommendations"u8); - writer.WriteStartArray(); - foreach (var item in VmRecommendations) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(PathRecommendations)) - { - writer.WritePropertyName("pathRecommendations"u8); - writer.WriteStartArray(); - foreach (var item in PathRecommendations) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - AdaptiveApplicationControlGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(AdaptiveApplicationControlGroupData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAdaptiveApplicationControlGroupData(document.RootElement, options); - } - - internal static AdaptiveApplicationControlGroupData DeserializeAdaptiveApplicationControlGroupData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AzureLocation? location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - SystemData systemData = default; - AdaptiveApplicationControlEnforcementMode? enforcementMode = default; - SecurityCenterFileProtectionMode protectionMode = default; - SecurityCenterConfigurationStatus? configurationStatus = default; - RecommendationStatus? recommendationStatus = default; - IReadOnlyList issues = default; - AdaptiveApplicationControlGroupSourceSystem? sourceSystem = default; - IList vmRecommendations = default; - IList pathRecommendations = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("location"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("enforcementMode"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enforcementMode = new AdaptiveApplicationControlEnforcementMode(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("protectionMode"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - protectionMode = SecurityCenterFileProtectionMode.DeserializeSecurityCenterFileProtectionMode(property0.Value, options); - continue; - } - if (property0.NameEquals("configurationStatus"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - configurationStatus = new SecurityCenterConfigurationStatus(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("recommendationStatus"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - recommendationStatus = new RecommendationStatus(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("issues"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(AdaptiveApplicationControlIssueSummary.DeserializeAdaptiveApplicationControlIssueSummary(item, options)); - } - issues = array; - continue; - } - if (property0.NameEquals("sourceSystem"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceSystem = new AdaptiveApplicationControlGroupSourceSystem(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("vmRecommendations"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(VmRecommendation.DeserializeVmRecommendation(item, options)); - } - vmRecommendations = array; - continue; - } - if (property0.NameEquals("pathRecommendations"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(PathRecommendation.DeserializePathRecommendation(item, options)); - } - pathRecommendations = array; - continue; - } - } - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new AdaptiveApplicationControlGroupData( - id, - name, - type, - systemData, - enforcementMode, - protectionMode, - configurationStatus, - recommendationStatus, - issues ?? new ChangeTrackingList(), - sourceSystem, - vmRecommendations ?? new ChangeTrackingList(), - pathRecommendations ?? new ChangeTrackingList(), - location, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(AdaptiveApplicationControlGroupData)} does not support writing '{options.Format}' format."); - } - } - - AdaptiveApplicationControlGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeAdaptiveApplicationControlGroupData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AdaptiveApplicationControlGroupData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupData.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupData.cs deleted file mode 100644 index 38c2a7689358..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupData.cs +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.Models; -using Azure.ResourceManager.SecurityCenter.Models; - -namespace Azure.ResourceManager.SecurityCenter -{ - /// A class representing the AdaptiveApplicationControlGroup data model. - public partial class AdaptiveApplicationControlGroupData : ResourceData - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public AdaptiveApplicationControlGroupData() - { - Issues = new ChangeTrackingList(); - VmRecommendations = new ChangeTrackingList(); - PathRecommendations = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The application control policy enforcement/protection mode of the machine group. - /// The protection mode of the collection/file types. Exe/Msi/Script are used for Windows, Executable is used for Linux. - /// The configuration status of the machines group or machine or rule. - /// The initial recommendation status of the machine group or machine. - /// - /// The source type of the machine group. - /// - /// - /// Location where the resource is stored. - /// Keeps track of any properties unknown to the library. - internal AdaptiveApplicationControlGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AdaptiveApplicationControlEnforcementMode? enforcementMode, SecurityCenterFileProtectionMode protectionMode, SecurityCenterConfigurationStatus? configurationStatus, RecommendationStatus? recommendationStatus, IReadOnlyList issues, AdaptiveApplicationControlGroupSourceSystem? sourceSystem, IList vmRecommendations, IList pathRecommendations, AzureLocation? location, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - EnforcementMode = enforcementMode; - ProtectionMode = protectionMode; - ConfigurationStatus = configurationStatus; - RecommendationStatus = recommendationStatus; - Issues = issues; - SourceSystem = sourceSystem; - VmRecommendations = vmRecommendations; - PathRecommendations = pathRecommendations; - Location = location; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The application control policy enforcement/protection mode of the machine group. - public AdaptiveApplicationControlEnforcementMode? EnforcementMode { get; set; } - /// The protection mode of the collection/file types. Exe/Msi/Script are used for Windows, Executable is used for Linux. - public SecurityCenterFileProtectionMode ProtectionMode { get; set; } - /// The configuration status of the machines group or machine or rule. - public SecurityCenterConfigurationStatus? ConfigurationStatus { get; } - /// The initial recommendation status of the machine group or machine. - public RecommendationStatus? RecommendationStatus { get; } - /// Gets the issues. - public IReadOnlyList Issues { get; } - /// The source type of the machine group. - public AdaptiveApplicationControlGroupSourceSystem? SourceSystem { get; } - /// Gets the vm recommendations. - public IList VmRecommendations { get; } - /// Gets the path recommendations. - public IList PathRecommendations { get; } - /// Location where the resource is stored. - public AzureLocation? Location { get; } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupResource.Serialization.cs deleted file mode 100644 index d19035918089..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Azure.ResourceManager.SecurityCenter -{ - public partial class AdaptiveApplicationControlGroupResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - AdaptiveApplicationControlGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - AdaptiveApplicationControlGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupResource.cs deleted file mode 100644 index c0ad4ba02031..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupResource.cs +++ /dev/null @@ -1,354 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.SecurityCenter -{ - /// - /// A Class representing an AdaptiveApplicationControlGroup along with the instance operations that can be performed on it. - /// If you have a you can construct an - /// from an instance of using the GetAdaptiveApplicationControlGroupResource method. - /// Otherwise you can get one from its parent resource using the GetAdaptiveApplicationControlGroup method. - /// - public partial class AdaptiveApplicationControlGroupResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The ascLocation. - /// The groupName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, AzureLocation ascLocation, string groupName) - { - var resourceId = $"/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _adaptiveApplicationControlGroupAdaptiveApplicationControlsClientDiagnostics; - private readonly AdaptiveApplicationControlsRestOperations _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient; - private readonly AdaptiveApplicationControlGroupData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.Security/locations/applicationWhitelistings"; - - /// Initializes a new instance of the class for mocking. - protected AdaptiveApplicationControlGroupResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal AdaptiveApplicationControlGroupResource(ArmClient client, AdaptiveApplicationControlGroupData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal AdaptiveApplicationControlGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _adaptiveApplicationControlGroupAdaptiveApplicationControlsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SecurityCenter", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string adaptiveApplicationControlGroupAdaptiveApplicationControlsApiVersion); - _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient = new AdaptiveApplicationControlsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, adaptiveApplicationControlGroupAdaptiveApplicationControlsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual AdaptiveApplicationControlGroupData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets an application control VM/server group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName} - /// - /// - /// Operation Id - /// AdaptiveApplicationControls_Get - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _adaptiveApplicationControlGroupAdaptiveApplicationControlsClientDiagnostics.CreateScope("AdaptiveApplicationControlGroupResource.Get"); - scope.Start(); - try - { - var response = await _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new AdaptiveApplicationControlGroupResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets an application control VM/server group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName} - /// - /// - /// Operation Id - /// AdaptiveApplicationControls_Get - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _adaptiveApplicationControlGroupAdaptiveApplicationControlsClientDiagnostics.CreateScope("AdaptiveApplicationControlGroupResource.Get"); - scope.Start(); - try - { - var response = _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient.Get(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new AdaptiveApplicationControlGroupResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete an application control machine group - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName} - /// - /// - /// Operation Id - /// AdaptiveApplicationControls_Delete - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _adaptiveApplicationControlGroupAdaptiveApplicationControlsClientDiagnostics.CreateScope("AdaptiveApplicationControlGroupResource.Delete"); - scope.Start(); - try - { - var response = await _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient.DeleteAsync(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken).ConfigureAwait(false); - var uri = _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient.CreateDeleteRequestUri(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new SecurityCenterArmOperation(response, rehydrationToken); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete an application control machine group - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName} - /// - /// - /// Operation Id - /// AdaptiveApplicationControls_Delete - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _adaptiveApplicationControlGroupAdaptiveApplicationControlsClientDiagnostics.CreateScope("AdaptiveApplicationControlGroupResource.Delete"); - scope.Start(); - try - { - var response = _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient.Delete(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken); - var uri = _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient.CreateDeleteRequestUri(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new SecurityCenterArmOperation(response, rehydrationToken); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update an application control machine group - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName} - /// - /// - /// Operation Id - /// AdaptiveApplicationControls_Put - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, AdaptiveApplicationControlGroupData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _adaptiveApplicationControlGroupAdaptiveApplicationControlsClientDiagnostics.CreateScope("AdaptiveApplicationControlGroupResource.Update"); - scope.Start(); - try - { - var response = await _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient.PutAsync(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, data, cancellationToken).ConfigureAwait(false); - var uri = _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient.CreatePutRequestUri(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, data); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new SecurityCenterArmOperation(Response.FromValue(new AdaptiveApplicationControlGroupResource(Client, response), response.GetRawResponse()), rehydrationToken); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update an application control machine group - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName} - /// - /// - /// Operation Id - /// AdaptiveApplicationControls_Put - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, AdaptiveApplicationControlGroupData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _adaptiveApplicationControlGroupAdaptiveApplicationControlsClientDiagnostics.CreateScope("AdaptiveApplicationControlGroupResource.Update"); - scope.Start(); - try - { - var response = _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient.Put(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, data, cancellationToken); - var uri = _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient.CreatePutRequestUri(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, data); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new SecurityCenterArmOperation(Response.FromValue(new AdaptiveApplicationControlGroupResource(Client, response), response.GetRawResponse()), rehydrationToken); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningCollection.cs deleted file mode 100644 index 6d2da564b640..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningCollection.cs +++ /dev/null @@ -1,407 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.SecurityCenter -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get an instance call the GetAdaptiveNetworkHardenings method from an instance of . - /// - public partial class AdaptiveNetworkHardeningCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _adaptiveNetworkHardeningClientDiagnostics; - private readonly AdaptiveNetworkHardeningsRestOperations _adaptiveNetworkHardeningRestClient; - private readonly string _resourceNamespace; - private readonly string _resourceType; - private readonly string _resourceName; - - /// Initializes a new instance of the class for mocking. - protected AdaptiveNetworkHardeningCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - /// The Namespace of the resource. - /// The type of the resource. - /// Name of the resource. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - internal AdaptiveNetworkHardeningCollection(ArmClient client, ResourceIdentifier id, string resourceNamespace, string resourceType, string resourceName) : base(client, id) - { - _resourceNamespace = resourceNamespace; - _resourceType = resourceType; - _resourceName = resourceName; - _adaptiveNetworkHardeningClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SecurityCenter", AdaptiveNetworkHardeningResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(AdaptiveNetworkHardeningResource.ResourceType, out string adaptiveNetworkHardeningApiVersion); - _adaptiveNetworkHardeningRestClient = new AdaptiveNetworkHardeningsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, adaptiveNetworkHardeningApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceGroupResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); - } - - /// - /// Gets a single Adaptive Network Hardening resource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings/{adaptiveNetworkHardeningResourceName} - /// - /// - /// Operation Id - /// AdaptiveNetworkHardenings_Get - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the Adaptive Network Hardening resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string adaptiveNetworkHardeningResourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(adaptiveNetworkHardeningResourceName, nameof(adaptiveNetworkHardeningResourceName)); - - using var scope = _adaptiveNetworkHardeningClientDiagnostics.CreateScope("AdaptiveNetworkHardeningCollection.Get"); - scope.Start(); - try - { - var response = await _adaptiveNetworkHardeningRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, _resourceNamespace, _resourceType, _resourceName, adaptiveNetworkHardeningResourceName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new AdaptiveNetworkHardeningResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a single Adaptive Network Hardening resource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings/{adaptiveNetworkHardeningResourceName} - /// - /// - /// Operation Id - /// AdaptiveNetworkHardenings_Get - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the Adaptive Network Hardening resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string adaptiveNetworkHardeningResourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(adaptiveNetworkHardeningResourceName, nameof(adaptiveNetworkHardeningResourceName)); - - using var scope = _adaptiveNetworkHardeningClientDiagnostics.CreateScope("AdaptiveNetworkHardeningCollection.Get"); - scope.Start(); - try - { - var response = _adaptiveNetworkHardeningRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, _resourceNamespace, _resourceType, _resourceName, adaptiveNetworkHardeningResourceName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new AdaptiveNetworkHardeningResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a list of Adaptive Network Hardenings resources in scope of an extended resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings - /// - /// - /// Operation Id - /// AdaptiveNetworkHardenings_ListByExtendedResource - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _adaptiveNetworkHardeningRestClient.CreateListByExtendedResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, _resourceNamespace, _resourceType, _resourceName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _adaptiveNetworkHardeningRestClient.CreateListByExtendedResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, _resourceNamespace, _resourceType, _resourceName); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AdaptiveNetworkHardeningResource(Client, AdaptiveNetworkHardeningData.DeserializeAdaptiveNetworkHardeningData(e)), _adaptiveNetworkHardeningClientDiagnostics, Pipeline, "AdaptiveNetworkHardeningCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Gets a list of Adaptive Network Hardenings resources in scope of an extended resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings - /// - /// - /// Operation Id - /// AdaptiveNetworkHardenings_ListByExtendedResource - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _adaptiveNetworkHardeningRestClient.CreateListByExtendedResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, _resourceNamespace, _resourceType, _resourceName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _adaptiveNetworkHardeningRestClient.CreateListByExtendedResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, _resourceNamespace, _resourceType, _resourceName); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AdaptiveNetworkHardeningResource(Client, AdaptiveNetworkHardeningData.DeserializeAdaptiveNetworkHardeningData(e)), _adaptiveNetworkHardeningClientDiagnostics, Pipeline, "AdaptiveNetworkHardeningCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings/{adaptiveNetworkHardeningResourceName} - /// - /// - /// Operation Id - /// AdaptiveNetworkHardenings_Get - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the Adaptive Network Hardening resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string adaptiveNetworkHardeningResourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(adaptiveNetworkHardeningResourceName, nameof(adaptiveNetworkHardeningResourceName)); - - using var scope = _adaptiveNetworkHardeningClientDiagnostics.CreateScope("AdaptiveNetworkHardeningCollection.Exists"); - scope.Start(); - try - { - var response = await _adaptiveNetworkHardeningRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, _resourceNamespace, _resourceType, _resourceName, adaptiveNetworkHardeningResourceName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings/{adaptiveNetworkHardeningResourceName} - /// - /// - /// Operation Id - /// AdaptiveNetworkHardenings_Get - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the Adaptive Network Hardening resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string adaptiveNetworkHardeningResourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(adaptiveNetworkHardeningResourceName, nameof(adaptiveNetworkHardeningResourceName)); - - using var scope = _adaptiveNetworkHardeningClientDiagnostics.CreateScope("AdaptiveNetworkHardeningCollection.Exists"); - scope.Start(); - try - { - var response = _adaptiveNetworkHardeningRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, _resourceNamespace, _resourceType, _resourceName, adaptiveNetworkHardeningResourceName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings/{adaptiveNetworkHardeningResourceName} - /// - /// - /// Operation Id - /// AdaptiveNetworkHardenings_Get - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the Adaptive Network Hardening resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string adaptiveNetworkHardeningResourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(adaptiveNetworkHardeningResourceName, nameof(adaptiveNetworkHardeningResourceName)); - - using var scope = _adaptiveNetworkHardeningClientDiagnostics.CreateScope("AdaptiveNetworkHardeningCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _adaptiveNetworkHardeningRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, _resourceNamespace, _resourceType, _resourceName, adaptiveNetworkHardeningResourceName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new AdaptiveNetworkHardeningResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings/{adaptiveNetworkHardeningResourceName} - /// - /// - /// Operation Id - /// AdaptiveNetworkHardenings_Get - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the Adaptive Network Hardening resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string adaptiveNetworkHardeningResourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(adaptiveNetworkHardeningResourceName, nameof(adaptiveNetworkHardeningResourceName)); - - using var scope = _adaptiveNetworkHardeningClientDiagnostics.CreateScope("AdaptiveNetworkHardeningCollection.GetIfExists"); - scope.Start(); - try - { - var response = _adaptiveNetworkHardeningRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, _resourceNamespace, _resourceType, _resourceName, adaptiveNetworkHardeningResourceName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new AdaptiveNetworkHardeningResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningData.Serialization.cs deleted file mode 100644 index e03827ac17db..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningData.Serialization.cs +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; -using Azure.ResourceManager.SecurityCenter.Models; - -namespace Azure.ResourceManager.SecurityCenter -{ - public partial class AdaptiveNetworkHardeningData : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(AdaptiveNetworkHardeningData)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Rules)) - { - writer.WritePropertyName("rules"u8); - writer.WriteStartArray(); - foreach (var item in Rules) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(RulesCalculatedOn)) - { - writer.WritePropertyName("rulesCalculationTime"u8); - writer.WriteStringValue(RulesCalculatedOn.Value, "O"); - } - if (Optional.IsCollectionDefined(EffectiveNetworkSecurityGroups)) - { - writer.WritePropertyName("effectiveNetworkSecurityGroups"u8); - writer.WriteStartArray(); - foreach (var item in EffectiveNetworkSecurityGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - AdaptiveNetworkHardeningData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(AdaptiveNetworkHardeningData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAdaptiveNetworkHardeningData(document.RootElement, options); - } - - internal static AdaptiveNetworkHardeningData DeserializeAdaptiveNetworkHardeningData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - SystemData systemData = default; - IList rules = default; - DateTimeOffset? rulesCalculationTime = default; - IList effectiveNetworkSecurityGroups = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("rules"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(RecommendedSecurityRule.DeserializeRecommendedSecurityRule(item, options)); - } - rules = array; - continue; - } - if (property0.NameEquals("rulesCalculationTime"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - rulesCalculationTime = property0.Value.GetDateTimeOffset("O"); - continue; - } - if (property0.NameEquals("effectiveNetworkSecurityGroups"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(Models.EffectiveNetworkSecurityGroups.DeserializeEffectiveNetworkSecurityGroups(item, options)); - } - effectiveNetworkSecurityGroups = array; - continue; - } - } - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new AdaptiveNetworkHardeningData( - id, - name, - type, - systemData, - rules ?? new ChangeTrackingList(), - rulesCalculationTime, - effectiveNetworkSecurityGroups ?? new ChangeTrackingList(), - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(AdaptiveNetworkHardeningData)} does not support writing '{options.Format}' format."); - } - } - - AdaptiveNetworkHardeningData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeAdaptiveNetworkHardeningData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AdaptiveNetworkHardeningData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningData.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningData.cs deleted file mode 100644 index 02e16278a5c7..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningData.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.Models; -using Azure.ResourceManager.SecurityCenter.Models; - -namespace Azure.ResourceManager.SecurityCenter -{ - /// - /// A class representing the AdaptiveNetworkHardening data model. - /// The resource whose properties describes the Adaptive Network Hardening settings for some Azure resource - /// - public partial class AdaptiveNetworkHardeningData : ResourceData - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public AdaptiveNetworkHardeningData() - { - Rules = new ChangeTrackingList(); - EffectiveNetworkSecurityGroups = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The security rules which are recommended to be effective on the VM. - /// The UTC time on which the rules were calculated. - /// The Network Security Groups effective on the network interfaces of the protected resource. - /// Keeps track of any properties unknown to the library. - internal AdaptiveNetworkHardeningData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IList rules, DateTimeOffset? rulesCalculatedOn, IList effectiveNetworkSecurityGroups, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - Rules = rules; - RulesCalculatedOn = rulesCalculatedOn; - EffectiveNetworkSecurityGroups = effectiveNetworkSecurityGroups; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The security rules which are recommended to be effective on the VM. - public IList Rules { get; } - /// The UTC time on which the rules were calculated. - public DateTimeOffset? RulesCalculatedOn { get; set; } - /// The Network Security Groups effective on the network interfaces of the protected resource. - public IList EffectiveNetworkSecurityGroups { get; } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningResource.Serialization.cs deleted file mode 100644 index c1a6a50d6ed9..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Azure.ResourceManager.SecurityCenter -{ - public partial class AdaptiveNetworkHardeningResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - AdaptiveNetworkHardeningData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - AdaptiveNetworkHardeningData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningResource.cs deleted file mode 100644 index 55dca30eb51a..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningResource.cs +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.Resources; -using Azure.ResourceManager.SecurityCenter.Models; - -namespace Azure.ResourceManager.SecurityCenter -{ - /// - /// A Class representing an AdaptiveNetworkHardening along with the instance operations that can be performed on it. - /// If you have a you can construct an - /// from an instance of using the GetAdaptiveNetworkHardeningResource method. - /// Otherwise you can get one from its parent resource using the GetAdaptiveNetworkHardening method. - /// - public partial class AdaptiveNetworkHardeningResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The resourceNamespace. - /// The resourceType. - /// The resourceName. - /// The adaptiveNetworkHardeningResourceName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName, string adaptiveNetworkHardeningResourceName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings/{adaptiveNetworkHardeningResourceName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _adaptiveNetworkHardeningClientDiagnostics; - private readonly AdaptiveNetworkHardeningsRestOperations _adaptiveNetworkHardeningRestClient; - private readonly AdaptiveNetworkHardeningData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.Security/adaptiveNetworkHardenings"; - - /// Initializes a new instance of the class for mocking. - protected AdaptiveNetworkHardeningResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal AdaptiveNetworkHardeningResource(ArmClient client, AdaptiveNetworkHardeningData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal AdaptiveNetworkHardeningResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _adaptiveNetworkHardeningClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SecurityCenter", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string adaptiveNetworkHardeningApiVersion); - _adaptiveNetworkHardeningRestClient = new AdaptiveNetworkHardeningsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, adaptiveNetworkHardeningApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual AdaptiveNetworkHardeningData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets a single Adaptive Network Hardening resource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings/{adaptiveNetworkHardeningResourceName} - /// - /// - /// Operation Id - /// AdaptiveNetworkHardenings_Get - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _adaptiveNetworkHardeningClientDiagnostics.CreateScope("AdaptiveNetworkHardeningResource.Get"); - scope.Start(); - try - { - var response = await _adaptiveNetworkHardeningRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.ResourceType.Namespace, Id.Parent.ResourceType.GetLastType(), Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new AdaptiveNetworkHardeningResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a single Adaptive Network Hardening resource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings/{adaptiveNetworkHardeningResourceName} - /// - /// - /// Operation Id - /// AdaptiveNetworkHardenings_Get - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _adaptiveNetworkHardeningClientDiagnostics.CreateScope("AdaptiveNetworkHardeningResource.Get"); - scope.Start(); - try - { - var response = _adaptiveNetworkHardeningRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.ResourceType.Namespace, Id.Parent.ResourceType.GetLastType(), Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new AdaptiveNetworkHardeningResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Enforces the given rules on the NSG(s) listed in the request - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings/{adaptiveNetworkHardeningResourceName}/{adaptiveNetworkHardeningEnforceAction} - /// - /// - /// Operation Id - /// AdaptiveNetworkHardenings_Enforce - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. - /// The cancellation token to use. - /// is null. - public virtual async Task EnforceAsync(WaitUntil waitUntil, AdaptiveNetworkHardeningEnforceContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _adaptiveNetworkHardeningClientDiagnostics.CreateScope("AdaptiveNetworkHardeningResource.Enforce"); - scope.Start(); - try - { - var response = await _adaptiveNetworkHardeningRestClient.EnforceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.ResourceType.Namespace, Id.Parent.ResourceType.GetLastType(), Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new SecurityCenterArmOperation(_adaptiveNetworkHardeningClientDiagnostics, Pipeline, _adaptiveNetworkHardeningRestClient.CreateEnforceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.ResourceType.Namespace, Id.Parent.ResourceType.GetLastType(), Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Enforces the given rules on the NSG(s) listed in the request - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings/{adaptiveNetworkHardeningResourceName}/{adaptiveNetworkHardeningEnforceAction} - /// - /// - /// Operation Id - /// AdaptiveNetworkHardenings_Enforce - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Enforce(WaitUntil waitUntil, AdaptiveNetworkHardeningEnforceContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _adaptiveNetworkHardeningClientDiagnostics.CreateScope("AdaptiveNetworkHardeningResource.Enforce"); - scope.Start(); - try - { - var response = _adaptiveNetworkHardeningRestClient.Enforce(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.ResourceType.Namespace, Id.Parent.ResourceType.GetLastType(), Id.Parent.Name, Id.Name, content, cancellationToken); - var operation = new SecurityCenterArmOperation(_adaptiveNetworkHardeningClientDiagnostics, Pipeline, _adaptiveNetworkHardeningRestClient.CreateEnforceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.ResourceType.Namespace, Id.Parent.ResourceType.GetLastType(), Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ArmSecurityCenterModelFactory.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ArmSecurityCenterModelFactory.cs index faee052cc44e..654a23b493f6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ArmSecurityCenterModelFactory.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ArmSecurityCenterModelFactory.cs @@ -507,84 +507,6 @@ public static SoftwareInventoryData SoftwareInventoryData(ResourceIdentifier id serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// GZip encoded KQL query representing the assessment automation results required. - /// Relevant cloud for the custom assessment automation. - /// The severity to relate to the assessments generated by this assessment automation. - /// The display name of the assessments generated by this assessment automation. - /// The description to relate to the assessments generated by this assessment automation. - /// The remediation description to relate to the assessments generated by this assessment automation. - /// The assessment metadata key used when an assessment is generated for this assessment automation. - /// A new instance for mocking. - public static CustomAssessmentAutomationData CustomAssessmentAutomationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string compressedQuery = null, CustomAssessmentAutomationSupportedCloud? supportedCloud = null, CustomAssessmentSeverity? severity = null, string displayName = null, string description = null, string remediationDescription = null, string assessmentKey = null) - { - return new CustomAssessmentAutomationData( - id, - name, - resourceType, - systemData, - compressedQuery, - supportedCloud, - severity, - displayName, - description, - remediationDescription, - assessmentKey, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Base 64 encoded KQL query representing the assessment automation results required. - /// Relevant cloud for the custom assessment automation. - /// The severity to relate to the assessments generated by this assessment automation. - /// The display name of the assessments generated by this assessment automation. - /// The description to relate to the assessments generated by this assessment automation. - /// The remediation description to relate to the assessments generated by this assessment automation. - /// A new instance for mocking. - public static CustomAssessmentAutomationCreateOrUpdateContent CustomAssessmentAutomationCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string compressedQuery = null, CustomAssessmentAutomationSupportedCloud? supportedCloud = null, CustomAssessmentSeverity? severity = null, string displayName = null, string description = null, string remediationDescription = null) - { - return new CustomAssessmentAutomationCreateOrUpdateContent( - id, - name, - resourceType, - systemData, - compressedQuery, - supportedCloud, - severity, - displayName, - description, - remediationDescription, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The principal assigned with entity store. Format of principal is: [AAD type]=[PrincipalObjectId];[TenantId]. - /// The link to entity store database. - /// A new instance for mocking. - public static CustomEntityStoreAssignmentData CustomEntityStoreAssignmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string principal = null, string entityStoreDatabaseLink = null) - { - return new CustomEntityStoreAssignmentData( - id, - name, - resourceType, - systemData, - principal, - entityStoreDatabaseLink, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -724,33 +646,29 @@ public static SecurityApplicationData SecurityApplicationData(ResourceIdentifier /// The name. /// The resourceType. /// The systemData. - /// Indicates whether Defender for Storage is enabled on this storage account. - /// Indicates whether the settings defined for this storage account should override the settings defined for the subscription. - /// Indicates whether Sensitive Data Discovery should be enabled. - /// Upon failure or partial success. Additional data describing Sensitive Data Discovery enable/disable operation. - /// Optional. Resource id of an Event Grid Topic to send scan results to. - /// Upon failure or partial success. Additional data describing Malware Scanning enable/disable operation. - /// Indicates whether On Upload malware scanning should be enabled. - /// Defines the max GB to be scanned per Month. Set to -1 if no capping is needed. + /// Defender for Storage resource properties. /// A new instance for mocking. - public static DefenderForStorageSettingData DefenderForStorageSettingData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? isEnabled = null, bool? isOverrideSubscriptionLevelSettingsEnabled = null, bool? isSensitiveDataDiscoveryEnabled = null, ExtensionOperationStatus sensitiveDataDiscoveryOperationStatus = null, ResourceIdentifier scanResultsEventGridTopicResourceId = null, ExtensionOperationStatus malwareScanningOperationStatus = null, bool? isMalwareScanningOnUploadEnabled = null, int? capGBPerMonth = null) + public static DefenderForStorageSettingData DefenderForStorageSettingData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DefenderForStorageSettingProperties properties = null) { return new DefenderForStorageSettingData( id, name, resourceType, systemData, - isEnabled, - isOverrideSubscriptionLevelSettingsEnabled, - isSensitiveDataDiscoveryEnabled, - sensitiveDataDiscoveryOperationStatus, - scanResultsEventGridTopicResourceId, - malwareScanningOperationStatus, - isMalwareScanningOnUploadEnabled, - capGBPerMonth, + properties, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Properties of On Upload malware scanning. + /// Optional. Resource id of an Event Grid Topic to send scan results to. + /// Upon failure or partial success. Additional data describing Malware Scanning enable/disable operation. + /// A new instance for mocking. + public static MalwareScanningProperties MalwareScanningProperties(OnUploadProperties onUpload = null, ResourceIdentifier scanResultsEventGridTopicResourceId = null, ExtensionOperationStatus operationStatus = null) + { + return new MalwareScanningProperties(onUpload, scanResultsEventGridTopicResourceId, operationStatus, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The operation status code. /// Additional information regarding the success/failure of the operation. @@ -760,6 +678,15 @@ public static ExtensionOperationStatus ExtensionOperationStatus(string code = nu return new ExtensionOperationStatus(code, message, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Indicates whether Sensitive Data Discovery should be enabled. + /// Upon failure or partial success. Additional data describing Sensitive Data Discovery enable/disable operation. + /// A new instance for mocking. + public static SensitiveDataDiscoveryProperties SensitiveDataDiscoveryProperties(bool? isEnabled = null, ExtensionOperationStatus operationStatus = null) + { + return new SensitiveDataDiscoveryProperties(isEnabled, operationStatus, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -975,1822 +902,1762 @@ public static HealthReportStatus HealthReportStatus(HealthReportStatusName? code serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// Azure DevOps Organization properties. - /// A new instance for mocking. - public static DevOpsOrgData DevOpsOrgData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DevOpsOrgProperties properties = null) + /// The tags. + /// The location. + /// The multi cloud resource identifier (account id in case of AWS connector, project number in case of GCP connector). + /// The date on which the trial period will end, if applicable. Trial period exists for 30 days after upgrading to payed offerings. + /// The multi cloud resource's cloud name. + /// + /// A collection of offerings for the security connector. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , , , , , , , , , , , and . + /// + /// + /// The security connector environment data. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . + /// + /// Kind of the resource. + /// Entity tag is used for comparing two or more entities from the same requested resource. + /// A new instance for mocking. + public static SecurityConnectorData SecurityConnectorData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string hierarchyIdentifier = null, DateTimeOffset? hierarchyIdentifierTrialEndOn = null, SecurityCenterCloudName? environmentName = null, IEnumerable offerings = null, SecurityConnectorEnvironment environmentData = null, string kind = null, ETag? eTag = null) { - return new DevOpsOrgData( + tags ??= new Dictionary(); + offerings ??= new List(); + + return new SecurityConnectorData( id, name, resourceType, systemData, - properties, + tags, + location, + hierarchyIdentifier, + hierarchyIdentifierTrialEndOn, + environmentName, + offerings?.ToList(), + environmentData, + kind, + eTag, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Gets or sets resource status message. - /// Gets or sets time when resource was last checked. - /// - /// The provisioning state of the resource. - /// - /// Pending - Provisioning pending. - /// Failed - Provisioning failed. - /// Succeeded - Successful provisioning. - /// Canceled - Provisioning canceled. - /// PendingDeletion - Deletion pending. - /// DeletionSuccess - Deletion successful. - /// DeletionFailure - Deletion failure. - /// - /// - /// Details about resource onboarding status across all connectors. - /// - /// OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only applicable to top-level resources. - /// Onboarded - this resource has already been onboarded by the specified connector. - /// NotOnboarded - this resource has not been onboarded to any connector. - /// NotApplicable - the onboarding state is not applicable to the current endpoint. - /// - /// Configuration payload for PR Annotations. - /// A new instance for mocking. - public static DevOpsOrgProperties DevOpsOrgProperties(string provisioningStatusMessage = null, DateTimeOffset? provisioningStatusUpdatedOn = null, DevOpsProvisioningState? provisioningState = null, ResourceOnboardingState? onboardingState = null, ActionableRemediation actionableRemediation = null) + /// Initializes a new instance of . + /// The type of the security offering. + /// The offering description. + /// A new instance for mocking. + public static SecurityCenterCloudOffering SecurityCenterCloudOffering(string offeringType = null, string description = null) { - return new DevOpsOrgProperties( - provisioningStatusMessage, - provisioningStatusUpdatedOn, - provisioningState, - onboardingState, - actionableRemediation, - serializedAdditionalRawData: null); + return new UnknownCloudOffering(offeringType == null ? default : new OfferingType(offeringType), description, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// Azure DevOps Project properties. - /// A new instance for mocking. - public static DevOpsProjectData DevOpsProjectData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DevOpsProjectProperties properties = null) + /// The status of the resource regarding a single assessment. + /// A new instance for mocking. + public static ComplianceResultData ComplianceResultData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SecurityAssessmentResourceStatus? resourceStatus = null) { - return new DevOpsProjectData( + return new ComplianceResultData( id, name, resourceType, systemData, - properties, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Gets or sets resource status message. - /// Gets or sets time when resource was last checked. - /// - /// The provisioning state of the resource. - /// - /// Pending - Provisioning pending. - /// Failed - Provisioning failed. - /// Succeeded - Successful provisioning. - /// Canceled - Provisioning canceled. - /// PendingDeletion - Deletion pending. - /// DeletionSuccess - Deletion successful. - /// DeletionFailure - Deletion failure. - /// - /// Gets or sets parent Azure DevOps Organization name. - /// Gets or sets Azure DevOps Project id. - /// - /// Details about resource onboarding status across all connectors. - /// - /// OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only applicable to top-level resources. - /// Onboarded - this resource has already been onboarded by the specified connector. - /// NotOnboarded - this resource has not been onboarded to any connector. - /// NotApplicable - the onboarding state is not applicable to the current endpoint. - /// - /// Configuration payload for PR Annotations. - /// A new instance for mocking. - public static DevOpsProjectProperties DevOpsProjectProperties(string provisioningStatusMessage = null, DateTimeOffset? provisioningStatusUpdatedOn = null, DevOpsProvisioningState? provisioningState = null, string parentOrgName = null, string projectId = null, ResourceOnboardingState? onboardingState = null, ActionableRemediation actionableRemediation = null) - { - return new DevOpsProjectProperties( - provisioningStatusMessage, - provisioningStatusUpdatedOn, - provisioningState, - parentOrgName, - projectId, - onboardingState, - actionableRemediation, + resourceStatus, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// Azure DevOps Repository properties. - /// A new instance for mocking. - public static DevOpsRepositoryData DevOpsRepositoryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DevOpsRepositoryProperties properties = null) + /// Indicates whether Advanced Threat Protection is enabled. + /// A new instance for mocking. + public static AdvancedThreatProtectionSettingData AdvancedThreatProtectionSettingData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? isEnabled = null) { - return new DevOpsRepositoryData( + return new AdvancedThreatProtectionSettingData( id, name, resourceType, systemData, - properties, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Gets or sets resource status message. - /// Gets or sets time when resource was last checked. - /// - /// The provisioning state of the resource. - /// - /// Pending - Provisioning pending. - /// Failed - Provisioning failed. - /// Succeeded - Successful provisioning. - /// Canceled - Provisioning canceled. - /// PendingDeletion - Deletion pending. - /// DeletionSuccess - Deletion successful. - /// DeletionFailure - Deletion failure. - /// - /// Gets or sets parent Azure DevOps Organization name. - /// Gets or sets parent Azure DevOps Project name. - /// Gets or sets Azure DevOps Repository id. - /// Gets or sets Azure DevOps Repository url. - /// Gets or sets Azure DevOps repository visibility, whether it is public or private etc. - /// - /// Details about resource onboarding status across all connectors. - /// - /// OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only applicable to top-level resources. - /// Onboarded - this resource has already been onboarded by the specified connector. - /// NotOnboarded - this resource has not been onboarded to any connector. - /// NotApplicable - the onboarding state is not applicable to the current endpoint. - /// - /// Configuration payload for PR Annotations. - /// A new instance for mocking. - public static DevOpsRepositoryProperties DevOpsRepositoryProperties(string provisioningStatusMessage = null, DateTimeOffset? provisioningStatusUpdatedOn = null, DevOpsProvisioningState? provisioningState = null, string parentOrgName = null, string parentProjectName = null, string repoId = null, Uri repoUri = null, string visibility = null, ResourceOnboardingState? onboardingState = null, ActionableRemediation actionableRemediation = null) - { - return new DevOpsRepositoryProperties( - provisioningStatusMessage, - provisioningStatusUpdatedOn, - provisioningState, - parentOrgName, - parentProjectName, - repoId, - repoUri, - visibility, - onboardingState, - actionableRemediation, + isEnabled, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// DevOps Configuration properties. - /// A new instance for mocking. - public static DevOpsConfigurationData DevOpsConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DevOpsConfigurationProperties properties = null) - { - return new DevOpsConfigurationData( - id, - name, - resourceType, - systemData, - properties, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Gets or sets resource status message. - /// Gets or sets time when resource was last checked. - /// - /// The provisioning state of the resource. - /// - /// Pending - Provisioning pending. - /// Failed - Provisioning failed. - /// Succeeded - Successful provisioning. - /// Canceled - Provisioning canceled. - /// PendingDeletion - Deletion pending. - /// DeletionSuccess - Deletion successful. - /// DeletionFailure - Deletion failure. + /// + /// The list of custom alert threshold rules. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , , , , , , , , , , , and . /// - /// Authorization payload. - /// AutoDiscovery states. - /// - /// List of top-level inventory to select when AutoDiscovery is disabled. - /// This field is ignored when AutoDiscovery is enabled. + /// + /// The list of custom alert time-window rules. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , , , , , , , , , , and . /// - /// A new instance for mocking. - public static DevOpsConfigurationProperties DevOpsConfigurationProperties(string provisioningStatusMessage = null, DateTimeOffset? provisioningStatusUpdateTimeUtc = null, DevOpsProvisioningState? provisioningState = null, string authorizationCode = null, DevOpsAutoDiscovery? autoDiscovery = null, IEnumerable topLevelInventoryList = null) + /// + /// The allow-list custom alert rules. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , and . + /// + /// The deny-list custom alert rules. + /// A new instance for mocking. + public static DeviceSecurityGroupData DeviceSecurityGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable thresholdRules = null, IEnumerable timeWindowRules = null, IEnumerable allowlistRules = null, IEnumerable denylistRules = null) { - topLevelInventoryList ??= new List(); + thresholdRules ??= new List(); + timeWindowRules ??= new List(); + allowlistRules ??= new List(); + denylistRules ??= new List(); - return new DevOpsConfigurationProperties( - provisioningStatusMessage, - provisioningStatusUpdateTimeUtc, - provisioningState, - authorizationCode != null ? new DevOpsAuthorization(authorizationCode, serializedAdditionalRawData: null) : null, - autoDiscovery, - topLevelInventoryList?.ToList(), + return new DeviceSecurityGroupData( + id, + name, + resourceType, + systemData, + thresholdRules?.ToList(), + timeWindowRules?.ToList(), + allowlistRules?.ToList(), + denylistRules?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . + /// The display name of the custom alert. + /// The description of the custom alert. + /// Status of the custom alert. + /// The minimum threshold. + /// The maximum threshold. + /// A new instance for mocking. + public static ThresholdCustomAlertRule ThresholdCustomAlertRule(string displayName = null, string description = null, bool isEnabled = default, int minThreshold = default, int maxThreshold = default) + { + return new ThresholdCustomAlertRule( + displayName, + description, + isEnabled, + "ThresholdCustomAlertRule", + serializedAdditionalRawData: null, + minThreshold, + maxThreshold); + } + + /// Initializes a new instance of . + /// The display name of the custom alert. + /// The description of the custom alert. + /// Status of the custom alert. + /// The type of the custom alert rule. + /// A new instance for mocking. + public static CustomAlertRule CustomAlertRule(string displayName = null, string description = null, bool isEnabled = default, string ruleType = null) + { + return new UnknownCustomAlertRule(displayName, description, isEnabled, ruleType, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The display name of the custom alert. + /// The description of the custom alert. + /// Status of the custom alert. + /// The minimum threshold. + /// The maximum threshold. + /// The time window size in iso8601 format. + /// A new instance for mocking. + public static TimeWindowCustomAlertRule TimeWindowCustomAlertRule(string displayName = null, string description = null, bool isEnabled = default, int minThreshold = default, int maxThreshold = default, TimeSpan timeWindowSize = default) + { + return new TimeWindowCustomAlertRule( + displayName, + description, + isEnabled, + "TimeWindowCustomAlertRule", + serializedAdditionalRawData: null, + minThreshold, + maxThreshold, + timeWindowSize); + } + + /// Initializes a new instance of . + /// The display name of the custom alert. + /// The description of the custom alert. + /// Status of the custom alert. + /// The value type of the items in the list. + /// The values to allow. The format of the values depends on the rule type. + /// A new instance for mocking. + public static AllowlistCustomAlertRule AllowlistCustomAlertRule(string displayName = null, string description = null, bool isEnabled = default, SecurityValueType? valueType = null, IEnumerable allowlistValues = null) + { + allowlistValues ??= new List(); + + return new AllowlistCustomAlertRule( + displayName, + description, + isEnabled, + "AllowlistCustomAlertRule", + serializedAdditionalRawData: null, + valueType, + allowlistValues?.ToList()); + } + + /// Initializes a new instance of . + /// The display name of the custom alert. + /// The description of the custom alert. + /// Status of the custom alert. + /// The value type of the items in the list. + /// A new instance for mocking. + public static ListCustomAlertRule ListCustomAlertRule(string displayName = null, string description = null, bool isEnabled = default, SecurityValueType? valueType = null) + { + return new ListCustomAlertRule( + displayName, + description, + isEnabled, + "ListCustomAlertRule", + serializedAdditionalRawData: null, + valueType); + } + + /// Initializes a new instance of . + /// The display name of the custom alert. + /// The description of the custom alert. + /// Status of the custom alert. + /// The value type of the items in the list. + /// The values to deny. The format of the values depends on the rule type. + /// A new instance for mocking. + public static DenylistCustomAlertRule DenylistCustomAlertRule(string displayName = null, string description = null, bool isEnabled = default, SecurityValueType? valueType = null, IEnumerable denylistValues = null) + { + denylistValues ??= new List(); + + return new DenylistCustomAlertRule( + displayName, + description, + isEnabled, + "DenylistCustomAlertRule", + serializedAdditionalRawData: null, + valueType, + denylistValues?.ToList()); + } + + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// GitHub Owner properties. - /// A new instance for mocking. - public static SecurityConnectorGitHubOwnerData SecurityConnectorGitHubOwnerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SecurityConnectorGitHubOwnerProperties properties = null) + /// Security analytics of your IoT Security solution. + /// Number of unhealthy devices within your IoT Security solution. + /// List of device metrics by the aggregation date. + /// List of the 3 devices with the most alerts. + /// List of the 3 most prevalent device alerts. + /// List of the 3 most prevalent device recommendations. + /// A new instance for mocking. + public static IotSecuritySolutionAnalyticsModelData IotSecuritySolutionAnalyticsModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IotSeverityMetrics metrics = null, long? unhealthyDeviceCount = null, IEnumerable devicesMetrics = null, IEnumerable topAlertedDevices = null, IEnumerable mostPrevalentDeviceAlerts = null, IEnumerable mostPrevalentDeviceRecommendations = null) { - return new SecurityConnectorGitHubOwnerData( + devicesMetrics ??= new List(); + topAlertedDevices ??= new List(); + mostPrevalentDeviceAlerts ??= new List(); + mostPrevalentDeviceRecommendations ??= new List(); + + return new IotSecuritySolutionAnalyticsModelData( id, name, resourceType, systemData, - properties, + metrics, + unhealthyDeviceCount, + devicesMetrics?.ToList(), + topAlertedDevices?.ToList(), + mostPrevalentDeviceAlerts?.ToList(), + mostPrevalentDeviceRecommendations?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Gets or sets resource status message. - /// Gets or sets time when resource was last checked. - /// - /// The provisioning state of the resource. - /// - /// Pending - Provisioning pending. - /// Failed - Provisioning failed. - /// Succeeded - Successful provisioning. - /// Canceled - Provisioning canceled. - /// PendingDeletion - Deletion pending. - /// DeletionSuccess - Deletion successful. - /// DeletionFailure - Deletion failure. - /// - /// Gets or sets GitHub Owner url. - /// Gets or sets internal GitHub id. - /// - /// Details about resource onboarding status across all connectors. - /// - /// OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only applicable to top-level resources. - /// Onboarded - this resource has already been onboarded by the specified connector. - /// NotOnboarded - this resource has not been onboarded to any connector. - /// NotApplicable - the onboarding state is not applicable to the current endpoint. - /// - /// A new instance for mocking. - public static SecurityConnectorGitHubOwnerProperties SecurityConnectorGitHubOwnerProperties(string provisioningStatusMessage = null, DateTimeOffset? provisioningStatusUpdateTimeUtc = null, DevOpsProvisioningState? provisioningState = null, Uri ownerUri = null, string gitHubInternalId = null, ResourceOnboardingState? onboardingState = null) + /// Initializes a new instance of . + /// Count of high severity alerts/recommendations. + /// Count of medium severity alerts/recommendations. + /// Count of low severity alerts/recommendations. + /// A new instance for mocking. + public static IotSeverityMetrics IotSeverityMetrics(long? high = null, long? medium = null, long? low = null) { - return new SecurityConnectorGitHubOwnerProperties( - provisioningStatusMessage, - provisioningStatusUpdateTimeUtc, - provisioningState, - ownerUri, - gitHubInternalId, - onboardingState, - serializedAdditionalRawData: null); + return new IotSeverityMetrics(high, medium, low, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . + /// Aggregation of IoT Security solution device alert metrics by date. + /// Device alert count by severity. + /// A new instance for mocking. + public static IotSecuritySolutionAnalyticsModelDevicesMetrics IotSecuritySolutionAnalyticsModelDevicesMetrics(DateTimeOffset? date = null, IotSeverityMetrics devicesMetrics = null) + { + return new IotSecuritySolutionAnalyticsModelDevicesMetrics(date, devicesMetrics, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Device identifier. + /// Number of alerts raised for this device. + /// A new instance for mocking. + public static IotSecurityAlertedDevice IotSecurityAlertedDevice(string deviceId = null, long? alertsCount = null) + { + return new IotSecurityAlertedDevice(deviceId, alertsCount, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Display name of the alert. + /// Assessed Alert severity. + /// Number of alerts raised for this alert type. + /// A new instance for mocking. + public static IotSecurityDeviceAlert IotSecurityDeviceAlert(string alertDisplayName = null, ReportedSeverity? reportedSeverity = null, long? alertsCount = null) + { + return new IotSecurityDeviceAlert(alertDisplayName, reportedSeverity, alertsCount, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Display name of the recommendation. + /// Assessed recommendation severity. + /// Number of devices with this recommendation. + /// A new instance for mocking. + public static IotSecurityDeviceRecommendation IotSecurityDeviceRecommendation(string recommendationDisplayName = null, ReportedSeverity? reportedSeverity = null, long? devicesCount = null) + { + return new IotSecurityDeviceRecommendation(recommendationDisplayName, reportedSeverity, devicesCount, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// GitHub Repository properties. - /// A new instance for mocking. - public static SecurityConnectorGitHubRepositoryData SecurityConnectorGitHubRepositoryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SecurityConnectorGitHubRepositoryProperties properties = null) + /// Name of the alert type. + /// Display name of the alert type. + /// Date of detection. + /// Name of the organization that raised the alert. + /// Assessed alert severity. + /// Recommended steps for remediation. + /// Description of the suspected vulnerability and meaning. + /// Number of alerts occurrences within the aggregated time window. + /// Azure resource ID of the resource that received the alerts. + /// The type of the alerted resource (Azure, Non-Azure). + /// IoT Security solution alert response. + /// Log analytics query for getting the list of affected devices/alerts. + /// 10 devices with the highest number of occurrences of this alert type, on this day. + /// Resource tags. + /// A new instance for mocking. + public static IotSecurityAggregatedAlertData IotSecurityAggregatedAlertData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string alertType = null, string alertDisplayName = null, DateTimeOffset? aggregatedOn = null, string vendorName = null, ReportedSeverity? reportedSeverity = null, string remediationSteps = null, string description = null, long? count = null, string effectedResourceType = null, string systemSource = null, string actionTaken = null, string logAnalyticsQuery = null, IEnumerable topDevicesList = null, IDictionary tags = null) { - return new SecurityConnectorGitHubRepositoryData( - id, - name, - resourceType, - systemData, - properties, - serializedAdditionalRawData: null); - } + topDevicesList ??= new List(); + tags ??= new Dictionary(); - /// Initializes a new instance of . - /// Gets or sets resource status message. - /// Gets or sets time when resource was last checked. - /// - /// The provisioning state of the resource. - /// - /// Pending - Provisioning pending. - /// Failed - Provisioning failed. - /// Succeeded - Successful provisioning. - /// Canceled - Provisioning canceled. - /// PendingDeletion - Deletion pending. - /// DeletionSuccess - Deletion successful. - /// DeletionFailure - Deletion failure. - /// - /// - /// Gets or sets GitHub Repository id. - /// - /// This is a numeric id defined by Github. - /// Eg: "123456". - /// - /// - /// Gets or sets GitHub Repository name. - /// Eg: "new-repo-1". - /// - /// - /// Gets or sets GitHub Full Name. - /// Repository name, prefixed with Owner name. - /// Eg: "my-org/new-repo-1". - /// - /// - /// Details about resource onboarding status across all connectors. - /// - /// OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only applicable to top-level resources. - /// Onboarded - this resource has already been onboarded by the specified connector. - /// NotOnboarded - this resource has not been onboarded to any connector. - /// NotApplicable - the onboarding state is not applicable to the current endpoint. - /// - /// Gets or sets GitHub Repository url. - /// Gets or sets parent GitHub Owner name. - /// A new instance for mocking. - public static SecurityConnectorGitHubRepositoryProperties SecurityConnectorGitHubRepositoryProperties(string provisioningStatusMessage = null, DateTimeOffset? provisioningStatusUpdateTimeUtc = null, DevOpsProvisioningState? provisioningState = null, string repoId = null, string repoName = null, string repoFullName = null, ResourceOnboardingState? onboardingState = null, Uri repoUri = null, string parentOwnerName = null) - { - return new SecurityConnectorGitHubRepositoryProperties( - provisioningStatusMessage, - provisioningStatusUpdateTimeUtc, - provisioningState, - repoId, - repoName, - repoFullName, - onboardingState, - repoUri, - parentOwnerName, + return new IotSecurityAggregatedAlertData( + id, + name, + resourceType, + systemData, + alertType, + alertDisplayName, + aggregatedOn, + vendorName, + reportedSeverity, + remediationSteps, + description, + count, + effectedResourceType, + systemSource, + actionTaken, + logAnalyticsQuery, + topDevicesList?.ToList(), + tags, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . + /// Name of the device. + /// Number of alerts raised for this device. + /// Most recent time this alert was raised for this device, on this day. + /// A new instance for mocking. + public static IotSecurityAggregatedAlertTopDevice IotSecurityAggregatedAlertTopDevice(string deviceId = null, long? alertsCount = null, string lastOccurrence = null) + { + return new IotSecurityAggregatedAlertTopDevice(deviceId, alertsCount, lastOccurrence, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// GitLab Group properties. - /// A new instance for mocking. - public static SecurityConnectorGitLabGroupData SecurityConnectorGitLabGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SecurityConnectorGitLabGroupProperties properties = null) + /// Name of the recommendation. + /// Display name of the recommendation type. + /// Description of the suspected vulnerability and meaning. + /// Recommendation-type GUID. + /// Name of the organization that made the recommendation. + /// Recommended steps for remediation. + /// Assessed recommendation severity. + /// Number of healthy devices within the IoT Security solution. + /// Number of unhealthy devices within the IoT Security solution. + /// Log analytics query for getting the list of affected devices/alerts. + /// Resource tags. + /// A new instance for mocking. + public static IotSecurityAggregatedRecommendationData IotSecurityAggregatedRecommendationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string recommendationName = null, string recommendationDisplayName = null, string description = null, string recommendationTypeId = null, string detectedBy = null, string remediationSteps = null, ReportedSeverity? reportedSeverity = null, long? healthyDevices = null, long? unhealthyDeviceCount = null, string logAnalyticsQuery = null, IDictionary tags = null) { - return new SecurityConnectorGitLabGroupData( + tags ??= new Dictionary(); + + return new IotSecurityAggregatedRecommendationData( id, name, resourceType, systemData, - properties, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Gets or sets resource status message. - /// Gets or sets time when resource was last checked. - /// - /// The provisioning state of the resource. - /// - /// Pending - Provisioning pending. - /// Failed - Provisioning failed. - /// Succeeded - Successful provisioning. - /// Canceled - Provisioning canceled. - /// PendingDeletion - Deletion pending. - /// DeletionSuccess - Deletion successful. - /// DeletionFailure - Deletion failure. - /// - /// - /// Gets or sets the fully-qualified name of the Group object. - /// - /// This contains the entire namespace hierarchy where namespaces are separated by the '$' character. - /// - /// - /// Gets or sets the human readable fully-qualified name of the Group object. - /// - /// This contains the entire namespace hierarchy as seen on GitLab UI where namespaces are separated by the '/' character. - /// - /// Gets or sets the url of the GitLab Group. - /// - /// Details about resource onboarding status across all connectors. - /// - /// OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only applicable to top-level resources. - /// Onboarded - this resource has already been onboarded by the specified connector. - /// NotOnboarded - this resource has not been onboarded to any connector. - /// NotApplicable - the onboarding state is not applicable to the current endpoint. - /// - /// A new instance for mocking. - public static SecurityConnectorGitLabGroupProperties SecurityConnectorGitLabGroupProperties(string provisioningStatusMessage = null, DateTimeOffset? provisioningStatusUpdateTimeUtc = null, DevOpsProvisioningState? provisioningState = null, string fullyQualifiedName = null, string fullyQualifiedFriendlyName = null, Uri uri = null, ResourceOnboardingState? onboardingState = null) - { - return new SecurityConnectorGitLabGroupProperties( - provisioningStatusMessage, - provisioningStatusUpdateTimeUtc, - provisioningState, - fullyQualifiedName, - fullyQualifiedFriendlyName, - uri, - onboardingState, + recommendationName, + recommendationDisplayName, + description, + recommendationTypeId, + detectedBy, + remediationSteps, + reportedSeverity, + healthyDevices, + unhealthyDeviceCount, + logAnalyticsQuery, + tags, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// GitLab Project properties. - /// A new instance for mocking. - public static SecurityConnectorGitLabProjectData SecurityConnectorGitLabProjectData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SecurityConnectorGitLabProjectProperties properties = null) + /// The tags. + /// The location. + /// Workspace resource ID. + /// Resource display name. + /// Status of the IoT Security solution. + /// List of additional options for exporting to workspace data. + /// Disabled data sources. Disabling these data sources compromises the system. + /// IoT Hub resource IDs. + /// Properties of the IoT Security solution's user defined resources. + /// List of resources that were automatically discovered as relevant to the security solution. + /// List of the configuration status for each recommendation type. + /// Unmasked IP address logging status. + /// List of additional workspaces. + /// A new instance for mocking. + public static IotSecuritySolutionData IotSecuritySolutionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string workspace = null, string displayName = null, SecuritySolutionStatus? status = null, IEnumerable export = null, IEnumerable disabledDataSources = null, IEnumerable iotHubs = null, UserDefinedResourcesProperties userDefinedResources = null, IEnumerable autoDiscoveredResources = null, IEnumerable recommendationsConfiguration = null, UnmaskedIPLoggingStatus? unmaskedIPLoggingStatus = null, IEnumerable additionalWorkspaces = null) { - return new SecurityConnectorGitLabProjectData( + tags ??= new Dictionary(); + export ??= new List(); + disabledDataSources ??= new List(); + iotHubs ??= new List(); + autoDiscoveredResources ??= new List(); + recommendationsConfiguration ??= new List(); + additionalWorkspaces ??= new List(); + + return new IotSecuritySolutionData( id, name, resourceType, systemData, - properties, + tags, + location, + workspace, + displayName, + status, + export?.ToList(), + disabledDataSources?.ToList(), + iotHubs?.ToList(), + userDefinedResources, + autoDiscoveredResources?.ToList(), + recommendationsConfiguration?.ToList(), + unmaskedIPLoggingStatus, + additionalWorkspaces?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Gets or sets resource status message. - /// Gets or sets time when resource was last checked. - /// - /// The provisioning state of the resource. - /// - /// Pending - Provisioning pending. - /// Failed - Provisioning failed. - /// Succeeded - Successful provisioning. - /// Canceled - Provisioning canceled. - /// PendingDeletion - Deletion pending. - /// DeletionSuccess - Deletion successful. - /// DeletionFailure - Deletion failure. - /// - /// - /// Gets or sets the fully-qualified name of the project object. - /// - /// This contains the entire hierarchy where entities are separated by the '$' character. - /// - /// - /// Gets or sets the human readable fully-qualified name of the Project object. - /// - /// This contains the entire namespace hierarchy as seen on GitLab UI where entities are separated by the '/' character. - /// - /// - /// Gets or sets the fully-qualified name of the project's parent group object. - /// - /// This contains the entire hierarchy where namespaces are separated by the '$' character. - /// - /// Gets or sets the url of the GitLab Project. - /// - /// Details about resource onboarding status across all connectors. - /// - /// OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only applicable to top-level resources. - /// Onboarded - this resource has already been onboarded by the specified connector. - /// NotOnboarded - this resource has not been onboarded to any connector. - /// NotApplicable - the onboarding state is not applicable to the current endpoint. - /// - /// A new instance for mocking. - public static SecurityConnectorGitLabProjectProperties SecurityConnectorGitLabProjectProperties(string provisioningStatusMessage = null, DateTimeOffset? provisioningStatusUpdateTimeUtc = null, DevOpsProvisioningState? provisioningState = null, string fullyQualifiedName = null, string fullyQualifiedFriendlyName = null, string fullyQualifiedParentGroupName = null, Uri uri = null, ResourceOnboardingState? onboardingState = null) + /// Initializes a new instance of . + /// The type of IoT Security recommendation. + /// + /// Recommendation status. When the recommendation status is disabled recommendations are not generated. + /// A new instance for mocking. + public static RecommendationConfigurationProperties RecommendationConfigurationProperties(IotSecurityRecommendationType recommendationType = default, string name = null, RecommendationConfigStatus status = default) { - return new SecurityConnectorGitLabProjectProperties( - provisioningStatusMessage, - provisioningStatusUpdateTimeUtc, - provisioningState, - fullyQualifiedName, - fullyQualifiedFriendlyName, - fullyQualifiedParentGroupName, - uri, - onboardingState, - serializedAdditionalRawData: null); + return new RecommendationConfigurationProperties(recommendationType, name, status, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The tags. - /// The location. - /// The multi cloud resource identifier (account id in case of AWS connector, project number in case of GCP connector). - /// The date on which the trial period will end, if applicable. Trial period exists for 30 days after upgrading to payed offerings. - /// The multi cloud resource's cloud name. - /// - /// A collection of offerings for the security connector. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , and . - /// - /// - /// The security connector environment data. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - /// Kind of the resource. - /// Entity tag is used for comparing two or more entities from the same requested resource. - /// A new instance for mocking. - public static SecurityConnectorData SecurityConnectorData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string hierarchyIdentifier = null, DateTimeOffset? hierarchyIdentifierTrialEndOn = null, SecurityCenterCloudName? environmentName = null, IEnumerable offerings = null, SecurityConnectorEnvironment environmentData = null, string kind = null, ETag? eTag = null) + /// The UTC time on which the allowed connections resource was calculated. + /// List of connectable resources. + /// Location where the resource is stored. + /// A new instance for mocking. + public static SecurityCenterAllowedConnection SecurityCenterAllowedConnection(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? calculatedOn = null, IEnumerable connectableResources = null, AzureLocation? location = null) { - tags ??= new Dictionary(); - offerings ??= new List(); + connectableResources ??= new List(); - return new SecurityConnectorData( + return new SecurityCenterAllowedConnection( id, name, resourceType, systemData, - tags, + calculatedOn, + connectableResources?.ToList(), location, - hierarchyIdentifier, - hierarchyIdentifierTrialEndOn, - environmentName, - offerings?.ToList(), - environmentData, - kind, - eTag, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The type of the security offering. - /// The offering description. - /// A new instance for mocking. - public static SecurityCenterCloudOffering SecurityCenterCloudOffering(string offeringType = null, string description = null) + /// Initializes a new instance of . + /// The Azure resource id. + /// The list of Azure resources that the resource has inbound allowed connection from. + /// The list of Azure resources that the resource has outbound allowed connection to. + /// A new instance for mocking. + public static ConnectableResourceInfo ConnectableResourceInfo(ResourceIdentifier id = null, IEnumerable inboundConnectedResources = null, IEnumerable outboundConnectedResources = null) + { + inboundConnectedResources ??= new List(); + outboundConnectedResources ??= new List(); + + return new ConnectableResourceInfo(id, inboundConnectedResources?.ToList(), outboundConnectedResources?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The Azure resource id of the connected resource. + /// The allowed tcp ports. + /// The allowed udp ports. + /// A new instance for mocking. + public static ConnectedResourceInfo ConnectedResourceInfo(ResourceIdentifier connectedResourceId = null, string tcpPorts = null, string udpPorts = null) { - return new UnknownCloudOffering(offeringType == null ? default : new OfferingType(offeringType), description, serializedAdditionalRawData: null); + return new ConnectedResourceInfo(connectedResourceId, tcpPorts, udpPorts, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The status of the resource regarding a single assessment. - /// A new instance for mocking. - public static ComplianceResultData ComplianceResultData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SecurityAssessmentResourceStatus? resourceStatus = null) + /// The security family of the discovered solution. + /// The security solutions' image offer. + /// The security solutions' image publisher. + /// The security solutions' image sku. + /// Location where the resource is stored. + /// A new instance for mocking. + public static DiscoveredSecuritySolution DiscoveredSecuritySolution(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SecurityFamily securityFamily = default, string offer = null, string publisher = null, string sku = null, AzureLocation? location = null) { - return new ComplianceResultData( + return new DiscoveredSecuritySolution( id, name, resourceType, systemData, - resourceStatus, + securityFamily, + offer, + publisher, + sku, + location, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// Indicates whether Advanced Threat Protection is enabled. - /// A new instance for mocking. - public static AdvancedThreatProtectionSettingData AdvancedThreatProtectionSettingData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? isEnabled = null) + /// The kind of the external solution. + /// Location where the resource is stored. + /// A new instance for mocking. + public static ExternalSecuritySolution ExternalSecuritySolution(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string kind = null, AzureLocation? location = null) { - return new AdvancedThreatProtectionSettingData( + return new ExternalSecuritySolution( id, name, resourceType, systemData, - isEnabled, + kind == null ? null : new ExternalSecuritySolutionKind?(kind), + location, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// - /// The list of custom alert threshold rules. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , and . - /// - /// - /// The list of custom alert time-window rules. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , and . - /// - /// - /// The allow-list custom alert rules. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . - /// - /// The deny-list custom alert rules. - /// A new instance for mocking. - public static DeviceSecurityGroupData DeviceSecurityGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable thresholdRules = null, IEnumerable timeWindowRules = null, IEnumerable allowlistRules = null, IEnumerable denylistRules = null) + /// Configurations for Microsoft.Compute/virtualMachines resource type. + /// + /// Gets the provisioning state of the Just-in-Time policy. + /// Kind of the resource. + /// Location where the resource is stored. + /// A new instance for mocking. + public static JitNetworkAccessPolicyData JitNetworkAccessPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable virtualMachines = null, IEnumerable requests = null, string provisioningState = null, string kind = null, AzureLocation? location = null) { - thresholdRules ??= new List(); - timeWindowRules ??= new List(); - allowlistRules ??= new List(); - denylistRules ??= new List(); + virtualMachines ??= new List(); + requests ??= new List(); - return new DeviceSecurityGroupData( + return new JitNetworkAccessPolicyData( id, name, resourceType, systemData, - thresholdRules?.ToList(), - timeWindowRules?.ToList(), - allowlistRules?.ToList(), - denylistRules?.ToList(), + virtualMachines?.ToList(), + requests?.ToList(), + provisioningState, + kind, + location, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The display name of the custom alert. - /// The description of the custom alert. - /// Status of the custom alert. - /// The minimum threshold. - /// The maximum threshold. - /// A new instance for mocking. - public static ThresholdCustomAlertRule ThresholdCustomAlertRule(string displayName = null, string description = null, bool isEnabled = default, int minThreshold = default, int maxThreshold = default) - { - return new ThresholdCustomAlertRule( - displayName, - description, - isEnabled, - "ThresholdCustomAlertRule", - serializedAdditionalRawData: null, - minThreshold, - maxThreshold); - } - - /// Initializes a new instance of . - /// The display name of the custom alert. - /// The description of the custom alert. - /// Status of the custom alert. - /// The type of the custom alert rule. - /// A new instance for mocking. - public static CustomAlertRule CustomAlertRule(string displayName = null, string description = null, bool isEnabled = default, string ruleType = null) - { - return new UnknownCustomAlertRule(displayName, description, isEnabled, ruleType, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The display name of the custom alert. - /// The description of the custom alert. - /// Status of the custom alert. - /// The minimum threshold. - /// The maximum threshold. - /// The time window size in iso8601 format. - /// A new instance for mocking. - public static TimeWindowCustomAlertRule TimeWindowCustomAlertRule(string displayName = null, string description = null, bool isEnabled = default, int minThreshold = default, int maxThreshold = default, TimeSpan timeWindowSize = default) + /// Initializes a new instance of . + /// + /// Source of the allowed traffic. If omitted, the request will be for the source IP address of the initiate request. + /// The time to close the request in UTC. + /// A new instance for mocking. + public static JitNetworkAccessPolicyInitiatePort JitNetworkAccessPolicyInitiatePort(int number = default, string allowedSourceAddressPrefix = null, DateTimeOffset endOn = default) { - return new TimeWindowCustomAlertRule( - displayName, - description, - isEnabled, - "TimeWindowCustomAlertRule", - serializedAdditionalRawData: null, - minThreshold, - maxThreshold, - timeWindowSize); + return new JitNetworkAccessPolicyInitiatePort(number, allowedSourceAddressPrefix, endOn, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The display name of the custom alert. - /// The description of the custom alert. - /// Status of the custom alert. - /// The value type of the items in the list. - /// The values to allow. The format of the values depends on the rule type. - /// A new instance for mocking. - public static AllowlistCustomAlertRule AllowlistCustomAlertRule(string displayName = null, string description = null, bool isEnabled = default, SecurityValueType? valueType = null, IEnumerable allowlistValues = null) + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The initiative’s name. + /// The relative weight for each subscription. Used when calculating an aggregated secure score for multiple subscriptions. + /// Maximum score available. + /// Current score. + /// Ratio of the current score divided by the maximum. Rounded to 4 digits after the decimal point. + /// A new instance for mocking. + public static SecureScoreData SecureScoreData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, long? weight = null, int? max = null, double? current = null, double? percentage = null) { - allowlistValues ??= new List(); - - return new AllowlistCustomAlertRule( + return new SecureScoreData( + id, + name, + resourceType, + systemData, displayName, - description, - isEnabled, - "AllowlistCustomAlertRule", - serializedAdditionalRawData: null, - valueType, - allowlistValues?.ToList()); + weight, + max, + current, + percentage, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The display name of the custom alert. - /// The description of the custom alert. - /// Status of the custom alert. - /// The value type of the items in the list. - /// A new instance for mocking. - public static ListCustomAlertRule ListCustomAlertRule(string displayName = null, string description = null, bool isEnabled = default, SecurityValueType? valueType = null) + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// User friendly display name of the control. + /// Number of healthy resources in the control. + /// Number of unhealthy resources in the control. + /// Number of not applicable resources in the control. + /// The relative weight for this specific control in each of your subscriptions. Used when calculating an aggregated score for this control across all of your subscriptions. + /// Information about the security control. + /// Maximum score available. + /// Current score. + /// Ratio of the current score divided by the maximum. Rounded to 4 digits after the decimal point. + /// A new instance for mocking. + public static SecureScoreControlDetails SecureScoreControlDetails(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, int? healthyResourceCount = null, int? unhealthyResourceCount = null, int? notApplicableResourceCount = null, long? weight = null, SecureScoreControlDefinitionItem definition = null, int? max = null, double? current = null, double? percentage = null) { - return new ListCustomAlertRule( + return new SecureScoreControlDetails( + id, + name, + resourceType, + systemData, displayName, - description, - isEnabled, - "ListCustomAlertRule", - serializedAdditionalRawData: null, - valueType); + healthyResourceCount, + unhealthyResourceCount, + notApplicableResourceCount, + weight, + definition, + max, + current, + percentage, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The display name of the custom alert. - /// The description of the custom alert. - /// Status of the custom alert. - /// The value type of the items in the list. - /// The values to deny. The format of the values depends on the rule type. - /// A new instance for mocking. - public static DenylistCustomAlertRule DenylistCustomAlertRule(string displayName = null, string description = null, bool isEnabled = default, SecurityValueType? valueType = null, IEnumerable denylistValues = null) + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// User friendly display name of the control. + /// User friendly description of the control. + /// Maximum control score (0..10). + /// Source object from which the control was created. + /// Array of assessments metadata IDs that are included in this security control. + /// A new instance for mocking. + public static SecureScoreControlDefinitionItem SecureScoreControlDefinitionItem(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, string description = null, int? maxScore = null, SecurityControlType? sourceType = null, IEnumerable assessmentDefinitions = null) { - denylistValues ??= new List(); + assessmentDefinitions ??= new List(); - return new DenylistCustomAlertRule( + return new SecureScoreControlDefinitionItem( + id, + name, + resourceType, + systemData, displayName, description, - isEnabled, - "DenylistCustomAlertRule", - serializedAdditionalRawData: null, - valueType, - denylistValues?.ToList()); + maxScore, + sourceType != null ? new SecureScoreControlDefinitionSource(sourceType, serializedAdditionalRawData: null) : null, + assessmentDefinitions?.ToList(), + serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// Security analytics of your IoT Security solution. - /// Number of unhealthy devices within your IoT Security solution. - /// List of device metrics by the aggregation date. - /// List of the 3 devices with the most alerts. - /// List of the 3 most prevalent device alerts. - /// List of the 3 most prevalent device recommendations. - /// A new instance for mocking. - public static IotSecuritySolutionAnalyticsModelData IotSecuritySolutionAnalyticsModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IotSeverityMetrics metrics = null, long? unhealthyDeviceCount = null, IEnumerable devicesMetrics = null, IEnumerable topAlertedDevices = null, IEnumerable mostPrevalentDeviceAlerts = null, IEnumerable mostPrevalentDeviceRecommendations = null) + /// The security family of the security solution. + /// The security family provisioning State. + /// The security solutions' template. + /// The security solutions' status. + /// Location where the resource is stored. + /// A new instance for mocking. + public static SecuritySolution SecuritySolution(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SecurityFamily? securityFamily = null, SecurityFamilyProvisioningState? provisioningState = null, string template = null, string protectionStatus = null, AzureLocation? location = null) { - devicesMetrics ??= new List(); - topAlertedDevices ??= new List(); - mostPrevalentDeviceAlerts ??= new List(); - mostPrevalentDeviceRecommendations ??= new List(); - - return new IotSecuritySolutionAnalyticsModelData( + return new SecuritySolution( id, name, resourceType, systemData, - metrics, - unhealthyDeviceCount, - devicesMetrics?.ToList(), - topAlertedDevices?.ToList(), - mostPrevalentDeviceAlerts?.ToList(), - mostPrevalentDeviceRecommendations?.ToList(), + securityFamily, + provisioningState, + template, + protectionStatus, + location, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Count of high severity alerts/recommendations. - /// Count of medium severity alerts/recommendations. - /// Count of low severity alerts/recommendations. - /// A new instance for mocking. - public static IotSeverityMetrics IotSeverityMetrics(long? high = null, long? medium = null, long? low = null) - { - return new IotSeverityMetrics(high, medium, low, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Aggregation of IoT Security solution device alert metrics by date. - /// Device alert count by severity. - /// A new instance for mocking. - public static IotSecuritySolutionAnalyticsModelDevicesMetrics IotSecuritySolutionAnalyticsModelDevicesMetrics(DateTimeOffset? date = null, IotSeverityMetrics devicesMetrics = null) - { - return new IotSecuritySolutionAnalyticsModelDevicesMetrics(date, devicesMetrics, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Device identifier. - /// Number of alerts raised for this device. - /// A new instance for mocking. - public static IotSecurityAlertedDevice IotSecurityAlertedDevice(string deviceId = null, long? alertsCount = null) - { - return new IotSecurityAlertedDevice(deviceId, alertsCount, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Display name of the alert. - /// Assessed Alert severity. - /// Number of alerts raised for this alert type. - /// A new instance for mocking. - public static IotSecurityDeviceAlert IotSecurityDeviceAlert(string alertDisplayName = null, ReportedSeverity? reportedSeverity = null, long? alertsCount = null) - { - return new IotSecurityDeviceAlert(alertDisplayName, reportedSeverity, alertsCount, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Display name of the recommendation. - /// Assessed recommendation severity. - /// Number of devices with this recommendation. - /// A new instance for mocking. - public static IotSecurityDeviceRecommendation IotSecurityDeviceRecommendation(string recommendationDisplayName = null, ReportedSeverity? reportedSeverity = null, long? devicesCount = null) - { - return new IotSecurityDeviceRecommendation(recommendationDisplayName, reportedSeverity, devicesCount, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// Name of the alert type. - /// Display name of the alert type. - /// Date of detection. - /// Name of the organization that raised the alert. - /// Assessed alert severity. - /// Recommended steps for remediation. - /// Description of the suspected vulnerability and meaning. - /// Number of alerts occurrences within the aggregated time window. - /// Azure resource ID of the resource that received the alerts. - /// The type of the alerted resource (Azure, Non-Azure). - /// IoT Security solution alert response. - /// Log analytics query for getting the list of affected devices/alerts. - /// 10 devices with the highest number of occurrences of this alert type, on this day. - /// Resource tags. - /// A new instance for mocking. - public static IotSecurityAggregatedAlertData IotSecurityAggregatedAlertData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string alertType = null, string alertDisplayName = null, DateTimeOffset? aggregatedOn = null, string vendorName = null, ReportedSeverity? reportedSeverity = null, string remediationSteps = null, string description = null, long? count = null, string effectedResourceType = null, string systemSource = null, string actionTaken = null, string logAnalyticsQuery = null, IEnumerable topDevicesList = null, IDictionary tags = null) + /// The security family of the security solution. + /// The security solutions' vendor name. + /// The security solutions' package info url. + /// The security solutions' product name. + /// The security solutions' publisher. + /// The security solutions' publisher display name. + /// The security solutions' template. + /// Location where the resource is stored. + /// A new instance for mocking. + public static SecuritySolutionsReferenceData SecuritySolutionsReferenceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SecurityFamily securityFamily = default, string alertVendorName = null, Uri packageInfoUri = null, string productName = null, string publisher = null, string publisherDisplayName = null, string template = null, AzureLocation? location = null) { - topDevicesList ??= new List(); - tags ??= new Dictionary(); - - return new IotSecurityAggregatedAlertData( + return new SecuritySolutionsReferenceData( id, name, resourceType, systemData, - alertType, - alertDisplayName, - aggregatedOn, - vendorName, - reportedSeverity, - remediationSteps, - description, - count, - effectedResourceType, - systemSource, - actionTaken, - logAnalyticsQuery, - topDevicesList?.ToList(), - tags, + securityFamily, + alertVendorName, + packageInfoUri, + productName, + publisher, + publisherDisplayName, + template, + location, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Name of the device. - /// Number of alerts raised for this device. - /// Most recent time this alert was raised for this device, on this day. - /// A new instance for mocking. - public static IotSecurityAggregatedAlertTopDevice IotSecurityAggregatedAlertTopDevice(string deviceId = null, long? alertsCount = null, string lastOccurrence = null) - { - return new IotSecurityAggregatedAlertTopDevice(deviceId, alertsCount, lastOccurrence, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// Name of the recommendation. - /// Display name of the recommendation type. - /// Description of the suspected vulnerability and meaning. - /// Recommendation-type GUID. - /// Name of the organization that made the recommendation. - /// Recommended steps for remediation. - /// Assessed recommendation severity. - /// Number of healthy devices within the IoT Security solution. - /// Number of unhealthy devices within the IoT Security solution. - /// Log analytics query for getting the list of affected devices/alerts. - /// Resource tags. - /// A new instance for mocking. - public static IotSecurityAggregatedRecommendationData IotSecurityAggregatedRecommendationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string recommendationName = null, string recommendationDisplayName = null, string description = null, string recommendationTypeId = null, string detectedBy = null, string remediationSteps = null, ReportedSeverity? reportedSeverity = null, long? healthyDevices = null, long? unhealthyDeviceCount = null, string logAnalyticsQuery = null, IDictionary tags = null) + /// The provisioningState of the vulnerability assessment capability on the VM. + /// A new instance for mocking. + public static ServerVulnerabilityAssessmentData ServerVulnerabilityAssessmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ServerVulnerabilityAssessmentPropertiesProvisioningState? provisioningState = null) { - tags ??= new Dictionary(); - - return new IotSecurityAggregatedRecommendationData( + return new ServerVulnerabilityAssessmentData( id, name, resourceType, systemData, - recommendationName, - recommendationDisplayName, - description, - recommendationTypeId, - detectedBy, - remediationSteps, - reportedSeverity, - healthyDevices, - unhealthyDeviceCount, - logAnalyticsQuery, - tags, + provisioningState, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The tags. - /// The location. - /// Workspace resource ID. - /// Resource display name. - /// Status of the IoT Security solution. - /// List of additional options for exporting to workspace data. - /// Disabled data sources. Disabling these data sources compromises the system. - /// IoT Hub resource IDs. - /// Properties of the IoT Security solution's user defined resources. - /// List of resources that were automatically discovered as relevant to the security solution. - /// List of the configuration status for each recommendation type. - /// Unmasked IP address logging status. - /// List of additional workspaces. - /// A new instance for mocking. - public static IotSecuritySolutionData IotSecuritySolutionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string workspace = null, string displayName = null, SecuritySolutionStatus? status = null, IEnumerable export = null, IEnumerable disabledDataSources = null, IEnumerable iotHubs = null, UserDefinedResourcesProperties userDefinedResources = null, IEnumerable autoDiscoveredResources = null, IEnumerable recommendationsConfiguration = null, UnmaskedIPLoggingStatus? unmaskedIPLoggingStatus = null, IEnumerable additionalWorkspaces = null) + /// The UTC time on which the topology was calculated. + /// Azure resources which are part of this topology resource. + /// Location where the resource is stored. + /// A new instance for mocking. + public static SecurityTopologyResource SecurityTopologyResource(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? calculatedOn = null, IEnumerable topologyResources = null, AzureLocation? location = null) { - tags ??= new Dictionary(); - export ??= new List(); - disabledDataSources ??= new List(); - iotHubs ??= new List(); - autoDiscoveredResources ??= new List(); - recommendationsConfiguration ??= new List(); - additionalWorkspaces ??= new List(); + topologyResources ??= new List(); + + return new SecurityTopologyResource( + id, + name, + resourceType, + systemData, + calculatedOn, + topologyResources?.ToList(), + location, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Azure resource id. + /// The security severity of the resource. + /// Indicates if the resource has security recommendations. + /// Indicates the resource connectivity level to the Internet (InternetFacing, Internal ,etc.). + /// Score of the resource based on its security severity. + /// The location of this resource. + /// Azure resources connected to this resource which are in higher level in the topology view. + /// Azure resources connected to this resource which are in lower level in the topology view. + /// A new instance for mocking. + public static TopologySingleResource TopologySingleResource(ResourceIdentifier resourceId = null, string severity = null, bool? recommendationsExist = null, string networkZones = null, int? topologyScore = null, AzureLocation? location = null, IEnumerable parents = null, IEnumerable children = null) + { + parents ??= new List(); + children ??= new List(); - return new IotSecuritySolutionData( - id, - name, - resourceType, - systemData, - tags, + return new TopologySingleResource( + resourceId, + severity, + recommendationsExist, + networkZones, + topologyScore, location, - workspace, - displayName, - status, - export?.ToList(), - disabledDataSources?.ToList(), - iotHubs?.ToList(), - userDefinedResources, - autoDiscoveredResources?.ToList(), - recommendationsConfiguration?.ToList(), - unmaskedIPLoggingStatus, - additionalWorkspaces?.ToList(), + parents?.ToList(), + children?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The type of IoT Security recommendation. - /// - /// Recommendation status. When the recommendation status is disabled recommendations are not generated. - /// A new instance for mocking. - public static RecommendationConfigurationProperties RecommendationConfigurationProperties(IotSecurityRecommendationType recommendationType = default, string name = null, RecommendationConfigStatus status = default) + /// Initializes a new instance of . + /// Azure resource id which serves as parent resource in topology view. + /// A new instance for mocking. + public static TopologySingleResourceParent TopologySingleResourceParent(ResourceIdentifier resourceId = null) { - return new RecommendationConfigurationProperties(recommendationType, name, status, serializedAdditionalRawData: null); + return new TopologySingleResourceParent(resourceId, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The security rules which are recommended to be effective on the VM. - /// The UTC time on which the rules were calculated. - /// The Network Security Groups effective on the network interfaces of the protected resource. - /// A new instance for mocking. - public static AdaptiveNetworkHardeningData AdaptiveNetworkHardeningData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable rules = null, DateTimeOffset? rulesCalculatedOn = null, IEnumerable effectiveNetworkSecurityGroups = null) + /// Initializes a new instance of . + /// Azure resource id which serves as child resource in topology view. + /// A new instance for mocking. + public static TopologySingleResourceChild TopologySingleResourceChild(ResourceIdentifier resourceId = null) { - rules ??= new List(); - effectiveNetworkSecurityGroups ??= new List(); - - return new AdaptiveNetworkHardeningData( - id, - name, - resourceType, - systemData, - rules?.ToList(), - rulesCalculatedOn, - effectiveNetworkSecurityGroups?.ToList(), - serializedAdditionalRawData: null); + return new TopologySingleResourceChild(resourceId, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The UTC time on which the allowed connections resource was calculated. - /// List of connectable resources. - /// Location where the resource is stored. - /// A new instance for mocking. - public static SecurityCenterAllowedConnection SecurityCenterAllowedConnection(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? calculatedOn = null, IEnumerable connectableResources = null, AzureLocation? location = null) + /// User friendly display name of the assessment. + /// Azure resource ID of the policy definition that turns this assessment calculation on. + /// Human readable description of the assessment. + /// Human readable description of what you should do to mitigate this security issue. + /// + /// The severity level of the assessment. + /// The user impact of the assessment. + /// The implementation effort required to remediate this assessment. + /// + /// True if this assessment is in preview release status. + /// BuiltIn if the assessment based on built-in Azure Policy definition, Custom if the assessment based on custom Azure Policy definition. + /// Describes the partner that created the assessment. + /// + /// + /// + /// + /// A new instance for mocking. + public static SecurityAssessmentMetadataData SecurityAssessmentMetadataData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, ResourceIdentifier policyDefinitionId = null, string description = null, string remediationDescription = null, IEnumerable categories = null, SecurityAssessmentSeverity? severity = null, SecurityAssessmentUserImpact? userImpact = null, ImplementationEffort? implementationEffort = null, IEnumerable threats = null, bool? isPreview = null, SecurityAssessmentType? assessmentType = null, SecurityAssessmentMetadataPartner partnerData = null, SecurityAssessmentPublishDates publishDates = null, string plannedDeprecationDate = null, IEnumerable tactics = null, IEnumerable techniques = null) { - connectableResources ??= new List(); + categories ??= new List(); + threats ??= new List(); + tactics ??= new List(); + techniques ??= new List(); - return new SecurityCenterAllowedConnection( + return new SecurityAssessmentMetadataData( id, name, resourceType, systemData, - calculatedOn, - connectableResources?.ToList(), - location, + displayName, + policyDefinitionId, + description, + remediationDescription, + categories?.ToList(), + severity, + userImpact, + implementationEffort, + threats?.ToList(), + isPreview, + assessmentType, + partnerData, + publishDates, + plannedDeprecationDate, + tactics?.ToList(), + techniques?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The Azure resource id. - /// The list of Azure resources that the resource has inbound allowed connection from. - /// The list of Azure resources that the resource has outbound allowed connection to. - /// A new instance for mocking. - public static ConnectableResourceInfo ConnectableResourceInfo(ResourceIdentifier id = null, IEnumerable inboundConnectedResources = null, IEnumerable outboundConnectedResources = null) + /// Initializes a new instance of . + /// User friendly display name of the assessment. + /// Azure resource ID of the policy definition that turns this assessment calculation on. + /// Human readable description of the assessment. + /// Human readable description of what you should do to mitigate this security issue. + /// + /// The severity level of the assessment. + /// The user impact of the assessment. + /// The implementation effort required to remediate this assessment. + /// + /// True if this assessment is in preview release status. + /// BuiltIn if the assessment based on built-in Azure Policy definition, Custom if the assessment based on custom Azure Policy definition. + /// Describes the partner that created the assessment. + /// A new instance for mocking. + public static SecurityAssessmentMetadataProperties SecurityAssessmentMetadataProperties(string displayName = null, ResourceIdentifier policyDefinitionId = null, string description = null, string remediationDescription = null, IEnumerable categories = null, SecurityAssessmentSeverity severity = default, SecurityAssessmentUserImpact? userImpact = null, ImplementationEffort? implementationEffort = null, IEnumerable threats = null, bool? isPreview = null, SecurityAssessmentType assessmentType = default, SecurityAssessmentMetadataPartner partnerData = null) { - inboundConnectedResources ??= new List(); - outboundConnectedResources ??= new List(); - - return new ConnectableResourceInfo(id, inboundConnectedResources?.ToList(), outboundConnectedResources?.ToList(), serializedAdditionalRawData: null); - } + categories ??= new List(); + threats ??= new List(); - /// Initializes a new instance of . - /// The Azure resource id of the connected resource. - /// The allowed tcp ports. - /// The allowed udp ports. - /// A new instance for mocking. - public static ConnectedResourceInfo ConnectedResourceInfo(ResourceIdentifier connectedResourceId = null, string tcpPorts = null, string udpPorts = null) - { - return new ConnectedResourceInfo(connectedResourceId, tcpPorts, udpPorts, serializedAdditionalRawData: null); + return new SecurityAssessmentMetadataProperties( + displayName, + policyDefinitionId, + description, + remediationDescription, + categories?.ToList(), + severity, + userImpact, + implementationEffort, + threats?.ToList(), + isPreview, + assessmentType, + partnerData, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The application control policy enforcement/protection mode of the machine group. - /// The protection mode of the collection/file types. Exe/Msi/Script are used for Windows, Executable is used for Linux. - /// The configuration status of the machines group or machine or rule. - /// The initial recommendation status of the machine group or machine. - /// - /// The source type of the machine group. - /// - /// - /// Location where the resource is stored. - /// A new instance for mocking. - public static AdaptiveApplicationControlGroupData AdaptiveApplicationControlGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AdaptiveApplicationControlEnforcementMode? enforcementMode = null, SecurityCenterFileProtectionMode protectionMode = null, SecurityCenterConfigurationStatus? configurationStatus = null, RecommendationStatus? recommendationStatus = null, IEnumerable issues = null, AdaptiveApplicationControlGroupSourceSystem? sourceSystem = null, IEnumerable vmRecommendations = null, IEnumerable pathRecommendations = null, AzureLocation? location = null) + /// + /// Details of the resource that was assessed + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// User friendly display name of the assessment. + /// Additional data regarding the assessment. + /// Links relevant to the assessment. + /// Describes properties of an assessment metadata. + /// Data regarding 3rd party partner integration. + /// The result of the assessment. + /// A new instance for mocking. + public static SecurityAssessmentData SecurityAssessmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SecurityCenterResourceDetails resourceDetails = null, string displayName = null, IDictionary additionalData = null, Uri linksAzurePortalUri = null, SecurityAssessmentMetadataProperties metadata = null, SecurityAssessmentPartner partnersData = null, SecurityAssessmentStatusResult status = null) { - issues ??= new List(); - vmRecommendations ??= new List(); - pathRecommendations ??= new List(); + additionalData ??= new Dictionary(); - return new AdaptiveApplicationControlGroupData( + return new SecurityAssessmentData( id, name, resourceType, systemData, - enforcementMode, - protectionMode, - configurationStatus, - recommendationStatus, - issues?.ToList(), - sourceSystem, - vmRecommendations?.ToList(), - pathRecommendations?.ToList(), - location, + resourceDetails, + displayName, + additionalData, + linksAzurePortalUri != null ? new AssessmentLinks(linksAzurePortalUri, serializedAdditionalRawData: null) : null, + metadata, + partnersData, + status, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// An alert that machines within a group can have. - /// The number of machines in the group that have this alert. - /// A new instance for mocking. - public static AdaptiveApplicationControlIssueSummary AdaptiveApplicationControlIssueSummary(AdaptiveApplicationControlIssue? issue = null, float? numberOfVms = null) + /// Initializes a new instance of . + /// Programmatic code for the status of the assessment. + /// Programmatic code for the cause of the assessment status. + /// Human readable description of the assessment status. + /// The time that the assessment was created and first evaluated. Returned as UTC time in ISO 8601 format. + /// The time that the status of the assessment last changed. Returned as UTC time in ISO 8601 format. + /// A new instance for mocking. + public static SecurityAssessmentStatusResult SecurityAssessmentStatusResult(SecurityAssessmentStatusCode code = default, string cause = null, string description = null, DateTimeOffset? firstEvaluatedOn = null, DateTimeOffset? statusChangeOn = null) { - return new AdaptiveApplicationControlIssueSummary(issue, numberOfVms, serializedAdditionalRawData: null); + return new SecurityAssessmentStatusResult( + code, + cause, + description, + serializedAdditionalRawData: null, + firstEvaluatedOn, + statusChangeOn); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The security family of the discovered solution. - /// The security solutions' image offer. - /// The security solutions' image publisher. - /// The security solutions' image sku. - /// Location where the resource is stored. - /// A new instance for mocking. - public static DiscoveredSecuritySolution DiscoveredSecuritySolution(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SecurityFamily securityFamily = default, string offer = null, string publisher = null, string sku = null, AzureLocation? location = null) + /// + /// Details of the resource that was assessed + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// User friendly display name of the assessment. + /// Additional data regarding the assessment. + /// Links relevant to the assessment. + /// Describes properties of an assessment metadata. + /// Data regarding 3rd party partner integration. + /// The result of the assessment. + /// A new instance for mocking. + public static SecurityAssessmentCreateOrUpdateContent SecurityAssessmentCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SecurityCenterResourceDetails resourceDetails = null, string displayName = null, IDictionary additionalData = null, Uri linksAzurePortalUri = null, SecurityAssessmentMetadataProperties metadata = null, SecurityAssessmentPartner partnersData = null, SecurityAssessmentStatus status = null) { - return new DiscoveredSecuritySolution( + additionalData ??= new Dictionary(); + + return new SecurityAssessmentCreateOrUpdateContent( id, name, resourceType, systemData, - securityFamily, - offer, - publisher, - sku, - location, + resourceDetails, + displayName, + additionalData, + linksAzurePortalUri != null ? new AssessmentLinks(linksAzurePortalUri, serializedAdditionalRawData: null) : null, + metadata, + partnersData, + status, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The kind of the external solution. - /// Location where the resource is stored. - /// A new instance for mocking. - public static ExternalSecuritySolution ExternalSecuritySolution(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string kind = null, AzureLocation? location = null) + /// Schema version. + /// Unique identifier for the detection logic (all alert instances from the same detection logic will have the same alertType). + /// Unique identifier for the alert. + /// The name of Azure Security Center pricing tier which powering this alert. Learn more: https://docs.microsoft.com/en-us/azure/security-center/security-center-pricing. + /// The display name of the alert. + /// Description of the suspicious activity that was detected. + /// The risk level of the threat that was detected. Learn more: https://docs.microsoft.com/en-us/azure/security-center/security-center-alerts-overview#how-are-alerts-classified. + /// The kill chain related intent behind the alert. For list of supported values, and explanations of Azure Security Center's supported kill chain intents. + /// The UTC time of the first event or activity included in the alert in ISO8601 format. + /// The UTC time of the last event or activity included in the alert in ISO8601 format. + /// + /// The resource identifiers that can be used to direct the alert to the right product exposure group (tenant, workspace, subscription etc.). There can be multiple identifiers of different type per alert. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Manual action items to take to remediate the alert. + /// The name of the vendor that raises the alert. + /// The life cycle status of the alert. + /// Links related to the alert. + /// A direct link to the alert page in Azure Portal. + /// The UTC time the alert was generated in ISO8601 format. + /// The name of the product which published this alert (Microsoft Sentinel, Microsoft Defender for Identity, Microsoft Defender for Endpoint, Microsoft Defender for Office, Microsoft Defender for Cloud Apps, and so on). + /// The UTC processing end time of the alert in ISO8601 format. + /// A list of entities related to the alert. + /// This field determines whether the alert is an incident (a compound grouping of several alerts) or a single alert. + /// Key for corelating related alerts. Alerts with the same correlation key considered to be related. + /// Custom properties for the alert. + /// The display name of the resource most related to this alert. + /// kill chain related techniques behind the alert. + /// Kill chain related sub-techniques behind the alert. + /// Changing set of properties depending on the supportingEvidence type. + /// A new instance for mocking. + public static SecurityAlertData SecurityAlertData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string version = null, string alertType = null, string systemAlertId = null, string productComponentName = null, string alertDisplayName = null, string description = null, SecurityAlertSeverity? severity = null, KillChainIntent? intent = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable resourceIdentifiers = null, IEnumerable remediationSteps = null, string vendorName = null, SecurityAlertStatus? status = null, IEnumerable> extendedLinks = null, Uri alertUri = null, DateTimeOffset? generatedOn = null, string productName = null, DateTimeOffset? processingEndOn = null, IEnumerable entities = null, bool? isIncident = null, string correlationKey = null, IDictionary extendedProperties = null, string compromisedEntity = null, IEnumerable techniques = null, IEnumerable subTechniques = null, SecurityAlertSupportingEvidence supportingEvidence = null) { - return new ExternalSecuritySolution( + resourceIdentifiers ??= new List(); + remediationSteps ??= new List(); + extendedLinks ??= new List>(); + entities ??= new List(); + extendedProperties ??= new Dictionary(); + techniques ??= new List(); + subTechniques ??= new List(); + + return new SecurityAlertData( id, name, resourceType, systemData, - kind == null ? null : new ExternalSecuritySolutionKind?(kind), - location, + version, + alertType, + systemAlertId, + productComponentName, + alertDisplayName, + description, + severity, + intent, + startOn, + endOn, + resourceIdentifiers?.ToList(), + remediationSteps?.ToList(), + vendorName, + status, + extendedLinks?.ToList(), + alertUri, + generatedOn, + productName, + processingEndOn, + entities?.ToList(), + isIncident, + correlationKey, + extendedProperties, + compromisedEntity, + techniques?.ToList(), + subTechniques?.ToList(), + supportingEvidence, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Configurations for Microsoft.Compute/virtualMachines resource type. - /// - /// Gets the provisioning state of the Just-in-Time policy. - /// Kind of the resource. - /// Location where the resource is stored. - /// A new instance for mocking. - public static JitNetworkAccessPolicyData JitNetworkAccessPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable virtualMachines = null, IEnumerable requests = null, string provisioningState = null, string kind = null, AzureLocation? location = null) + /// Initializes a new instance of . + /// Type of entity. + /// Additional Properties. + /// A new instance for mocking. + public static SecurityAlertEntity SecurityAlertEntity(string alertEntityType = null, IReadOnlyDictionary additionalProperties = null) { - virtualMachines ??= new List(); - requests ??= new List(); + additionalProperties ??= new Dictionary(); - return new JitNetworkAccessPolicyData( - id, - name, - resourceType, - systemData, - virtualMachines?.ToList(), - requests?.ToList(), - provisioningState, - kind, - location, - serializedAdditionalRawData: null); + return new SecurityAlertEntity(alertEntityType, additionalProperties); } - /// Initializes a new instance of . - /// - /// Source of the allowed traffic. If omitted, the request will be for the source IP address of the initiate request. - /// The time to close the request in UTC. - /// A new instance for mocking. - public static JitNetworkAccessPolicyInitiatePort JitNetworkAccessPolicyInitiatePort(int number = default, string allowedSourceAddressPrefix = null, DateTimeOffset endOn = default) + /// Initializes a new instance of . + /// Type of the supportingEvidence. + /// Additional Properties. + /// A new instance for mocking. + public static SecurityAlertSupportingEvidence SecurityAlertSupportingEvidence(string securityAlertSupportingEvidenceType = null, IDictionary additionalProperties = null) { - return new JitNetworkAccessPolicyInitiatePort(number, allowedSourceAddressPrefix, endOn, serializedAdditionalRawData: null); + additionalProperties ??= new Dictionary(); + + return new SecurityAlertSupportingEvidence(securityAlertSupportingEvidenceType, additionalProperties); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The initiative’s name. - /// The relative weight for each subscription. Used when calculating an aggregated secure score for multiple subscriptions. - /// Maximum score available. - /// Current score. - /// Ratio of the current score divided by the maximum. Rounded to 4 digits after the decimal point. - /// A new instance for mocking. - public static SecureScoreData SecureScoreData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, long? weight = null, int? max = null, double? current = null, double? percentage = null) + /// the kind of the settings string. + /// A new instance for mocking. + public static SecuritySettingData SecuritySettingData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string kind = null) { - return new SecureScoreData( + return new SecuritySettingData( id, name, resourceType, systemData, - displayName, - weight, - max, - current, - percentage, + kind == null ? default : new SettingKind(kind), serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// User friendly display name of the control. - /// Number of healthy resources in the control. - /// Number of unhealthy resources in the control. - /// Number of not applicable resources in the control. - /// The relative weight for this specific control in each of your subscriptions. Used when calculating an aggregated score for this control across all of your subscriptions. - /// Information about the security control. - /// Maximum score available. - /// Current score. - /// Ratio of the current score divided by the maximum. Rounded to 4 digits after the decimal point. - /// A new instance for mocking. - public static SecureScoreControlDetails SecureScoreControlDetails(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, int? healthyResourceCount = null, int? unhealthyResourceCount = null, int? notApplicableResourceCount = null, long? weight = null, SecureScoreControlDefinitionItem definition = null, int? max = null, double? current = null, double? percentage = null) + /// The pricing tier value. Microsoft Defender for Cloud is provided in two pricing tiers: free and standard. The standard tier offers advanced security capabilities, while the free tier offers basic security features. + /// The sub-plan selected for a Standard pricing configuration, when more than one sub-plan is available. Each sub-plan enables a set of security features. When not specified, full plan is applied. + /// The duration left for the subscriptions free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S). + /// Optional. If `pricingTier` is `Standard` then this property holds the date of the last time the `pricingTier` was set to `Standard`, when available (e.g 2023-03-01T12:42:42.1921106Z). + /// Optional. True if the plan is deprecated. If there are replacing plans they will appear in `replacedBy` property. + /// Optional. List of plans that replace this plan. This property exists only if this plan is deprecated. + /// Optional. List of extensions offered under a plan. + /// A new instance for mocking. + public static SecurityCenterPricingData SecurityCenterPricingData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SecurityCenterPricingTier? pricingTier = null, string subPlan = null, TimeSpan? freeTrialRemainingTime = null, DateTimeOffset? enabledOn = null, bool? isDeprecated = null, IEnumerable replacedBy = null, IEnumerable extensions = null) { - return new SecureScoreControlDetails( + replacedBy ??= new List(); + extensions ??= new List(); + + return new SecurityCenterPricingData( id, name, resourceType, systemData, - displayName, - healthyResourceCount, - unhealthyResourceCount, - notApplicableResourceCount, - weight, - definition, - max, - current, - percentage, + pricingTier, + subPlan, + freeTrialRemainingTime, + enabledOn, + isDeprecated, + replacedBy?.ToList(), + extensions?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// User friendly display name of the control. - /// User friendly description of the control. - /// Maximum control score (0..10). - /// Source object from which the control was created. - /// Array of assessments metadata IDs that are included in this security control. - /// A new instance for mocking. - public static SecureScoreControlDefinitionItem SecureScoreControlDefinitionItem(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, string description = null, int? maxScore = null, SecurityControlType? sourceType = null, IEnumerable assessmentDefinitions = null) + /// Initializes a new instance of . + /// + /// The extension name. Supported values are: <br><br>**AgentlessDiscoveryForKubernetes** - API-based discovery of information about Kubernetes cluster architecture, workload objects, and setup. Required for Kubernetes inventory, identity and network exposure detection, attack path analysis and risk hunting as part of the cloud security explorer. + /// Available for CloudPosture plan.<br><br>**OnUploadMalwareScanning** - Limits the GB to be scanned per month for each storage account within the subscription. Once this limit reached on a given storage account, Blobs won't be scanned during current calendar month. + /// Available for StorageAccounts plan.<br><br>**SensitiveDataDiscovery** - Sensitive data discovery identifies Blob storage container with sensitive data such as credentials, credit cards, and more, to help prioritize and investigate security events. + /// Available for StorageAccounts and CloudPosture plans.<br><br>**ContainerRegistriesVulnerabilityAssessments** - Provides vulnerability management for images stored in your container registries. + /// Available for CloudPosture and Containers plans. + /// + /// Indicates whether the extension is enabled. + /// Property values associated with the extension. + /// Optional. A status describing the success/failure of the extension's enablement/disablement operation. + /// A new instance for mocking. + public static PlanExtension PlanExtension(string name = null, IsExtensionEnabled isEnabled = default, IDictionary additionalExtensionProperties = null, OperationStatusAutoGenerated operationStatus = null) { - assessmentDefinitions ??= new List(); + additionalExtensionProperties ??= new Dictionary(); - return new SecureScoreControlDefinitionItem( - id, - name, - resourceType, - systemData, - displayName, - description, - maxScore, - sourceType != null ? new SecureScoreControlDefinitionSource(sourceType, serializedAdditionalRawData: null) : null, - assessmentDefinitions?.ToList(), - serializedAdditionalRawData: null); + return new PlanExtension(name, isEnabled, additionalExtensionProperties, operationStatus, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . + /// The operation status code. + /// Additional information regarding the success/failure of the operation. + /// A new instance for mocking. + public static OperationStatusAutoGenerated OperationStatusAutoGenerated(ExtensionOperationStatusCode? code = null, string message = null) + { + return new OperationStatusAutoGenerated(code, message, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The security family of the security solution. - /// The security family provisioning State. - /// The security solutions' template. - /// The security solutions' status. - /// Location where the resource is stored. - /// A new instance for mocking. - public static SecuritySolution SecuritySolution(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SecurityFamily? securityFamily = null, SecurityFamilyProvisioningState? provisioningState = null, string template = null, string protectionStatus = null, AzureLocation? location = null) + /// The kind of the server vulnerability assessments setting. + /// A new instance for mocking. + public static ServerVulnerabilityAssessmentsSettingData ServerVulnerabilityAssessmentsSettingData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string kind = null) { - return new SecuritySolution( + return new UnknownServerVulnerabilityAssessmentsSetting( id, name, resourceType, systemData, - securityFamily, - provisioningState, - template, - protectionStatus, - location, + kind == null ? default : new ServerVulnerabilityAssessmentsSettingKind(kind), serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The security family of the security solution. - /// The security solutions' vendor name. - /// The security solutions' package info url. - /// The security solutions' product name. - /// The security solutions' publisher. - /// The security solutions' publisher display name. - /// The security solutions' template. - /// Location where the resource is stored. - /// A new instance for mocking. - public static SecuritySolutionsReferenceData SecuritySolutionsReferenceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SecurityFamily securityFamily = default, string alertVendorName = null, Uri packageInfoUri = null, string productName = null, string publisher = null, string publisherDisplayName = null, string template = null, AzureLocation? location = null) + /// Gets the provisioning state of the API collection. + /// The display name of the API collection. + /// The resource Id of the resource from where this API collection was discovered. + /// The base URI for this API collection. All endpoints of this API collection extend this base URI. + /// The number of API endpoints discovered in this API collection. + /// The number of API endpoints in this API collection that have not received any API traffic in the last 30 days. + /// The number of API endpoints in this API collection that are unauthenticated. + /// The number of API endpoints in this API collection for which API traffic from the internet was observed. + /// The number of API endpoints in this API collection which are exposing sensitive data in their requests and/or responses. + /// The highest priority sensitivity label from Microsoft Purview in this API collection. + /// A new instance for mocking. + public static SecurityCenterApiCollectionData SecurityCenterApiCollectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SecurityFamilyProvisioningState? provisioningState = null, string displayName = null, ResourceIdentifier discoveredVia = null, Uri baseUri = null, long? numberOfApiEndpoints = null, long? numberOfInactiveApiEndpoints = null, long? numberOfUnauthenticatedApiEndpoints = null, long? numberOfExternalApiEndpoints = null, long? numberOfApiEndpointsWithSensitiveDataExposed = null, string sensitivityLabel = null) { - return new SecuritySolutionsReferenceData( + return new SecurityCenterApiCollectionData( id, name, resourceType, systemData, - securityFamily, - alertVendorName, - packageInfoUri, - productName, - publisher, - publisherDisplayName, - template, - location, + provisioningState, + displayName, + discoveredVia, + baseUri, + numberOfApiEndpoints, + numberOfInactiveApiEndpoints, + numberOfUnauthenticatedApiEndpoints, + numberOfExternalApiEndpoints, + numberOfApiEndpointsWithSensitiveDataExposed, + sensitivityLabel, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The provisioningState of the vulnerability assessment capability on the VM. - /// A new instance for mocking. - public static ServerVulnerabilityAssessmentData ServerVulnerabilityAssessmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ServerVulnerabilityAssessmentPropertiesProvisioningState? provisioningState = null) + /// Azure DevOps Organization properties. + /// A new instance for mocking. + public static DevOpsOrgData DevOpsOrgData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DevOpsOrgProperties properties = null) { - return new ServerVulnerabilityAssessmentData( + return new DevOpsOrgData( id, name, resourceType, systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets resource status message. + /// Gets or sets time when resource was last checked. + /// + /// The provisioning state of the resource. + /// + /// Pending - Provisioning pending. + /// Failed - Provisioning failed. + /// Succeeded - Successful provisioning. + /// Canceled - Provisioning canceled. + /// PendingDeletion - Deletion pending. + /// DeletionSuccess - Deletion successful. + /// DeletionFailure - Deletion failure. + /// + /// + /// Details about resource onboarding status across all connectors. + /// + /// OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only applicable to top-level resources. + /// Onboarded - this resource has already been onboarded by the specified connector. + /// NotOnboarded - this resource has not been onboarded to any connector. + /// NotApplicable - the onboarding state is not applicable to the current endpoint. + /// + /// Configuration payload for PR Annotations. + /// A new instance for mocking. + public static DevOpsOrgProperties DevOpsOrgProperties(string provisioningStatusMessage = null, DateTimeOffset? provisioningStatusUpdatedOn = null, DevOpsProvisioningState? provisioningState = null, ResourceOnboardingState? onboardingState = null, ActionableRemediation actionableRemediation = null) + { + return new DevOpsOrgProperties( + provisioningStatusMessage, + provisioningStatusUpdatedOn, provisioningState, + onboardingState, + actionableRemediation, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The UTC time on which the topology was calculated. - /// Azure resources which are part of this topology resource. - /// Location where the resource is stored. - /// A new instance for mocking. - public static SecurityTopologyResource SecurityTopologyResource(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? calculatedOn = null, IEnumerable topologyResources = null, AzureLocation? location = null) + /// Azure DevOps Project properties. + /// A new instance for mocking. + public static DevOpsProjectData DevOpsProjectData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DevOpsProjectProperties properties = null) { - topologyResources ??= new List(); - - return new SecurityTopologyResource( + return new DevOpsProjectData( id, name, resourceType, systemData, - calculatedOn, - topologyResources?.ToList(), - location, + properties, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Azure resource id. - /// The security severity of the resource. - /// Indicates if the resource has security recommendations. - /// Indicates the resource connectivity level to the Internet (InternetFacing, Internal ,etc.). - /// Score of the resource based on its security severity. - /// The location of this resource. - /// Azure resources connected to this resource which are in higher level in the topology view. - /// Azure resources connected to this resource which are in lower level in the topology view. - /// A new instance for mocking. - public static TopologySingleResource TopologySingleResource(ResourceIdentifier resourceId = null, string severity = null, bool? recommendationsExist = null, string networkZones = null, int? topologyScore = null, AzureLocation? location = null, IEnumerable parents = null, IEnumerable children = null) + /// Initializes a new instance of . + /// Gets or sets resource status message. + /// Gets or sets time when resource was last checked. + /// + /// The provisioning state of the resource. + /// + /// Pending - Provisioning pending. + /// Failed - Provisioning failed. + /// Succeeded - Successful provisioning. + /// Canceled - Provisioning canceled. + /// PendingDeletion - Deletion pending. + /// DeletionSuccess - Deletion successful. + /// DeletionFailure - Deletion failure. + /// + /// Gets or sets parent Azure DevOps Organization name. + /// Gets or sets Azure DevOps Project id. + /// + /// Details about resource onboarding status across all connectors. + /// + /// OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only applicable to top-level resources. + /// Onboarded - this resource has already been onboarded by the specified connector. + /// NotOnboarded - this resource has not been onboarded to any connector. + /// NotApplicable - the onboarding state is not applicable to the current endpoint. + /// + /// Configuration payload for PR Annotations. + /// A new instance for mocking. + public static DevOpsProjectProperties DevOpsProjectProperties(string provisioningStatusMessage = null, DateTimeOffset? provisioningStatusUpdatedOn = null, DevOpsProvisioningState? provisioningState = null, string parentOrgName = null, string projectId = null, ResourceOnboardingState? onboardingState = null, ActionableRemediation actionableRemediation = null) { - parents ??= new List(); - children ??= new List(); - - return new TopologySingleResource( - resourceId, - severity, - recommendationsExist, - networkZones, - topologyScore, - location, - parents?.ToList(), - children?.ToList(), + return new DevOpsProjectProperties( + provisioningStatusMessage, + provisioningStatusUpdatedOn, + provisioningState, + parentOrgName, + projectId, + onboardingState, + actionableRemediation, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Azure resource id which serves as parent resource in topology view. - /// A new instance for mocking. - public static TopologySingleResourceParent TopologySingleResourceParent(ResourceIdentifier resourceId = null) - { - return new TopologySingleResourceParent(resourceId, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Azure resource id which serves as child resource in topology view. - /// A new instance for mocking. - public static TopologySingleResourceChild TopologySingleResourceChild(ResourceIdentifier resourceId = null) - { - return new TopologySingleResourceChild(resourceId, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// User friendly display name of the assessment. - /// Azure resource ID of the policy definition that turns this assessment calculation on. - /// Human readable description of the assessment. - /// Human readable description of what you should do to mitigate this security issue. - /// - /// The severity level of the assessment. - /// The user impact of the assessment. - /// The implementation effort required to remediate this assessment. - /// - /// True if this assessment is in preview release status. - /// BuiltIn if the assessment based on built-in Azure Policy definition, Custom if the assessment based on custom Azure Policy definition. - /// Describes the partner that created the assessment. - /// - /// - /// - /// - /// A new instance for mocking. - public static SecurityAssessmentMetadataData SecurityAssessmentMetadataData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, ResourceIdentifier policyDefinitionId = null, string description = null, string remediationDescription = null, IEnumerable categories = null, SecurityAssessmentSeverity? severity = null, SecurityAssessmentUserImpact? userImpact = null, ImplementationEffort? implementationEffort = null, IEnumerable threats = null, bool? isPreview = null, SecurityAssessmentType? assessmentType = null, SecurityAssessmentMetadataPartner partnerData = null, SecurityAssessmentPublishDates publishDates = null, string plannedDeprecationDate = null, IEnumerable tactics = null, IEnumerable techniques = null) + /// Azure DevOps Repository properties. + /// A new instance for mocking. + public static DevOpsRepositoryData DevOpsRepositoryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DevOpsRepositoryProperties properties = null) { - categories ??= new List(); - threats ??= new List(); - tactics ??= new List(); - techniques ??= new List(); - - return new SecurityAssessmentMetadataData( + return new DevOpsRepositoryData( id, name, resourceType, systemData, - displayName, - policyDefinitionId, - description, - remediationDescription, - categories?.ToList(), - severity, - userImpact, - implementationEffort, - threats?.ToList(), - isPreview, - assessmentType, - partnerData, - publishDates, - plannedDeprecationDate, - tactics?.ToList(), - techniques?.ToList(), + properties, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// User friendly display name of the assessment. - /// Azure resource ID of the policy definition that turns this assessment calculation on. - /// Human readable description of the assessment. - /// Human readable description of what you should do to mitigate this security issue. - /// - /// The severity level of the assessment. - /// The user impact of the assessment. - /// The implementation effort required to remediate this assessment. - /// - /// True if this assessment is in preview release status. - /// BuiltIn if the assessment based on built-in Azure Policy definition, Custom if the assessment based on custom Azure Policy definition. - /// Describes the partner that created the assessment. - /// A new instance for mocking. - public static SecurityAssessmentMetadataProperties SecurityAssessmentMetadataProperties(string displayName = null, ResourceIdentifier policyDefinitionId = null, string description = null, string remediationDescription = null, IEnumerable categories = null, SecurityAssessmentSeverity severity = default, SecurityAssessmentUserImpact? userImpact = null, ImplementationEffort? implementationEffort = null, IEnumerable threats = null, bool? isPreview = null, SecurityAssessmentType assessmentType = default, SecurityAssessmentMetadataPartner partnerData = null) - { - categories ??= new List(); - threats ??= new List(); - - return new SecurityAssessmentMetadataProperties( - displayName, - policyDefinitionId, - description, - remediationDescription, - categories?.ToList(), - severity, - userImpact, - implementationEffort, - threats?.ToList(), - isPreview, - assessmentType, - partnerData, + /// Initializes a new instance of . + /// Gets or sets resource status message. + /// Gets or sets time when resource was last checked. + /// + /// The provisioning state of the resource. + /// + /// Pending - Provisioning pending. + /// Failed - Provisioning failed. + /// Succeeded - Successful provisioning. + /// Canceled - Provisioning canceled. + /// PendingDeletion - Deletion pending. + /// DeletionSuccess - Deletion successful. + /// DeletionFailure - Deletion failure. + /// + /// Gets or sets parent Azure DevOps Organization name. + /// Gets or sets parent Azure DevOps Project name. + /// Gets or sets Azure DevOps Repository id. + /// Gets or sets Azure DevOps Repository url. + /// Gets or sets Azure DevOps repository visibility, whether it is public or private etc. + /// + /// Details about resource onboarding status across all connectors. + /// + /// OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only applicable to top-level resources. + /// Onboarded - this resource has already been onboarded by the specified connector. + /// NotOnboarded - this resource has not been onboarded to any connector. + /// NotApplicable - the onboarding state is not applicable to the current endpoint. + /// + /// Configuration payload for PR Annotations. + /// A new instance for mocking. + public static DevOpsRepositoryProperties DevOpsRepositoryProperties(string provisioningStatusMessage = null, DateTimeOffset? provisioningStatusUpdatedOn = null, DevOpsProvisioningState? provisioningState = null, string parentOrgName = null, string parentProjectName = null, string repoId = null, Uri repoUri = null, string visibility = null, ResourceOnboardingState? onboardingState = null, ActionableRemediation actionableRemediation = null) + { + return new DevOpsRepositoryProperties( + provisioningStatusMessage, + provisioningStatusUpdatedOn, + provisioningState, + parentOrgName, + parentProjectName, + repoId, + repoUri, + visibility, + onboardingState, + actionableRemediation, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// - /// Details of the resource that was assessed - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// User friendly display name of the assessment. - /// Additional data regarding the assessment. - /// Links relevant to the assessment. - /// Describes properties of an assessment metadata. - /// Data regarding 3rd party partner integration. - /// The result of the assessment. - /// A new instance for mocking. - public static SecurityAssessmentData SecurityAssessmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SecurityCenterResourceDetails resourceDetails = null, string displayName = null, IDictionary additionalData = null, Uri linksAzurePortalUri = null, SecurityAssessmentMetadataProperties metadata = null, SecurityAssessmentPartner partnersData = null, SecurityAssessmentStatusResult status = null) + /// DevOps Configuration properties. + /// A new instance for mocking. + public static DevOpsConfigurationData DevOpsConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DevOpsConfigurationProperties properties = null) { - additionalData ??= new Dictionary(); - - return new SecurityAssessmentData( + return new DevOpsConfigurationData( id, name, resourceType, systemData, - resourceDetails, - displayName, - additionalData, - linksAzurePortalUri != null ? new AssessmentLinks(linksAzurePortalUri, serializedAdditionalRawData: null) : null, - metadata, - partnersData, - status, + properties, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Programmatic code for the status of the assessment. - /// Programmatic code for the cause of the assessment status. - /// Human readable description of the assessment status. - /// The time that the assessment was created and first evaluated. Returned as UTC time in ISO 8601 format. - /// The time that the status of the assessment last changed. Returned as UTC time in ISO 8601 format. - /// A new instance for mocking. - public static SecurityAssessmentStatusResult SecurityAssessmentStatusResult(SecurityAssessmentStatusCode code = default, string cause = null, string description = null, DateTimeOffset? firstEvaluatedOn = null, DateTimeOffset? statusChangeOn = null) - { - return new SecurityAssessmentStatusResult( - code, - cause, - description, - serializedAdditionalRawData: null, - firstEvaluatedOn, - statusChangeOn); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// Details of the resource that was assessed - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// Initializes a new instance of . + /// Gets or sets resource status message. + /// Gets or sets time when resource was last checked. + /// + /// The provisioning state of the resource. + /// + /// Pending - Provisioning pending. + /// Failed - Provisioning failed. + /// Succeeded - Successful provisioning. + /// Canceled - Provisioning canceled. + /// PendingDeletion - Deletion pending. + /// DeletionSuccess - Deletion successful. + /// DeletionFailure - Deletion failure. /// - /// User friendly display name of the assessment. - /// Additional data regarding the assessment. - /// Links relevant to the assessment. - /// Describes properties of an assessment metadata. - /// Data regarding 3rd party partner integration. - /// The result of the assessment. - /// A new instance for mocking. - public static SecurityAssessmentCreateOrUpdateContent SecurityAssessmentCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SecurityCenterResourceDetails resourceDetails = null, string displayName = null, IDictionary additionalData = null, Uri linksAzurePortalUri = null, SecurityAssessmentMetadataProperties metadata = null, SecurityAssessmentPartner partnersData = null, SecurityAssessmentStatus status = null) + /// Authorization payload. + /// AutoDiscovery states. + /// + /// List of top-level inventory to select when AutoDiscovery is disabled. + /// This field is ignored when AutoDiscovery is enabled. + /// + /// List of capabilities assigned to the DevOps configuration during the discovery process. + /// A new instance for mocking. + public static DevOpsConfigurationProperties DevOpsConfigurationProperties(string provisioningStatusMessage = null, DateTimeOffset? provisioningStatusUpdateTimeUtc = null, DevOpsProvisioningState? provisioningState = null, string authorizationCode = null, DevOpsAutoDiscovery? autoDiscovery = null, IEnumerable topLevelInventoryList = null, IEnumerable capabilities = null) { - additionalData ??= new Dictionary(); + topLevelInventoryList ??= new List(); + capabilities ??= new List(); - return new SecurityAssessmentCreateOrUpdateContent( - id, - name, - resourceType, - systemData, - resourceDetails, - displayName, - additionalData, - linksAzurePortalUri != null ? new AssessmentLinks(linksAzurePortalUri, serializedAdditionalRawData: null) : null, - metadata, - partnersData, - status, + return new DevOpsConfigurationProperties( + provisioningStatusMessage, + provisioningStatusUpdateTimeUtc, + provisioningState, + authorizationCode != null ? new DevOpsAuthorization(authorizationCode, serializedAdditionalRawData: null) : null, + autoDiscovery, + topLevelInventoryList?.ToList(), + capabilities?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . + /// Gets the name of the DevOps capability. + /// Gets the value of the DevOps capability. + /// A new instance for mocking. + public static DevOpsCapability DevOpsCapability(string name = null, string value = null) + { + return new DevOpsCapability(name, value, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// Schema version. - /// Unique identifier for the detection logic (all alert instances from the same detection logic will have the same alertType). - /// Unique identifier for the alert. - /// The name of Azure Security Center pricing tier which powering this alert. Learn more: https://docs.microsoft.com/en-us/azure/security-center/security-center-pricing. - /// The display name of the alert. - /// Description of the suspicious activity that was detected. - /// The risk level of the threat that was detected. Learn more: https://docs.microsoft.com/en-us/azure/security-center/security-center-alerts-overview#how-are-alerts-classified. - /// The kill chain related intent behind the alert. For list of supported values, and explanations of Azure Security Center's supported kill chain intents. - /// The UTC time of the first event or activity included in the alert in ISO8601 format. - /// The UTC time of the last event or activity included in the alert in ISO8601 format. - /// - /// The resource identifiers that can be used to direct the alert to the right product exposure group (tenant, workspace, subscription etc.). There can be multiple identifiers of different type per alert. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// Manual action items to take to remediate the alert. - /// The name of the vendor that raises the alert. - /// The life cycle status of the alert. - /// Links related to the alert. - /// A direct link to the alert page in Azure Portal. - /// The UTC time the alert was generated in ISO8601 format. - /// The name of the product which published this alert (Microsoft Sentinel, Microsoft Defender for Identity, Microsoft Defender for Endpoint, Microsoft Defender for Office, Microsoft Defender for Cloud Apps, and so on). - /// The UTC processing end time of the alert in ISO8601 format. - /// A list of entities related to the alert. - /// This field determines whether the alert is an incident (a compound grouping of several alerts) or a single alert. - /// Key for corelating related alerts. Alerts with the same correlation key considered to be related. - /// Custom properties for the alert. - /// The display name of the resource most related to this alert. - /// kill chain related techniques behind the alert. - /// Kill chain related sub-techniques behind the alert. - /// Changing set of properties depending on the supportingEvidence type. - /// A new instance for mocking. - public static SecurityAlertData SecurityAlertData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string version = null, string alertType = null, string systemAlertId = null, string productComponentName = null, string alertDisplayName = null, string description = null, SecurityAlertSeverity? severity = null, KillChainIntent? intent = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable resourceIdentifiers = null, IEnumerable remediationSteps = null, string vendorName = null, SecurityAlertStatus? status = null, IEnumerable> extendedLinks = null, Uri alertUri = null, DateTimeOffset? generatedOn = null, string productName = null, DateTimeOffset? processingEndOn = null, IEnumerable entities = null, bool? isIncident = null, string correlationKey = null, IDictionary extendedProperties = null, string compromisedEntity = null, IEnumerable techniques = null, IEnumerable subTechniques = null, SecurityAlertSupportingEvidence supportingEvidence = null) + /// GitHub Owner properties. + /// A new instance for mocking. + public static SecurityConnectorGitHubOwnerData SecurityConnectorGitHubOwnerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SecurityConnectorGitHubOwnerProperties properties = null) { - resourceIdentifiers ??= new List(); - remediationSteps ??= new List(); - extendedLinks ??= new List>(); - entities ??= new List(); - extendedProperties ??= new Dictionary(); - techniques ??= new List(); - subTechniques ??= new List(); - - return new SecurityAlertData( + return new SecurityConnectorGitHubOwnerData( id, name, resourceType, systemData, - version, - alertType, - systemAlertId, - productComponentName, - alertDisplayName, - description, - severity, - intent, - startOn, - endOn, - resourceIdentifiers?.ToList(), - remediationSteps?.ToList(), - vendorName, - status, - extendedLinks?.ToList(), - alertUri, - generatedOn, - productName, - processingEndOn, - entities?.ToList(), - isIncident, - correlationKey, - extendedProperties, - compromisedEntity, - techniques?.ToList(), - subTechniques?.ToList(), - supportingEvidence, + properties, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Type of entity. - /// Additional Properties. - /// A new instance for mocking. - public static SecurityAlertEntity SecurityAlertEntity(string alertEntityType = null, IReadOnlyDictionary additionalProperties = null) - { - additionalProperties ??= new Dictionary(); - - return new SecurityAlertEntity(alertEntityType, additionalProperties); - } - - /// Initializes a new instance of . - /// Type of the supportingEvidence. - /// Additional Properties. - /// A new instance for mocking. - public static SecurityAlertSupportingEvidence SecurityAlertSupportingEvidence(string securityAlertSupportingEvidenceType = null, IDictionary additionalProperties = null) + /// Initializes a new instance of . + /// Gets or sets resource status message. + /// Gets or sets time when resource was last checked. + /// + /// The provisioning state of the resource. + /// + /// Pending - Provisioning pending. + /// Failed - Provisioning failed. + /// Succeeded - Successful provisioning. + /// Canceled - Provisioning canceled. + /// PendingDeletion - Deletion pending. + /// DeletionSuccess - Deletion successful. + /// DeletionFailure - Deletion failure. + /// + /// Gets or sets GitHub Owner url. + /// Gets or sets internal GitHub id. + /// + /// Details about resource onboarding status across all connectors. + /// + /// OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only applicable to top-level resources. + /// Onboarded - this resource has already been onboarded by the specified connector. + /// NotOnboarded - this resource has not been onboarded to any connector. + /// NotApplicable - the onboarding state is not applicable to the current endpoint. + /// + /// A new instance for mocking. + public static SecurityConnectorGitHubOwnerProperties SecurityConnectorGitHubOwnerProperties(string provisioningStatusMessage = null, DateTimeOffset? provisioningStatusUpdateTimeUtc = null, DevOpsProvisioningState? provisioningState = null, Uri ownerUri = null, string gitHubInternalId = null, ResourceOnboardingState? onboardingState = null) { - additionalProperties ??= new Dictionary(); - - return new SecurityAlertSupportingEvidence(securityAlertSupportingEvidenceType, additionalProperties); + return new SecurityConnectorGitHubOwnerProperties( + provisioningStatusMessage, + provisioningStatusUpdateTimeUtc, + provisioningState, + ownerUri, + gitHubInternalId, + onboardingState, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// the kind of the settings string. - /// A new instance for mocking. - public static SecuritySettingData SecuritySettingData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string kind = null) + /// GitHub Repository properties. + /// A new instance for mocking. + public static SecurityConnectorGitHubRepositoryData SecurityConnectorGitHubRepositoryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SecurityConnectorGitHubRepositoryProperties properties = null) { - return new SecuritySettingData( + return new SecurityConnectorGitHubRepositoryData( id, name, resourceType, systemData, - kind == null ? default : new SettingKind(kind), + properties, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . + /// Gets or sets resource status message. + /// Gets or sets time when resource was last checked. + /// + /// The provisioning state of the resource. + /// + /// Pending - Provisioning pending. + /// Failed - Provisioning failed. + /// Succeeded - Successful provisioning. + /// Canceled - Provisioning canceled. + /// PendingDeletion - Deletion pending. + /// DeletionSuccess - Deletion successful. + /// DeletionFailure - Deletion failure. + /// + /// + /// Gets or sets GitHub Repository id. + /// + /// This is a numeric id defined by Github. + /// Eg: "123456". + /// + /// + /// Gets or sets GitHub Repository name. + /// Eg: "new-repo-1". + /// + /// + /// Gets or sets GitHub Full Name. + /// Repository name, prefixed with Owner name. + /// Eg: "my-org/new-repo-1". + /// + /// + /// Details about resource onboarding status across all connectors. + /// + /// OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only applicable to top-level resources. + /// Onboarded - this resource has already been onboarded by the specified connector. + /// NotOnboarded - this resource has not been onboarded to any connector. + /// NotApplicable - the onboarding state is not applicable to the current endpoint. + /// + /// Gets or sets GitHub Repository url. + /// Gets or sets parent GitHub Owner name. + /// A new instance for mocking. + public static SecurityConnectorGitHubRepositoryProperties SecurityConnectorGitHubRepositoryProperties(string provisioningStatusMessage = null, DateTimeOffset? provisioningStatusUpdateTimeUtc = null, DevOpsProvisioningState? provisioningState = null, string repoId = null, string repoName = null, string repoFullName = null, ResourceOnboardingState? onboardingState = null, Uri repoUri = null, string parentOwnerName = null) + { + return new SecurityConnectorGitHubRepositoryProperties( + provisioningStatusMessage, + provisioningStatusUpdateTimeUtc, + provisioningState, + repoId, + repoName, + repoFullName, + onboardingState, + repoUri, + parentOwnerName, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The pricing tier value. Microsoft Defender for Cloud is provided in two pricing tiers: free and standard. The standard tier offers advanced security capabilities, while the free tier offers basic security features. - /// The sub-plan selected for a Standard pricing configuration, when more than one sub-plan is available. Each sub-plan enables a set of security features. When not specified, full plan is applied. - /// The duration left for the subscriptions free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S). - /// Optional. If `pricingTier` is `Standard` then this property holds the date of the last time the `pricingTier` was set to `Standard`, when available (e.g 2023-03-01T12:42:42.1921106Z). - /// Optional. True if the plan is deprecated. If there are replacing plans they will appear in `replacedBy` property. - /// Optional. List of plans that replace this plan. This property exists only if this plan is deprecated. - /// Optional. List of extensions offered under a plan. - /// A new instance for mocking. - public static SecurityCenterPricingData SecurityCenterPricingData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SecurityCenterPricingTier? pricingTier = null, string subPlan = null, TimeSpan? freeTrialRemainingTime = null, DateTimeOffset? enabledOn = null, bool? isDeprecated = null, IEnumerable replacedBy = null, IEnumerable extensions = null) + /// GitLab Group properties. + /// A new instance for mocking. + public static SecurityConnectorGitLabGroupData SecurityConnectorGitLabGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SecurityConnectorGitLabGroupProperties properties = null) { - replacedBy ??= new List(); - extensions ??= new List(); - - return new SecurityCenterPricingData( + return new SecurityConnectorGitLabGroupData( id, name, resourceType, systemData, - pricingTier, - subPlan, - freeTrialRemainingTime, - enabledOn, - isDeprecated, - replacedBy?.ToList(), - extensions?.ToList(), + properties, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// - /// The extension name. Supported values are: <br><br>**AgentlessDiscoveryForKubernetes** - API-based discovery of information about Kubernetes cluster architecture, workload objects, and setup. Required for Kubernetes inventory, identity and network exposure detection, attack path analysis and risk hunting as part of the cloud security explorer. - /// Available for CloudPosture plan.<br><br>**OnUploadMalwareScanning** - Limits the GB to be scanned per month for each storage account within the subscription. Once this limit reached on a given storage account, Blobs won't be scanned during current calendar month. - /// Available for StorageAccounts plan.<br><br>**SensitiveDataDiscovery** - Sensitive data discovery identifies Blob storage container with sensitive data such as credentials, credit cards, and more, to help prioritize and investigate security events. - /// Available for StorageAccounts and CloudPosture plans.<br><br>**ContainerRegistriesVulnerabilityAssessments** - Provides vulnerability management for images stored in your container registries. - /// Available for CloudPosture and Containers plans. + /// Initializes a new instance of . + /// Gets or sets resource status message. + /// Gets or sets time when resource was last checked. + /// + /// The provisioning state of the resource. + /// + /// Pending - Provisioning pending. + /// Failed - Provisioning failed. + /// Succeeded - Successful provisioning. + /// Canceled - Provisioning canceled. + /// PendingDeletion - Deletion pending. + /// DeletionSuccess - Deletion successful. + /// DeletionFailure - Deletion failure. /// - /// Indicates whether the extension is enabled. - /// Property values associated with the extension. - /// Optional. A status describing the success/failure of the extension's enablement/disablement operation. - /// A new instance for mocking. - public static PlanExtension PlanExtension(string name = null, IsExtensionEnabled isEnabled = default, IDictionary additionalExtensionProperties = null, OperationStatusAutoGenerated operationStatus = null) - { - additionalExtensionProperties ??= new Dictionary(); - - return new PlanExtension(name, isEnabled, additionalExtensionProperties, operationStatus, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The operation status code. - /// Additional information regarding the success/failure of the operation. - /// A new instance for mocking. - public static OperationStatusAutoGenerated OperationStatusAutoGenerated(ExtensionOperationStatusCode? code = null, string message = null) + /// + /// Gets or sets the fully-qualified name of the Group object. + /// + /// This contains the entire namespace hierarchy where namespaces are separated by the '$' character. + /// + /// + /// Gets or sets the human readable fully-qualified name of the Group object. + /// + /// This contains the entire namespace hierarchy as seen on GitLab UI where namespaces are separated by the '/' character. + /// + /// Gets or sets the url of the GitLab Group. + /// + /// Details about resource onboarding status across all connectors. + /// + /// OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only applicable to top-level resources. + /// Onboarded - this resource has already been onboarded by the specified connector. + /// NotOnboarded - this resource has not been onboarded to any connector. + /// NotApplicable - the onboarding state is not applicable to the current endpoint. + /// + /// A new instance for mocking. + public static SecurityConnectorGitLabGroupProperties SecurityConnectorGitLabGroupProperties(string provisioningStatusMessage = null, DateTimeOffset? provisioningStatusUpdateTimeUtc = null, DevOpsProvisioningState? provisioningState = null, string fullyQualifiedName = null, string fullyQualifiedFriendlyName = null, Uri uri = null, ResourceOnboardingState? onboardingState = null) { - return new OperationStatusAutoGenerated(code, message, serializedAdditionalRawData: null); + return new SecurityConnectorGitLabGroupProperties( + provisioningStatusMessage, + provisioningStatusUpdateTimeUtc, + provisioningState, + fullyQualifiedName, + fullyQualifiedFriendlyName, + uri, + onboardingState, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The kind of the server vulnerability assessments setting. - /// A new instance for mocking. - public static ServerVulnerabilityAssessmentsSettingData ServerVulnerabilityAssessmentsSettingData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string kind = null) + /// GitLab Project properties. + /// A new instance for mocking. + public static SecurityConnectorGitLabProjectData SecurityConnectorGitLabProjectData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SecurityConnectorGitLabProjectProperties properties = null) { - return new UnknownServerVulnerabilityAssessmentsSetting( + return new SecurityConnectorGitLabProjectData( id, name, resourceType, systemData, - kind == null ? default : new ServerVulnerabilityAssessmentsSettingKind(kind), + properties, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Gets the provisioning state of the API collection. - /// The display name of the API collection. - /// The resource Id of the resource from where this API collection was discovered. - /// The base URI for this API collection. All endpoints of this API collection extend this base URI. - /// The number of API endpoints discovered in this API collection. - /// The number of API endpoints in this API collection that have not received any API traffic in the last 30 days. - /// The number of API endpoints in this API collection that are unauthenticated. - /// The number of API endpoints in this API collection for which API traffic from the internet was observed. - /// The number of API endpoints in this API collection which are exposing sensitive data in their requests and/or responses. - /// The highest priority sensitivity label from Microsoft Purview in this API collection. - /// A new instance for mocking. - public static SecurityCenterApiCollectionData SecurityCenterApiCollectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SecurityFamilyProvisioningState? provisioningState = null, string displayName = null, ResourceIdentifier discoveredVia = null, Uri baseUri = null, long? numberOfApiEndpoints = null, long? numberOfInactiveApiEndpoints = null, long? numberOfUnauthenticatedApiEndpoints = null, long? numberOfExternalApiEndpoints = null, long? numberOfApiEndpointsWithSensitiveDataExposed = null, string sensitivityLabel = null) + /// Initializes a new instance of . + /// Gets or sets resource status message. + /// Gets or sets time when resource was last checked. + /// + /// The provisioning state of the resource. + /// + /// Pending - Provisioning pending. + /// Failed - Provisioning failed. + /// Succeeded - Successful provisioning. + /// Canceled - Provisioning canceled. + /// PendingDeletion - Deletion pending. + /// DeletionSuccess - Deletion successful. + /// DeletionFailure - Deletion failure. + /// + /// + /// Gets or sets the fully-qualified name of the project object. + /// + /// This contains the entire hierarchy where entities are separated by the '$' character. + /// + /// + /// Gets or sets the human readable fully-qualified name of the Project object. + /// + /// This contains the entire namespace hierarchy as seen on GitLab UI where entities are separated by the '/' character. + /// + /// + /// Gets or sets the fully-qualified name of the project's parent group object. + /// + /// This contains the entire hierarchy where namespaces are separated by the '$' character. + /// + /// Gets or sets the url of the GitLab Project. + /// + /// Details about resource onboarding status across all connectors. + /// + /// OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only applicable to top-level resources. + /// Onboarded - this resource has already been onboarded by the specified connector. + /// NotOnboarded - this resource has not been onboarded to any connector. + /// NotApplicable - the onboarding state is not applicable to the current endpoint. + /// + /// A new instance for mocking. + public static SecurityConnectorGitLabProjectProperties SecurityConnectorGitLabProjectProperties(string provisioningStatusMessage = null, DateTimeOffset? provisioningStatusUpdateTimeUtc = null, DevOpsProvisioningState? provisioningState = null, string fullyQualifiedName = null, string fullyQualifiedFriendlyName = null, string fullyQualifiedParentGroupName = null, Uri uri = null, ResourceOnboardingState? onboardingState = null) { - return new SecurityCenterApiCollectionData( - id, - name, - resourceType, - systemData, + return new SecurityConnectorGitLabProjectProperties( + provisioningStatusMessage, + provisioningStatusUpdateTimeUtc, provisioningState, - displayName, - discoveredVia, - baseUri, - numberOfApiEndpoints, - numberOfInactiveApiEndpoints, - numberOfUnauthenticatedApiEndpoints, - numberOfExternalApiEndpoints, - numberOfApiEndpointsWithSensitiveDataExposed, - sensitivityLabel, + fullyQualifiedName, + fullyQualifiedFriendlyName, + fullyQualifiedParentGroupName, + uri, + onboardingState, serializedAdditionalRawData: null); } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationCollection.cs deleted file mode 100644 index f67bba47f62d..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationCollection.cs +++ /dev/null @@ -1,499 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.Resources; -using Azure.ResourceManager.SecurityCenter.Models; - -namespace Azure.ResourceManager.SecurityCenter -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetCustomAssessmentAutomations method from an instance of . - /// - public partial class CustomAssessmentAutomationCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _customAssessmentAutomationClientDiagnostics; - private readonly CustomAssessmentAutomationsRestOperations _customAssessmentAutomationRestClient; - - /// Initializes a new instance of the class for mocking. - protected CustomAssessmentAutomationCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal CustomAssessmentAutomationCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _customAssessmentAutomationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SecurityCenter", CustomAssessmentAutomationResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(CustomAssessmentAutomationResource.ResourceType, out string customAssessmentAutomationApiVersion); - _customAssessmentAutomationRestClient = new CustomAssessmentAutomationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, customAssessmentAutomationApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceGroupResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); - } - - /// - /// Creates or updates a custom assessment automation for the provided subscription. Please note that providing an existing custom assessment automation will replace the existing record. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName} - /// - /// - /// Operation Id - /// CustomAssessmentAutomations_Create - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the Custom Assessment Automation. - /// Custom Assessment Automation body. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string customAssessmentAutomationName, CustomAssessmentAutomationCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(customAssessmentAutomationName, nameof(customAssessmentAutomationName)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _customAssessmentAutomationClientDiagnostics.CreateScope("CustomAssessmentAutomationCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _customAssessmentAutomationRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, customAssessmentAutomationName, content, cancellationToken).ConfigureAwait(false); - var uri = _customAssessmentAutomationRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, customAssessmentAutomationName, content); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new SecurityCenterArmOperation(Response.FromValue(new CustomAssessmentAutomationResource(Client, response), response.GetRawResponse()), rehydrationToken); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a custom assessment automation for the provided subscription. Please note that providing an existing custom assessment automation will replace the existing record. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName} - /// - /// - /// Operation Id - /// CustomAssessmentAutomations_Create - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the Custom Assessment Automation. - /// Custom Assessment Automation body. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string customAssessmentAutomationName, CustomAssessmentAutomationCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(customAssessmentAutomationName, nameof(customAssessmentAutomationName)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _customAssessmentAutomationClientDiagnostics.CreateScope("CustomAssessmentAutomationCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _customAssessmentAutomationRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, customAssessmentAutomationName, content, cancellationToken); - var uri = _customAssessmentAutomationRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, customAssessmentAutomationName, content); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new SecurityCenterArmOperation(Response.FromValue(new CustomAssessmentAutomationResource(Client, response), response.GetRawResponse()), rehydrationToken); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a single custom assessment automation by name for the provided subscription and resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName} - /// - /// - /// Operation Id - /// CustomAssessmentAutomations_Get - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the Custom Assessment Automation. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string customAssessmentAutomationName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(customAssessmentAutomationName, nameof(customAssessmentAutomationName)); - - using var scope = _customAssessmentAutomationClientDiagnostics.CreateScope("CustomAssessmentAutomationCollection.Get"); - scope.Start(); - try - { - var response = await _customAssessmentAutomationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, customAssessmentAutomationName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CustomAssessmentAutomationResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a single custom assessment automation by name for the provided subscription and resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName} - /// - /// - /// Operation Id - /// CustomAssessmentAutomations_Get - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the Custom Assessment Automation. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string customAssessmentAutomationName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(customAssessmentAutomationName, nameof(customAssessmentAutomationName)); - - using var scope = _customAssessmentAutomationClientDiagnostics.CreateScope("CustomAssessmentAutomationCollection.Get"); - scope.Start(); - try - { - var response = _customAssessmentAutomationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, customAssessmentAutomationName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CustomAssessmentAutomationResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List custom assessment automations by provided subscription and resource group - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations - /// - /// - /// Operation Id - /// CustomAssessmentAutomations_ListByResourceGroup - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _customAssessmentAutomationRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _customAssessmentAutomationRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new CustomAssessmentAutomationResource(Client, CustomAssessmentAutomationData.DeserializeCustomAssessmentAutomationData(e)), _customAssessmentAutomationClientDiagnostics, Pipeline, "CustomAssessmentAutomationCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// List custom assessment automations by provided subscription and resource group - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations - /// - /// - /// Operation Id - /// CustomAssessmentAutomations_ListByResourceGroup - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _customAssessmentAutomationRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _customAssessmentAutomationRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new CustomAssessmentAutomationResource(Client, CustomAssessmentAutomationData.DeserializeCustomAssessmentAutomationData(e)), _customAssessmentAutomationClientDiagnostics, Pipeline, "CustomAssessmentAutomationCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName} - /// - /// - /// Operation Id - /// CustomAssessmentAutomations_Get - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the Custom Assessment Automation. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string customAssessmentAutomationName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(customAssessmentAutomationName, nameof(customAssessmentAutomationName)); - - using var scope = _customAssessmentAutomationClientDiagnostics.CreateScope("CustomAssessmentAutomationCollection.Exists"); - scope.Start(); - try - { - var response = await _customAssessmentAutomationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, customAssessmentAutomationName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName} - /// - /// - /// Operation Id - /// CustomAssessmentAutomations_Get - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the Custom Assessment Automation. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string customAssessmentAutomationName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(customAssessmentAutomationName, nameof(customAssessmentAutomationName)); - - using var scope = _customAssessmentAutomationClientDiagnostics.CreateScope("CustomAssessmentAutomationCollection.Exists"); - scope.Start(); - try - { - var response = _customAssessmentAutomationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, customAssessmentAutomationName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName} - /// - /// - /// Operation Id - /// CustomAssessmentAutomations_Get - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the Custom Assessment Automation. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string customAssessmentAutomationName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(customAssessmentAutomationName, nameof(customAssessmentAutomationName)); - - using var scope = _customAssessmentAutomationClientDiagnostics.CreateScope("CustomAssessmentAutomationCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _customAssessmentAutomationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, customAssessmentAutomationName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new CustomAssessmentAutomationResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName} - /// - /// - /// Operation Id - /// CustomAssessmentAutomations_Get - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the Custom Assessment Automation. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string customAssessmentAutomationName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(customAssessmentAutomationName, nameof(customAssessmentAutomationName)); - - using var scope = _customAssessmentAutomationClientDiagnostics.CreateScope("CustomAssessmentAutomationCollection.GetIfExists"); - scope.Start(); - try - { - var response = _customAssessmentAutomationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, customAssessmentAutomationName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new CustomAssessmentAutomationResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationData.Serialization.cs deleted file mode 100644 index e0a976c52137..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationData.Serialization.cs +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; -using Azure.ResourceManager.SecurityCenter.Models; - -namespace Azure.ResourceManager.SecurityCenter -{ - public partial class CustomAssessmentAutomationData : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomAssessmentAutomationData)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(CompressedQuery)) - { - writer.WritePropertyName("compressedQuery"u8); - writer.WriteStringValue(CompressedQuery); - } - if (Optional.IsDefined(SupportedCloud)) - { - writer.WritePropertyName("supportedCloud"u8); - writer.WriteStringValue(SupportedCloud.Value.ToString()); - } - if (Optional.IsDefined(Severity)) - { - writer.WritePropertyName("severity"u8); - writer.WriteStringValue(Severity.Value.ToString()); - } - if (Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(RemediationDescription)) - { - writer.WritePropertyName("remediationDescription"u8); - writer.WriteStringValue(RemediationDescription); - } - if (Optional.IsDefined(AssessmentKey)) - { - writer.WritePropertyName("assessmentKey"u8); - writer.WriteStringValue(AssessmentKey); - } - writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - CustomAssessmentAutomationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomAssessmentAutomationData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomAssessmentAutomationData(document.RootElement, options); - } - - internal static CustomAssessmentAutomationData DeserializeCustomAssessmentAutomationData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - SystemData systemData = default; - string compressedQuery = default; - CustomAssessmentAutomationSupportedCloud? supportedCloud = default; - CustomAssessmentSeverity? severity = default; - string displayName = default; - string description = default; - string remediationDescription = default; - string assessmentKey = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("compressedQuery"u8)) - { - compressedQuery = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("supportedCloud"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - supportedCloud = new CustomAssessmentAutomationSupportedCloud(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("severity"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - severity = new CustomAssessmentSeverity(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("displayName"u8)) - { - displayName = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("description"u8)) - { - description = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("remediationDescription"u8)) - { - remediationDescription = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("assessmentKey"u8)) - { - assessmentKey = property0.Value.GetString(); - continue; - } - } - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CustomAssessmentAutomationData( - id, - name, - type, - systemData, - compressedQuery, - supportedCloud, - severity, - displayName, - description, - remediationDescription, - assessmentKey, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(CustomAssessmentAutomationData)} does not support writing '{options.Format}' format."); - } - } - - CustomAssessmentAutomationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomAssessmentAutomationData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CustomAssessmentAutomationData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationData.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationData.cs deleted file mode 100644 index 79f46d2e39be..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationData.cs +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.Models; -using Azure.ResourceManager.SecurityCenter.Models; - -namespace Azure.ResourceManager.SecurityCenter -{ - /// - /// A class representing the CustomAssessmentAutomation data model. - /// Custom Assessment Automation - /// - public partial class CustomAssessmentAutomationData : ResourceData - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public CustomAssessmentAutomationData() - { - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// GZip encoded KQL query representing the assessment automation results required. - /// Relevant cloud for the custom assessment automation. - /// The severity to relate to the assessments generated by this assessment automation. - /// The display name of the assessments generated by this assessment automation. - /// The description to relate to the assessments generated by this assessment automation. - /// The remediation description to relate to the assessments generated by this assessment automation. - /// The assessment metadata key used when an assessment is generated for this assessment automation. - /// Keeps track of any properties unknown to the library. - internal CustomAssessmentAutomationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string compressedQuery, CustomAssessmentAutomationSupportedCloud? supportedCloud, CustomAssessmentSeverity? severity, string displayName, string description, string remediationDescription, string assessmentKey, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - CompressedQuery = compressedQuery; - SupportedCloud = supportedCloud; - Severity = severity; - DisplayName = displayName; - Description = description; - RemediationDescription = remediationDescription; - AssessmentKey = assessmentKey; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// GZip encoded KQL query representing the assessment automation results required. - public string CompressedQuery { get; set; } - /// Relevant cloud for the custom assessment automation. - public CustomAssessmentAutomationSupportedCloud? SupportedCloud { get; set; } - /// The severity to relate to the assessments generated by this assessment automation. - public CustomAssessmentSeverity? Severity { get; set; } - /// The display name of the assessments generated by this assessment automation. - public string DisplayName { get; set; } - /// The description to relate to the assessments generated by this assessment automation. - public string Description { get; set; } - /// The remediation description to relate to the assessments generated by this assessment automation. - public string RemediationDescription { get; set; } - /// The assessment metadata key used when an assessment is generated for this assessment automation. - public string AssessmentKey { get; set; } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationResource.Serialization.cs deleted file mode 100644 index def807d10bd0..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Azure.ResourceManager.SecurityCenter -{ - public partial class CustomAssessmentAutomationResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - CustomAssessmentAutomationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - CustomAssessmentAutomationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationResource.cs deleted file mode 100644 index 802a5582cddb..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationResource.cs +++ /dev/null @@ -1,356 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.Resources; -using Azure.ResourceManager.SecurityCenter.Models; - -namespace Azure.ResourceManager.SecurityCenter -{ - /// - /// A Class representing a CustomAssessmentAutomation along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetCustomAssessmentAutomationResource method. - /// Otherwise you can get one from its parent resource using the GetCustomAssessmentAutomation method. - /// - public partial class CustomAssessmentAutomationResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The customAssessmentAutomationName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string customAssessmentAutomationName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _customAssessmentAutomationClientDiagnostics; - private readonly CustomAssessmentAutomationsRestOperations _customAssessmentAutomationRestClient; - private readonly CustomAssessmentAutomationData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.Security/customAssessmentAutomations"; - - /// Initializes a new instance of the class for mocking. - protected CustomAssessmentAutomationResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal CustomAssessmentAutomationResource(ArmClient client, CustomAssessmentAutomationData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal CustomAssessmentAutomationResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _customAssessmentAutomationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SecurityCenter", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string customAssessmentAutomationApiVersion); - _customAssessmentAutomationRestClient = new CustomAssessmentAutomationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, customAssessmentAutomationApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual CustomAssessmentAutomationData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets a single custom assessment automation by name for the provided subscription and resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName} - /// - /// - /// Operation Id - /// CustomAssessmentAutomations_Get - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _customAssessmentAutomationClientDiagnostics.CreateScope("CustomAssessmentAutomationResource.Get"); - scope.Start(); - try - { - var response = await _customAssessmentAutomationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CustomAssessmentAutomationResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a single custom assessment automation by name for the provided subscription and resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName} - /// - /// - /// Operation Id - /// CustomAssessmentAutomations_Get - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _customAssessmentAutomationClientDiagnostics.CreateScope("CustomAssessmentAutomationResource.Get"); - scope.Start(); - try - { - var response = _customAssessmentAutomationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CustomAssessmentAutomationResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a custom assessment automation by name for a provided subscription - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName} - /// - /// - /// Operation Id - /// CustomAssessmentAutomations_Delete - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _customAssessmentAutomationClientDiagnostics.CreateScope("CustomAssessmentAutomationResource.Delete"); - scope.Start(); - try - { - var response = await _customAssessmentAutomationRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var uri = _customAssessmentAutomationRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new SecurityCenterArmOperation(response, rehydrationToken); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a custom assessment automation by name for a provided subscription - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName} - /// - /// - /// Operation Id - /// CustomAssessmentAutomations_Delete - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _customAssessmentAutomationClientDiagnostics.CreateScope("CustomAssessmentAutomationResource.Delete"); - scope.Start(); - try - { - var response = _customAssessmentAutomationRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var uri = _customAssessmentAutomationRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new SecurityCenterArmOperation(response, rehydrationToken); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a custom assessment automation for the provided subscription. Please note that providing an existing custom assessment automation will replace the existing record. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName} - /// - /// - /// Operation Id - /// CustomAssessmentAutomations_Create - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Custom Assessment Automation body. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, CustomAssessmentAutomationCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _customAssessmentAutomationClientDiagnostics.CreateScope("CustomAssessmentAutomationResource.Update"); - scope.Start(); - try - { - var response = await _customAssessmentAutomationRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var uri = _customAssessmentAutomationRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new SecurityCenterArmOperation(Response.FromValue(new CustomAssessmentAutomationResource(Client, response), response.GetRawResponse()), rehydrationToken); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates a custom assessment automation for the provided subscription. Please note that providing an existing custom assessment automation will replace the existing record. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName} - /// - /// - /// Operation Id - /// CustomAssessmentAutomations_Create - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Custom Assessment Automation body. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, CustomAssessmentAutomationCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _customAssessmentAutomationClientDiagnostics.CreateScope("CustomAssessmentAutomationResource.Update"); - scope.Start(); - try - { - var response = _customAssessmentAutomationRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var uri = _customAssessmentAutomationRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new SecurityCenterArmOperation(Response.FromValue(new CustomAssessmentAutomationResource(Client, response), response.GetRawResponse()), rehydrationToken); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentCollection.cs deleted file mode 100644 index b1da35516339..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentCollection.cs +++ /dev/null @@ -1,499 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.Resources; -using Azure.ResourceManager.SecurityCenter.Models; - -namespace Azure.ResourceManager.SecurityCenter -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetCustomEntityStoreAssignments method from an instance of . - /// - public partial class CustomEntityStoreAssignmentCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _customEntityStoreAssignmentClientDiagnostics; - private readonly CustomEntityStoreAssignmentsRestOperations _customEntityStoreAssignmentRestClient; - - /// Initializes a new instance of the class for mocking. - protected CustomEntityStoreAssignmentCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal CustomEntityStoreAssignmentCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _customEntityStoreAssignmentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SecurityCenter", CustomEntityStoreAssignmentResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(CustomEntityStoreAssignmentResource.ResourceType, out string customEntityStoreAssignmentApiVersion); - _customEntityStoreAssignmentRestClient = new CustomEntityStoreAssignmentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, customEntityStoreAssignmentApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceGroupResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); - } - - /// - /// Creates a custom entity store assignment for the provided subscription, if not already exists. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName} - /// - /// - /// Operation Id - /// CustomEntityStoreAssignments_Create - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the custom entity store assignment. Generated name is GUID. - /// Custom entity store assignment body. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string customEntityStoreAssignmentName, CustomEntityStoreAssignmentCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(customEntityStoreAssignmentName, nameof(customEntityStoreAssignmentName)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _customEntityStoreAssignmentClientDiagnostics.CreateScope("CustomEntityStoreAssignmentCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _customEntityStoreAssignmentRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, customEntityStoreAssignmentName, content, cancellationToken).ConfigureAwait(false); - var uri = _customEntityStoreAssignmentRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, customEntityStoreAssignmentName, content); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new SecurityCenterArmOperation(Response.FromValue(new CustomEntityStoreAssignmentResource(Client, response), response.GetRawResponse()), rehydrationToken); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates a custom entity store assignment for the provided subscription, if not already exists. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName} - /// - /// - /// Operation Id - /// CustomEntityStoreAssignments_Create - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the custom entity store assignment. Generated name is GUID. - /// Custom entity store assignment body. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string customEntityStoreAssignmentName, CustomEntityStoreAssignmentCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(customEntityStoreAssignmentName, nameof(customEntityStoreAssignmentName)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _customEntityStoreAssignmentClientDiagnostics.CreateScope("CustomEntityStoreAssignmentCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _customEntityStoreAssignmentRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, customEntityStoreAssignmentName, content, cancellationToken); - var uri = _customEntityStoreAssignmentRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, customEntityStoreAssignmentName, content); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new SecurityCenterArmOperation(Response.FromValue(new CustomEntityStoreAssignmentResource(Client, response), response.GetRawResponse()), rehydrationToken); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a single custom entity store assignment by name for the provided subscription and resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName} - /// - /// - /// Operation Id - /// CustomEntityStoreAssignments_Get - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the custom entity store assignment. Generated name is GUID. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string customEntityStoreAssignmentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(customEntityStoreAssignmentName, nameof(customEntityStoreAssignmentName)); - - using var scope = _customEntityStoreAssignmentClientDiagnostics.CreateScope("CustomEntityStoreAssignmentCollection.Get"); - scope.Start(); - try - { - var response = await _customEntityStoreAssignmentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, customEntityStoreAssignmentName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CustomEntityStoreAssignmentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a single custom entity store assignment by name for the provided subscription and resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName} - /// - /// - /// Operation Id - /// CustomEntityStoreAssignments_Get - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the custom entity store assignment. Generated name is GUID. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string customEntityStoreAssignmentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(customEntityStoreAssignmentName, nameof(customEntityStoreAssignmentName)); - - using var scope = _customEntityStoreAssignmentClientDiagnostics.CreateScope("CustomEntityStoreAssignmentCollection.Get"); - scope.Start(); - try - { - var response = _customEntityStoreAssignmentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, customEntityStoreAssignmentName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CustomEntityStoreAssignmentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List custom entity store assignments by a provided subscription and resource group - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments - /// - /// - /// Operation Id - /// CustomEntityStoreAssignments_ListByResourceGroup - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _customEntityStoreAssignmentRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _customEntityStoreAssignmentRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new CustomEntityStoreAssignmentResource(Client, CustomEntityStoreAssignmentData.DeserializeCustomEntityStoreAssignmentData(e)), _customEntityStoreAssignmentClientDiagnostics, Pipeline, "CustomEntityStoreAssignmentCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// List custom entity store assignments by a provided subscription and resource group - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments - /// - /// - /// Operation Id - /// CustomEntityStoreAssignments_ListByResourceGroup - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _customEntityStoreAssignmentRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _customEntityStoreAssignmentRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new CustomEntityStoreAssignmentResource(Client, CustomEntityStoreAssignmentData.DeserializeCustomEntityStoreAssignmentData(e)), _customEntityStoreAssignmentClientDiagnostics, Pipeline, "CustomEntityStoreAssignmentCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName} - /// - /// - /// Operation Id - /// CustomEntityStoreAssignments_Get - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the custom entity store assignment. Generated name is GUID. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string customEntityStoreAssignmentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(customEntityStoreAssignmentName, nameof(customEntityStoreAssignmentName)); - - using var scope = _customEntityStoreAssignmentClientDiagnostics.CreateScope("CustomEntityStoreAssignmentCollection.Exists"); - scope.Start(); - try - { - var response = await _customEntityStoreAssignmentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, customEntityStoreAssignmentName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName} - /// - /// - /// Operation Id - /// CustomEntityStoreAssignments_Get - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the custom entity store assignment. Generated name is GUID. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string customEntityStoreAssignmentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(customEntityStoreAssignmentName, nameof(customEntityStoreAssignmentName)); - - using var scope = _customEntityStoreAssignmentClientDiagnostics.CreateScope("CustomEntityStoreAssignmentCollection.Exists"); - scope.Start(); - try - { - var response = _customEntityStoreAssignmentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, customEntityStoreAssignmentName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName} - /// - /// - /// Operation Id - /// CustomEntityStoreAssignments_Get - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the custom entity store assignment. Generated name is GUID. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string customEntityStoreAssignmentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(customEntityStoreAssignmentName, nameof(customEntityStoreAssignmentName)); - - using var scope = _customEntityStoreAssignmentClientDiagnostics.CreateScope("CustomEntityStoreAssignmentCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _customEntityStoreAssignmentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, customEntityStoreAssignmentName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new CustomEntityStoreAssignmentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName} - /// - /// - /// Operation Id - /// CustomEntityStoreAssignments_Get - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the custom entity store assignment. Generated name is GUID. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string customEntityStoreAssignmentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(customEntityStoreAssignmentName, nameof(customEntityStoreAssignmentName)); - - using var scope = _customEntityStoreAssignmentClientDiagnostics.CreateScope("CustomEntityStoreAssignmentCollection.GetIfExists"); - scope.Start(); - try - { - var response = _customEntityStoreAssignmentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, customEntityStoreAssignmentName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new CustomEntityStoreAssignmentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentData.Serialization.cs deleted file mode 100644 index 9406d7bb600c..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentData.Serialization.cs +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.SecurityCenter -{ - public partial class CustomEntityStoreAssignmentData : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomEntityStoreAssignmentData)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Principal)) - { - writer.WritePropertyName("principal"u8); - writer.WriteStringValue(Principal); - } - if (Optional.IsDefined(EntityStoreDatabaseLink)) - { - writer.WritePropertyName("entityStoreDatabaseLink"u8); - writer.WriteStringValue(EntityStoreDatabaseLink); - } - writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - CustomEntityStoreAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomEntityStoreAssignmentData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomEntityStoreAssignmentData(document.RootElement, options); - } - - internal static CustomEntityStoreAssignmentData DeserializeCustomEntityStoreAssignmentData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - SystemData systemData = default; - string principal = default; - string entityStoreDatabaseLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("principal"u8)) - { - principal = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("entityStoreDatabaseLink"u8)) - { - entityStoreDatabaseLink = property0.Value.GetString(); - continue; - } - } - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CustomEntityStoreAssignmentData( - id, - name, - type, - systemData, - principal, - entityStoreDatabaseLink, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(CustomEntityStoreAssignmentData)} does not support writing '{options.Format}' format."); - } - } - - CustomEntityStoreAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomEntityStoreAssignmentData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CustomEntityStoreAssignmentData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentData.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentData.cs deleted file mode 100644 index f7cb66078b4f..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentData.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.SecurityCenter -{ - /// - /// A class representing the CustomEntityStoreAssignment data model. - /// Custom entity store assignment - /// - public partial class CustomEntityStoreAssignmentData : ResourceData - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public CustomEntityStoreAssignmentData() - { - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The principal assigned with entity store. Format of principal is: [AAD type]=[PrincipalObjectId];[TenantId]. - /// The link to entity store database. - /// Keeps track of any properties unknown to the library. - internal CustomEntityStoreAssignmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string principal, string entityStoreDatabaseLink, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - Principal = principal; - EntityStoreDatabaseLink = entityStoreDatabaseLink; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The principal assigned with entity store. Format of principal is: [AAD type]=[PrincipalObjectId];[TenantId]. - public string Principal { get; set; } - /// The link to entity store database. - public string EntityStoreDatabaseLink { get; set; } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentResource.Serialization.cs deleted file mode 100644 index ef7564579099..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Azure.ResourceManager.SecurityCenter -{ - public partial class CustomEntityStoreAssignmentResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - CustomEntityStoreAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - CustomEntityStoreAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentResource.cs deleted file mode 100644 index f44f85215e81..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentResource.cs +++ /dev/null @@ -1,356 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.Resources; -using Azure.ResourceManager.SecurityCenter.Models; - -namespace Azure.ResourceManager.SecurityCenter -{ - /// - /// A Class representing a CustomEntityStoreAssignment along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetCustomEntityStoreAssignmentResource method. - /// Otherwise you can get one from its parent resource using the GetCustomEntityStoreAssignment method. - /// - public partial class CustomEntityStoreAssignmentResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The customEntityStoreAssignmentName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string customEntityStoreAssignmentName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _customEntityStoreAssignmentClientDiagnostics; - private readonly CustomEntityStoreAssignmentsRestOperations _customEntityStoreAssignmentRestClient; - private readonly CustomEntityStoreAssignmentData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.Security/customEntityStoreAssignments"; - - /// Initializes a new instance of the class for mocking. - protected CustomEntityStoreAssignmentResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal CustomEntityStoreAssignmentResource(ArmClient client, CustomEntityStoreAssignmentData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal CustomEntityStoreAssignmentResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _customEntityStoreAssignmentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SecurityCenter", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string customEntityStoreAssignmentApiVersion); - _customEntityStoreAssignmentRestClient = new CustomEntityStoreAssignmentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, customEntityStoreAssignmentApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual CustomEntityStoreAssignmentData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets a single custom entity store assignment by name for the provided subscription and resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName} - /// - /// - /// Operation Id - /// CustomEntityStoreAssignments_Get - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _customEntityStoreAssignmentClientDiagnostics.CreateScope("CustomEntityStoreAssignmentResource.Get"); - scope.Start(); - try - { - var response = await _customEntityStoreAssignmentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CustomEntityStoreAssignmentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a single custom entity store assignment by name for the provided subscription and resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName} - /// - /// - /// Operation Id - /// CustomEntityStoreAssignments_Get - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _customEntityStoreAssignmentClientDiagnostics.CreateScope("CustomEntityStoreAssignmentResource.Get"); - scope.Start(); - try - { - var response = _customEntityStoreAssignmentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CustomEntityStoreAssignmentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete a custom entity store assignment by name for a provided subscription - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName} - /// - /// - /// Operation Id - /// CustomEntityStoreAssignments_Delete - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _customEntityStoreAssignmentClientDiagnostics.CreateScope("CustomEntityStoreAssignmentResource.Delete"); - scope.Start(); - try - { - var response = await _customEntityStoreAssignmentRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var uri = _customEntityStoreAssignmentRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new SecurityCenterArmOperation(response, rehydrationToken); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete a custom entity store assignment by name for a provided subscription - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName} - /// - /// - /// Operation Id - /// CustomEntityStoreAssignments_Delete - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _customEntityStoreAssignmentClientDiagnostics.CreateScope("CustomEntityStoreAssignmentResource.Delete"); - scope.Start(); - try - { - var response = _customEntityStoreAssignmentRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var uri = _customEntityStoreAssignmentRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new SecurityCenterArmOperation(response, rehydrationToken); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates a custom entity store assignment for the provided subscription, if not already exists. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName} - /// - /// - /// Operation Id - /// CustomEntityStoreAssignments_Create - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Custom entity store assignment body. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, CustomEntityStoreAssignmentCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _customEntityStoreAssignmentClientDiagnostics.CreateScope("CustomEntityStoreAssignmentResource.Update"); - scope.Start(); - try - { - var response = await _customEntityStoreAssignmentRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var uri = _customEntityStoreAssignmentRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new SecurityCenterArmOperation(Response.FromValue(new CustomEntityStoreAssignmentResource(Client, response), response.GetRawResponse()), rehydrationToken); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates a custom entity store assignment for the provided subscription, if not already exists. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName} - /// - /// - /// Operation Id - /// CustomEntityStoreAssignments_Create - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Custom entity store assignment body. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, CustomEntityStoreAssignmentCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _customEntityStoreAssignmentClientDiagnostics.CreateScope("CustomEntityStoreAssignmentResource.Update"); - scope.Start(); - try - { - var response = _customEntityStoreAssignmentRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var uri = _customEntityStoreAssignmentRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new SecurityCenterArmOperation(Response.FromValue(new CustomEntityStoreAssignmentResource(Client, response), response.GetRawResponse()), rehydrationToken); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DefenderForStorageSettingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DefenderForStorageSettingData.Serialization.cs index f453249a6e50..839e0876e80d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DefenderForStorageSettingData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DefenderForStorageSettingData.Serialization.cs @@ -28,6 +28,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } if (options.Format != "W") { writer.WritePropertyName("id"u8); @@ -48,58 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WritePropertyName("systemData"u8); JsonSerializer.Serialize(writer, SystemData); } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(IsEnabled)) - { - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled.Value); - } - if (Optional.IsDefined(IsOverrideSubscriptionLevelSettingsEnabled)) - { - writer.WritePropertyName("overrideSubscriptionLevelSettings"u8); - writer.WriteBooleanValue(IsOverrideSubscriptionLevelSettingsEnabled.Value); - } - writer.WritePropertyName("sensitiveDataDiscovery"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(IsSensitiveDataDiscoveryEnabled)) - { - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsSensitiveDataDiscoveryEnabled.Value); - } - if (options.Format != "W" && Optional.IsDefined(SensitiveDataDiscoveryOperationStatus)) - { - writer.WritePropertyName("operationStatus"u8); - writer.WriteObjectValue(SensitiveDataDiscoveryOperationStatus, options); - } - writer.WriteEndObject(); - writer.WritePropertyName("malwareScanning"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(ScanResultsEventGridTopicResourceId)) - { - writer.WritePropertyName("scanResultsEventGridTopicResourceId"u8); - writer.WriteStringValue(ScanResultsEventGridTopicResourceId); - } - if (options.Format != "W" && Optional.IsDefined(MalwareScanningOperationStatus)) - { - writer.WritePropertyName("operationStatus"u8); - writer.WriteObjectValue(MalwareScanningOperationStatus, options); - } - writer.WritePropertyName("onUpload"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(IsMalwareScanningOnUploadEnabled)) - { - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsMalwareScanningOnUploadEnabled.Value); - } - if (Optional.IsDefined(CapGBPerMonth)) - { - writer.WritePropertyName("capGBPerMonth"u8); - writer.WriteNumberValue(CapGBPerMonth.Value); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -138,22 +91,24 @@ internal static DefenderForStorageSettingData DeserializeDefenderForStorageSetti { return null; } + DefenderForStorageSettingProperties properties = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; - bool? isEnabled = default; - bool? overrideSubscriptionLevelSettings = default; - bool? isEnabled0 = default; - ExtensionOperationStatus operationStatus = default; - ResourceIdentifier scanResultsEventGridTopicResourceId = default; - ExtensionOperationStatus operationStatus0 = default; - bool? isEnabled1 = default; - int? capGBPerMonth = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DefenderForStorageSettingProperties.DeserializeDefenderForStorageSettingProperties(property.Value, options); + continue; + } if (property.NameEquals("id"u8)) { id = new ResourceIdentifier(property.Value.GetString()); @@ -178,126 +133,6 @@ internal static DefenderForStorageSettingData DeserializeDefenderForStorageSetti systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("isEnabled"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isEnabled = property0.Value.GetBoolean(); - continue; - } - if (property0.NameEquals("overrideSubscriptionLevelSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - overrideSubscriptionLevelSettings = property0.Value.GetBoolean(); - continue; - } - if (property0.NameEquals("sensitiveDataDiscovery"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.NameEquals("isEnabled"u8)) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isEnabled0 = property1.Value.GetBoolean(); - continue; - } - if (property1.NameEquals("operationStatus"u8)) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - operationStatus = ExtensionOperationStatus.DeserializeExtensionOperationStatus(property1.Value, options); - continue; - } - } - continue; - } - if (property0.NameEquals("malwareScanning"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.NameEquals("scanResultsEventGridTopicResourceId"u8)) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - scanResultsEventGridTopicResourceId = new ResourceIdentifier(property1.Value.GetString()); - continue; - } - if (property1.NameEquals("operationStatus"u8)) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - operationStatus0 = ExtensionOperationStatus.DeserializeExtensionOperationStatus(property1.Value, options); - continue; - } - if (property1.NameEquals("onUpload"u8)) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - property1.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property2 in property1.Value.EnumerateObject()) - { - if (property2.NameEquals("isEnabled"u8)) - { - if (property2.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isEnabled1 = property2.Value.GetBoolean(); - continue; - } - if (property2.NameEquals("capGBPerMonth"u8)) - { - if (property2.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - capGBPerMonth = property2.Value.GetInt32(); - continue; - } - } - continue; - } - } - continue; - } - } - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -309,14 +144,7 @@ internal static DefenderForStorageSettingData DeserializeDefenderForStorageSetti name, type, systemData, - isEnabled, - overrideSubscriptionLevelSettings, - isEnabled0, - operationStatus, - scanResultsEventGridTopicResourceId, - operationStatus0, - isEnabled1, - capGBPerMonth, + properties, serializedAdditionalRawData); } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DefenderForStorageSettingData.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DefenderForStorageSettingData.cs index 7b4c8c344cda..2efc00dc7770 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DefenderForStorageSettingData.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DefenderForStorageSettingData.cs @@ -61,43 +61,15 @@ public DefenderForStorageSettingData() /// The name. /// The resourceType. /// The systemData. - /// Indicates whether Defender for Storage is enabled on this storage account. - /// Indicates whether the settings defined for this storage account should override the settings defined for the subscription. - /// Indicates whether Sensitive Data Discovery should be enabled. - /// Upon failure or partial success. Additional data describing Sensitive Data Discovery enable/disable operation. - /// Optional. Resource id of an Event Grid Topic to send scan results to. - /// Upon failure or partial success. Additional data describing Malware Scanning enable/disable operation. - /// Indicates whether On Upload malware scanning should be enabled. - /// Defines the max GB to be scanned per Month. Set to -1 if no capping is needed. + /// Defender for Storage resource properties. /// Keeps track of any properties unknown to the library. - internal DefenderForStorageSettingData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, bool? isEnabled, bool? isOverrideSubscriptionLevelSettingsEnabled, bool? isSensitiveDataDiscoveryEnabled, ExtensionOperationStatus sensitiveDataDiscoveryOperationStatus, ResourceIdentifier scanResultsEventGridTopicResourceId, ExtensionOperationStatus malwareScanningOperationStatus, bool? isMalwareScanningOnUploadEnabled, int? capGBPerMonth, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal DefenderForStorageSettingData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DefenderForStorageSettingProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { - IsEnabled = isEnabled; - IsOverrideSubscriptionLevelSettingsEnabled = isOverrideSubscriptionLevelSettingsEnabled; - IsSensitiveDataDiscoveryEnabled = isSensitiveDataDiscoveryEnabled; - SensitiveDataDiscoveryOperationStatus = sensitiveDataDiscoveryOperationStatus; - ScanResultsEventGridTopicResourceId = scanResultsEventGridTopicResourceId; - MalwareScanningOperationStatus = malwareScanningOperationStatus; - IsMalwareScanningOnUploadEnabled = isMalwareScanningOnUploadEnabled; - CapGBPerMonth = capGBPerMonth; + Properties = properties; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Indicates whether Defender for Storage is enabled on this storage account. - public bool? IsEnabled { get; set; } - /// Indicates whether the settings defined for this storage account should override the settings defined for the subscription. - public bool? IsOverrideSubscriptionLevelSettingsEnabled { get; set; } - /// Indicates whether Sensitive Data Discovery should be enabled. - public bool? IsSensitiveDataDiscoveryEnabled { get; set; } - /// Upon failure or partial success. Additional data describing Sensitive Data Discovery enable/disable operation. - public ExtensionOperationStatus SensitiveDataDiscoveryOperationStatus { get; } - /// Optional. Resource id of an Event Grid Topic to send scan results to. - public ResourceIdentifier ScanResultsEventGridTopicResourceId { get; set; } - /// Upon failure or partial success. Additional data describing Malware Scanning enable/disable operation. - public ExtensionOperationStatus MalwareScanningOperationStatus { get; } - /// Indicates whether On Upload malware scanning should be enabled. - public bool? IsMalwareScanningOnUploadEnabled { get; set; } - /// Defines the max GB to be scanned per Month. Set to -1 if no capping is needed. - public int? CapGBPerMonth { get; set; } + /// Defender for Storage resource properties. + public DefenderForStorageSettingProperties Properties { get; set; } } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsConfigurationResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsConfigurationResource.cs index d6f4f83994c4..e4b7035bb0fa 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsConfigurationResource.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsConfigurationResource.cs @@ -128,7 +128,7 @@ public virtual DevOpsOrgCollection GetDevOpsOrgs() /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -159,7 +159,7 @@ public virtual async Task> GetDevOpsOrgAsync(string /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -197,7 +197,7 @@ public virtual SecurityConnectorGitHubOwnerCollection GetSecurityConnectorGitHub /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> GetSec /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual SecurityConnectorGitLabGroupCollection GetSecurityConnectorGitLab /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -297,7 +297,7 @@ public virtual async Task> GetSec /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -328,7 +328,7 @@ public virtual Response GetSecurityConnect /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -368,7 +368,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -450,7 +450,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -492,7 +492,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -538,7 +538,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -584,7 +584,7 @@ public virtual ArmOperation Update(WaitUntil waitUn /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -630,7 +630,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -676,7 +676,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -705,7 +705,7 @@ public virtual AsyncPageable GetAvailableDevOpsOrgsAsync(Canc /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -734,7 +734,7 @@ public virtual Pageable GetAvailableDevOpsOrgs(CancellationTo /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -763,7 +763,7 @@ public virtual AsyncPageable GetAvailableG /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -792,7 +792,7 @@ public virtual Pageable GetAvailableGitHub /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -821,7 +821,7 @@ public virtual AsyncPageable GetAvailableG /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -850,7 +850,7 @@ public virtual Pageable GetAvailableGitLab /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// @@ -889,7 +889,7 @@ public virtual async Task> GetDevOpsOperationRes /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsOrgCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsOrgCollection.cs index 9c6edb93dc26..a0a8712b121e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsOrgCollection.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsOrgCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync(W /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnti /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string orgName, /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string orgName, CancellationToken /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellation /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string orgName, Cancellati /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string orgName, CancellationToken cancellat /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsync( /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsOrgResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsOrgResource.cs index e7e200b5b16d..2edbbd1ec3bd 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsOrgResource.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsOrgResource.cs @@ -108,7 +108,7 @@ public virtual DevOpsProjectCollection GetDevOpsProjects() /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetDevOpsProjectAsync /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetDevOpsProject(string projectNa /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsync(CancellationToke /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task> UpdateAsync(WaitUntil /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsProjectCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsProjectCollection.cs index c9ad831c9f49..500e0278e3b3 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsProjectCollection.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsProjectCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string proje /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string projectName, Cancellat /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string projectName, Cancel /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string projectName, CancellationToken cance /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsProjectResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsProjectResource.cs index 3c033bdb78a1..d8846561b1ad 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsProjectResource.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsProjectResource.cs @@ -109,7 +109,7 @@ public virtual DevOpsRepositoryCollection GetDevOpsRepositories() /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetDevOpsRepositor /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetDevOpsRepository(string rep /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -251,7 +251,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -297,7 +297,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsRepositoryCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsRepositoryCollection.cs index a27f60afc6a2..317fb07d0b9f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsRepositoryCollection.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsRepositoryCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string re /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string repoName, Cancellat /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string repoName, Cancellat /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string repoName, CancellationToken cancella /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsRepositoryResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsRepositoryResource.cs index 030300b9f67c..ba16e52360e0 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsRepositoryResource.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsRepositoryResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task> UpdateAsync(Wa /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Extensions/MockableSecurityCenterArmClient.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Extensions/MockableSecurityCenterArmClient.cs index 775d06d8e2aa..37f8b56e0644 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Extensions/MockableSecurityCenterArmClient.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Extensions/MockableSecurityCenterArmClient.cs @@ -1169,30 +1169,6 @@ public virtual SoftwareInventoryResource GetSoftwareInventoryResource(ResourceId return new SoftwareInventoryResource(Client, id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual CustomAssessmentAutomationResource GetCustomAssessmentAutomationResource(ResourceIdentifier id) - { - CustomAssessmentAutomationResource.ValidateResourceId(id); - return new CustomAssessmentAutomationResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual CustomEntityStoreAssignmentResource GetCustomEntityStoreAssignmentResource(ResourceIdentifier id) - { - CustomEntityStoreAssignmentResource.ValidateResourceId(id); - return new CustomEntityStoreAssignmentResource(Client, id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -1313,102 +1289,6 @@ public virtual SecurityHealthReportResource GetSecurityHealthReportResource(Reso return new SecurityHealthReportResource(Client, id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual DevOpsOrgResource GetDevOpsOrgResource(ResourceIdentifier id) - { - DevOpsOrgResource.ValidateResourceId(id); - return new DevOpsOrgResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual DevOpsProjectResource GetDevOpsProjectResource(ResourceIdentifier id) - { - DevOpsProjectResource.ValidateResourceId(id); - return new DevOpsProjectResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual DevOpsRepositoryResource GetDevOpsRepositoryResource(ResourceIdentifier id) - { - DevOpsRepositoryResource.ValidateResourceId(id); - return new DevOpsRepositoryResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual DevOpsConfigurationResource GetDevOpsConfigurationResource(ResourceIdentifier id) - { - DevOpsConfigurationResource.ValidateResourceId(id); - return new DevOpsConfigurationResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual SecurityConnectorGitHubOwnerResource GetSecurityConnectorGitHubOwnerResource(ResourceIdentifier id) - { - SecurityConnectorGitHubOwnerResource.ValidateResourceId(id); - return new SecurityConnectorGitHubOwnerResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual SecurityConnectorGitHubRepositoryResource GetSecurityConnectorGitHubRepositoryResource(ResourceIdentifier id) - { - SecurityConnectorGitHubRepositoryResource.ValidateResourceId(id); - return new SecurityConnectorGitHubRepositoryResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual SecurityConnectorGitLabGroupResource GetSecurityConnectorGitLabGroupResource(ResourceIdentifier id) - { - SecurityConnectorGitLabGroupResource.ValidateResourceId(id); - return new SecurityConnectorGitLabGroupResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual SecurityConnectorGitLabProjectResource GetSecurityConnectorGitLabProjectResource(ResourceIdentifier id) - { - SecurityConnectorGitLabProjectResource.ValidateResourceId(id); - return new SecurityConnectorGitLabProjectResource(Client, id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -1505,30 +1385,6 @@ public virtual IotSecuritySolutionResource GetIotSecuritySolutionResource(Resour return new IotSecuritySolutionResource(Client, id); } - /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual AdaptiveNetworkHardeningResource GetAdaptiveNetworkHardeningResource(ResourceIdentifier id) - { - AdaptiveNetworkHardeningResource.ValidateResourceId(id); - return new AdaptiveNetworkHardeningResource(Client, id); - } - - /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual AdaptiveApplicationControlGroupResource GetAdaptiveApplicationControlGroupResource(ResourceIdentifier id) - { - AdaptiveApplicationControlGroupResource.ValidateResourceId(id); - return new AdaptiveApplicationControlGroupResource(Client, id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -1672,5 +1528,101 @@ public virtual SecurityCenterApiCollectionResource GetSecurityCenterApiCollectio SecurityCenterApiCollectionResource.ValidateResourceId(id); return new SecurityCenterApiCollectionResource(Client, id); } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DevOpsOrgResource GetDevOpsOrgResource(ResourceIdentifier id) + { + DevOpsOrgResource.ValidateResourceId(id); + return new DevOpsOrgResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DevOpsProjectResource GetDevOpsProjectResource(ResourceIdentifier id) + { + DevOpsProjectResource.ValidateResourceId(id); + return new DevOpsProjectResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DevOpsRepositoryResource GetDevOpsRepositoryResource(ResourceIdentifier id) + { + DevOpsRepositoryResource.ValidateResourceId(id); + return new DevOpsRepositoryResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DevOpsConfigurationResource GetDevOpsConfigurationResource(ResourceIdentifier id) + { + DevOpsConfigurationResource.ValidateResourceId(id); + return new DevOpsConfigurationResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SecurityConnectorGitHubOwnerResource GetSecurityConnectorGitHubOwnerResource(ResourceIdentifier id) + { + SecurityConnectorGitHubOwnerResource.ValidateResourceId(id); + return new SecurityConnectorGitHubOwnerResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SecurityConnectorGitHubRepositoryResource GetSecurityConnectorGitHubRepositoryResource(ResourceIdentifier id) + { + SecurityConnectorGitHubRepositoryResource.ValidateResourceId(id); + return new SecurityConnectorGitHubRepositoryResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SecurityConnectorGitLabGroupResource GetSecurityConnectorGitLabGroupResource(ResourceIdentifier id) + { + SecurityConnectorGitLabGroupResource.ValidateResourceId(id); + return new SecurityConnectorGitLabGroupResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SecurityConnectorGitLabProjectResource GetSecurityConnectorGitLabProjectResource(ResourceIdentifier id) + { + SecurityConnectorGitLabProjectResource.ValidateResourceId(id); + return new SecurityConnectorGitLabProjectResource(Client, id); + } } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Extensions/MockableSecurityCenterResourceGroupResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Extensions/MockableSecurityCenterResourceGroupResource.cs index a28bb2eedd92..1683a4d7480d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Extensions/MockableSecurityCenterResourceGroupResource.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Extensions/MockableSecurityCenterResourceGroupResource.cs @@ -291,144 +291,6 @@ public virtual Response GetSoftwareInventory(string r return GetSoftwareInventories(resourceNamespace, resourceType, resourceName).Get(softwareName, cancellationToken); } - /// Gets a collection of CustomAssessmentAutomationResources in the ResourceGroupResource. - /// An object representing collection of CustomAssessmentAutomationResources and their operations over a CustomAssessmentAutomationResource. - public virtual CustomAssessmentAutomationCollection GetCustomAssessmentAutomations() - { - return GetCachedClient(client => new CustomAssessmentAutomationCollection(client, Id)); - } - - /// - /// Gets a single custom assessment automation by name for the provided subscription and resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName} - /// - /// - /// Operation Id - /// CustomAssessmentAutomations_Get - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the Custom Assessment Automation. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetCustomAssessmentAutomationAsync(string customAssessmentAutomationName, CancellationToken cancellationToken = default) - { - return await GetCustomAssessmentAutomations().GetAsync(customAssessmentAutomationName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a single custom assessment automation by name for the provided subscription and resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName} - /// - /// - /// Operation Id - /// CustomAssessmentAutomations_Get - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the Custom Assessment Automation. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetCustomAssessmentAutomation(string customAssessmentAutomationName, CancellationToken cancellationToken = default) - { - return GetCustomAssessmentAutomations().Get(customAssessmentAutomationName, cancellationToken); - } - - /// Gets a collection of CustomEntityStoreAssignmentResources in the ResourceGroupResource. - /// An object representing collection of CustomEntityStoreAssignmentResources and their operations over a CustomEntityStoreAssignmentResource. - public virtual CustomEntityStoreAssignmentCollection GetCustomEntityStoreAssignments() - { - return GetCachedClient(client => new CustomEntityStoreAssignmentCollection(client, Id)); - } - - /// - /// Gets a single custom entity store assignment by name for the provided subscription and resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName} - /// - /// - /// Operation Id - /// CustomEntityStoreAssignments_Get - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the custom entity store assignment. Generated name is GUID. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetCustomEntityStoreAssignmentAsync(string customEntityStoreAssignmentName, CancellationToken cancellationToken = default) - { - return await GetCustomEntityStoreAssignments().GetAsync(customEntityStoreAssignmentName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a single custom entity store assignment by name for the provided subscription and resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName} - /// - /// - /// Operation Id - /// CustomEntityStoreAssignments_Get - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the custom entity store assignment. Generated name is GUID. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetCustomEntityStoreAssignment(string customEntityStoreAssignmentName, CancellationToken cancellationToken = default) - { - return GetCustomEntityStoreAssignments().Get(customEntityStoreAssignmentName, cancellationToken); - } - /// Gets a collection of SecurityConnectorResources in the ResourceGroupResource. /// An object representing collection of SecurityConnectorResources and their operations over a SecurityConnectorResource. public virtual SecurityConnectorCollection GetSecurityConnectors() @@ -567,86 +429,6 @@ public virtual Response GetIotSecuritySolution(stri return GetIotSecuritySolutions().Get(solutionName, cancellationToken); } - /// Gets a collection of AdaptiveNetworkHardeningResources in the ResourceGroupResource. - /// The Namespace of the resource. - /// The type of the resource. - /// Name of the resource. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - /// An object representing collection of AdaptiveNetworkHardeningResources and their operations over a AdaptiveNetworkHardeningResource. - public virtual AdaptiveNetworkHardeningCollection GetAdaptiveNetworkHardenings(string resourceNamespace, string resourceType, string resourceName) - { - return new AdaptiveNetworkHardeningCollection(Client, Id, resourceNamespace, resourceType, resourceName); - } - - /// - /// Gets a single Adaptive Network Hardening resource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings/{adaptiveNetworkHardeningResourceName} - /// - /// - /// Operation Id - /// AdaptiveNetworkHardenings_Get - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The Namespace of the resource. - /// The type of the resource. - /// Name of the resource. - /// The name of the Adaptive Network Hardening resource. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetAdaptiveNetworkHardeningAsync(string resourceNamespace, string resourceType, string resourceName, string adaptiveNetworkHardeningResourceName, CancellationToken cancellationToken = default) - { - return await GetAdaptiveNetworkHardenings(resourceNamespace, resourceType, resourceName).GetAsync(adaptiveNetworkHardeningResourceName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a single Adaptive Network Hardening resource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings/{adaptiveNetworkHardeningResourceName} - /// - /// - /// Operation Id - /// AdaptiveNetworkHardenings_Get - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The Namespace of the resource. - /// The type of the resource. - /// Name of the resource. - /// The name of the Adaptive Network Hardening resource. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetAdaptiveNetworkHardening(string resourceNamespace, string resourceType, string resourceName, string adaptiveNetworkHardeningResourceName, CancellationToken cancellationToken = default) - { - return GetAdaptiveNetworkHardenings(resourceNamespace, resourceType, resourceName).Get(adaptiveNetworkHardeningResourceName, cancellationToken); - } - /// Gets a collection of JitNetworkAccessPolicyResources in the ResourceGroupResource. /// The location where ASC stores the data of the subscription. can be retrieved from Get locations. /// An object representing collection of JitNetworkAccessPolicyResources and their operations over a JitNetworkAccessPolicyResource. diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Extensions/MockableSecurityCenterSubscriptionResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Extensions/MockableSecurityCenterSubscriptionResource.cs index d6fce6b27de2..6378d9a99c79 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Extensions/MockableSecurityCenterSubscriptionResource.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Extensions/MockableSecurityCenterSubscriptionResource.cs @@ -24,10 +24,6 @@ public partial class MockableSecurityCenterSubscriptionResource : ArmResource private AutomationsRestOperations _securityAutomationAutomationsRestClient; private ClientDiagnostics _softwareInventoryClientDiagnostics; private SoftwareInventoriesRestOperations _softwareInventoryRestClient; - private ClientDiagnostics _customAssessmentAutomationClientDiagnostics; - private CustomAssessmentAutomationsRestOperations _customAssessmentAutomationRestClient; - private ClientDiagnostics _customEntityStoreAssignmentClientDiagnostics; - private CustomEntityStoreAssignmentsRestOperations _customEntityStoreAssignmentRestClient; private ClientDiagnostics _mdeOnboardingsClientDiagnostics; private MdeOnboardingsRestOperations _mdeOnboardingsRestClient; private ClientDiagnostics _securityConnectorClientDiagnostics; @@ -36,8 +32,6 @@ public partial class MockableSecurityCenterSubscriptionResource : ArmResource private IotSecuritySolutionRestOperations _iotSecuritySolutionRestClient; private ClientDiagnostics _allowedConnectionsClientDiagnostics; private AllowedConnectionsRestOperations _allowedConnectionsRestClient; - private ClientDiagnostics _adaptiveApplicationControlGroupAdaptiveApplicationControlsClientDiagnostics; - private AdaptiveApplicationControlsRestOperations _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient; private ClientDiagnostics _discoveredSecuritySolutionsClientDiagnostics; private DiscoveredSecuritySolutionsRestOperations _discoveredSecuritySolutionsRestClient; private ClientDiagnostics _externalSecuritySolutionsClientDiagnostics; @@ -77,10 +71,6 @@ internal MockableSecurityCenterSubscriptionResource(ArmClient client, ResourceId private AutomationsRestOperations SecurityAutomationAutomationsRestClient => _securityAutomationAutomationsRestClient ??= new AutomationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SecurityAutomationResource.ResourceType)); private ClientDiagnostics SoftwareInventoryClientDiagnostics => _softwareInventoryClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SecurityCenter", SoftwareInventoryResource.ResourceType.Namespace, Diagnostics); private SoftwareInventoriesRestOperations SoftwareInventoryRestClient => _softwareInventoryRestClient ??= new SoftwareInventoriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SoftwareInventoryResource.ResourceType)); - private ClientDiagnostics CustomAssessmentAutomationClientDiagnostics => _customAssessmentAutomationClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SecurityCenter", CustomAssessmentAutomationResource.ResourceType.Namespace, Diagnostics); - private CustomAssessmentAutomationsRestOperations CustomAssessmentAutomationRestClient => _customAssessmentAutomationRestClient ??= new CustomAssessmentAutomationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(CustomAssessmentAutomationResource.ResourceType)); - private ClientDiagnostics CustomEntityStoreAssignmentClientDiagnostics => _customEntityStoreAssignmentClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SecurityCenter", CustomEntityStoreAssignmentResource.ResourceType.Namespace, Diagnostics); - private CustomEntityStoreAssignmentsRestOperations CustomEntityStoreAssignmentRestClient => _customEntityStoreAssignmentRestClient ??= new CustomEntityStoreAssignmentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(CustomEntityStoreAssignmentResource.ResourceType)); private ClientDiagnostics MdeOnboardingsClientDiagnostics => _mdeOnboardingsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SecurityCenter", ProviderConstants.DefaultProviderNamespace, Diagnostics); private MdeOnboardingsRestOperations MdeOnboardingsRestClient => _mdeOnboardingsRestClient ??= new MdeOnboardingsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics SecurityConnectorClientDiagnostics => _securityConnectorClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SecurityCenter", SecurityConnectorResource.ResourceType.Namespace, Diagnostics); @@ -89,8 +79,6 @@ internal MockableSecurityCenterSubscriptionResource(ArmClient client, ResourceId private IotSecuritySolutionRestOperations IotSecuritySolutionRestClient => _iotSecuritySolutionRestClient ??= new IotSecuritySolutionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(IotSecuritySolutionResource.ResourceType)); private ClientDiagnostics AllowedConnectionsClientDiagnostics => _allowedConnectionsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SecurityCenter", ProviderConstants.DefaultProviderNamespace, Diagnostics); private AllowedConnectionsRestOperations AllowedConnectionsRestClient => _allowedConnectionsRestClient ??= new AllowedConnectionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - private ClientDiagnostics AdaptiveApplicationControlGroupAdaptiveApplicationControlsClientDiagnostics => _adaptiveApplicationControlGroupAdaptiveApplicationControlsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SecurityCenter", AdaptiveApplicationControlGroupResource.ResourceType.Namespace, Diagnostics); - private AdaptiveApplicationControlsRestOperations AdaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient => _adaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient ??= new AdaptiveApplicationControlsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(AdaptiveApplicationControlGroupResource.ResourceType)); private ClientDiagnostics DiscoveredSecuritySolutionsClientDiagnostics => _discoveredSecuritySolutionsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SecurityCenter", ProviderConstants.DefaultProviderNamespace, Diagnostics); private DiscoveredSecuritySolutionsRestOperations DiscoveredSecuritySolutionsRestClient => _discoveredSecuritySolutionsRestClient ??= new DiscoveredSecuritySolutionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics ExternalSecuritySolutionsClientDiagnostics => _externalSecuritySolutionsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SecurityCenter", ProviderConstants.DefaultProviderNamespace, Diagnostics); @@ -1177,126 +1165,6 @@ public virtual Pageable GetSoftwareInventories(Cancel return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SoftwareInventoryResource(Client, SoftwareInventoryData.DeserializeSoftwareInventoryData(e)), SoftwareInventoryClientDiagnostics, Pipeline, "MockableSecurityCenterSubscriptionResource.GetSoftwareInventories", "value", "nextLink", cancellationToken); } - /// - /// List custom assessment automations by provided subscription - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/customAssessmentAutomations - /// - /// - /// Operation Id - /// CustomAssessmentAutomations_ListBySubscription - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetCustomAssessmentAutomationsAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => CustomAssessmentAutomationRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CustomAssessmentAutomationRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new CustomAssessmentAutomationResource(Client, CustomAssessmentAutomationData.DeserializeCustomAssessmentAutomationData(e)), CustomAssessmentAutomationClientDiagnostics, Pipeline, "MockableSecurityCenterSubscriptionResource.GetCustomAssessmentAutomations", "value", "nextLink", cancellationToken); - } - - /// - /// List custom assessment automations by provided subscription - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/customAssessmentAutomations - /// - /// - /// Operation Id - /// CustomAssessmentAutomations_ListBySubscription - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetCustomAssessmentAutomations(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => CustomAssessmentAutomationRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CustomAssessmentAutomationRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new CustomAssessmentAutomationResource(Client, CustomAssessmentAutomationData.DeserializeCustomAssessmentAutomationData(e)), CustomAssessmentAutomationClientDiagnostics, Pipeline, "MockableSecurityCenterSubscriptionResource.GetCustomAssessmentAutomations", "value", "nextLink", cancellationToken); - } - - /// - /// List custom entity store assignments by provided subscription - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/customEntityStoreAssignments - /// - /// - /// Operation Id - /// CustomEntityStoreAssignments_ListBySubscription - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetCustomEntityStoreAssignmentsAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => CustomEntityStoreAssignmentRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CustomEntityStoreAssignmentRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new CustomEntityStoreAssignmentResource(Client, CustomEntityStoreAssignmentData.DeserializeCustomEntityStoreAssignmentData(e)), CustomEntityStoreAssignmentClientDiagnostics, Pipeline, "MockableSecurityCenterSubscriptionResource.GetCustomEntityStoreAssignments", "value", "nextLink", cancellationToken); - } - - /// - /// List custom entity store assignments by provided subscription - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/customEntityStoreAssignments - /// - /// - /// Operation Id - /// CustomEntityStoreAssignments_ListBySubscription - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetCustomEntityStoreAssignments(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => CustomEntityStoreAssignmentRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CustomEntityStoreAssignmentRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new CustomEntityStoreAssignmentResource(Client, CustomEntityStoreAssignmentData.DeserializeCustomEntityStoreAssignmentData(e)), CustomEntityStoreAssignmentClientDiagnostics, Pipeline, "MockableSecurityCenterSubscriptionResource.GetCustomEntityStoreAssignments", "value", "nextLink", cancellationToken); - } - /// /// The configuration or data needed to onboard the machine to MDE /// @@ -1589,68 +1457,6 @@ public virtual Pageable GetAllowedConnections(C return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => SecurityCenterAllowedConnection.DeserializeSecurityCenterAllowedConnection(e), AllowedConnectionsClientDiagnostics, Pipeline, "MockableSecurityCenterSubscriptionResource.GetAllowedConnections", "value", "nextLink", cancellationToken); } - /// - /// Gets a list of application control machine groups for the subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/applicationWhitelistings - /// - /// - /// Operation Id - /// AdaptiveApplicationControls_List - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Include the policy rules. - /// Return output in a summarized form. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAdaptiveApplicationControlGroupsAsync(bool? includePathRecommendations = null, bool? summary = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => AdaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient.CreateListRequest(Id.SubscriptionId, includePathRecommendations, summary); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new AdaptiveApplicationControlGroupResource(Client, AdaptiveApplicationControlGroupData.DeserializeAdaptiveApplicationControlGroupData(e)), AdaptiveApplicationControlGroupAdaptiveApplicationControlsClientDiagnostics, Pipeline, "MockableSecurityCenterSubscriptionResource.GetAdaptiveApplicationControlGroups", "value", null, cancellationToken); - } - - /// - /// Gets a list of application control machine groups for the subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/applicationWhitelistings - /// - /// - /// Operation Id - /// AdaptiveApplicationControls_List - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Include the policy rules. - /// Return output in a summarized form. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAdaptiveApplicationControlGroups(bool? includePathRecommendations = null, bool? summary = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => AdaptiveApplicationControlGroupAdaptiveApplicationControlsRestClient.CreateListRequest(Id.SubscriptionId, includePathRecommendations, summary); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => new AdaptiveApplicationControlGroupResource(Client, AdaptiveApplicationControlGroupData.DeserializeAdaptiveApplicationControlGroupData(e)), AdaptiveApplicationControlGroupAdaptiveApplicationControlsClientDiagnostics, Pipeline, "MockableSecurityCenterSubscriptionResource.GetAdaptiveApplicationControlGroups", "value", null, cancellationToken); - } - /// /// Gets a list of discovered Security Solutions for the subscription. /// diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Extensions/SecurityCenterExtensions.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Extensions/SecurityCenterExtensions.cs index 75836e01b7ae..b6aa9a8646e2 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Extensions/SecurityCenterExtensions.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Extensions/SecurityCenterExtensions.cs @@ -1485,44 +1485,6 @@ public static SoftwareInventoryResource GetSoftwareInventoryResource(this ArmCli return GetMockableSecurityCenterArmClient(client).GetSoftwareInventoryResource(id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static CustomAssessmentAutomationResource GetCustomAssessmentAutomationResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableSecurityCenterArmClient(client).GetCustomAssessmentAutomationResource(id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static CustomEntityStoreAssignmentResource GetCustomEntityStoreAssignmentResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableSecurityCenterArmClient(client).GetCustomEntityStoreAssignmentResource(id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -1713,158 +1675,6 @@ public static SecurityHealthReportResource GetSecurityHealthReportResource(this return GetMockableSecurityCenterArmClient(client).GetSecurityHealthReportResource(id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static DevOpsOrgResource GetDevOpsOrgResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableSecurityCenterArmClient(client).GetDevOpsOrgResource(id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static DevOpsProjectResource GetDevOpsProjectResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableSecurityCenterArmClient(client).GetDevOpsProjectResource(id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static DevOpsRepositoryResource GetDevOpsRepositoryResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableSecurityCenterArmClient(client).GetDevOpsRepositoryResource(id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static DevOpsConfigurationResource GetDevOpsConfigurationResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableSecurityCenterArmClient(client).GetDevOpsConfigurationResource(id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static SecurityConnectorGitHubOwnerResource GetSecurityConnectorGitHubOwnerResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableSecurityCenterArmClient(client).GetSecurityConnectorGitHubOwnerResource(id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static SecurityConnectorGitHubRepositoryResource GetSecurityConnectorGitHubRepositoryResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableSecurityCenterArmClient(client).GetSecurityConnectorGitHubRepositoryResource(id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static SecurityConnectorGitLabGroupResource GetSecurityConnectorGitLabGroupResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableSecurityCenterArmClient(client).GetSecurityConnectorGitLabGroupResource(id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static SecurityConnectorGitLabProjectResource GetSecurityConnectorGitLabProjectResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableSecurityCenterArmClient(client).GetSecurityConnectorGitLabProjectResource(id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -2017,44 +1827,6 @@ public static IotSecuritySolutionResource GetIotSecuritySolutionResource(this Ar return GetMockableSecurityCenterArmClient(client).GetIotSecuritySolutionResource(id); } - /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static AdaptiveNetworkHardeningResource GetAdaptiveNetworkHardeningResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableSecurityCenterArmClient(client).GetAdaptiveNetworkHardeningResource(id); - } - - /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static AdaptiveApplicationControlGroupResource GetAdaptiveApplicationControlGroupResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableSecurityCenterArmClient(client).GetAdaptiveApplicationControlGroupResource(id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -2283,6 +2055,158 @@ public static SecurityCenterApiCollectionResource GetSecurityCenterApiCollection return GetMockableSecurityCenterArmClient(client).GetSecurityCenterApiCollectionResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DevOpsOrgResource GetDevOpsOrgResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSecurityCenterArmClient(client).GetDevOpsOrgResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DevOpsProjectResource GetDevOpsProjectResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSecurityCenterArmClient(client).GetDevOpsProjectResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DevOpsRepositoryResource GetDevOpsRepositoryResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSecurityCenterArmClient(client).GetDevOpsRepositoryResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DevOpsConfigurationResource GetDevOpsConfigurationResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSecurityCenterArmClient(client).GetDevOpsConfigurationResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SecurityConnectorGitHubOwnerResource GetSecurityConnectorGitHubOwnerResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSecurityCenterArmClient(client).GetSecurityConnectorGitHubOwnerResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SecurityConnectorGitHubRepositoryResource GetSecurityConnectorGitHubRepositoryResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSecurityCenterArmClient(client).GetSecurityConnectorGitHubRepositoryResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SecurityConnectorGitLabGroupResource GetSecurityConnectorGitLabGroupResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSecurityCenterArmClient(client).GetSecurityConnectorGitLabGroupResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SecurityConnectorGitLabProjectResource GetSecurityConnectorGitLabProjectResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSecurityCenterArmClient(client).GetSecurityConnectorGitLabProjectResource(id); + } + /// /// Gets a collection of ResourceGroupSecurityTaskResources in the ResourceGroupResource. /// @@ -2535,230 +2459,44 @@ public static async Task> GetSoftwareInvento } /// - /// Gets a single software data of the virtual machine. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/softwareInventories/{softwareName} - /// - /// - /// Operation Id - /// SoftwareInventories_Get - /// - /// - /// Default Api Version - /// 2021-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The namespace of the resource. - /// The type of the resource. - /// Name of the resource. - /// Name of the installed software. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public static Response GetSoftwareInventory(this ResourceGroupResource resourceGroupResource, string resourceNamespace, string resourceType, string resourceName, string softwareName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableSecurityCenterResourceGroupResource(resourceGroupResource).GetSoftwareInventory(resourceNamespace, resourceType, resourceName, softwareName, cancellationToken); - } - - /// - /// Gets a collection of CustomAssessmentAutomationResources in the ResourceGroupResource. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// is null. - /// An object representing collection of CustomAssessmentAutomationResources and their operations over a CustomAssessmentAutomationResource. - public static CustomAssessmentAutomationCollection GetCustomAssessmentAutomations(this ResourceGroupResource resourceGroupResource) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableSecurityCenterResourceGroupResource(resourceGroupResource).GetCustomAssessmentAutomations(); - } - - /// - /// Gets a single custom assessment automation by name for the provided subscription and resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName} - /// - /// - /// Operation Id - /// CustomAssessmentAutomations_Get - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// Name of the Custom Assessment Automation. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public static async Task> GetCustomAssessmentAutomationAsync(this ResourceGroupResource resourceGroupResource, string customAssessmentAutomationName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return await GetMockableSecurityCenterResourceGroupResource(resourceGroupResource).GetCustomAssessmentAutomationAsync(customAssessmentAutomationName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a single custom assessment automation by name for the provided subscription and resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName} - /// - /// - /// Operation Id - /// CustomAssessmentAutomations_Get - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// Name of the Custom Assessment Automation. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public static Response GetCustomAssessmentAutomation(this ResourceGroupResource resourceGroupResource, string customAssessmentAutomationName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableSecurityCenterResourceGroupResource(resourceGroupResource).GetCustomAssessmentAutomation(customAssessmentAutomationName, cancellationToken); - } - - /// - /// Gets a collection of CustomEntityStoreAssignmentResources in the ResourceGroupResource. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// is null. - /// An object representing collection of CustomEntityStoreAssignmentResources and their operations over a CustomEntityStoreAssignmentResource. - public static CustomEntityStoreAssignmentCollection GetCustomEntityStoreAssignments(this ResourceGroupResource resourceGroupResource) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableSecurityCenterResourceGroupResource(resourceGroupResource).GetCustomEntityStoreAssignments(); - } - - /// - /// Gets a single custom entity store assignment by name for the provided subscription and resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName} - /// - /// - /// Operation Id - /// CustomEntityStoreAssignments_Get - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// Name of the custom entity store assignment. Generated name is GUID. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public static async Task> GetCustomEntityStoreAssignmentAsync(this ResourceGroupResource resourceGroupResource, string customEntityStoreAssignmentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return await GetMockableSecurityCenterResourceGroupResource(resourceGroupResource).GetCustomEntityStoreAssignmentAsync(customEntityStoreAssignmentName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a single custom entity store assignment by name for the provided subscription and resource group. + /// Gets a single software data of the virtual machine. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customEntityStoreAssignments/{customEntityStoreAssignmentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/softwareInventories/{softwareName} /// /// /// Operation Id - /// CustomEntityStoreAssignments_Get + /// SoftwareInventories_Get /// /// /// Default Api Version - /// 2021-07-01-preview + /// 2021-05-01-preview /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// Name of the custom entity store assignment. Generated name is GUID. + /// The namespace of the resource. + /// The type of the resource. + /// Name of the resource. + /// Name of the installed software. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static Response GetCustomEntityStoreAssignment(this ResourceGroupResource resourceGroupResource, string customEntityStoreAssignmentName, CancellationToken cancellationToken = default) + public static Response GetSoftwareInventory(this ResourceGroupResource resourceGroupResource, string resourceNamespace, string resourceType, string resourceName, string softwareName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableSecurityCenterResourceGroupResource(resourceGroupResource).GetCustomEntityStoreAssignment(customEntityStoreAssignmentName, cancellationToken); + return GetMockableSecurityCenterResourceGroupResource(resourceGroupResource).GetSoftwareInventory(resourceNamespace, resourceType, resourceName, softwareName, cancellationToken); } /// @@ -2947,109 +2685,6 @@ public static Response GetIotSecuritySolution(this return GetMockableSecurityCenterResourceGroupResource(resourceGroupResource).GetIotSecuritySolution(solutionName, cancellationToken); } - /// - /// Gets a collection of AdaptiveNetworkHardeningResources in the ResourceGroupResource. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The Namespace of the resource. - /// The type of the resource. - /// Name of the resource. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - /// An object representing collection of AdaptiveNetworkHardeningResources and their operations over a AdaptiveNetworkHardeningResource. - public static AdaptiveNetworkHardeningCollection GetAdaptiveNetworkHardenings(this ResourceGroupResource resourceGroupResource, string resourceNamespace, string resourceType, string resourceName) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableSecurityCenterResourceGroupResource(resourceGroupResource).GetAdaptiveNetworkHardenings(resourceNamespace, resourceType, resourceName); - } - - /// - /// Gets a single Adaptive Network Hardening resource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings/{adaptiveNetworkHardeningResourceName} - /// - /// - /// Operation Id - /// AdaptiveNetworkHardenings_Get - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The Namespace of the resource. - /// The type of the resource. - /// Name of the resource. - /// The name of the Adaptive Network Hardening resource. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public static async Task> GetAdaptiveNetworkHardeningAsync(this ResourceGroupResource resourceGroupResource, string resourceNamespace, string resourceType, string resourceName, string adaptiveNetworkHardeningResourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return await GetMockableSecurityCenterResourceGroupResource(resourceGroupResource).GetAdaptiveNetworkHardeningAsync(resourceNamespace, resourceType, resourceName, adaptiveNetworkHardeningResourceName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a single Adaptive Network Hardening resource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings/{adaptiveNetworkHardeningResourceName} - /// - /// - /// Operation Id - /// AdaptiveNetworkHardenings_Get - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The Namespace of the resource. - /// The type of the resource. - /// Name of the resource. - /// The name of the Adaptive Network Hardening resource. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public static Response GetAdaptiveNetworkHardening(this ResourceGroupResource resourceGroupResource, string resourceNamespace, string resourceType, string resourceName, string adaptiveNetworkHardeningResourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableSecurityCenterResourceGroupResource(resourceGroupResource).GetAdaptiveNetworkHardening(resourceNamespace, resourceType, resourceName, adaptiveNetworkHardeningResourceName, cancellationToken); - } - /// /// Gets a collection of JitNetworkAccessPolicyResources in the ResourceGroupResource. /// @@ -5399,150 +5034,6 @@ public static Pageable GetSoftwareInventories(this Su return GetMockableSecurityCenterSubscriptionResource(subscriptionResource).GetSoftwareInventories(cancellationToken); } - /// - /// List custom assessment automations by provided subscription - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/customAssessmentAutomations - /// - /// - /// Operation Id - /// CustomAssessmentAutomations_ListBySubscription - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetCustomAssessmentAutomationsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return GetMockableSecurityCenterSubscriptionResource(subscriptionResource).GetCustomAssessmentAutomationsAsync(cancellationToken); - } - - /// - /// List custom assessment automations by provided subscription - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/customAssessmentAutomations - /// - /// - /// Operation Id - /// CustomAssessmentAutomations_ListBySubscription - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetCustomAssessmentAutomations(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return GetMockableSecurityCenterSubscriptionResource(subscriptionResource).GetCustomAssessmentAutomations(cancellationToken); - } - - /// - /// List custom entity store assignments by provided subscription - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/customEntityStoreAssignments - /// - /// - /// Operation Id - /// CustomEntityStoreAssignments_ListBySubscription - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetCustomEntityStoreAssignmentsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return GetMockableSecurityCenterSubscriptionResource(subscriptionResource).GetCustomEntityStoreAssignmentsAsync(cancellationToken); - } - - /// - /// List custom entity store assignments by provided subscription - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/customEntityStoreAssignments - /// - /// - /// Operation Id - /// CustomEntityStoreAssignments_ListBySubscription - /// - /// - /// Default Api Version - /// 2021-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetCustomEntityStoreAssignments(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return GetMockableSecurityCenterSubscriptionResource(subscriptionResource).GetCustomEntityStoreAssignments(cancellationToken); - } - /// /// The configuration or data needed to onboard the machine to MDE /// @@ -5879,82 +5370,6 @@ public static Pageable GetAllowedConnections(th return GetMockableSecurityCenterSubscriptionResource(subscriptionResource).GetAllowedConnections(cancellationToken); } - /// - /// Gets a list of application control machine groups for the subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/applicationWhitelistings - /// - /// - /// Operation Id - /// AdaptiveApplicationControls_List - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// Include the policy rules. - /// Return output in a summarized form. - /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetAdaptiveApplicationControlGroupsAsync(this SubscriptionResource subscriptionResource, bool? includePathRecommendations = null, bool? summary = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return GetMockableSecurityCenterSubscriptionResource(subscriptionResource).GetAdaptiveApplicationControlGroupsAsync(includePathRecommendations, summary, cancellationToken); - } - - /// - /// Gets a list of application control machine groups for the subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/applicationWhitelistings - /// - /// - /// Operation Id - /// AdaptiveApplicationControls_List - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// Include the policy rules. - /// Return output in a summarized form. - /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetAdaptiveApplicationControlGroups(this SubscriptionResource subscriptionResource, bool? includePathRecommendations = null, bool? summary = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return GetMockableSecurityCenterSubscriptionResource(subscriptionResource).GetAdaptiveApplicationControlGroups(includePathRecommendations, summary, cancellationToken); - } - /// /// Gets a list of discovered Security Solutions for the subscription. /// diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlEnforcementMode.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlEnforcementMode.cs deleted file mode 100644 index 5a9311d63ba8..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlEnforcementMode.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - /// The application control policy enforcement/protection mode of the machine group. - public readonly partial struct AdaptiveApplicationControlEnforcementMode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AdaptiveApplicationControlEnforcementMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AuditValue = "Audit"; - private const string EnforceValue = "Enforce"; - private const string NoneValue = "None"; - - /// Audit. - public static AdaptiveApplicationControlEnforcementMode Audit { get; } = new AdaptiveApplicationControlEnforcementMode(AuditValue); - /// Enforce. - public static AdaptiveApplicationControlEnforcementMode Enforce { get; } = new AdaptiveApplicationControlEnforcementMode(EnforceValue); - /// None. - public static AdaptiveApplicationControlEnforcementMode None { get; } = new AdaptiveApplicationControlEnforcementMode(NoneValue); - /// Determines if two values are the same. - public static bool operator ==(AdaptiveApplicationControlEnforcementMode left, AdaptiveApplicationControlEnforcementMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AdaptiveApplicationControlEnforcementMode left, AdaptiveApplicationControlEnforcementMode right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator AdaptiveApplicationControlEnforcementMode(string value) => new AdaptiveApplicationControlEnforcementMode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AdaptiveApplicationControlEnforcementMode other && Equals(other); - /// - public bool Equals(AdaptiveApplicationControlEnforcementMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlGroupSourceSystem.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlGroupSourceSystem.cs deleted file mode 100644 index b165392ba38f..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlGroupSourceSystem.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - /// The source type of the machine group. - public readonly partial struct AdaptiveApplicationControlGroupSourceSystem : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AdaptiveApplicationControlGroupSourceSystem(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AzureAppLockerValue = "Azure_AppLocker"; - private const string AzureAuditDValue = "Azure_AuditD"; - private const string NonAzureAppLockerValue = "NonAzure_AppLocker"; - private const string NonAzureAuditDValue = "NonAzure_AuditD"; - private const string NoneValue = "None"; - - /// Azure_AppLocker. - public static AdaptiveApplicationControlGroupSourceSystem AzureAppLocker { get; } = new AdaptiveApplicationControlGroupSourceSystem(AzureAppLockerValue); - /// Azure_AuditD. - public static AdaptiveApplicationControlGroupSourceSystem AzureAuditD { get; } = new AdaptiveApplicationControlGroupSourceSystem(AzureAuditDValue); - /// NonAzure_AppLocker. - public static AdaptiveApplicationControlGroupSourceSystem NonAzureAppLocker { get; } = new AdaptiveApplicationControlGroupSourceSystem(NonAzureAppLockerValue); - /// NonAzure_AuditD. - public static AdaptiveApplicationControlGroupSourceSystem NonAzureAuditD { get; } = new AdaptiveApplicationControlGroupSourceSystem(NonAzureAuditDValue); - /// None. - public static AdaptiveApplicationControlGroupSourceSystem None { get; } = new AdaptiveApplicationControlGroupSourceSystem(NoneValue); - /// Determines if two values are the same. - public static bool operator ==(AdaptiveApplicationControlGroupSourceSystem left, AdaptiveApplicationControlGroupSourceSystem right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AdaptiveApplicationControlGroupSourceSystem left, AdaptiveApplicationControlGroupSourceSystem right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator AdaptiveApplicationControlGroupSourceSystem(string value) => new AdaptiveApplicationControlGroupSourceSystem(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AdaptiveApplicationControlGroupSourceSystem other && Equals(other); - /// - public bool Equals(AdaptiveApplicationControlGroupSourceSystem other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlIssue.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlIssue.cs deleted file mode 100644 index 881110ef80e6..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlIssue.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - /// An alert that machines within a group can have. - public readonly partial struct AdaptiveApplicationControlIssue : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AdaptiveApplicationControlIssue(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ViolationsAuditedValue = "ViolationsAudited"; - private const string ViolationsBlockedValue = "ViolationsBlocked"; - private const string MsiAndScriptViolationsAuditedValue = "MsiAndScriptViolationsAudited"; - private const string MsiAndScriptViolationsBlockedValue = "MsiAndScriptViolationsBlocked"; - private const string ExecutableViolationsAuditedValue = "ExecutableViolationsAudited"; - private const string RulesViolatedManuallyValue = "RulesViolatedManually"; - - /// ViolationsAudited. - public static AdaptiveApplicationControlIssue ViolationsAudited { get; } = new AdaptiveApplicationControlIssue(ViolationsAuditedValue); - /// ViolationsBlocked. - public static AdaptiveApplicationControlIssue ViolationsBlocked { get; } = new AdaptiveApplicationControlIssue(ViolationsBlockedValue); - /// MsiAndScriptViolationsAudited. - public static AdaptiveApplicationControlIssue MsiAndScriptViolationsAudited { get; } = new AdaptiveApplicationControlIssue(MsiAndScriptViolationsAuditedValue); - /// MsiAndScriptViolationsBlocked. - public static AdaptiveApplicationControlIssue MsiAndScriptViolationsBlocked { get; } = new AdaptiveApplicationControlIssue(MsiAndScriptViolationsBlockedValue); - /// ExecutableViolationsAudited. - public static AdaptiveApplicationControlIssue ExecutableViolationsAudited { get; } = new AdaptiveApplicationControlIssue(ExecutableViolationsAuditedValue); - /// RulesViolatedManually. - public static AdaptiveApplicationControlIssue RulesViolatedManually { get; } = new AdaptiveApplicationControlIssue(RulesViolatedManuallyValue); - /// Determines if two values are the same. - public static bool operator ==(AdaptiveApplicationControlIssue left, AdaptiveApplicationControlIssue right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AdaptiveApplicationControlIssue left, AdaptiveApplicationControlIssue right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator AdaptiveApplicationControlIssue(string value) => new AdaptiveApplicationControlIssue(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AdaptiveApplicationControlIssue other && Equals(other); - /// - public bool Equals(AdaptiveApplicationControlIssue other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlIssueSummary.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlIssueSummary.cs deleted file mode 100644 index bb6fa840ebaf..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlIssueSummary.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - /// Represents a summary of the alerts of the machine group. - public partial class AdaptiveApplicationControlIssueSummary - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - internal AdaptiveApplicationControlIssueSummary() - { - } - - /// Initializes a new instance of . - /// An alert that machines within a group can have. - /// The number of machines in the group that have this alert. - /// Keeps track of any properties unknown to the library. - internal AdaptiveApplicationControlIssueSummary(AdaptiveApplicationControlIssue? issue, float? numberOfVms, IDictionary serializedAdditionalRawData) - { - Issue = issue; - NumberOfVms = numberOfVms; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// An alert that machines within a group can have. - public AdaptiveApplicationControlIssue? Issue { get; } - /// The number of machines in the group that have this alert. - public float? NumberOfVms { get; } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningEnforceContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningEnforceContent.Serialization.cs deleted file mode 100644 index 112f0f39851f..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningEnforceContent.Serialization.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - public partial class AdaptiveNetworkHardeningEnforceContent : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(AdaptiveNetworkHardeningEnforceContent)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - writer.WritePropertyName("rules"u8); - writer.WriteStartArray(); - foreach (var item in Rules) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - writer.WritePropertyName("networkSecurityGroups"u8); - writer.WriteStartArray(); - foreach (var item in NetworkSecurityGroups) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - AdaptiveNetworkHardeningEnforceContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(AdaptiveNetworkHardeningEnforceContent)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAdaptiveNetworkHardeningEnforceContent(document.RootElement, options); - } - - internal static AdaptiveNetworkHardeningEnforceContent DeserializeAdaptiveNetworkHardeningEnforceContent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList rules = default; - IList networkSecurityGroups = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("rules"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RecommendedSecurityRule.DeserializeRecommendedSecurityRule(item, options)); - } - rules = array; - continue; - } - if (property.NameEquals("networkSecurityGroups"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - networkSecurityGroups = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new AdaptiveNetworkHardeningEnforceContent(rules, networkSecurityGroups, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(AdaptiveNetworkHardeningEnforceContent)} does not support writing '{options.Format}' format."); - } - } - - AdaptiveNetworkHardeningEnforceContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeAdaptiveNetworkHardeningEnforceContent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AdaptiveNetworkHardeningEnforceContent)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningEnforceContent.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningEnforceContent.cs deleted file mode 100644 index 745774c90a26..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningEnforceContent.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - /// The AdaptiveNetworkHardeningEnforceContent. - public partial class AdaptiveNetworkHardeningEnforceContent - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// The rules to enforce. - /// The Azure resource IDs of the effective network security groups that will be updated with the created security rules from the Adaptive Network Hardening rules. - /// or is null. - public AdaptiveNetworkHardeningEnforceContent(IEnumerable rules, IEnumerable networkSecurityGroups) - { - Argument.AssertNotNull(rules, nameof(rules)); - Argument.AssertNotNull(networkSecurityGroups, nameof(networkSecurityGroups)); - - Rules = rules.ToList(); - NetworkSecurityGroups = networkSecurityGroups.ToList(); - } - - /// Initializes a new instance of . - /// The rules to enforce. - /// The Azure resource IDs of the effective network security groups that will be updated with the created security rules from the Adaptive Network Hardening rules. - /// Keeps track of any properties unknown to the library. - internal AdaptiveNetworkHardeningEnforceContent(IList rules, IList networkSecurityGroups, IDictionary serializedAdditionalRawData) - { - Rules = rules; - NetworkSecurityGroups = networkSecurityGroups; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal AdaptiveNetworkHardeningEnforceContent() - { - } - - /// The rules to enforce. - public IList Rules { get; } - /// The Azure resource IDs of the effective network security groups that will be updated with the created security rules from the Adaptive Network Hardening rules. - public IList NetworkSecurityGroups { get; } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningsList.Serialization.cs deleted file mode 100644 index 02e5fd683ab3..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningsList.Serialization.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - internal partial class AdaptiveNetworkHardeningsList : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(AdaptiveNetworkHardeningsList)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Value)) - { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - AdaptiveNetworkHardeningsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(AdaptiveNetworkHardeningsList)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAdaptiveNetworkHardeningsList(document.RootElement, options); - } - - internal static AdaptiveNetworkHardeningsList DeserializeAdaptiveNetworkHardeningsList(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - string nextLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(AdaptiveNetworkHardeningData.DeserializeAdaptiveNetworkHardeningData(item, options)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new AdaptiveNetworkHardeningsList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(AdaptiveNetworkHardeningsList)} does not support writing '{options.Format}' format."); - } - } - - AdaptiveNetworkHardeningsList IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeAdaptiveNetworkHardeningsList(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AdaptiveNetworkHardeningsList)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationCreateOrUpdateContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationCreateOrUpdateContent.Serialization.cs deleted file mode 100644 index fbe89072d825..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationCreateOrUpdateContent.Serialization.cs +++ /dev/null @@ -1,260 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - public partial class CustomAssessmentAutomationCreateOrUpdateContent : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomAssessmentAutomationCreateOrUpdateContent)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(CompressedQuery)) - { - writer.WritePropertyName("compressedQuery"u8); - writer.WriteStringValue(CompressedQuery); - } - if (Optional.IsDefined(SupportedCloud)) - { - writer.WritePropertyName("supportedCloud"u8); - writer.WriteStringValue(SupportedCloud.Value.ToString()); - } - if (Optional.IsDefined(Severity)) - { - writer.WritePropertyName("severity"u8); - writer.WriteStringValue(Severity.Value.ToString()); - } - if (Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(RemediationDescription)) - { - writer.WritePropertyName("remediationDescription"u8); - writer.WriteStringValue(RemediationDescription); - } - writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - CustomAssessmentAutomationCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomAssessmentAutomationCreateOrUpdateContent)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomAssessmentAutomationCreateOrUpdateContent(document.RootElement, options); - } - - internal static CustomAssessmentAutomationCreateOrUpdateContent DeserializeCustomAssessmentAutomationCreateOrUpdateContent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - SystemData systemData = default; - string compressedQuery = default; - CustomAssessmentAutomationSupportedCloud? supportedCloud = default; - CustomAssessmentSeverity? severity = default; - string displayName = default; - string description = default; - string remediationDescription = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("compressedQuery"u8)) - { - compressedQuery = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("supportedCloud"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - supportedCloud = new CustomAssessmentAutomationSupportedCloud(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("severity"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - severity = new CustomAssessmentSeverity(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("displayName"u8)) - { - displayName = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("description"u8)) - { - description = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("remediationDescription"u8)) - { - remediationDescription = property0.Value.GetString(); - continue; - } - } - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CustomAssessmentAutomationCreateOrUpdateContent( - id, - name, - type, - systemData, - compressedQuery, - supportedCloud, - severity, - displayName, - description, - remediationDescription, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(CustomAssessmentAutomationCreateOrUpdateContent)} does not support writing '{options.Format}' format."); - } - } - - CustomAssessmentAutomationCreateOrUpdateContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomAssessmentAutomationCreateOrUpdateContent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CustomAssessmentAutomationCreateOrUpdateContent)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationCreateOrUpdateContent.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationCreateOrUpdateContent.cs deleted file mode 100644 index 86e79a01f58b..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationCreateOrUpdateContent.cs +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - /// Custom Assessment Automation request. - public partial class CustomAssessmentAutomationCreateOrUpdateContent : ResourceData - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public CustomAssessmentAutomationCreateOrUpdateContent() - { - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Base 64 encoded KQL query representing the assessment automation results required. - /// Relevant cloud for the custom assessment automation. - /// The severity to relate to the assessments generated by this assessment automation. - /// The display name of the assessments generated by this assessment automation. - /// The description to relate to the assessments generated by this assessment automation. - /// The remediation description to relate to the assessments generated by this assessment automation. - /// Keeps track of any properties unknown to the library. - internal CustomAssessmentAutomationCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string compressedQuery, CustomAssessmentAutomationSupportedCloud? supportedCloud, CustomAssessmentSeverity? severity, string displayName, string description, string remediationDescription, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - CompressedQuery = compressedQuery; - SupportedCloud = supportedCloud; - Severity = severity; - DisplayName = displayName; - Description = description; - RemediationDescription = remediationDescription; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Base 64 encoded KQL query representing the assessment automation results required. - public string CompressedQuery { get; set; } - /// Relevant cloud for the custom assessment automation. - public CustomAssessmentAutomationSupportedCloud? SupportedCloud { get; set; } - /// The severity to relate to the assessments generated by this assessment automation. - public CustomAssessmentSeverity? Severity { get; set; } - /// The display name of the assessments generated by this assessment automation. - public string DisplayName { get; set; } - /// The description to relate to the assessments generated by this assessment automation. - public string Description { get; set; } - /// The remediation description to relate to the assessments generated by this assessment automation. - public string RemediationDescription { get; set; } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationSupportedCloud.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationSupportedCloud.cs deleted file mode 100644 index e9d8b1eacc89..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationSupportedCloud.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - /// Relevant cloud for the custom assessment automation. - public readonly partial struct CustomAssessmentAutomationSupportedCloud : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public CustomAssessmentAutomationSupportedCloud(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AwsValue = "AWS"; - private const string GcpValue = "GCP"; - - /// AWS. - public static CustomAssessmentAutomationSupportedCloud Aws { get; } = new CustomAssessmentAutomationSupportedCloud(AwsValue); - /// GCP. - public static CustomAssessmentAutomationSupportedCloud Gcp { get; } = new CustomAssessmentAutomationSupportedCloud(GcpValue); - /// Determines if two values are the same. - public static bool operator ==(CustomAssessmentAutomationSupportedCloud left, CustomAssessmentAutomationSupportedCloud right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(CustomAssessmentAutomationSupportedCloud left, CustomAssessmentAutomationSupportedCloud right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator CustomAssessmentAutomationSupportedCloud(string value) => new CustomAssessmentAutomationSupportedCloud(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is CustomAssessmentAutomationSupportedCloud other && Equals(other); - /// - public bool Equals(CustomAssessmentAutomationSupportedCloud other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationsListResult.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationsListResult.Serialization.cs deleted file mode 100644 index 1ae96ec5a3c6..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationsListResult.Serialization.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - internal partial class CustomAssessmentAutomationsListResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomAssessmentAutomationsListResult)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) - { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - CustomAssessmentAutomationsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomAssessmentAutomationsListResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomAssessmentAutomationsListResult(document.RootElement, options); - } - - internal static CustomAssessmentAutomationsListResult DeserializeCustomAssessmentAutomationsListResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - string nextLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(CustomAssessmentAutomationData.DeserializeCustomAssessmentAutomationData(item, options)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CustomAssessmentAutomationsListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(CustomAssessmentAutomationsListResult)} does not support writing '{options.Format}' format."); - } - } - - CustomAssessmentAutomationsListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomAssessmentAutomationsListResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CustomAssessmentAutomationsListResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentSeverity.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentSeverity.cs deleted file mode 100644 index d36bd190d940..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentSeverity.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - /// The severity to relate to the assessments generated by this assessment automation. - public readonly partial struct CustomAssessmentSeverity : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public CustomAssessmentSeverity(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string HighValue = "High"; - private const string MediumValue = "Medium"; - private const string LowValue = "Low"; - - /// High. - public static CustomAssessmentSeverity High { get; } = new CustomAssessmentSeverity(HighValue); - /// Medium. - public static CustomAssessmentSeverity Medium { get; } = new CustomAssessmentSeverity(MediumValue); - /// Low. - public static CustomAssessmentSeverity Low { get; } = new CustomAssessmentSeverity(LowValue); - /// Determines if two values are the same. - public static bool operator ==(CustomAssessmentSeverity left, CustomAssessmentSeverity right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(CustomAssessmentSeverity left, CustomAssessmentSeverity right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator CustomAssessmentSeverity(string value) => new CustomAssessmentSeverity(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is CustomAssessmentSeverity other && Equals(other); - /// - public bool Equals(CustomAssessmentSeverity other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentCreateOrUpdateContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentCreateOrUpdateContent.Serialization.cs deleted file mode 100644 index 942df10fb5c8..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentCreateOrUpdateContent.Serialization.cs +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - public partial class CustomEntityStoreAssignmentCreateOrUpdateContent : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomEntityStoreAssignmentCreateOrUpdateContent)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Principal)) - { - writer.WritePropertyName("principal"u8); - writer.WriteStringValue(Principal); - } - writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - CustomEntityStoreAssignmentCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomEntityStoreAssignmentCreateOrUpdateContent)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomEntityStoreAssignmentCreateOrUpdateContent(document.RootElement, options); - } - - internal static CustomEntityStoreAssignmentCreateOrUpdateContent DeserializeCustomEntityStoreAssignmentCreateOrUpdateContent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string principal = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("principal"u8)) - { - principal = property0.Value.GetString(); - continue; - } - } - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CustomEntityStoreAssignmentCreateOrUpdateContent(principal, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(CustomEntityStoreAssignmentCreateOrUpdateContent)} does not support writing '{options.Format}' format."); - } - } - - CustomEntityStoreAssignmentCreateOrUpdateContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomEntityStoreAssignmentCreateOrUpdateContent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CustomEntityStoreAssignmentCreateOrUpdateContent)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentsListResult.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentsListResult.Serialization.cs deleted file mode 100644 index f5cfc524a83b..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentsListResult.Serialization.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - internal partial class CustomEntityStoreAssignmentsListResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomEntityStoreAssignmentsListResult)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) - { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - CustomEntityStoreAssignmentsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomEntityStoreAssignmentsListResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomEntityStoreAssignmentsListResult(document.RootElement, options); - } - - internal static CustomEntityStoreAssignmentsListResult DeserializeCustomEntityStoreAssignmentsListResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - string nextLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(CustomEntityStoreAssignmentData.DeserializeCustomEntityStoreAssignmentData(item, options)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CustomEntityStoreAssignmentsListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(CustomEntityStoreAssignmentsListResult)} does not support writing '{options.Format}' format."); - } - } - - CustomEntityStoreAssignmentsListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomEntityStoreAssignmentsListResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CustomEntityStoreAssignmentsListResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForStorageSettingProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForStorageSettingProperties.Serialization.cs new file mode 100644 index 000000000000..d5c6f520137d --- /dev/null +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForStorageSettingProperties.Serialization.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SecurityCenter.Models +{ + public partial class DefenderForStorageSettingProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DefenderForStorageSettingProperties)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(IsEnabled)) + { + writer.WritePropertyName("isEnabled"u8); + writer.WriteBooleanValue(IsEnabled.Value); + } + if (Optional.IsDefined(MalwareScanning)) + { + writer.WritePropertyName("malwareScanning"u8); + writer.WriteObjectValue(MalwareScanning, options); + } + if (Optional.IsDefined(SensitiveDataDiscovery)) + { + writer.WritePropertyName("sensitiveDataDiscovery"u8); + writer.WriteObjectValue(SensitiveDataDiscovery, options); + } + if (Optional.IsDefined(OverrideSubscriptionLevelSettings)) + { + writer.WritePropertyName("overrideSubscriptionLevelSettings"u8); + writer.WriteBooleanValue(OverrideSubscriptionLevelSettings.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DefenderForStorageSettingProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DefenderForStorageSettingProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDefenderForStorageSettingProperties(document.RootElement, options); + } + + internal static DefenderForStorageSettingProperties DeserializeDefenderForStorageSettingProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? isEnabled = default; + MalwareScanningProperties malwareScanning = default; + SensitiveDataDiscoveryProperties sensitiveDataDiscovery = default; + bool? overrideSubscriptionLevelSettings = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("isEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("malwareScanning"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + malwareScanning = MalwareScanningProperties.DeserializeMalwareScanningProperties(property.Value, options); + continue; + } + if (property.NameEquals("sensitiveDataDiscovery"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sensitiveDataDiscovery = SensitiveDataDiscoveryProperties.DeserializeSensitiveDataDiscoveryProperties(property.Value, options); + continue; + } + if (property.NameEquals("overrideSubscriptionLevelSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + overrideSubscriptionLevelSettings = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DefenderForStorageSettingProperties(isEnabled, malwareScanning, sensitiveDataDiscovery, overrideSubscriptionLevelSettings, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DefenderForStorageSettingProperties)} does not support writing '{options.Format}' format."); + } + } + + DefenderForStorageSettingProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDefenderForStorageSettingProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DefenderForStorageSettingProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForStorageSettingProperties.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForStorageSettingProperties.cs new file mode 100644 index 000000000000..2be70cfea63a --- /dev/null +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForStorageSettingProperties.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SecurityCenter.Models +{ + /// Defender for Storage resource properties. + public partial class DefenderForStorageSettingProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DefenderForStorageSettingProperties() + { + } + + /// Initializes a new instance of . + /// Indicates whether Defender for Storage is enabled on this storage account. + /// Properties of Malware Scanning. + /// Properties of Sensitive Data Discovery. + /// Indicates whether the settings defined for this storage account should override the settings defined for the subscription. + /// Keeps track of any properties unknown to the library. + internal DefenderForStorageSettingProperties(bool? isEnabled, MalwareScanningProperties malwareScanning, SensitiveDataDiscoveryProperties sensitiveDataDiscovery, bool? overrideSubscriptionLevelSettings, IDictionary serializedAdditionalRawData) + { + IsEnabled = isEnabled; + MalwareScanning = malwareScanning; + SensitiveDataDiscovery = sensitiveDataDiscovery; + OverrideSubscriptionLevelSettings = overrideSubscriptionLevelSettings; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Indicates whether Defender for Storage is enabled on this storage account. + public bool? IsEnabled { get; set; } + /// Properties of Malware Scanning. + public MalwareScanningProperties MalwareScanning { get; set; } + /// Properties of Sensitive Data Discovery. + public SensitiveDataDiscoveryProperties SensitiveDataDiscovery { get; set; } + /// Indicates whether the settings defined for this storage account should override the settings defined for the subscription. + public bool? OverrideSubscriptionLevelSettings { get; set; } + } +} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsCapability.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsCapability.Serialization.cs new file mode 100644 index 000000000000..0784444bdd45 --- /dev/null +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsCapability.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SecurityCenter.Models +{ + public partial class DevOpsCapability : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DevOpsCapability)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W" && Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DevOpsCapability IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DevOpsCapability)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDevOpsCapability(document.RootElement, options); + } + + internal static DevOpsCapability DeserializeDevOpsCapability(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DevOpsCapability(name, value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DevOpsCapability)} does not support writing '{options.Format}' format."); + } + } + + DevOpsCapability IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDevOpsCapability(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DevOpsCapability)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationsListResult.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsCapability.cs similarity index 63% rename from sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationsListResult.cs rename to sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsCapability.cs index f7110da91db2..e34c3f490193 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationsListResult.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsCapability.cs @@ -10,8 +10,8 @@ namespace Azure.ResourceManager.SecurityCenter.Models { - /// A list of Custom Assessment Automations. - internal partial class CustomAssessmentAutomationsListResult + /// Details about DevOps capability. + public partial class DevOpsCapability { /// /// Keeps track of any properties unknown to the library. @@ -45,26 +45,25 @@ internal partial class CustomAssessmentAutomationsListResult /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - internal CustomAssessmentAutomationsListResult() + /// Initializes a new instance of . + internal DevOpsCapability() { - Value = new ChangeTrackingList(); } - /// Initializes a new instance of . - /// Collection of Custom Assessment Automations. - /// The link used to get the next page of operations. + /// Initializes a new instance of . + /// Gets the name of the DevOps capability. + /// Gets the value of the DevOps capability. /// Keeps track of any properties unknown to the library. - internal CustomAssessmentAutomationsListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal DevOpsCapability(string name, string value, IDictionary serializedAdditionalRawData) { + Name = name; Value = value; - NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Collection of Custom Assessment Automations. - public IReadOnlyList Value { get; } - /// The link used to get the next page of operations. - public string NextLink { get; } + /// Gets the name of the DevOps capability. + public string Name { get; } + /// Gets the value of the DevOps capability. + public string Value { get; } } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationProperties.Serialization.cs index e8af4c8cf7c6..5efa8479d710 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationProperties.Serialization.cs @@ -61,6 +61,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } writer.WriteEndArray(); } + if (options.Format != "W" && Optional.IsCollectionDefined(Capabilities)) + { + writer.WritePropertyName("capabilities"u8); + writer.WriteStartArray(); + foreach (var item in Capabilities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -105,6 +115,7 @@ internal static DevOpsConfigurationProperties DeserializeDevOpsConfigurationProp DevOpsAuthorization authorization = default; DevOpsAutoDiscovery? autoDiscovery = default; IList topLevelInventoryList = default; + IReadOnlyList capabilities = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -164,6 +175,20 @@ internal static DevOpsConfigurationProperties DeserializeDevOpsConfigurationProp topLevelInventoryList = array; continue; } + if (property.NameEquals("capabilities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DevOpsCapability.DeserializeDevOpsCapability(item, options)); + } + capabilities = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -177,6 +202,7 @@ internal static DevOpsConfigurationProperties DeserializeDevOpsConfigurationProp authorization, autoDiscovery, topLevelInventoryList ?? new ChangeTrackingList(), + capabilities ?? new ChangeTrackingList(), serializedAdditionalRawData); } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationProperties.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationProperties.cs index a6c177d50362..be293eb109ac 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationProperties.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationProperties.cs @@ -49,6 +49,7 @@ public partial class DevOpsConfigurationProperties public DevOpsConfigurationProperties() { TopLevelInventoryList = new ChangeTrackingList(); + Capabilities = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -71,8 +72,9 @@ public DevOpsConfigurationProperties() /// List of top-level inventory to select when AutoDiscovery is disabled. /// This field is ignored when AutoDiscovery is enabled. /// + /// List of capabilities assigned to the DevOps configuration during the discovery process. /// Keeps track of any properties unknown to the library. - internal DevOpsConfigurationProperties(string provisioningStatusMessage, DateTimeOffset? provisioningStatusUpdateTimeUtc, DevOpsProvisioningState? provisioningState, DevOpsAuthorization authorization, DevOpsAutoDiscovery? autoDiscovery, IList topLevelInventoryList, IDictionary serializedAdditionalRawData) + internal DevOpsConfigurationProperties(string provisioningStatusMessage, DateTimeOffset? provisioningStatusUpdateTimeUtc, DevOpsProvisioningState? provisioningState, DevOpsAuthorization authorization, DevOpsAutoDiscovery? autoDiscovery, IList topLevelInventoryList, IReadOnlyList capabilities, IDictionary serializedAdditionalRawData) { ProvisioningStatusMessage = provisioningStatusMessage; ProvisioningStatusUpdateTimeUtc = provisioningStatusUpdateTimeUtc; @@ -80,6 +82,7 @@ internal DevOpsConfigurationProperties(string provisioningStatusMessage, DateTim Authorization = authorization; AutoDiscovery = autoDiscovery; TopLevelInventoryList = topLevelInventoryList; + Capabilities = capabilities; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -124,5 +127,7 @@ public string AuthorizationCode /// This field is ignored when AutoDiscovery is enabled. /// public IList TopLevelInventoryList { get; } + /// List of capabilities assigned to the DevOps configuration during the discovery process. + public IReadOnlyList Capabilities { get; } } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EffectiveNetworkSecurityGroups.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EffectiveNetworkSecurityGroups.Serialization.cs deleted file mode 100644 index a90038e3917c..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EffectiveNetworkSecurityGroups.Serialization.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - public partial class EffectiveNetworkSecurityGroups : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(EffectiveNetworkSecurityGroups)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(NetworkInterface)) - { - writer.WritePropertyName("networkInterface"u8); - writer.WriteStringValue(NetworkInterface); - } - if (Optional.IsCollectionDefined(NetworkSecurityGroups)) - { - writer.WritePropertyName("networkSecurityGroups"u8); - writer.WriteStartArray(); - foreach (var item in NetworkSecurityGroups) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - EffectiveNetworkSecurityGroups IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(EffectiveNetworkSecurityGroups)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEffectiveNetworkSecurityGroups(document.RootElement, options); - } - - internal static EffectiveNetworkSecurityGroups DeserializeEffectiveNetworkSecurityGroups(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string networkInterface = default; - IList networkSecurityGroups = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("networkInterface"u8)) - { - networkInterface = property.Value.GetString(); - continue; - } - if (property.NameEquals("networkSecurityGroups"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - networkSecurityGroups = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new EffectiveNetworkSecurityGroups(networkInterface, networkSecurityGroups ?? new ChangeTrackingList(), serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(EffectiveNetworkSecurityGroups)} does not support writing '{options.Format}' format."); - } - } - - EffectiveNetworkSecurityGroups IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeEffectiveNetworkSecurityGroups(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(EffectiveNetworkSecurityGroups)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EffectiveNetworkSecurityGroups.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EffectiveNetworkSecurityGroups.cs deleted file mode 100644 index b6d8f342b72a..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EffectiveNetworkSecurityGroups.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - /// Describes the Network Security Groups effective on a network interface. - public partial class EffectiveNetworkSecurityGroups - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public EffectiveNetworkSecurityGroups() - { - NetworkSecurityGroups = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The Azure resource ID of the network interface. - /// The Network Security Groups effective on the network interface. - /// Keeps track of any properties unknown to the library. - internal EffectiveNetworkSecurityGroups(string networkInterface, IList networkSecurityGroups, IDictionary serializedAdditionalRawData) - { - NetworkInterface = networkInterface; - NetworkSecurityGroups = networkSecurityGroups; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The Azure resource ID of the network interface. - public string NetworkInterface { get; set; } - /// The Network Security Groups effective on the network interface. - public IList NetworkSecurityGroups { get; } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlGroups.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GetSensitivitySettingsListResponse.Serialization.cs similarity index 57% rename from sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlGroups.Serialization.cs rename to sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GetSensitivitySettingsListResponse.Serialization.cs index 52f72297e89f..4776f9c91318 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlGroups.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GetSensitivitySettingsListResponse.Serialization.cs @@ -13,16 +13,16 @@ namespace Azure.ResourceManager.SecurityCenter.Models { - internal partial class AdaptiveApplicationControlGroups : IUtf8JsonSerializable, IJsonModel + internal partial class GetSensitivitySettingsListResponse : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AdaptiveApplicationControlGroups)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(GetSensitivitySettingsListResponse)} does not support writing '{format}' format."); } writer.WriteStartObject(); @@ -54,19 +54,19 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteEndObject(); } - AdaptiveApplicationControlGroups IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + GetSensitivitySettingsListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AdaptiveApplicationControlGroups)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(GetSensitivitySettingsListResponse)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAdaptiveApplicationControlGroups(document.RootElement, options); + return DeserializeGetSensitivitySettingsListResponse(document.RootElement, options); } - internal static AdaptiveApplicationControlGroups DeserializeAdaptiveApplicationControlGroups(JsonElement element, ModelReaderWriterOptions options = null) + internal static GetSensitivitySettingsListResponse DeserializeGetSensitivitySettingsListResponse(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -74,7 +74,7 @@ internal static AdaptiveApplicationControlGroups DeserializeAdaptiveApplicationC { return null; } - IReadOnlyList value = default; + IReadOnlyList value = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -85,10 +85,10 @@ internal static AdaptiveApplicationControlGroups DeserializeAdaptiveApplicationC { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AdaptiveApplicationControlGroupData.DeserializeAdaptiveApplicationControlGroupData(item, options)); + array.Add(SensitivitySettingData.DeserializeSensitivitySettingData(item, options)); } value = array; continue; @@ -99,38 +99,38 @@ internal static AdaptiveApplicationControlGroups DeserializeAdaptiveApplicationC } } serializedAdditionalRawData = rawDataDictionary; - return new AdaptiveApplicationControlGroups(value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new GetSensitivitySettingsListResponse(value ?? new ChangeTrackingList(), serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(AdaptiveApplicationControlGroups)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(GetSensitivitySettingsListResponse)} does not support writing '{options.Format}' format."); } } - AdaptiveApplicationControlGroups IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + GetSensitivitySettingsListResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeAdaptiveApplicationControlGroups(document.RootElement, options); + return DeserializeGetSensitivitySettingsListResponse(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(AdaptiveApplicationControlGroups)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(GetSensitivitySettingsListResponse)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlGroups.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GetSensitivitySettingsListResponse.cs similarity index 70% rename from sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlGroups.cs rename to sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GetSensitivitySettingsListResponse.cs index dfcba8a247a9..5df1d7e5f4ec 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlGroups.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GetSensitivitySettingsListResponse.cs @@ -10,8 +10,8 @@ namespace Azure.ResourceManager.SecurityCenter.Models { - /// Represents a list of VM/server groups and set of rules that are Recommended by Microsoft Defender for Cloud to be allowed. - internal partial class AdaptiveApplicationControlGroups + /// A list with a single sensitivity settings resource. + internal partial class GetSensitivitySettingsListResponse { /// /// Keeps track of any properties unknown to the library. @@ -45,22 +45,22 @@ internal partial class AdaptiveApplicationControlGroups /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - internal AdaptiveApplicationControlGroups() + /// Initializes a new instance of . + internal GetSensitivitySettingsListResponse() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. - internal AdaptiveApplicationControlGroups(IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal GetSensitivitySettingsListResponse(IReadOnlyList value, IDictionary serializedAdditionalRawData) { Value = value; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Gets the value. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MalwareScanningProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MalwareScanningProperties.Serialization.cs new file mode 100644 index 000000000000..f3cd6c5c0b18 --- /dev/null +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MalwareScanningProperties.Serialization.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SecurityCenter.Models +{ + public partial class MalwareScanningProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MalwareScanningProperties)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(OnUpload)) + { + writer.WritePropertyName("onUpload"u8); + writer.WriteObjectValue(OnUpload, options); + } + if (Optional.IsDefined(ScanResultsEventGridTopicResourceId)) + { + writer.WritePropertyName("scanResultsEventGridTopicResourceId"u8); + writer.WriteStringValue(ScanResultsEventGridTopicResourceId); + } + if (options.Format != "W" && Optional.IsDefined(OperationStatus)) + { + writer.WritePropertyName("operationStatus"u8); + writer.WriteObjectValue(OperationStatus, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + MalwareScanningProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MalwareScanningProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMalwareScanningProperties(document.RootElement, options); + } + + internal static MalwareScanningProperties DeserializeMalwareScanningProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + OnUploadProperties onUpload = default; + ResourceIdentifier scanResultsEventGridTopicResourceId = default; + ExtensionOperationStatus operationStatus = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("onUpload"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onUpload = OnUploadProperties.DeserializeOnUploadProperties(property.Value, options); + continue; + } + if (property.NameEquals("scanResultsEventGridTopicResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scanResultsEventGridTopicResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("operationStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + operationStatus = ExtensionOperationStatus.DeserializeExtensionOperationStatus(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MalwareScanningProperties(onUpload, scanResultsEventGridTopicResourceId, operationStatus, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MalwareScanningProperties)} does not support writing '{options.Format}' format."); + } + } + + MalwareScanningProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeMalwareScanningProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MalwareScanningProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentsListResult.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MalwareScanningProperties.cs similarity index 52% rename from sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentsListResult.cs rename to sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MalwareScanningProperties.cs index ee414e40945f..f1e265ad87f6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentsListResult.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MalwareScanningProperties.cs @@ -7,11 +7,12 @@ using System; using System.Collections.Generic; +using Azure.Core; namespace Azure.ResourceManager.SecurityCenter.Models { - /// A list of custom entity store assignments. - internal partial class CustomEntityStoreAssignmentsListResult + /// Properties of Malware Scanning. + public partial class MalwareScanningProperties { /// /// Keeps track of any properties unknown to the library. @@ -45,26 +46,29 @@ internal partial class CustomEntityStoreAssignmentsListResult /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - internal CustomEntityStoreAssignmentsListResult() + /// Initializes a new instance of . + public MalwareScanningProperties() { - Value = new ChangeTrackingList(); } - /// Initializes a new instance of . - /// Collection of custom entity store assignments. - /// The link used to get the next page of operations. + /// Initializes a new instance of . + /// Properties of On Upload malware scanning. + /// Optional. Resource id of an Event Grid Topic to send scan results to. + /// Upon failure or partial success. Additional data describing Malware Scanning enable/disable operation. /// Keeps track of any properties unknown to the library. - internal CustomEntityStoreAssignmentsListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal MalwareScanningProperties(OnUploadProperties onUpload, ResourceIdentifier scanResultsEventGridTopicResourceId, ExtensionOperationStatus operationStatus, IDictionary serializedAdditionalRawData) { - Value = value; - NextLink = nextLink; + OnUpload = onUpload; + ScanResultsEventGridTopicResourceId = scanResultsEventGridTopicResourceId; + OperationStatus = operationStatus; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Collection of custom entity store assignments. - public IReadOnlyList Value { get; } - /// The link used to get the next page of operations. - public string NextLink { get; } + /// Properties of On Upload malware scanning. + public OnUploadProperties OnUpload { get; set; } + /// Optional. Resource id of an Event Grid Topic to send scan results to. + public ResourceIdentifier ScanResultsEventGridTopicResourceId { get; set; } + /// Upon failure or partial success. Additional data describing Malware Scanning enable/disable operation. + public ExtensionOperationStatus OperationStatus { get; } } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserRecommendation.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnUploadProperties.Serialization.cs similarity index 61% rename from sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserRecommendation.Serialization.cs rename to sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnUploadProperties.Serialization.cs index a272c473a624..276fd92bde3c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserRecommendation.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnUploadProperties.Serialization.cs @@ -13,28 +13,28 @@ namespace Azure.ResourceManager.SecurityCenter.Models { - public partial class UserRecommendation : IUtf8JsonSerializable, IJsonModel + public partial class OnUploadProperties : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(UserRecommendation)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(OnUploadProperties)} does not support writing '{format}' format."); } writer.WriteStartObject(); - if (Optional.IsDefined(Username)) + if (Optional.IsDefined(IsEnabled)) { - writer.WritePropertyName("username"u8); - writer.WriteStringValue(Username); + writer.WritePropertyName("isEnabled"u8); + writer.WriteBooleanValue(IsEnabled.Value); } - if (Optional.IsDefined(RecommendationAction)) + if (Optional.IsDefined(CapGBPerMonth)) { - writer.WritePropertyName("recommendationAction"u8); - writer.WriteStringValue(RecommendationAction.Value.ToString()); + writer.WritePropertyName("capGBPerMonth"u8); + writer.WriteNumberValue(CapGBPerMonth.Value); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -54,19 +54,19 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteEndObject(); } - UserRecommendation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + OnUploadProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(UserRecommendation)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(OnUploadProperties)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeUserRecommendation(document.RootElement, options); + return DeserializeOnUploadProperties(document.RootElement, options); } - internal static UserRecommendation DeserializeUserRecommendation(JsonElement element, ModelReaderWriterOptions options = null) + internal static OnUploadProperties DeserializeOnUploadProperties(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -74,24 +74,28 @@ internal static UserRecommendation DeserializeUserRecommendation(JsonElement ele { return null; } - string username = default; - RecommendationAction? recommendationAction = default; + bool? isEnabled = default; + int? capGBPerMonth = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("username"u8)) + if (property.NameEquals("isEnabled"u8)) { - username = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isEnabled = property.Value.GetBoolean(); continue; } - if (property.NameEquals("recommendationAction"u8)) + if (property.NameEquals("capGBPerMonth"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - recommendationAction = new RecommendationAction(property.Value.GetString()); + capGBPerMonth = property.Value.GetInt32(); continue; } if (options.Format != "W") @@ -100,38 +104,38 @@ internal static UserRecommendation DeserializeUserRecommendation(JsonElement ele } } serializedAdditionalRawData = rawDataDictionary; - return new UserRecommendation(username, recommendationAction, serializedAdditionalRawData); + return new OnUploadProperties(isEnabled, capGBPerMonth, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(UserRecommendation)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(OnUploadProperties)} does not support writing '{options.Format}' format."); } } - UserRecommendation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + OnUploadProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeUserRecommendation(document.RootElement, options); + return DeserializeOnUploadProperties(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(UserRecommendation)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(OnUploadProperties)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentCreateOrUpdateContent.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnUploadProperties.cs similarity index 62% rename from sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentCreateOrUpdateContent.cs rename to sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnUploadProperties.cs index 276948667b6a..4a18838a8461 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentCreateOrUpdateContent.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnUploadProperties.cs @@ -10,8 +10,8 @@ namespace Azure.ResourceManager.SecurityCenter.Models { - /// describes the custom entity store assignment request. - public partial class CustomEntityStoreAssignmentCreateOrUpdateContent + /// Properties of On Upload malware scanning. + public partial class OnUploadProperties { /// /// Keeps track of any properties unknown to the library. @@ -45,21 +45,25 @@ public partial class CustomEntityStoreAssignmentCreateOrUpdateContent /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public CustomEntityStoreAssignmentCreateOrUpdateContent() + /// Initializes a new instance of . + public OnUploadProperties() { } - /// Initializes a new instance of . - /// The principal assigned with entity store. If not provided, will use caller principal. Format of principal is: [AAD type]=[PrincipalObjectId];[TenantId]. + /// Initializes a new instance of . + /// Indicates whether On Upload malware scanning should be enabled. + /// Defines the max GB to be scanned per Month. Set to -1 if no capping is needed. /// Keeps track of any properties unknown to the library. - internal CustomEntityStoreAssignmentCreateOrUpdateContent(string principal, IDictionary serializedAdditionalRawData) + internal OnUploadProperties(bool? isEnabled, int? capGBPerMonth, IDictionary serializedAdditionalRawData) { - Principal = principal; + IsEnabled = isEnabled; + CapGBPerMonth = capGBPerMonth; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The principal assigned with entity store. If not provided, will use caller principal. Format of principal is: [AAD type]=[PrincipalObjectId];[TenantId]. - public string Principal { get; set; } + /// Indicates whether On Upload malware scanning should be enabled. + public bool? IsEnabled { get; set; } + /// Defines the max GB to be scanned per Month. Set to -1 if no capping is needed. + public int? CapGBPerMonth { get; set; } } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PathRecommendation.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PathRecommendation.Serialization.cs deleted file mode 100644 index 3942827d7f42..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PathRecommendation.Serialization.cs +++ /dev/null @@ -1,272 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - public partial class PathRecommendation : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(PathRecommendation)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(Path)) - { - writer.WritePropertyName("path"u8); - writer.WriteStringValue(Path); - } - if (Optional.IsDefined(Action)) - { - writer.WritePropertyName("action"u8); - writer.WriteStringValue(Action.Value.ToString()); - } - if (Optional.IsDefined(IotSecurityRecommendationType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(IotSecurityRecommendationType.Value.ToString()); - } - if (Optional.IsDefined(PublisherInfo)) - { - writer.WritePropertyName("publisherInfo"u8); - writer.WriteObjectValue(PublisherInfo, options); - } - if (Optional.IsDefined(IsCommon)) - { - writer.WritePropertyName("common"u8); - writer.WriteBooleanValue(IsCommon.Value); - } - if (Optional.IsCollectionDefined(UserSids)) - { - writer.WritePropertyName("userSids"u8); - writer.WriteStartArray(); - foreach (var item in UserSids) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Usernames)) - { - writer.WritePropertyName("usernames"u8); - writer.WriteStartArray(); - foreach (var item in Usernames) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(FileType)) - { - writer.WritePropertyName("fileType"u8); - writer.WriteStringValue(FileType.Value.ToString()); - } - if (Optional.IsDefined(ConfigurationStatus)) - { - writer.WritePropertyName("configurationStatus"u8); - writer.WriteStringValue(ConfigurationStatus.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - PathRecommendation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(PathRecommendation)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePathRecommendation(document.RootElement, options); - } - - internal static PathRecommendation DeserializePathRecommendation(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string path = default; - RecommendationAction? action = default; - IotSecurityRecommendationType? type = default; - SecurityCenterPublisherInfo publisherInfo = default; - bool? common = default; - IList userSids = default; - IList usernames = default; - PathRecommendationFileType? fileType = default; - SecurityCenterConfigurationStatus? configurationStatus = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("path"u8)) - { - path = property.Value.GetString(); - continue; - } - if (property.NameEquals("action"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - action = new RecommendationAction(property.Value.GetString()); - continue; - } - if (property.NameEquals("type"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - type = new IotSecurityRecommendationType(property.Value.GetString()); - continue; - } - if (property.NameEquals("publisherInfo"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - publisherInfo = SecurityCenterPublisherInfo.DeserializeSecurityCenterPublisherInfo(property.Value, options); - continue; - } - if (property.NameEquals("common"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - common = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("userSids"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - userSids = array; - continue; - } - if (property.NameEquals("usernames"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(UserRecommendation.DeserializeUserRecommendation(item, options)); - } - usernames = array; - continue; - } - if (property.NameEquals("fileType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileType = new PathRecommendationFileType(property.Value.GetString()); - continue; - } - if (property.NameEquals("configurationStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - configurationStatus = new SecurityCenterConfigurationStatus(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new PathRecommendation( - path, - action, - type, - publisherInfo, - common, - userSids ?? new ChangeTrackingList(), - usernames ?? new ChangeTrackingList(), - fileType, - configurationStatus, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(PathRecommendation)} does not support writing '{options.Format}' format."); - } - } - - PathRecommendation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializePathRecommendation(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(PathRecommendation)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PathRecommendation.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PathRecommendation.cs deleted file mode 100644 index 928ddb56143d..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PathRecommendation.cs +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - /// Represents a path that is recommended to be allowed and its properties. - public partial class PathRecommendation - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public PathRecommendation() - { - UserSids = new ChangeTrackingList(); - Usernames = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The full path of the file, or an identifier of the application. - /// The recommendation action of the machine or rule. - /// The type of IoT Security recommendation. - /// Represents the publisher information of a process/rule. - /// Whether the application is commonly run on the machine. - /// - /// - /// The type of the file (for Linux files - Executable is used). - /// The configuration status of the machines group or machine or rule. - /// Keeps track of any properties unknown to the library. - internal PathRecommendation(string path, RecommendationAction? action, IotSecurityRecommendationType? iotSecurityRecommendationType, SecurityCenterPublisherInfo publisherInfo, bool? isCommon, IList userSids, IList usernames, PathRecommendationFileType? fileType, SecurityCenterConfigurationStatus? configurationStatus, IDictionary serializedAdditionalRawData) - { - Path = path; - Action = action; - IotSecurityRecommendationType = iotSecurityRecommendationType; - PublisherInfo = publisherInfo; - IsCommon = isCommon; - UserSids = userSids; - Usernames = usernames; - FileType = fileType; - ConfigurationStatus = configurationStatus; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The full path of the file, or an identifier of the application. - public string Path { get; set; } - /// The recommendation action of the machine or rule. - public RecommendationAction? Action { get; set; } - /// The type of IoT Security recommendation. - public IotSecurityRecommendationType? IotSecurityRecommendationType { get; set; } - /// Represents the publisher information of a process/rule. - public SecurityCenterPublisherInfo PublisherInfo { get; set; } - /// Whether the application is commonly run on the machine. - public bool? IsCommon { get; set; } - /// Gets the user sids. - public IList UserSids { get; } - /// Gets the usernames. - public IList Usernames { get; } - /// The type of the file (for Linux files - Executable is used). - public PathRecommendationFileType? FileType { get; set; } - /// The configuration status of the machines group or machine or rule. - public SecurityCenterConfigurationStatus? ConfigurationStatus { get; set; } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PathRecommendationFileType.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PathRecommendationFileType.cs deleted file mode 100644 index de05c4408920..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PathRecommendationFileType.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - /// The type of the file (for Linux files - Executable is used). - public readonly partial struct PathRecommendationFileType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public PathRecommendationFileType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ExeValue = "Exe"; - private const string DllValue = "Dll"; - private const string MsiValue = "Msi"; - private const string ScriptValue = "Script"; - private const string ExecutableValue = "Executable"; - private const string UnknownValue = "Unknown"; - - /// Exe. - public static PathRecommendationFileType Exe { get; } = new PathRecommendationFileType(ExeValue); - /// Dll. - public static PathRecommendationFileType Dll { get; } = new PathRecommendationFileType(DllValue); - /// Msi. - public static PathRecommendationFileType Msi { get; } = new PathRecommendationFileType(MsiValue); - /// Script. - public static PathRecommendationFileType Script { get; } = new PathRecommendationFileType(ScriptValue); - /// Executable. - public static PathRecommendationFileType Executable { get; } = new PathRecommendationFileType(ExecutableValue); - /// Unknown. - public static PathRecommendationFileType Unknown { get; } = new PathRecommendationFileType(UnknownValue); - /// Determines if two values are the same. - public static bool operator ==(PathRecommendationFileType left, PathRecommendationFileType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(PathRecommendationFileType left, PathRecommendationFileType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator PathRecommendationFileType(string value) => new PathRecommendationFileType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is PathRecommendationFileType other && Equals(other); - /// - public bool Equals(PathRecommendationFileType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendationAction.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendationAction.cs deleted file mode 100644 index bb800aad71d4..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendationAction.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - /// The recommendation action of the machine or rule. - public readonly partial struct RecommendationAction : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RecommendationAction(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string RecommendedValue = "Recommended"; - private const string AddValue = "Add"; - private const string RemoveValue = "Remove"; - - /// Recommended. - public static RecommendationAction Recommended { get; } = new RecommendationAction(RecommendedValue); - /// Add. - public static RecommendationAction Add { get; } = new RecommendationAction(AddValue); - /// Remove. - public static RecommendationAction Remove { get; } = new RecommendationAction(RemoveValue); - /// Determines if two values are the same. - public static bool operator ==(RecommendationAction left, RecommendationAction right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RecommendationAction left, RecommendationAction right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator RecommendationAction(string value) => new RecommendationAction(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RecommendationAction other && Equals(other); - /// - public bool Equals(RecommendationAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendationStatus.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendationStatus.cs deleted file mode 100644 index 0291d7680688..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendationStatus.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - /// The initial recommendation status of the machine group or machine. - public readonly partial struct RecommendationStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RecommendationStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string RecommendedValue = "Recommended"; - private const string NotRecommendedValue = "NotRecommended"; - private const string NotAvailableValue = "NotAvailable"; - private const string NoStatusValue = "NoStatus"; - - /// Recommended. - public static RecommendationStatus Recommended { get; } = new RecommendationStatus(RecommendedValue); - /// NotRecommended. - public static RecommendationStatus NotRecommended { get; } = new RecommendationStatus(NotRecommendedValue); - /// NotAvailable. - public static RecommendationStatus NotAvailable { get; } = new RecommendationStatus(NotAvailableValue); - /// NoStatus. - public static RecommendationStatus NoStatus { get; } = new RecommendationStatus(NoStatusValue); - /// Determines if two values are the same. - public static bool operator ==(RecommendationStatus left, RecommendationStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RecommendationStatus left, RecommendationStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator RecommendationStatus(string value) => new RecommendationStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RecommendationStatus other && Equals(other); - /// - public bool Equals(RecommendationStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendedSecurityRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendedSecurityRule.Serialization.cs deleted file mode 100644 index e9c9645ed925..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendedSecurityRule.Serialization.cs +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - public partial class RecommendedSecurityRule : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RecommendedSecurityRule)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Direction)) - { - writer.WritePropertyName("direction"u8); - writer.WriteStringValue(Direction.Value.ToString()); - } - if (Optional.IsDefined(DestinationPort)) - { - writer.WritePropertyName("destinationPort"u8); - writer.WriteNumberValue(DestinationPort.Value); - } - if (Optional.IsCollectionDefined(Protocols)) - { - writer.WritePropertyName("protocols"u8); - writer.WriteStartArray(); - foreach (var item in Protocols) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(IPAddresses)) - { - writer.WritePropertyName("ipAddresses"u8); - writer.WriteStartArray(); - foreach (var item in IPAddresses) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - RecommendedSecurityRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RecommendedSecurityRule)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRecommendedSecurityRule(document.RootElement, options); - } - - internal static RecommendedSecurityRule DeserializeRecommendedSecurityRule(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - SecurityTrafficDirection? direction = default; - int? destinationPort = default; - IList protocols = default; - IList ipAddresses = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("direction"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - direction = new SecurityTrafficDirection(property.Value.GetString()); - continue; - } - if (property.NameEquals("destinationPort"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - destinationPort = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("protocols"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(new SecurityTransportProtocol(item.GetString())); - } - protocols = array; - continue; - } - if (property.NameEquals("ipAddresses"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - ipAddresses = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RecommendedSecurityRule( - name, - direction, - destinationPort, - protocols ?? new ChangeTrackingList(), - ipAddresses ?? new ChangeTrackingList(), - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(RecommendedSecurityRule)} does not support writing '{options.Format}' format."); - } - } - - RecommendedSecurityRule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeRecommendedSecurityRule(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RecommendedSecurityRule)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendedSecurityRule.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendedSecurityRule.cs deleted file mode 100644 index 8fbd31cb8dd9..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendedSecurityRule.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - /// Describes remote addresses that is recommended to communicate with the Azure resource on some (Protocol, Port, Direction). All other remote addresses are recommended to be blocked. - public partial class RecommendedSecurityRule - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public RecommendedSecurityRule() - { - Protocols = new ChangeTrackingList(); - IPAddresses = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The name of the rule. - /// The rule's direction. - /// The rule's destination port. - /// The rule's transport protocols. - /// The remote IP addresses that should be able to communicate with the Azure resource on the rule's destination port and protocol. - /// Keeps track of any properties unknown to the library. - internal RecommendedSecurityRule(string name, SecurityTrafficDirection? direction, int? destinationPort, IList protocols, IList ipAddresses, IDictionary serializedAdditionalRawData) - { - Name = name; - Direction = direction; - DestinationPort = destinationPort; - Protocols = protocols; - IPAddresses = ipAddresses; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The name of the rule. - public string Name { get; set; } - /// The rule's direction. - public SecurityTrafficDirection? Direction { get; set; } - /// The rule's destination port. - public int? DestinationPort { get; set; } - /// The rule's transport protocols. - public IList Protocols { get; } - /// The remote IP addresses that should be able to communicate with the Azure resource on the rule's destination port and protocol. - public IList IPAddresses { get; } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterConfigurationStatus.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterConfigurationStatus.cs deleted file mode 100644 index ac83ebe00c54..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterConfigurationStatus.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - /// The configuration status of the machines group or machine or rule. - public readonly partial struct SecurityCenterConfigurationStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SecurityCenterConfigurationStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ConfiguredValue = "Configured"; - private const string NotConfiguredValue = "NotConfigured"; - private const string InProgressValue = "InProgress"; - private const string FailedValue = "Failed"; - private const string NoStatusValue = "NoStatus"; - - /// Configured. - public static SecurityCenterConfigurationStatus Configured { get; } = new SecurityCenterConfigurationStatus(ConfiguredValue); - /// NotConfigured. - public static SecurityCenterConfigurationStatus NotConfigured { get; } = new SecurityCenterConfigurationStatus(NotConfiguredValue); - /// InProgress. - public static SecurityCenterConfigurationStatus InProgress { get; } = new SecurityCenterConfigurationStatus(InProgressValue); - /// Failed. - public static SecurityCenterConfigurationStatus Failed { get; } = new SecurityCenterConfigurationStatus(FailedValue); - /// NoStatus. - public static SecurityCenterConfigurationStatus NoStatus { get; } = new SecurityCenterConfigurationStatus(NoStatusValue); - /// Determines if two values are the same. - public static bool operator ==(SecurityCenterConfigurationStatus left, SecurityCenterConfigurationStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SecurityCenterConfigurationStatus left, SecurityCenterConfigurationStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SecurityCenterConfigurationStatus(string value) => new SecurityCenterConfigurationStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SecurityCenterConfigurationStatus other && Equals(other); - /// - public bool Equals(SecurityCenterConfigurationStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterFileProtectionMode.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterFileProtectionMode.Serialization.cs deleted file mode 100644 index e5769bd204d8..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterFileProtectionMode.Serialization.cs +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - public partial class SecurityCenterFileProtectionMode : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SecurityCenterFileProtectionMode)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(Exe)) - { - writer.WritePropertyName("exe"u8); - writer.WriteStringValue(Exe.Value.ToString()); - } - if (Optional.IsDefined(Msi)) - { - writer.WritePropertyName("msi"u8); - writer.WriteStringValue(Msi.Value.ToString()); - } - if (Optional.IsDefined(Script)) - { - writer.WritePropertyName("script"u8); - writer.WriteStringValue(Script.Value.ToString()); - } - if (Optional.IsDefined(Executable)) - { - writer.WritePropertyName("executable"u8); - writer.WriteStringValue(Executable.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - SecurityCenterFileProtectionMode IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SecurityCenterFileProtectionMode)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSecurityCenterFileProtectionMode(document.RootElement, options); - } - - internal static SecurityCenterFileProtectionMode DeserializeSecurityCenterFileProtectionMode(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AdaptiveApplicationControlEnforcementMode? exe = default; - AdaptiveApplicationControlEnforcementMode? msi = default; - AdaptiveApplicationControlEnforcementMode? script = default; - AdaptiveApplicationControlEnforcementMode? executable = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("exe"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - exe = new AdaptiveApplicationControlEnforcementMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("msi"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - msi = new AdaptiveApplicationControlEnforcementMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("script"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - script = new AdaptiveApplicationControlEnforcementMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("executable"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - executable = new AdaptiveApplicationControlEnforcementMode(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SecurityCenterFileProtectionMode(exe, msi, script, executable, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(SecurityCenterFileProtectionMode)} does not support writing '{options.Format}' format."); - } - } - - SecurityCenterFileProtectionMode IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeSecurityCenterFileProtectionMode(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SecurityCenterFileProtectionMode)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterFileProtectionMode.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterFileProtectionMode.cs deleted file mode 100644 index 77d9d0185c99..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterFileProtectionMode.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - /// The protection mode of the collection/file types. Exe/Msi/Script are used for Windows, Executable is used for Linux. - public partial class SecurityCenterFileProtectionMode - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public SecurityCenterFileProtectionMode() - { - } - - /// Initializes a new instance of . - /// The application control policy enforcement/protection mode of the machine group. - /// The application control policy enforcement/protection mode of the machine group. - /// The application control policy enforcement/protection mode of the machine group. - /// The application control policy enforcement/protection mode of the machine group. - /// Keeps track of any properties unknown to the library. - internal SecurityCenterFileProtectionMode(AdaptiveApplicationControlEnforcementMode? exe, AdaptiveApplicationControlEnforcementMode? msi, AdaptiveApplicationControlEnforcementMode? script, AdaptiveApplicationControlEnforcementMode? executable, IDictionary serializedAdditionalRawData) - { - Exe = exe; - Msi = msi; - Script = script; - Executable = executable; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The application control policy enforcement/protection mode of the machine group. - public AdaptiveApplicationControlEnforcementMode? Exe { get; set; } - /// The application control policy enforcement/protection mode of the machine group. - public AdaptiveApplicationControlEnforcementMode? Msi { get; set; } - /// The application control policy enforcement/protection mode of the machine group. - public AdaptiveApplicationControlEnforcementMode? Script { get; set; } - /// The application control policy enforcement/protection mode of the machine group. - public AdaptiveApplicationControlEnforcementMode? Executable { get; set; } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterPublisherInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterPublisherInfo.Serialization.cs deleted file mode 100644 index 8da0ffaeae25..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterPublisherInfo.Serialization.cs +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - public partial class SecurityCenterPublisherInfo : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SecurityCenterPublisherInfo)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(PublisherName)) - { - writer.WritePropertyName("publisherName"u8); - writer.WriteStringValue(PublisherName); - } - if (Optional.IsDefined(ProductName)) - { - writer.WritePropertyName("productName"u8); - writer.WriteStringValue(ProductName); - } - if (Optional.IsDefined(BinaryName)) - { - writer.WritePropertyName("binaryName"u8); - writer.WriteStringValue(BinaryName); - } - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"u8); - writer.WriteStringValue(Version); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - SecurityCenterPublisherInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SecurityCenterPublisherInfo)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSecurityCenterPublisherInfo(document.RootElement, options); - } - - internal static SecurityCenterPublisherInfo DeserializeSecurityCenterPublisherInfo(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string publisherName = default; - string productName = default; - string binaryName = default; - string version = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("publisherName"u8)) - { - publisherName = property.Value.GetString(); - continue; - } - if (property.NameEquals("productName"u8)) - { - productName = property.Value.GetString(); - continue; - } - if (property.NameEquals("binaryName"u8)) - { - binaryName = property.Value.GetString(); - continue; - } - if (property.NameEquals("version"u8)) - { - version = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SecurityCenterPublisherInfo(publisherName, productName, binaryName, version, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(SecurityCenterPublisherInfo)} does not support writing '{options.Format}' format."); - } - } - - SecurityCenterPublisherInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeSecurityCenterPublisherInfo(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SecurityCenterPublisherInfo)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterPublisherInfo.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterPublisherInfo.cs deleted file mode 100644 index d21b9f897d1d..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterPublisherInfo.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - /// Represents the publisher information of a process/rule. - public partial class SecurityCenterPublisherInfo - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public SecurityCenterPublisherInfo() - { - } - - /// Initializes a new instance of . - /// The Subject field of the x.509 certificate used to sign the code, using the following fields - O = Organization, L = Locality, S = State or Province, and C = Country. - /// The product name taken from the file's version resource. - /// The "OriginalName" field taken from the file's version resource. - /// The binary file version taken from the file's version resource. - /// Keeps track of any properties unknown to the library. - internal SecurityCenterPublisherInfo(string publisherName, string productName, string binaryName, string version, IDictionary serializedAdditionalRawData) - { - PublisherName = publisherName; - ProductName = productName; - BinaryName = binaryName; - Version = version; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The Subject field of the x.509 certificate used to sign the code, using the following fields - O = Organization, L = Locality, S = State or Province, and C = Country. - public string PublisherName { get; set; } - /// The product name taken from the file's version resource. - public string ProductName { get; set; } - /// The "OriginalName" field taken from the file's version resource. - public string BinaryName { get; set; } - /// The binary file version taken from the file's version resource. - public string Version { get; set; } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterVmEnforcementSupportState.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterVmEnforcementSupportState.cs deleted file mode 100644 index 5d1b2a11f73e..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterVmEnforcementSupportState.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - /// The machine supportability of Enforce feature. - public readonly partial struct SecurityCenterVmEnforcementSupportState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SecurityCenterVmEnforcementSupportState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SupportedValue = "Supported"; - private const string NotSupportedValue = "NotSupported"; - private const string UnknownValue = "Unknown"; - - /// Supported. - public static SecurityCenterVmEnforcementSupportState Supported { get; } = new SecurityCenterVmEnforcementSupportState(SupportedValue); - /// NotSupported. - public static SecurityCenterVmEnforcementSupportState NotSupported { get; } = new SecurityCenterVmEnforcementSupportState(NotSupportedValue); - /// Unknown. - public static SecurityCenterVmEnforcementSupportState Unknown { get; } = new SecurityCenterVmEnforcementSupportState(UnknownValue); - /// Determines if two values are the same. - public static bool operator ==(SecurityCenterVmEnforcementSupportState left, SecurityCenterVmEnforcementSupportState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SecurityCenterVmEnforcementSupportState left, SecurityCenterVmEnforcementSupportState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SecurityCenterVmEnforcementSupportState(string value) => new SecurityCenterVmEnforcementSupportState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SecurityCenterVmEnforcementSupportState other && Equals(other); - /// - public bool Equals(SecurityCenterVmEnforcementSupportState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTrafficDirection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTrafficDirection.cs deleted file mode 100644 index d2647f7a1220..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTrafficDirection.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - /// The rule's direction. - public readonly partial struct SecurityTrafficDirection : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SecurityTrafficDirection(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InboundValue = "Inbound"; - private const string OutboundValue = "Outbound"; - - /// Inbound. - public static SecurityTrafficDirection Inbound { get; } = new SecurityTrafficDirection(InboundValue); - /// Outbound. - public static SecurityTrafficDirection Outbound { get; } = new SecurityTrafficDirection(OutboundValue); - /// Determines if two values are the same. - public static bool operator ==(SecurityTrafficDirection left, SecurityTrafficDirection right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SecurityTrafficDirection left, SecurityTrafficDirection right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SecurityTrafficDirection(string value) => new SecurityTrafficDirection(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SecurityTrafficDirection other && Equals(other); - /// - public bool Equals(SecurityTrafficDirection other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTransportProtocol.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTransportProtocol.cs deleted file mode 100644 index de4c6b184057..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTransportProtocol.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - /// The SecurityTransportProtocol. - public readonly partial struct SecurityTransportProtocol : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SecurityTransportProtocol(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string TcpValue = "TCP"; - private const string UdpValue = "UDP"; - - /// TCP. - public static SecurityTransportProtocol Tcp { get; } = new SecurityTransportProtocol(TcpValue); - /// UDP. - public static SecurityTransportProtocol Udp { get; } = new SecurityTransportProtocol(UdpValue); - /// Determines if two values are the same. - public static bool operator ==(SecurityTransportProtocol left, SecurityTransportProtocol right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SecurityTransportProtocol left, SecurityTransportProtocol right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SecurityTransportProtocol(string value) => new SecurityTransportProtocol(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SecurityTransportProtocol other && Equals(other); - /// - public bool Equals(SecurityTransportProtocol other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlIssueSummary.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitiveDataDiscoveryProperties.Serialization.cs similarity index 51% rename from sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlIssueSummary.Serialization.cs rename to sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitiveDataDiscoveryProperties.Serialization.cs index c3e33dab01b8..e0df481be736 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlIssueSummary.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitiveDataDiscoveryProperties.Serialization.cs @@ -13,28 +13,28 @@ namespace Azure.ResourceManager.SecurityCenter.Models { - public partial class AdaptiveApplicationControlIssueSummary : IUtf8JsonSerializable, IJsonModel + public partial class SensitiveDataDiscoveryProperties : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AdaptiveApplicationControlIssueSummary)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(SensitiveDataDiscoveryProperties)} does not support writing '{format}' format."); } writer.WriteStartObject(); - if (Optional.IsDefined(Issue)) + if (Optional.IsDefined(IsEnabled)) { - writer.WritePropertyName("issue"u8); - writer.WriteStringValue(Issue.Value.ToString()); + writer.WritePropertyName("isEnabled"u8); + writer.WriteBooleanValue(IsEnabled.Value); } - if (Optional.IsDefined(NumberOfVms)) + if (options.Format != "W" && Optional.IsDefined(OperationStatus)) { - writer.WritePropertyName("numberOfVms"u8); - writer.WriteNumberValue(NumberOfVms.Value); + writer.WritePropertyName("operationStatus"u8); + writer.WriteObjectValue(OperationStatus, options); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -54,19 +54,19 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteEndObject(); } - AdaptiveApplicationControlIssueSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + SensitiveDataDiscoveryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AdaptiveApplicationControlIssueSummary)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(SensitiveDataDiscoveryProperties)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAdaptiveApplicationControlIssueSummary(document.RootElement, options); + return DeserializeSensitiveDataDiscoveryProperties(document.RootElement, options); } - internal static AdaptiveApplicationControlIssueSummary DeserializeAdaptiveApplicationControlIssueSummary(JsonElement element, ModelReaderWriterOptions options = null) + internal static SensitiveDataDiscoveryProperties DeserializeSensitiveDataDiscoveryProperties(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -74,28 +74,28 @@ internal static AdaptiveApplicationControlIssueSummary DeserializeAdaptiveApplic { return null; } - AdaptiveApplicationControlIssue? issue = default; - float? numberOfVms = default; + bool? isEnabled = default; + ExtensionOperationStatus operationStatus = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("issue"u8)) + if (property.NameEquals("isEnabled"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - issue = new AdaptiveApplicationControlIssue(property.Value.GetString()); + isEnabled = property.Value.GetBoolean(); continue; } - if (property.NameEquals("numberOfVms"u8)) + if (property.NameEquals("operationStatus"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - numberOfVms = property.Value.GetSingle(); + operationStatus = ExtensionOperationStatus.DeserializeExtensionOperationStatus(property.Value, options); continue; } if (options.Format != "W") @@ -104,38 +104,38 @@ internal static AdaptiveApplicationControlIssueSummary DeserializeAdaptiveApplic } } serializedAdditionalRawData = rawDataDictionary; - return new AdaptiveApplicationControlIssueSummary(issue, numberOfVms, serializedAdditionalRawData); + return new SensitiveDataDiscoveryProperties(isEnabled, operationStatus, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(AdaptiveApplicationControlIssueSummary)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(SensitiveDataDiscoveryProperties)} does not support writing '{options.Format}' format."); } } - AdaptiveApplicationControlIssueSummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + SensitiveDataDiscoveryProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeAdaptiveApplicationControlIssueSummary(document.RootElement, options); + return DeserializeSensitiveDataDiscoveryProperties(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(AdaptiveApplicationControlIssueSummary)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SensitiveDataDiscoveryProperties)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningsList.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitiveDataDiscoveryProperties.cs similarity index 59% rename from sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningsList.cs rename to sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitiveDataDiscoveryProperties.cs index 1d2918be6e25..c8d82e484f3f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningsList.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitiveDataDiscoveryProperties.cs @@ -10,8 +10,8 @@ namespace Azure.ResourceManager.SecurityCenter.Models { - /// Response for ListAdaptiveNetworkHardenings API service call. - internal partial class AdaptiveNetworkHardeningsList + /// Properties of Sensitive Data Discovery. + public partial class SensitiveDataDiscoveryProperties { /// /// Keeps track of any properties unknown to the library. @@ -45,26 +45,25 @@ internal partial class AdaptiveNetworkHardeningsList /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - internal AdaptiveNetworkHardeningsList() + /// Initializes a new instance of . + public SensitiveDataDiscoveryProperties() { - Value = new ChangeTrackingList(); } - /// Initializes a new instance of . - /// A list of Adaptive Network Hardenings resources. - /// The URL to get the next set of results. + /// Initializes a new instance of . + /// Indicates whether Sensitive Data Discovery should be enabled. + /// Upon failure or partial success. Additional data describing Sensitive Data Discovery enable/disable operation. /// Keeps track of any properties unknown to the library. - internal AdaptiveNetworkHardeningsList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal SensitiveDataDiscoveryProperties(bool? isEnabled, ExtensionOperationStatus operationStatus, IDictionary serializedAdditionalRawData) { - Value = value; - NextLink = nextLink; + IsEnabled = isEnabled; + OperationStatus = operationStatus; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// A list of Adaptive Network Hardenings resources. - public IReadOnlyList Value { get; } - /// The URL to get the next set of results. - public string NextLink { get; } + /// Indicates whether Sensitive Data Discovery should be enabled. + public bool? IsEnabled { get; set; } + /// Upon failure or partial success. Additional data describing Sensitive Data Discovery enable/disable operation. + public ExtensionOperationStatus OperationStatus { get; } } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserRecommendation.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserRecommendation.cs deleted file mode 100644 index 53cd86344e0b..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserRecommendation.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - /// Represents a user that is recommended to be allowed for a certain rule. - public partial class UserRecommendation - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public UserRecommendation() - { - } - - /// Initializes a new instance of . - /// Represents a user that is recommended to be allowed for a certain rule. - /// The recommendation action of the machine or rule. - /// Keeps track of any properties unknown to the library. - internal UserRecommendation(string username, RecommendationAction? recommendationAction, IDictionary serializedAdditionalRawData) - { - Username = username; - RecommendationAction = recommendationAction; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Represents a user that is recommended to be allowed for a certain rule. - public string Username { get; set; } - /// The recommendation action of the machine or rule. - public RecommendationAction? RecommendationAction { get; set; } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VmRecommendation.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VmRecommendation.Serialization.cs deleted file mode 100644 index d8aada761fee..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VmRecommendation.Serialization.cs +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - public partial class VmRecommendation : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(VmRecommendation)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(ConfigurationStatus)) - { - writer.WritePropertyName("configurationStatus"u8); - writer.WriteStringValue(ConfigurationStatus.Value.ToString()); - } - if (Optional.IsDefined(RecommendationAction)) - { - writer.WritePropertyName("recommendationAction"u8); - writer.WriteStringValue(RecommendationAction.Value.ToString()); - } - if (Optional.IsDefined(ResourceId)) - { - writer.WritePropertyName("resourceId"u8); - writer.WriteStringValue(ResourceId); - } - if (Optional.IsDefined(EnforcementSupport)) - { - writer.WritePropertyName("enforcementSupport"u8); - writer.WriteStringValue(EnforcementSupport.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - VmRecommendation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(VmRecommendation)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeVmRecommendation(document.RootElement, options); - } - - internal static VmRecommendation DeserializeVmRecommendation(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - SecurityCenterConfigurationStatus? configurationStatus = default; - RecommendationAction? recommendationAction = default; - ResourceIdentifier resourceId = default; - SecurityCenterVmEnforcementSupportState? enforcementSupport = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("configurationStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - configurationStatus = new SecurityCenterConfigurationStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("recommendationAction"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - recommendationAction = new RecommendationAction(property.Value.GetString()); - continue; - } - if (property.NameEquals("resourceId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - resourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("enforcementSupport"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enforcementSupport = new SecurityCenterVmEnforcementSupportState(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new VmRecommendation(configurationStatus, recommendationAction, resourceId, enforcementSupport, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(VmRecommendation)} does not support writing '{options.Format}' format."); - } - } - - VmRecommendation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeVmRecommendation(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(VmRecommendation)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VmRecommendation.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VmRecommendation.cs deleted file mode 100644 index 993aa692b3d1..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VmRecommendation.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.SecurityCenter.Models -{ - /// Represents a machine that is part of a machine group. - public partial class VmRecommendation - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public VmRecommendation() - { - } - - /// Initializes a new instance of . - /// The configuration status of the machines group or machine or rule. - /// The recommendation action of the machine or rule. - /// The full resource id of the machine. - /// The machine supportability of Enforce feature. - /// Keeps track of any properties unknown to the library. - internal VmRecommendation(SecurityCenterConfigurationStatus? configurationStatus, RecommendationAction? recommendationAction, ResourceIdentifier resourceId, SecurityCenterVmEnforcementSupportState? enforcementSupport, IDictionary serializedAdditionalRawData) - { - ConfigurationStatus = configurationStatus; - RecommendationAction = recommendationAction; - ResourceId = resourceId; - EnforcementSupport = enforcementSupport; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The configuration status of the machines group or machine or rule. - public SecurityCenterConfigurationStatus? ConfigurationStatus { get; set; } - /// The recommendation action of the machine or rule. - public RecommendationAction? RecommendationAction { get; set; } - /// The full resource id of the machine. - public ResourceIdentifier ResourceId { get; set; } - /// The machine supportability of Enforce feature. - public SecurityCenterVmEnforcementSupportState? EnforcementSupport { get; set; } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/AdaptiveApplicationControlsRestOperations.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/AdaptiveApplicationControlsRestOperations.cs deleted file mode 100644 index 98a3b3239a34..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/AdaptiveApplicationControlsRestOperations.cs +++ /dev/null @@ -1,413 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.SecurityCenter.Models; - -namespace Azure.ResourceManager.SecurityCenter -{ - internal partial class AdaptiveApplicationControlsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of AdaptiveApplicationControlsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public AdaptiveApplicationControlsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, bool? includePathRecommendations, bool? summary) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.Security/applicationWhitelistings", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (includePathRecommendations != null) - { - uri.AppendQuery("includePathRecommendations", includePathRecommendations.Value, true); - } - if (summary != null) - { - uri.AppendQuery("summary", summary.Value, true); - } - return uri; - } - - internal HttpMessage CreateListRequest(string subscriptionId, bool? includePathRecommendations, bool? summary) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.Security/applicationWhitelistings", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (includePathRecommendations != null) - { - uri.AppendQuery("includePathRecommendations", includePathRecommendations.Value, true); - } - if (summary != null) - { - uri.AppendQuery("summary", summary.Value, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets a list of application control machine groups for the subscription. - /// Azure subscription ID. - /// Include the policy rules. - /// Return output in a summarized form. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, bool? includePathRecommendations = null, bool? summary = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListRequest(subscriptionId, includePathRecommendations, summary); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - AdaptiveApplicationControlGroups value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AdaptiveApplicationControlGroups.DeserializeAdaptiveApplicationControlGroups(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a list of application control machine groups for the subscription. - /// Azure subscription ID. - /// Include the policy rules. - /// Return output in a summarized form. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, bool? includePathRecommendations = null, bool? summary = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListRequest(subscriptionId, includePathRecommendations, summary); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - AdaptiveApplicationControlGroups value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AdaptiveApplicationControlGroups.DeserializeAdaptiveApplicationControlGroups(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation ascLocation, string groupName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.Security/locations/", false); - uri.AppendPath(ascLocation, true); - uri.AppendPath("/applicationWhitelistings/", false); - uri.AppendPath(groupName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation ascLocation, string groupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.Security/locations/", false); - uri.AppendPath(ascLocation, true); - uri.AppendPath("/applicationWhitelistings/", false); - uri.AppendPath(groupName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets an application control VM/server group. - /// Azure subscription ID. - /// The location where ASC stores the data of the subscription. can be retrieved from Get locations. - /// Name of an application control machine group. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, AzureLocation ascLocation, string groupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - - using var message = CreateGetRequest(subscriptionId, ascLocation, groupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - AdaptiveApplicationControlGroupData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AdaptiveApplicationControlGroupData.DeserializeAdaptiveApplicationControlGroupData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((AdaptiveApplicationControlGroupData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets an application control VM/server group. - /// Azure subscription ID. - /// The location where ASC stores the data of the subscription. can be retrieved from Get locations. - /// Name of an application control machine group. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, AzureLocation ascLocation, string groupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - - using var message = CreateGetRequest(subscriptionId, ascLocation, groupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - AdaptiveApplicationControlGroupData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AdaptiveApplicationControlGroupData.DeserializeAdaptiveApplicationControlGroupData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((AdaptiveApplicationControlGroupData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreatePutRequestUri(string subscriptionId, AzureLocation ascLocation, string groupName, AdaptiveApplicationControlGroupData data) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.Security/locations/", false); - uri.AppendPath(ascLocation, true); - uri.AppendPath("/applicationWhitelistings/", false); - uri.AppendPath(groupName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreatePutRequest(string subscriptionId, AzureLocation ascLocation, string groupName, AdaptiveApplicationControlGroupData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.Security/locations/", false); - uri.AppendPath(ascLocation, true); - uri.AppendPath("/applicationWhitelistings/", false); - uri.AppendPath(groupName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Update an application control machine group. - /// Azure subscription ID. - /// The location where ASC stores the data of the subscription. can be retrieved from Get locations. - /// Name of an application control machine group. - /// The to use. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> PutAsync(string subscriptionId, AzureLocation ascLocation, string groupName, AdaptiveApplicationControlGroupData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreatePutRequest(subscriptionId, ascLocation, groupName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - AdaptiveApplicationControlGroupData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AdaptiveApplicationControlGroupData.DeserializeAdaptiveApplicationControlGroupData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Update an application control machine group. - /// Azure subscription ID. - /// The location where ASC stores the data of the subscription. can be retrieved from Get locations. - /// Name of an application control machine group. - /// The to use. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response Put(string subscriptionId, AzureLocation ascLocation, string groupName, AdaptiveApplicationControlGroupData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreatePutRequest(subscriptionId, ascLocation, groupName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - AdaptiveApplicationControlGroupData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AdaptiveApplicationControlGroupData.DeserializeAdaptiveApplicationControlGroupData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, AzureLocation ascLocation, string groupName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.Security/locations/", false); - uri.AppendPath(ascLocation, true); - uri.AppendPath("/applicationWhitelistings/", false); - uri.AppendPath(groupName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, AzureLocation ascLocation, string groupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.Security/locations/", false); - uri.AppendPath(ascLocation, true); - uri.AppendPath("/applicationWhitelistings/", false); - uri.AppendPath(groupName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Delete an application control machine group. - /// Azure subscription ID. - /// The location where ASC stores the data of the subscription. can be retrieved from Get locations. - /// Name of an application control machine group. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, AzureLocation ascLocation, string groupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - - using var message = CreateDeleteRequest(subscriptionId, ascLocation, groupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Delete an application control machine group. - /// Azure subscription ID. - /// The location where ASC stores the data of the subscription. can be retrieved from Get locations. - /// Name of an application control machine group. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, AzureLocation ascLocation, string groupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - - using var message = CreateDeleteRequest(subscriptionId, ascLocation, groupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/AdaptiveNetworkHardeningsRestOperations.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/AdaptiveNetworkHardeningsRestOperations.cs deleted file mode 100644 index 87c6ef1c2454..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/AdaptiveNetworkHardeningsRestOperations.cs +++ /dev/null @@ -1,481 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.SecurityCenter.Models; - -namespace Azure.ResourceManager.SecurityCenter -{ - internal partial class AdaptiveNetworkHardeningsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of AdaptiveNetworkHardeningsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public AdaptiveNetworkHardeningsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateListByExtendedResourceRequestUri(string subscriptionId, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/", false); - uri.AppendPath(resourceNamespace, true); - uri.AppendPath("/", false); - uri.AppendPath(resourceType, true); - uri.AppendPath("/", false); - uri.AppendPath(resourceName, true); - uri.AppendPath("/providers/Microsoft.Security/adaptiveNetworkHardenings", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListByExtendedResourceRequest(string subscriptionId, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/", false); - uri.AppendPath(resourceNamespace, true); - uri.AppendPath("/", false); - uri.AppendPath(resourceType, true); - uri.AppendPath("/", false); - uri.AppendPath(resourceName, true); - uri.AppendPath("/providers/Microsoft.Security/adaptiveNetworkHardenings", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets a list of Adaptive Network Hardenings resources in scope of an extended resource. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// The Namespace of the resource. - /// The type of the resource. - /// Name of the resource. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> ListByExtendedResourceAsync(string subscriptionId, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(resourceNamespace, nameof(resourceNamespace)); - Argument.AssertNotNullOrEmpty(resourceType, nameof(resourceType)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - - using var message = CreateListByExtendedResourceRequest(subscriptionId, resourceGroupName, resourceNamespace, resourceType, resourceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - AdaptiveNetworkHardeningsList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AdaptiveNetworkHardeningsList.DeserializeAdaptiveNetworkHardeningsList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a list of Adaptive Network Hardenings resources in scope of an extended resource. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// The Namespace of the resource. - /// The type of the resource. - /// Name of the resource. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response ListByExtendedResource(string subscriptionId, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(resourceNamespace, nameof(resourceNamespace)); - Argument.AssertNotNullOrEmpty(resourceType, nameof(resourceType)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - - using var message = CreateListByExtendedResourceRequest(subscriptionId, resourceGroupName, resourceNamespace, resourceType, resourceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - AdaptiveNetworkHardeningsList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AdaptiveNetworkHardeningsList.DeserializeAdaptiveNetworkHardeningsList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName, string adaptiveNetworkHardeningResourceName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/", false); - uri.AppendPath(resourceNamespace, true); - uri.AppendPath("/", false); - uri.AppendPath(resourceType, true); - uri.AppendPath("/", false); - uri.AppendPath(resourceName, true); - uri.AppendPath("/providers/Microsoft.Security/adaptiveNetworkHardenings/", false); - uri.AppendPath(adaptiveNetworkHardeningResourceName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName, string adaptiveNetworkHardeningResourceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/", false); - uri.AppendPath(resourceNamespace, true); - uri.AppendPath("/", false); - uri.AppendPath(resourceType, true); - uri.AppendPath("/", false); - uri.AppendPath(resourceName, true); - uri.AppendPath("/providers/Microsoft.Security/adaptiveNetworkHardenings/", false); - uri.AppendPath(adaptiveNetworkHardeningResourceName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets a single Adaptive Network Hardening resource. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// The Namespace of the resource. - /// The type of the resource. - /// Name of the resource. - /// The name of the Adaptive Network Hardening resource. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName, string adaptiveNetworkHardeningResourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(resourceNamespace, nameof(resourceNamespace)); - Argument.AssertNotNullOrEmpty(resourceType, nameof(resourceType)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNullOrEmpty(adaptiveNetworkHardeningResourceName, nameof(adaptiveNetworkHardeningResourceName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, resourceNamespace, resourceType, resourceName, adaptiveNetworkHardeningResourceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - AdaptiveNetworkHardeningData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AdaptiveNetworkHardeningData.DeserializeAdaptiveNetworkHardeningData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((AdaptiveNetworkHardeningData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a single Adaptive Network Hardening resource. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// The Namespace of the resource. - /// The type of the resource. - /// Name of the resource. - /// The name of the Adaptive Network Hardening resource. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName, string adaptiveNetworkHardeningResourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(resourceNamespace, nameof(resourceNamespace)); - Argument.AssertNotNullOrEmpty(resourceType, nameof(resourceType)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNullOrEmpty(adaptiveNetworkHardeningResourceName, nameof(adaptiveNetworkHardeningResourceName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, resourceNamespace, resourceType, resourceName, adaptiveNetworkHardeningResourceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - AdaptiveNetworkHardeningData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AdaptiveNetworkHardeningData.DeserializeAdaptiveNetworkHardeningData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((AdaptiveNetworkHardeningData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateEnforceRequestUri(string subscriptionId, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName, string adaptiveNetworkHardeningResourceName, AdaptiveNetworkHardeningEnforceContent content) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/", false); - uri.AppendPath(resourceNamespace, true); - uri.AppendPath("/", false); - uri.AppendPath(resourceType, true); - uri.AppendPath("/", false); - uri.AppendPath(resourceName, true); - uri.AppendPath("/providers/Microsoft.Security/adaptiveNetworkHardenings/", false); - uri.AppendPath(adaptiveNetworkHardeningResourceName, true); - uri.AppendPath("/", false); - uri.AppendPath("enforce", true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateEnforceRequest(string subscriptionId, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName, string adaptiveNetworkHardeningResourceName, AdaptiveNetworkHardeningEnforceContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/", false); - uri.AppendPath(resourceNamespace, true); - uri.AppendPath("/", false); - uri.AppendPath(resourceType, true); - uri.AppendPath("/", false); - uri.AppendPath(resourceName, true); - uri.AppendPath("/providers/Microsoft.Security/adaptiveNetworkHardenings/", false); - uri.AppendPath(adaptiveNetworkHardeningResourceName, true); - uri.AppendPath("/", false); - uri.AppendPath("enforce", true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Enforces the given rules on the NSG(s) listed in the request. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// The Namespace of the resource. - /// The type of the resource. - /// Name of the resource. - /// The name of the Adaptive Network Hardening resource. - /// The to use. - /// The cancellation token to use. - /// , , , , , or is null. - /// , , , , or is an empty string, and was expected to be non-empty. - public async Task EnforceAsync(string subscriptionId, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName, string adaptiveNetworkHardeningResourceName, AdaptiveNetworkHardeningEnforceContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(resourceNamespace, nameof(resourceNamespace)); - Argument.AssertNotNullOrEmpty(resourceType, nameof(resourceType)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNullOrEmpty(adaptiveNetworkHardeningResourceName, nameof(adaptiveNetworkHardeningResourceName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateEnforceRequest(subscriptionId, resourceGroupName, resourceNamespace, resourceType, resourceName, adaptiveNetworkHardeningResourceName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Enforces the given rules on the NSG(s) listed in the request. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// The Namespace of the resource. - /// The type of the resource. - /// Name of the resource. - /// The name of the Adaptive Network Hardening resource. - /// The to use. - /// The cancellation token to use. - /// , , , , , or is null. - /// , , , , or is an empty string, and was expected to be non-empty. - public Response Enforce(string subscriptionId, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName, string adaptiveNetworkHardeningResourceName, AdaptiveNetworkHardeningEnforceContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(resourceNamespace, nameof(resourceNamespace)); - Argument.AssertNotNullOrEmpty(resourceType, nameof(resourceType)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNullOrEmpty(adaptiveNetworkHardeningResourceName, nameof(adaptiveNetworkHardeningResourceName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateEnforceRequest(subscriptionId, resourceGroupName, resourceNamespace, resourceType, resourceName, adaptiveNetworkHardeningResourceName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListByExtendedResourceNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListByExtendedResourceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets a list of Adaptive Network Hardenings resources in scope of an extended resource. - /// The URL to the next page of results. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// The Namespace of the resource. - /// The type of the resource. - /// Name of the resource. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> ListByExtendedResourceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(resourceNamespace, nameof(resourceNamespace)); - Argument.AssertNotNullOrEmpty(resourceType, nameof(resourceType)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - - using var message = CreateListByExtendedResourceNextPageRequest(nextLink, subscriptionId, resourceGroupName, resourceNamespace, resourceType, resourceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - AdaptiveNetworkHardeningsList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AdaptiveNetworkHardeningsList.DeserializeAdaptiveNetworkHardeningsList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a list of Adaptive Network Hardenings resources in scope of an extended resource. - /// The URL to the next page of results. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// The Namespace of the resource. - /// The type of the resource. - /// Name of the resource. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response ListByExtendedResourceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(resourceNamespace, nameof(resourceNamespace)); - Argument.AssertNotNullOrEmpty(resourceType, nameof(resourceType)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - - using var message = CreateListByExtendedResourceNextPageRequest(nextLink, subscriptionId, resourceGroupName, resourceNamespace, resourceType, resourceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - AdaptiveNetworkHardeningsList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AdaptiveNetworkHardeningsList.DeserializeAdaptiveNetworkHardeningsList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/AzureDevOpsOrgsRestOperations.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/AzureDevOpsOrgsRestOperations.cs index 20015b43552d..cba501f6a820 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/AzureDevOpsOrgsRestOperations.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/AzureDevOpsOrgsRestOperations.cs @@ -32,7 +32,7 @@ public AzureDevOpsOrgsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/AzureDevOpsProjectsRestOperations.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/AzureDevOpsProjectsRestOperations.cs index df5616b23c66..1867c1c1c352 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/AzureDevOpsProjectsRestOperations.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/AzureDevOpsProjectsRestOperations.cs @@ -32,7 +32,7 @@ public AzureDevOpsProjectsRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/AzureDevOpsReposRestOperations.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/AzureDevOpsReposRestOperations.cs index b7711518039d..5fab63b793f1 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/AzureDevOpsReposRestOperations.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/AzureDevOpsReposRestOperations.cs @@ -32,7 +32,7 @@ public AzureDevOpsReposRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/CustomAssessmentAutomationsRestOperations.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/CustomAssessmentAutomationsRestOperations.cs deleted file mode 100644 index 2415ede94473..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/CustomAssessmentAutomationsRestOperations.cs +++ /dev/null @@ -1,641 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.SecurityCenter.Models; - -namespace Azure.ResourceManager.SecurityCenter -{ - internal partial class CustomAssessmentAutomationsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of CustomAssessmentAutomationsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public CustomAssessmentAutomationsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-07-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string customAssessmentAutomationName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourcegroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Security/customAssessmentAutomations/", false); - uri.AppendPath(customAssessmentAutomationName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string customAssessmentAutomationName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourcegroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Security/customAssessmentAutomations/", false); - uri.AppendPath(customAssessmentAutomationName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets a single custom assessment automation by name for the provided subscription and resource group. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// Name of the Custom Assessment Automation. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string customAssessmentAutomationName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(customAssessmentAutomationName, nameof(customAssessmentAutomationName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, customAssessmentAutomationName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - CustomAssessmentAutomationData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CustomAssessmentAutomationData.DeserializeCustomAssessmentAutomationData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((CustomAssessmentAutomationData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a single custom assessment automation by name for the provided subscription and resource group. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// Name of the Custom Assessment Automation. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string customAssessmentAutomationName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(customAssessmentAutomationName, nameof(customAssessmentAutomationName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, customAssessmentAutomationName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - CustomAssessmentAutomationData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CustomAssessmentAutomationData.DeserializeCustomAssessmentAutomationData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((CustomAssessmentAutomationData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string customAssessmentAutomationName, CustomAssessmentAutomationCreateOrUpdateContent content) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourcegroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Security/customAssessmentAutomations/", false); - uri.AppendPath(customAssessmentAutomationName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string customAssessmentAutomationName, CustomAssessmentAutomationCreateOrUpdateContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourcegroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Security/customAssessmentAutomations/", false); - uri.AppendPath(customAssessmentAutomationName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Creates or updates a custom assessment automation for the provided subscription. Please note that providing an existing custom assessment automation will replace the existing record. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// Name of the Custom Assessment Automation. - /// Custom Assessment Automation body. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> CreateAsync(string subscriptionId, string resourceGroupName, string customAssessmentAutomationName, CustomAssessmentAutomationCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(customAssessmentAutomationName, nameof(customAssessmentAutomationName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, customAssessmentAutomationName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - { - CustomAssessmentAutomationData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CustomAssessmentAutomationData.DeserializeCustomAssessmentAutomationData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates or updates a custom assessment automation for the provided subscription. Please note that providing an existing custom assessment automation will replace the existing record. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// Name of the Custom Assessment Automation. - /// Custom Assessment Automation body. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string customAssessmentAutomationName, CustomAssessmentAutomationCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(customAssessmentAutomationName, nameof(customAssessmentAutomationName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, customAssessmentAutomationName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - { - CustomAssessmentAutomationData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CustomAssessmentAutomationData.DeserializeCustomAssessmentAutomationData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string customAssessmentAutomationName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourcegroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Security/customAssessmentAutomations/", false); - uri.AppendPath(customAssessmentAutomationName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string customAssessmentAutomationName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourcegroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Security/customAssessmentAutomations/", false); - uri.AppendPath(customAssessmentAutomationName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes a custom assessment automation by name for a provided subscription. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// Name of the Custom Assessment Automation. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string customAssessmentAutomationName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(customAssessmentAutomationName, nameof(customAssessmentAutomationName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, customAssessmentAutomationName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes a custom assessment automation by name for a provided subscription. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// Name of the Custom Assessment Automation. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string customAssessmentAutomationName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(customAssessmentAutomationName, nameof(customAssessmentAutomationName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, customAssessmentAutomationName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourcegroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Security/customAssessmentAutomations", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourcegroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Security/customAssessmentAutomations", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List custom assessment automations by provided subscription and resource group. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - CustomAssessmentAutomationsListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CustomAssessmentAutomationsListResult.DeserializeCustomAssessmentAutomationsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List custom assessment automations by provided subscription and resource group. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - CustomAssessmentAutomationsListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CustomAssessmentAutomationsListResult.DeserializeCustomAssessmentAutomationsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.Security/customAssessmentAutomations", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.Security/customAssessmentAutomations", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List custom assessment automations by provided subscription. - /// Azure subscription ID. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionRequest(subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - CustomAssessmentAutomationsListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CustomAssessmentAutomationsListResult.DeserializeCustomAssessmentAutomationsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List custom assessment automations by provided subscription. - /// Azure subscription ID. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionRequest(subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - CustomAssessmentAutomationsListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CustomAssessmentAutomationsListResult.DeserializeCustomAssessmentAutomationsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List custom assessment automations by provided subscription and resource group. - /// The URL to the next page of results. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - CustomAssessmentAutomationsListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CustomAssessmentAutomationsListResult.DeserializeCustomAssessmentAutomationsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List custom assessment automations by provided subscription and resource group. - /// The URL to the next page of results. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - CustomAssessmentAutomationsListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CustomAssessmentAutomationsListResult.DeserializeCustomAssessmentAutomationsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List custom assessment automations by provided subscription. - /// The URL to the next page of results. - /// Azure subscription ID. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - CustomAssessmentAutomationsListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CustomAssessmentAutomationsListResult.DeserializeCustomAssessmentAutomationsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List custom assessment automations by provided subscription. - /// The URL to the next page of results. - /// Azure subscription ID. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - CustomAssessmentAutomationsListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CustomAssessmentAutomationsListResult.DeserializeCustomAssessmentAutomationsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/CustomEntityStoreAssignmentsRestOperations.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/CustomEntityStoreAssignmentsRestOperations.cs deleted file mode 100644 index e36c1e4374bd..000000000000 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/CustomEntityStoreAssignmentsRestOperations.cs +++ /dev/null @@ -1,641 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.SecurityCenter.Models; - -namespace Azure.ResourceManager.SecurityCenter -{ - internal partial class CustomEntityStoreAssignmentsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of CustomEntityStoreAssignmentsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public CustomEntityStoreAssignmentsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-07-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string customEntityStoreAssignmentName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourcegroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Security/customEntityStoreAssignments/", false); - uri.AppendPath(customEntityStoreAssignmentName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string customEntityStoreAssignmentName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourcegroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Security/customEntityStoreAssignments/", false); - uri.AppendPath(customEntityStoreAssignmentName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets a single custom entity store assignment by name for the provided subscription and resource group. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// Name of the custom entity store assignment. Generated name is GUID. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string customEntityStoreAssignmentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(customEntityStoreAssignmentName, nameof(customEntityStoreAssignmentName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, customEntityStoreAssignmentName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - CustomEntityStoreAssignmentData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CustomEntityStoreAssignmentData.DeserializeCustomEntityStoreAssignmentData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((CustomEntityStoreAssignmentData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a single custom entity store assignment by name for the provided subscription and resource group. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// Name of the custom entity store assignment. Generated name is GUID. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string customEntityStoreAssignmentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(customEntityStoreAssignmentName, nameof(customEntityStoreAssignmentName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, customEntityStoreAssignmentName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - CustomEntityStoreAssignmentData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CustomEntityStoreAssignmentData.DeserializeCustomEntityStoreAssignmentData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((CustomEntityStoreAssignmentData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string customEntityStoreAssignmentName, CustomEntityStoreAssignmentCreateOrUpdateContent content) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourcegroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Security/customEntityStoreAssignments/", false); - uri.AppendPath(customEntityStoreAssignmentName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string customEntityStoreAssignmentName, CustomEntityStoreAssignmentCreateOrUpdateContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourcegroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Security/customEntityStoreAssignments/", false); - uri.AppendPath(customEntityStoreAssignmentName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Creates a custom entity store assignment for the provided subscription, if not already exists. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// Name of the custom entity store assignment. Generated name is GUID. - /// Custom entity store assignment body. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> CreateAsync(string subscriptionId, string resourceGroupName, string customEntityStoreAssignmentName, CustomEntityStoreAssignmentCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(customEntityStoreAssignmentName, nameof(customEntityStoreAssignmentName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, customEntityStoreAssignmentName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - { - CustomEntityStoreAssignmentData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CustomEntityStoreAssignmentData.DeserializeCustomEntityStoreAssignmentData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates a custom entity store assignment for the provided subscription, if not already exists. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// Name of the custom entity store assignment. Generated name is GUID. - /// Custom entity store assignment body. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string customEntityStoreAssignmentName, CustomEntityStoreAssignmentCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(customEntityStoreAssignmentName, nameof(customEntityStoreAssignmentName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, customEntityStoreAssignmentName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - { - CustomEntityStoreAssignmentData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CustomEntityStoreAssignmentData.DeserializeCustomEntityStoreAssignmentData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string customEntityStoreAssignmentName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourcegroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Security/customEntityStoreAssignments/", false); - uri.AppendPath(customEntityStoreAssignmentName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string customEntityStoreAssignmentName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourcegroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Security/customEntityStoreAssignments/", false); - uri.AppendPath(customEntityStoreAssignmentName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Delete a custom entity store assignment by name for a provided subscription. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// Name of the custom entity store assignment. Generated name is GUID. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string customEntityStoreAssignmentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(customEntityStoreAssignmentName, nameof(customEntityStoreAssignmentName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, customEntityStoreAssignmentName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Delete a custom entity store assignment by name for a provided subscription. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// Name of the custom entity store assignment. Generated name is GUID. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string customEntityStoreAssignmentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(customEntityStoreAssignmentName, nameof(customEntityStoreAssignmentName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, customEntityStoreAssignmentName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourcegroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Security/customEntityStoreAssignments", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourcegroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Security/customEntityStoreAssignments", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List custom entity store assignments by a provided subscription and resource group. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - CustomEntityStoreAssignmentsListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CustomEntityStoreAssignmentsListResult.DeserializeCustomEntityStoreAssignmentsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List custom entity store assignments by a provided subscription and resource group. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - CustomEntityStoreAssignmentsListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CustomEntityStoreAssignmentsListResult.DeserializeCustomEntityStoreAssignmentsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.Security/customEntityStoreAssignments", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.Security/customEntityStoreAssignments", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List custom entity store assignments by provided subscription. - /// Azure subscription ID. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionRequest(subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - CustomEntityStoreAssignmentsListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CustomEntityStoreAssignmentsListResult.DeserializeCustomEntityStoreAssignmentsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List custom entity store assignments by provided subscription. - /// Azure subscription ID. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionRequest(subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - CustomEntityStoreAssignmentsListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CustomEntityStoreAssignmentsListResult.DeserializeCustomEntityStoreAssignmentsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List custom entity store assignments by a provided subscription and resource group. - /// The URL to the next page of results. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - CustomEntityStoreAssignmentsListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CustomEntityStoreAssignmentsListResult.DeserializeCustomEntityStoreAssignmentsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List custom entity store assignments by a provided subscription and resource group. - /// The URL to the next page of results. - /// Azure subscription ID. - /// The name of the resource group within the user's subscription. The name is case insensitive. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - CustomEntityStoreAssignmentsListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CustomEntityStoreAssignmentsListResult.DeserializeCustomEntityStoreAssignmentsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List custom entity store assignments by provided subscription. - /// The URL to the next page of results. - /// Azure subscription ID. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - CustomEntityStoreAssignmentsListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CustomEntityStoreAssignmentsListResult.DeserializeCustomEntityStoreAssignmentsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List custom entity store assignments by provided subscription. - /// The URL to the next page of results. - /// Azure subscription ID. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - CustomEntityStoreAssignmentsListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CustomEntityStoreAssignmentsListResult.DeserializeCustomEntityStoreAssignmentsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/DevOpsConfigurationsRestOperations.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/DevOpsConfigurationsRestOperations.cs index e5fafddfb14b..22e93deddcaf 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/DevOpsConfigurationsRestOperations.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/DevOpsConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public DevOpsConfigurationsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/DevOpsOperationResultsRestOperations.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/DevOpsOperationResultsRestOperations.cs index 8b5955c978fd..0aedafa13e55 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/DevOpsOperationResultsRestOperations.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/DevOpsOperationResultsRestOperations.cs @@ -32,7 +32,7 @@ public DevOpsOperationResultsRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/GitHubOwnersRestOperations.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/GitHubOwnersRestOperations.cs index 411c33a5a592..1fe3b0699b30 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/GitHubOwnersRestOperations.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/GitHubOwnersRestOperations.cs @@ -32,7 +32,7 @@ public GitHubOwnersRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/GitHubReposRestOperations.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/GitHubReposRestOperations.cs index 64ba96eebbae..c907dc7fac09 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/GitHubReposRestOperations.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/GitHubReposRestOperations.cs @@ -32,7 +32,7 @@ public GitHubReposRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/GitLabGroupsRestOperations.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/GitLabGroupsRestOperations.cs index d695b4a9ad55..f8016f2bb6e1 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/GitLabGroupsRestOperations.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/GitLabGroupsRestOperations.cs @@ -32,7 +32,7 @@ public GitLabGroupsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/GitLabProjectsRestOperations.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/GitLabProjectsRestOperations.cs index 294e2de2d120..7c628f539aea 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/GitLabProjectsRestOperations.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/GitLabProjectsRestOperations.cs @@ -32,7 +32,7 @@ public GitLabProjectsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/GitLabSubgroupsRestOperations.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/GitLabSubgroupsRestOperations.cs index 81f2c8e205ed..58bb9c190b9f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/GitLabSubgroupsRestOperations.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/GitLabSubgroupsRestOperations.cs @@ -32,7 +32,7 @@ public GitLabSubgroupsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/SecurityCenterRestOperations.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/SensitivitySettingsRestOperations.cs similarity index 61% rename from sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/SecurityCenterRestOperations.cs rename to sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/SensitivitySettingsRestOperations.cs index d766583c17af..a3dbd32a3eae 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/SecurityCenterRestOperations.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RestOperations/SensitivitySettingsRestOperations.cs @@ -15,20 +15,20 @@ namespace Azure.ResourceManager.SecurityCenter { - internal partial class SecurityCenterRestOperations + internal partial class SensitivitySettingsRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; private readonly Uri _endpoint; private readonly string _apiVersion; - /// Initializes a new instance of SecurityCenterRestOperations. + /// Initializes a new instance of SensitivitySettingsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. /// server parameter. /// Api Version. /// or is null. - public SecurityCenterRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + public SensitivitySettingsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); @@ -36,7 +36,7 @@ public SecurityCenterRestOperations(HttpPipeline pipeline, string applicationId, _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateUpdateSensitivitySettingsRequestUri(SensitivitySettingCreateOrUpdateContent content) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(SensitivitySettingCreateOrUpdateContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -45,7 +45,7 @@ internal RequestUriBuilder CreateUpdateSensitivitySettingsRequestUri(Sensitivity return uri; } - internal HttpMessage CreateUpdateSensitivitySettingsRequest(SensitivitySettingCreateOrUpdateContent content) + internal HttpMessage CreateCreateOrUpdateRequest(SensitivitySettingCreateOrUpdateContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -64,15 +64,15 @@ internal HttpMessage CreateUpdateSensitivitySettingsRequest(SensitivitySettingCr return message; } - /// Updates data sensitivity settings for sensitive data discovery. + /// Create or update data sensitivity settings for sensitive data discovery. /// The data sensitivity settings to update. /// The cancellation token to use. /// is null. - public async Task> UpdateSensitivitySettingsAsync(SensitivitySettingCreateOrUpdateContent content, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(SensitivitySettingCreateOrUpdateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateSensitivitySettingsRequest(content); + using var message = CreateCreateOrUpdateRequest(content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -88,15 +88,15 @@ public async Task> UpdateSensitivitySettingsAsy } } - /// Updates data sensitivity settings for sensitive data discovery. + /// Create or update data sensitivity settings for sensitive data discovery. /// The data sensitivity settings to update. /// The cancellation token to use. /// is null. - public Response UpdateSensitivitySettings(SensitivitySettingCreateOrUpdateContent content, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(SensitivitySettingCreateOrUpdateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateSensitivitySettingsRequest(content); + using var message = CreateCreateOrUpdateRequest(content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -112,7 +112,7 @@ public Response UpdateSensitivitySettings(SensitivitySet } } - internal RequestUriBuilder CreateGetSensitivitySettingsRequestUri() + internal RequestUriBuilder CreateGetRequestUri() { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -121,7 +121,7 @@ internal RequestUriBuilder CreateGetSensitivitySettingsRequestUri() return uri; } - internal HttpMessage CreateGetSensitivitySettingsRequest() + internal HttpMessage CreateGetRequest() { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -138,9 +138,9 @@ internal HttpMessage CreateGetSensitivitySettingsRequest() /// Gets data sensitivity settings for sensitive data discovery. /// The cancellation token to use. - public async Task> GetSensitivitySettingsAsync(CancellationToken cancellationToken = default) + public async Task> GetAsync(CancellationToken cancellationToken = default) { - using var message = CreateGetSensitivitySettingsRequest(); + using var message = CreateGetRequest(); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -160,9 +160,9 @@ public async Task> GetSensitivitySettingsAsync( /// Gets data sensitivity settings for sensitive data discovery. /// The cancellation token to use. - public Response GetSensitivitySettings(CancellationToken cancellationToken = default) + public Response Get(CancellationToken cancellationToken = default) { - using var message = CreateGetSensitivitySettingsRequest(); + using var message = CreateGetRequest(); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -179,5 +179,69 @@ public Response GetSensitivitySettings(CancellationToken throw new RequestFailedException(message.Response); } } + + internal RequestUriBuilder CreateListRequestUri() + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.Security/sensitivitySettings", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest() + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.Security/sensitivitySettings", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list with a single sensitivity settings resource. + /// The cancellation token to use. + public async Task> ListAsync(CancellationToken cancellationToken = default) + { + using var message = CreateListRequest(); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GetSensitivitySettingsListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = GetSensitivitySettingsListResponse.DeserializeGetSensitivitySettingsListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list with a single sensitivity settings resource. + /// The cancellation token to use. + public Response List(CancellationToken cancellationToken = default) + { + using var message = CreateListRequest(); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GetSensitivitySettingsListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = GetSensitivitySettingsListResponse.DeserializeGetSensitivitySettingsListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterLocationResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterLocationResource.cs index 31c74c91760f..6e793eaf1d2f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterLocationResource.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterLocationResource.cs @@ -183,75 +183,6 @@ public virtual Response GetSubscriptionSecurit return GetSubscriptionSecurityTasks().Get(taskName, cancellationToken); } - /// Gets a collection of AdaptiveApplicationControlGroupResources in the SecurityCenterLocation. - /// An object representing collection of AdaptiveApplicationControlGroupResources and their operations over a AdaptiveApplicationControlGroupResource. - public virtual AdaptiveApplicationControlGroupCollection GetAdaptiveApplicationControlGroups() - { - return GetCachedClient(client => new AdaptiveApplicationControlGroupCollection(client, Id)); - } - - /// - /// Gets an application control VM/server group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName} - /// - /// - /// Operation Id - /// AdaptiveApplicationControls_Get - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of an application control machine group. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetAdaptiveApplicationControlGroupAsync(string groupName, CancellationToken cancellationToken = default) - { - return await GetAdaptiveApplicationControlGroups().GetAsync(groupName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets an application control VM/server group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName} - /// - /// - /// Operation Id - /// AdaptiveApplicationControls_Get - /// - /// - /// Default Api Version - /// 2020-01-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of an application control machine group. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetAdaptiveApplicationControlGroup(string groupName, CancellationToken cancellationToken = default) - { - return GetAdaptiveApplicationControlGroups().Get(groupName, cancellationToken); - } - /// Gets a collection of SubscriptionSecurityAlertResources in the SecurityCenterLocation. /// An object representing collection of SubscriptionSecurityAlertResources and their operations over a SubscriptionSecurityAlertResource. public virtual SubscriptionSecurityAlertCollection GetSubscriptionSecurityAlerts() diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubOwnerCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubOwnerCollection.cs index 53399b29b568..5762050c795f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubOwnerCollection.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubOwnerCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string ownerNa /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string ownerName, Cancella /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string ownerName, CancellationToken cancell /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubOwnerResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubOwnerResource.cs index e58754f7bdb7..ae73ecfdea44 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubOwnerResource.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubOwnerResource.cs @@ -108,7 +108,7 @@ public virtual SecurityConnectorGitHubRepositoryCollection GetSecurityConnectorG /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetSecurityCo /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubRepositoryCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubRepositoryCollection.cs index 968fb5ba20dc..8a0608e81ca1 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubRepositoryCollection.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubRepositoryCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string re /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancel /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string repoName, Cancellat /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string repoName, CancellationToken cancella /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubRepositoryResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubRepositoryResource.cs index f657122c9479..b2bb9f5c2be7 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubRepositoryResource.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubRepositoryResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabGroupCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabGroupCollection.cs index fb4449b7480b..1a03f29d2bc2 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabGroupCollection.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabGroupCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -158,7 +158,7 @@ public virtual Response Get(string groupFQ /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// @@ -248,7 +248,7 @@ public virtual AsyncPageable GetGitLabSubg /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// @@ -278,7 +278,7 @@ public virtual Pageable GetGitLabSubgroups /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual async Task> ExistsAsync(string groupFQName, Cancel /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual Response Exists(string groupFQName, CancellationToken cance /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabGroupResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabGroupResource.cs index 104ba022397e..dfdd7b183e45 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabGroupResource.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabGroupResource.cs @@ -108,7 +108,7 @@ public virtual SecurityConnectorGitLabProjectCollection GetSecurityConnectorGitL /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetS /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetSecurityConne /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabProjectCollection.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabProjectCollection.cs index 5b8b5b9d5d8a..5ccedfe4f2f9 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabProjectCollection.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabProjectCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string proje /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancellat /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string projectName, Cancel /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string projectName, CancellationToken cance /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabProjectResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabProjectResource.cs index ad7dfd18d311..4756e1319ac6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabProjectResource.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabProjectResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-09-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SensitivitySettingResource.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SensitivitySettingResource.cs index a3fb4ce32dce..bed8e0484cc7 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SensitivitySettingResource.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SensitivitySettingResource.cs @@ -32,7 +32,7 @@ public static ResourceIdentifier CreateResourceIdentifier() } private readonly ClientDiagnostics _sensitivitySettingClientDiagnostics; - private readonly SecurityCenterRestOperations _sensitivitySettingRestClient; + private readonly SensitivitySettingsRestOperations _sensitivitySettingRestClient; private readonly SensitivitySettingData _data; /// Gets the resource type for the operations. @@ -59,7 +59,7 @@ internal SensitivitySettingResource(ArmClient client, ResourceIdentifier id) : b { _sensitivitySettingClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SecurityCenter", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string sensitivitySettingApiVersion); - _sensitivitySettingRestClient = new SecurityCenterRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sensitivitySettingApiVersion); + _sensitivitySettingRestClient = new SensitivitySettingsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sensitivitySettingApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -95,7 +95,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// GetSensitivitySettings + /// SensitivitySettings_Get /// /// /// Default Api Version @@ -114,7 +114,7 @@ public virtual async Task> GetAsync(Cancell scope.Start(); try { - var response = await _sensitivitySettingRestClient.GetSensitivitySettingsAsync(cancellationToken).ConfigureAwait(false); + var response = await _sensitivitySettingRestClient.GetAsync(cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new SensitivitySettingResource(Client, response.Value), response.GetRawResponse()); @@ -135,7 +135,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Operation Id - /// GetSensitivitySettings + /// SensitivitySettings_Get /// /// /// Default Api Version @@ -154,7 +154,7 @@ public virtual Response Get(CancellationToken cancel scope.Start(); try { - var response = _sensitivitySettingRestClient.GetSensitivitySettings(cancellationToken); + var response = _sensitivitySettingRestClient.Get(cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new SensitivitySettingResource(Client, response.Value), response.GetRawResponse()); @@ -167,7 +167,7 @@ public virtual Response Get(CancellationToken cancel } /// - /// Updates data sensitivity settings for sensitive data discovery + /// Create or update data sensitivity settings for sensitive data discovery /// /// /// Request Path @@ -175,7 +175,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Operation Id - /// UpdateSensitivitySettings + /// SensitivitySettings_CreateOrUpdate /// /// /// Default Api Version @@ -199,8 +199,8 @@ public virtual async Task> CreateOrUpda scope.Start(); try { - var response = await _sensitivitySettingRestClient.UpdateSensitivitySettingsAsync(content, cancellationToken).ConfigureAwait(false); - var uri = _sensitivitySettingRestClient.CreateUpdateSensitivitySettingsRequestUri(content); + var response = await _sensitivitySettingRestClient.CreateOrUpdateAsync(content, cancellationToken).ConfigureAwait(false); + var uri = _sensitivitySettingRestClient.CreateCreateOrUpdateRequestUri(content); var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); var operation = new SecurityCenterArmOperation(Response.FromValue(new SensitivitySettingResource(Client, response), response.GetRawResponse()), rehydrationToken); if (waitUntil == WaitUntil.Completed) @@ -215,7 +215,7 @@ public virtual async Task> CreateOrUpda } /// - /// Updates data sensitivity settings for sensitive data discovery + /// Create or update data sensitivity settings for sensitive data discovery /// /// /// Request Path @@ -223,7 +223,7 @@ public virtual async Task> CreateOrUpda /// /// /// Operation Id - /// UpdateSensitivitySettings + /// SensitivitySettings_CreateOrUpdate /// /// /// Default Api Version @@ -247,8 +247,8 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil scope.Start(); try { - var response = _sensitivitySettingRestClient.UpdateSensitivitySettings(content, cancellationToken); - var uri = _sensitivitySettingRestClient.CreateUpdateSensitivitySettingsRequestUri(content); + var response = _sensitivitySettingRestClient.CreateOrUpdate(content, cancellationToken); + var uri = _sensitivitySettingRestClient.CreateCreateOrUpdateRequestUri(content); var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); var operation = new SecurityCenterArmOperation(Response.FromValue(new SensitivitySettingResource(Client, response), response.GetRawResponse()), rehydrationToken); if (waitUntil == WaitUntil.Completed) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/autorest.md b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/autorest.md index a897795fec59..9499198ba126 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/autorest.md +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: SecurityCenter namespace: Azure.ResourceManager.SecurityCenter -require: https://github.com/Azure/azure-rest-api-specs/blob/6c4497e6b0aaad8127f2dd50fa8a29aaf68f24e6/specification/security/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/security/resource-manager/readme.md tag: package-dotnet-sdk output-folder: $(this-folder)/Generated clear-output-folder: true