diff --git a/sdk/security/azure-resourcemanager-security/CHANGELOG.md b/sdk/security/azure-resourcemanager-security/CHANGELOG.md
index 64cd1ddaaaf2..4335d3c58ae1 100644
--- a/sdk/security/azure-resourcemanager-security/CHANGELOG.md
+++ b/sdk/security/azure-resourcemanager-security/CHANGELOG.md
@@ -1,6 +1,8 @@
# Release History
-## 1.0.0-beta.5 (Unreleased)
+## 1.0.0-beta.1 (2023-04-03)
+
+- Azure Resource Manager Security client library for Java. This package contains Microsoft Azure SDK for Security Management SDK. API spec for Microsoft.Security (Azure Security Center) resource provider. Package tag package-composite-v3. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Features Added
diff --git a/sdk/security/azure-resourcemanager-security/README.md b/sdk/security/azure-resourcemanager-security/README.md
index d5a2f20c8a87..960b33cd33f3 100644
--- a/sdk/security/azure-resourcemanager-security/README.md
+++ b/sdk/security/azure-resourcemanager-security/README.md
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-security
- 1.0.0-beta.4
+ 1.0.0-beta.5
```
[//]: # ({x-version-update-end})
diff --git a/sdk/security/azure-resourcemanager-security/SAMPLE.md b/sdk/security/azure-resourcemanager-security/SAMPLE.md
index 8165f46c2fac..3972495626d9 100644
--- a/sdk/security/azure-resourcemanager-security/SAMPLE.md
+++ b/sdk/security/azure-resourcemanager-security/SAMPLE.md
@@ -303,6 +303,13 @@
- [Get](#securitycontacts_get)
- [List](#securitycontacts_list)
+## SecurityOperators
+
+- [CreateOrUpdate](#securityoperators_createorupdate)
+- [Delete](#securityoperators_delete)
+- [Get](#securityoperators_get)
+- [List](#securityoperators_list)
+
## SecuritySolutions
- [Get](#securitysolutions_get)
@@ -4525,14 +4532,66 @@ public final class MdeOnboardingsListSamples {
/** Samples for Pricings Get. */
public final class PricingsGetSamples {
/*
- * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-03-01/examples/Pricings/GetPricingByName_example.json
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-01-01/examples/Pricings/GetPricingByNameCloudPosture_example.json
*/
/**
- * Sample code: Get pricings on subscription.
+ * Sample code: Get pricings on subscription - CloudPosture plan.
*
* @param manager Entry point to SecurityManager.
*/
- public static void getPricingsOnSubscription(com.azure.resourcemanager.security.SecurityManager manager) {
+ public static void getPricingsOnSubscriptionCloudPosturePlan(
+ com.azure.resourcemanager.security.SecurityManager manager) {
+ manager.pricings().getWithResponse("CloudPosture", com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-01-01/examples/Pricings/GetPricingByNameDns_example.json
+ */
+ /**
+ * Sample code: Get pricings on subscription - Dns plan.
+ *
+ * @param manager Entry point to SecurityManager.
+ */
+ public static void getPricingsOnSubscriptionDnsPlan(com.azure.resourcemanager.security.SecurityManager manager) {
+ manager.pricings().getWithResponse("Dns", com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-01-01/examples/Pricings/GetPricingByNameContainers_example.json
+ */
+ /**
+ * Sample code: Get pricings on subscription - Containers plan.
+ *
+ * @param manager Entry point to SecurityManager.
+ */
+ public static void getPricingsOnSubscriptionContainersPlan(
+ com.azure.resourcemanager.security.SecurityManager manager) {
+ manager.pricings().getWithResponse("Containers", com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-01-01/examples/Pricings/GetPricingByNameStorageAccounts_example.json
+ */
+ /**
+ * Sample code: Get pricings on subscription - StorageAccounts plan.
+ *
+ * @param manager Entry point to SecurityManager.
+ */
+ public static void getPricingsOnSubscriptionStorageAccountsPlan(
+ com.azure.resourcemanager.security.SecurityManager manager) {
+ manager.pricings().getWithResponse("StorageAccounts", com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-01-01/examples/Pricings/GetPricingByNameVirtualMachines_example.json
+ */
+ /**
+ * Sample code: Get pricings on subscription - VirtualMachines plan.
+ *
+ * @param manager Entry point to SecurityManager.
+ */
+ public static void getPricingsOnSubscriptionVirtualMachinesPlan(
+ com.azure.resourcemanager.security.SecurityManager manager) {
manager.pricings().getWithResponse("VirtualMachines", com.azure.core.util.Context.NONE);
}
}
@@ -4544,7 +4603,7 @@ public final class PricingsGetSamples {
/** Samples for Pricings List. */
public final class PricingsListSamples {
/*
- * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-03-01/examples/Pricings/ListPricings_example.json
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-01-01/examples/Pricings/ListPricings_example.json
*/
/**
* Sample code: Get pricings on subscription.
@@ -4566,7 +4625,25 @@ import com.azure.resourcemanager.security.models.PricingTier;
/** Samples for Pricings Update. */
public final class PricingsUpdateSamples {
/*
- * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-03-01/examples/Pricings/PutPricingByName_example.json
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-01-01/examples/Pricings/PutPricingByNamePartialSuccess_example.json
+ */
+ /**
+ * Sample code: Update pricing on subscription - partial success.
+ *
+ * @param manager Entry point to SecurityManager.
+ */
+ public static void updatePricingOnSubscriptionPartialSuccess(
+ com.azure.resourcemanager.security.SecurityManager manager) {
+ manager
+ .pricings()
+ .updateWithResponse(
+ "CloudPosture",
+ new PricingInner().withPricingTier(PricingTier.STANDARD),
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-01-01/examples/Pricings/PutPricingByName_example.json
*/
/**
* Sample code: Update pricing on subscription.
@@ -4577,8 +4654,8 @@ public final class PricingsUpdateSamples {
manager
.pricings()
.updateWithResponse(
- "VirtualMachines",
- new PricingInner().withPricingTier(PricingTier.STANDARD).withSubPlan("P2"),
+ "CloudPosture",
+ new PricingInner().withPricingTier(PricingTier.STANDARD),
com.azure.core.util.Context.NONE);
}
}
@@ -4974,7 +5051,7 @@ import java.util.Map;
/** Samples for SecurityConnectors CreateOrUpdate. */
public final class SecurityConnectorsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-08-01-preview/examples/SecurityConnectors/PutSecurityConnector_example.json
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-03-01-preview/examples/SecurityConnectors/PutSecurityConnector_example.json
*/
/**
* Sample code: Create or update a security connector.
@@ -5020,7 +5097,7 @@ public final class SecurityConnectorsCreateOrUpdateSamples {
/** Samples for SecurityConnectors Delete. */
public final class SecurityConnectorsDeleteSamples {
/*
- * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-08-01-preview/examples/SecurityConnectors/DeleteSecurityConnector_example.json
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-03-01-preview/examples/SecurityConnectors/DeleteSecurityConnector_example.json
*/
/**
* Sample code: Delete a security connector.
@@ -5041,7 +5118,7 @@ public final class SecurityConnectorsDeleteSamples {
/** Samples for SecurityConnectors GetByResourceGroup. */
public final class SecurityConnectorsGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-08-01-preview/examples/SecurityConnectors/GetSecurityConnectorSingleResource_example.json
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-03-01-preview/examples/SecurityConnectors/GetSecurityConnectorSingleResource_example.json
*/
/**
* Sample code: Retrieve a security connector.
@@ -5063,7 +5140,7 @@ public final class SecurityConnectorsGetByResourceGroupSamples {
/** Samples for SecurityConnectors List. */
public final class SecurityConnectorsListSamples {
/*
- * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-08-01-preview/examples/SecurityConnectors/GetSecurityConnectorsSubscription_example.json
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-03-01-preview/examples/SecurityConnectors/GetSecurityConnectorsSubscription_example.json
*/
/**
* Sample code: List all security connectors of a specified subscription.
@@ -5083,7 +5160,7 @@ public final class SecurityConnectorsListSamples {
/** Samples for SecurityConnectors ListByResourceGroup. */
public final class SecurityConnectorsListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-08-01-preview/examples/SecurityConnectors/GetSecurityConnectorsResourceGroup_example.json
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-03-01-preview/examples/SecurityConnectors/GetSecurityConnectorsResourceGroup_example.json
*/
/**
* Sample code: List all security connectors of a specified resource group.
@@ -5112,7 +5189,7 @@ import java.util.Map;
/** Samples for SecurityConnectors Update. */
public final class SecurityConnectorsUpdateSamples {
/*
- * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-08-01-preview/examples/SecurityConnectors/PatchSecurityConnector_example.json
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-03-01-preview/examples/SecurityConnectors/PatchSecurityConnector_example.json
*/
/**
* Sample code: Update a security connector.
@@ -5251,6 +5328,93 @@ public final class SecurityContactsListSamples {
}
```
+### SecurityOperators_CreateOrUpdate
+
+```java
+/** Samples for SecurityOperators CreateOrUpdate. */
+public final class SecurityOperatorsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-01-01-preview/examples/SecurityOperators/PutSecurityOperatorByName_example.json
+ */
+ /**
+ * Sample code: Create a security operator on the given scope.
+ *
+ * @param manager Entry point to SecurityManager.
+ */
+ public static void createASecurityOperatorOnTheGivenScope(
+ com.azure.resourcemanager.security.SecurityManager manager) {
+ manager
+ .securityOperators()
+ .createOrUpdateWithResponse(
+ "CloudPosture", "DefenderCSPMSecurityOperator", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SecurityOperators_Delete
+
+```java
+/** Samples for SecurityOperators Delete. */
+public final class SecurityOperatorsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-01-01-preview/examples/SecurityOperators/DeleteSecurityOperatorByName_example.json
+ */
+ /**
+ * Sample code: Delete SecurityOperator on subscription.
+ *
+ * @param manager Entry point to SecurityManager.
+ */
+ public static void deleteSecurityOperatorOnSubscription(
+ com.azure.resourcemanager.security.SecurityManager manager) {
+ manager
+ .securityOperators()
+ .deleteByResourceGroupWithResponse(
+ "CloudPosture", "DefenderCSPMSecurityOperator", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SecurityOperators_Get
+
+```java
+/** Samples for SecurityOperators Get. */
+public final class SecurityOperatorsGetSamples {
+ /*
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-01-01-preview/examples/SecurityOperators/GetSecurityOperatorByName_example.json
+ */
+ /**
+ * Sample code: Get a specific security operator by scope and securityOperatorName.
+ *
+ * @param manager Entry point to SecurityManager.
+ */
+ public static void getASpecificSecurityOperatorByScopeAndSecurityOperatorName(
+ com.azure.resourcemanager.security.SecurityManager manager) {
+ manager
+ .securityOperators()
+ .getWithResponse("CloudPosture", "DefenderCSPMSecurityOperator", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SecurityOperators_List
+
+```java
+/** Samples for SecurityOperators List. */
+public final class SecurityOperatorsListSamples {
+ /*
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-01-01-preview/examples/SecurityOperators/ListSecurityOperators_example.json
+ */
+ /**
+ * Sample code: List SecurityOperators.
+ *
+ * @param manager Entry point to SecurityManager.
+ */
+ public static void listSecurityOperators(com.azure.resourcemanager.security.SecurityManager manager) {
+ manager.securityOperators().listWithResponse("CloudPosture", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### SecuritySolutions_Get
```java
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/SecurityManager.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/SecurityManager.java
index 439e175bfbed..8a9f67c76387 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/SecurityManager.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/SecurityManager.java
@@ -73,6 +73,7 @@
import com.azure.resourcemanager.security.implementation.SecurityConnectorApplicationsImpl;
import com.azure.resourcemanager.security.implementation.SecurityConnectorsImpl;
import com.azure.resourcemanager.security.implementation.SecurityContactsImpl;
+import com.azure.resourcemanager.security.implementation.SecurityOperatorsImpl;
import com.azure.resourcemanager.security.implementation.SecuritySolutionsImpl;
import com.azure.resourcemanager.security.implementation.SecuritySolutionsReferenceDatasImpl;
import com.azure.resourcemanager.security.implementation.ServerVulnerabilityAssessmentsImpl;
@@ -133,6 +134,7 @@
import com.azure.resourcemanager.security.models.SecurityConnectorApplications;
import com.azure.resourcemanager.security.models.SecurityConnectors;
import com.azure.resourcemanager.security.models.SecurityContacts;
+import com.azure.resourcemanager.security.models.SecurityOperators;
import com.azure.resourcemanager.security.models.SecuritySolutions;
import com.azure.resourcemanager.security.models.SecuritySolutionsReferenceDatas;
import com.azure.resourcemanager.security.models.ServerVulnerabilityAssessments;
@@ -244,8 +246,6 @@ public final class SecurityManager {
private SoftwareInventories softwareInventories;
- private SecurityConnectors securityConnectors;
-
private GovernanceRules governanceRules;
private GovernanceAssignments governanceAssignments;
@@ -274,6 +274,10 @@ public final class SecurityManager {
private SqlVulnerabilityAssessmentBaselineRules sqlVulnerabilityAssessmentBaselineRules;
+ private SecurityConnectors securityConnectors;
+
+ private SecurityOperators securityOperators;
+
private final SecurityCenter clientObject;
private SecurityManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
@@ -439,7 +443,7 @@ public SecurityManager authenticate(TokenCredential credential, AzureProfile pro
.append("-")
.append("com.azure.resourcemanager.security")
.append("/")
- .append("1.0.0-beta.4");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -1058,18 +1062,6 @@ public SoftwareInventories softwareInventories() {
return softwareInventories;
}
- /**
- * Gets the resource collection API of SecurityConnectors. It manages SecurityConnector.
- *
- * @return Resource collection API of SecurityConnectors.
- */
- public SecurityConnectors securityConnectors() {
- if (this.securityConnectors == null) {
- this.securityConnectors = new SecurityConnectorsImpl(clientObject.getSecurityConnectors(), this);
- }
- return securityConnectors;
- }
-
/**
* Gets the resource collection API of GovernanceRules. It manages GovernanceRule.
*
@@ -1249,6 +1241,30 @@ public SqlVulnerabilityAssessmentBaselineRules sqlVulnerabilityAssessmentBaselin
return sqlVulnerabilityAssessmentBaselineRules;
}
+ /**
+ * Gets the resource collection API of SecurityConnectors. It manages SecurityConnector.
+ *
+ * @return Resource collection API of SecurityConnectors.
+ */
+ public SecurityConnectors securityConnectors() {
+ if (this.securityConnectors == null) {
+ this.securityConnectors = new SecurityConnectorsImpl(clientObject.getSecurityConnectors(), this);
+ }
+ return securityConnectors;
+ }
+
+ /**
+ * Gets the resource collection API of SecurityOperators.
+ *
+ * @return Resource collection API of SecurityOperators.
+ */
+ public SecurityOperators securityOperators() {
+ if (this.securityOperators == null) {
+ this.securityOperators = new SecurityOperatorsImpl(clientObject.getSecurityOperators(), this);
+ }
+ return securityOperators;
+ }
+
/**
* @return Wrapped service client SecurityCenter providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/PricingsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/PricingsClient.java
index 7179613a2b17..fefcef79c849 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/PricingsClient.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/PricingsClient.java
@@ -70,8 +70,8 @@ public interface PricingsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard, with the standard tier
- * available with a trial period along with {@link Response}.
+ * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard along with {@link
+ * Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response updateWithResponse(String pricingName, PricingInner pricing, Context context);
@@ -84,8 +84,7 @@ public interface PricingsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard, with the standard tier
- * available with a trial period.
+ * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
PricingInner update(String pricingName, PricingInner pricing);
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityCenter.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityCenter.java
index 705fefe02cb5..3632a9b91815 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityCenter.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityCenter.java
@@ -352,13 +352,6 @@ public interface SecurityCenter {
*/
SoftwareInventoriesClient getSoftwareInventories();
- /**
- * Gets the SecurityConnectorsClient object to access its operations.
- *
- * @return the SecurityConnectorsClient object.
- */
- SecurityConnectorsClient getSecurityConnectors();
-
/**
* Gets the GovernanceRulesClient object to access its operations.
*
@@ -456,4 +449,18 @@ public interface SecurityCenter {
* @return the SqlVulnerabilityAssessmentBaselineRulesClient object.
*/
SqlVulnerabilityAssessmentBaselineRulesClient getSqlVulnerabilityAssessmentBaselineRules();
+
+ /**
+ * Gets the SecurityConnectorsClient object to access its operations.
+ *
+ * @return the SecurityConnectorsClient object.
+ */
+ SecurityConnectorsClient getSecurityConnectors();
+
+ /**
+ * Gets the SecurityOperatorsClient object to access its operations.
+ *
+ * @return the SecurityOperatorsClient object.
+ */
+ SecurityOperatorsClient getSecurityOperators();
}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityOperatorsClient.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityOperatorsClient.java
new file mode 100644
index 000000000000..bd785ec861db
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecurityOperatorsClient.java
@@ -0,0 +1,121 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.security.fluent.models.SecurityOperatorInner;
+import com.azure.resourcemanager.security.fluent.models.SecurityOperatorListInner;
+
+/** An instance of this class provides access to all the operations defined in SecurityOperatorsClient. */
+public interface SecurityOperatorsClient {
+ /**
+ * Lists Microsoft Defender for Cloud securityOperators in the subscription.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of SecurityOperator response along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listWithResponse(String pricingName, Context context);
+
+ /**
+ * Lists Microsoft Defender for Cloud securityOperators in the subscription.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of SecurityOperator response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SecurityOperatorListInner list(String pricingName);
+
+ /**
+ * Get a specific security operator for the requested scope.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a specific security operator for the requested scope along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String pricingName, String securityOperatorName, Context context);
+
+ /**
+ * Get a specific security operator for the requested scope.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a specific security operator for the requested scope.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SecurityOperatorInner get(String pricingName, String securityOperatorName);
+
+ /**
+ * Creates Microsoft Defender for Cloud security operator on the given scope.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return security operator under a given subscription and pricing along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String pricingName, String securityOperatorName, Context context);
+
+ /**
+ * Creates Microsoft Defender for Cloud security operator on the given scope.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return security operator under a given subscription and pricing.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SecurityOperatorInner createOrUpdate(String pricingName, String securityOperatorName);
+
+ /**
+ * Delete Microsoft Defender for Cloud securityOperator in the subscription.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String pricingName, String securityOperatorName, Context context);
+
+ /**
+ * Delete Microsoft Defender for Cloud securityOperator in the subscription.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String pricingName, String securityOperatorName);
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/PricingInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/PricingInner.java
index 979f5106ad8a..99e866421998 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/PricingInner.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/PricingInner.java
@@ -6,15 +6,16 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
+import com.azure.resourcemanager.security.models.Extension;
import com.azure.resourcemanager.security.models.PricingTier;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.Duration;
+import java.time.OffsetDateTime;
import java.util.List;
/**
- * Microsoft Defender for Cloud is provided in two pricing tiers: free and standard, with the standard tier available
- * with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic
- * security features.
+ * 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.
*/
@Fluent
public final class PricingInner extends ProxyResource {
@@ -39,8 +40,8 @@ private PricingProperties innerProperties() {
/**
* Get the pricingTier property: The pricing tier value. Microsoft Defender for Cloud is provided in two pricing
- * tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced
- * security capabilities, while the free tier offers basic security features.
+ * tiers: free and standard. The standard tier offers advanced security capabilities, while the free tier offers
+ * basic security features.
*
* @return the pricingTier value.
*/
@@ -50,8 +51,8 @@ public PricingTier pricingTier() {
/**
* Set the pricingTier property: The pricing tier value. Microsoft Defender for Cloud is provided in two pricing
- * tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced
- * security capabilities, while the free tier offers basic security features.
+ * tiers: free and standard. The standard tier offers advanced security capabilities, while the free tier offers
+ * basic security features.
*
* @param pricingTier the pricingTier value to set.
* @return the PricingInner object itself.
@@ -99,6 +100,16 @@ public Duration freeTrialRemainingTime() {
return this.innerProperties() == null ? null : this.innerProperties().freeTrialRemainingTime();
}
+ /**
+ * Get the enablementTime property: 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).
+ *
+ * @return the enablementTime value.
+ */
+ public OffsetDateTime enablementTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().enablementTime();
+ }
+
/**
* Get the deprecated property: Optional. True if the plan is deprecated. If there are replacing plans they will
* appear in `replacedBy` property.
@@ -119,6 +130,29 @@ public List replacedBy() {
return this.innerProperties() == null ? null : this.innerProperties().replacedBy();
}
+ /**
+ * Get the extensions property: Optional. List of extensions offered under a plan.
+ *
+ * @return the extensions value.
+ */
+ public List extensions() {
+ return this.innerProperties() == null ? null : this.innerProperties().extensions();
+ }
+
+ /**
+ * Set the extensions property: Optional. List of extensions offered under a plan.
+ *
+ * @param extensions the extensions value to set.
+ * @return the PricingInner object itself.
+ */
+ public PricingInner withExtensions(List extensions) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PricingProperties();
+ }
+ this.innerProperties().withExtensions(extensions);
+ return this;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/PricingProperties.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/PricingProperties.java
index dcf5d895914a..681894d02f72 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/PricingProperties.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/PricingProperties.java
@@ -6,18 +6,19 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.security.models.Extension;
import com.azure.resourcemanager.security.models.PricingTier;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.Duration;
+import java.time.OffsetDateTime;
import java.util.List;
/** Pricing properties for the relevant scope. */
@Fluent
public final class PricingProperties {
/*
- * The pricing tier value. Microsoft Defender for Cloud is provided in two pricing tiers: free and standard, with
- * the standard tier available with a trial period. The standard tier offers advanced security capabilities, while
- * the free tier offers basic security features.
+ * 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.
*/
@JsonProperty(value = "pricingTier", required = true)
private PricingTier pricingTier;
@@ -35,6 +36,13 @@ public final class PricingProperties {
@JsonProperty(value = "freeTrialRemainingTime", access = JsonProperty.Access.WRITE_ONLY)
private Duration freeTrialRemainingTime;
+ /*
+ * 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).
+ */
+ @JsonProperty(value = "enablementTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime enablementTime;
+
/*
* Optional. True if the plan is deprecated. If there are replacing plans they will appear in `replacedBy` property
*/
@@ -47,14 +55,20 @@ public final class PricingProperties {
@JsonProperty(value = "replacedBy", access = JsonProperty.Access.WRITE_ONLY)
private List replacedBy;
+ /*
+ * Optional. List of extensions offered under a plan.
+ */
+ @JsonProperty(value = "extensions")
+ private List extensions;
+
/** Creates an instance of PricingProperties class. */
public PricingProperties() {
}
/**
* Get the pricingTier property: The pricing tier value. Microsoft Defender for Cloud is provided in two pricing
- * tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced
- * security capabilities, while the free tier offers basic security features.
+ * tiers: free and standard. The standard tier offers advanced security capabilities, while the free tier offers
+ * basic security features.
*
* @return the pricingTier value.
*/
@@ -64,8 +78,8 @@ public PricingTier pricingTier() {
/**
* Set the pricingTier property: The pricing tier value. Microsoft Defender for Cloud is provided in two pricing
- * tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced
- * security capabilities, while the free tier offers basic security features.
+ * tiers: free and standard. The standard tier offers advanced security capabilities, while the free tier offers
+ * basic security features.
*
* @param pricingTier the pricingTier value to set.
* @return the PricingProperties object itself.
@@ -107,6 +121,16 @@ public Duration freeTrialRemainingTime() {
return this.freeTrialRemainingTime;
}
+ /**
+ * Get the enablementTime property: 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).
+ *
+ * @return the enablementTime value.
+ */
+ public OffsetDateTime enablementTime() {
+ return this.enablementTime;
+ }
+
/**
* Get the deprecated property: Optional. True if the plan is deprecated. If there are replacing plans they will
* appear in `replacedBy` property.
@@ -127,6 +151,26 @@ public List replacedBy() {
return this.replacedBy;
}
+ /**
+ * Get the extensions property: Optional. List of extensions offered under a plan.
+ *
+ * @return the extensions value.
+ */
+ public List extensions() {
+ return this.extensions;
+ }
+
+ /**
+ * Set the extensions property: Optional. List of extensions offered under a plan.
+ *
+ * @param extensions the extensions value to set.
+ * @return the PricingProperties object itself.
+ */
+ public PricingProperties withExtensions(List extensions) {
+ this.extensions = extensions;
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -138,6 +182,9 @@ public void validate() {
.logExceptionAsError(
new IllegalArgumentException("Missing required property pricingTier in model PricingProperties"));
}
+ if (extensions() != null) {
+ extensions().forEach(e -> e.validate());
+ }
}
private static final ClientLogger LOGGER = new ClientLogger(PricingProperties.class);
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityOperatorInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityOperatorInner.java
new file mode 100644
index 000000000000..74c332b17887
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityOperatorInner.java
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.resourcemanager.security.models.Identity;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Security operator under a given subscription and pricing. */
+@Fluent
+public final class SecurityOperatorInner extends ProxyResource {
+ /*
+ * Identity for the resource.
+ */
+ @JsonProperty(value = "identity")
+ private Identity identity;
+
+ /** Creates an instance of SecurityOperatorInner class. */
+ public SecurityOperatorInner() {
+ }
+
+ /**
+ * Get the identity property: Identity for the resource.
+ *
+ * @return the identity value.
+ */
+ public Identity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: Identity for the resource.
+ *
+ * @param identity the identity value to set.
+ * @return the SecurityOperatorInner object itself.
+ */
+ public SecurityOperatorInner withIdentity(Identity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (identity() != null) {
+ identity().validate();
+ }
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityOperatorListInner.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityOperatorListInner.java
new file mode 100644
index 000000000000..de1c00d24b3b
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/SecurityOperatorListInner.java
@@ -0,0 +1,61 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** List of SecurityOperator response. */
+@Fluent
+public final class SecurityOperatorListInner {
+ /*
+ * List of SecurityOperator configurations
+ */
+ @JsonProperty(value = "value", required = true)
+ private List value;
+
+ /** Creates an instance of SecurityOperatorListInner class. */
+ public SecurityOperatorListInner() {
+ }
+
+ /**
+ * Get the value property: List of SecurityOperator configurations.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: List of SecurityOperator configurations.
+ *
+ * @param value the value value to set.
+ * @return the SecurityOperatorListInner object itself.
+ */
+ public SecurityOperatorListInner withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property value in model SecurityOperatorListInner"));
+ } else {
+ value().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(SecurityOperatorListInner.class);
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PricingImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PricingImpl.java
index ad59075987ba..46e348a6d463 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PricingImpl.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PricingImpl.java
@@ -5,9 +5,11 @@
package com.azure.resourcemanager.security.implementation;
import com.azure.resourcemanager.security.fluent.models.PricingInner;
+import com.azure.resourcemanager.security.models.Extension;
import com.azure.resourcemanager.security.models.Pricing;
import com.azure.resourcemanager.security.models.PricingTier;
import java.time.Duration;
+import java.time.OffsetDateTime;
import java.util.Collections;
import java.util.List;
@@ -45,6 +47,10 @@ public Duration freeTrialRemainingTime() {
return this.innerModel().freeTrialRemainingTime();
}
+ public OffsetDateTime enablementTime() {
+ return this.innerModel().enablementTime();
+ }
+
public Boolean deprecated() {
return this.innerModel().deprecated();
}
@@ -58,6 +64,15 @@ public List replacedBy() {
}
}
+ public List extensions() {
+ List inner = this.innerModel().extensions();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
public PricingInner innerModel() {
return this.innerObject;
}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PricingsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PricingsClientImpl.java
index befe2ff74281..d1e7fb2693c0 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PricingsClientImpl.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/PricingsClientImpl.java
@@ -112,7 +112,7 @@ private Mono> listWithResponseAsync() {
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2022-03-01";
+ final String apiVersion = "2023-01-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -146,7 +146,7 @@ private Mono> listWithResponseAsync(Context context)
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2022-03-01";
+ final String apiVersion = "2023-01-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context);
@@ -217,7 +217,7 @@ private Mono> getWithResponseAsync(String pricingName) {
if (pricingName == null) {
return Mono.error(new IllegalArgumentException("Parameter pricingName is required and cannot be null."));
}
- final String apiVersion = "2022-03-01";
+ final String apiVersion = "2023-01-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -261,7 +261,7 @@ private Mono> getWithResponseAsync(String pricingName, Co
if (pricingName == null) {
return Mono.error(new IllegalArgumentException("Parameter pricingName is required and cannot be null."));
}
- final String apiVersion = "2022-03-01";
+ final String apiVersion = "2023-01-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -321,8 +321,8 @@ public PricingInner get(String pricingName) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard, with the standard tier
- * available with a trial period along with {@link Response} on successful completion of {@link Mono}.
+ * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard along with {@link
+ * Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> updateWithResponseAsync(String pricingName, PricingInner pricing) {
@@ -346,7 +346,7 @@ private Mono> updateWithResponseAsync(String pricingName,
} else {
pricing.validate();
}
- final String apiVersion = "2022-03-01";
+ final String apiVersion = "2023-01-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -372,8 +372,8 @@ private Mono> updateWithResponseAsync(String pricingName,
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard, with the standard tier
- * available with a trial period along with {@link Response} on successful completion of {@link Mono}.
+ * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard along with {@link
+ * Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> updateWithResponseAsync(
@@ -398,7 +398,7 @@ private Mono> updateWithResponseAsync(
} else {
pricing.validate();
}
- final String apiVersion = "2022-03-01";
+ final String apiVersion = "2023-01-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -420,8 +420,8 @@ private Mono> updateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard, with the standard tier
- * available with a trial period on successful completion of {@link Mono}.
+ * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(String pricingName, PricingInner pricing) {
@@ -437,8 +437,8 @@ private Mono updateAsync(String pricingName, PricingInner pricing)
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard, with the standard tier
- * available with a trial period along with {@link Response}.
+ * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard along with {@link
+ * Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response updateWithResponse(String pricingName, PricingInner pricing, Context context) {
@@ -453,8 +453,7 @@ public Response updateWithResponse(String pricingName, PricingInne
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard, with the standard tier
- * available with a trial period.
+ * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public PricingInner update(String pricingName, PricingInner pricing) {
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityCenterImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityCenterImpl.java
index c9277a64c04f..2f43f2f9a553 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityCenterImpl.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityCenterImpl.java
@@ -71,6 +71,7 @@
import com.azure.resourcemanager.security.fluent.SecurityConnectorApplicationsClient;
import com.azure.resourcemanager.security.fluent.SecurityConnectorsClient;
import com.azure.resourcemanager.security.fluent.SecurityContactsClient;
+import com.azure.resourcemanager.security.fluent.SecurityOperatorsClient;
import com.azure.resourcemanager.security.fluent.SecuritySolutionsClient;
import com.azure.resourcemanager.security.fluent.SecuritySolutionsReferenceDatasClient;
import com.azure.resourcemanager.security.fluent.ServerVulnerabilityAssessmentsClient;
@@ -695,18 +696,6 @@ public SoftwareInventoriesClient getSoftwareInventories() {
return this.softwareInventories;
}
- /** The SecurityConnectorsClient object to access its operations. */
- private final SecurityConnectorsClient securityConnectors;
-
- /**
- * Gets the SecurityConnectorsClient object to access its operations.
- *
- * @return the SecurityConnectorsClient object.
- */
- public SecurityConnectorsClient getSecurityConnectors() {
- return this.securityConnectors;
- }
-
/** The GovernanceRulesClient object to access its operations. */
private final GovernanceRulesClient governanceRules;
@@ -875,6 +864,30 @@ public SqlVulnerabilityAssessmentBaselineRulesClient getSqlVulnerabilityAssessme
return this.sqlVulnerabilityAssessmentBaselineRules;
}
+ /** The SecurityConnectorsClient object to access its operations. */
+ private final SecurityConnectorsClient securityConnectors;
+
+ /**
+ * Gets the SecurityConnectorsClient object to access its operations.
+ *
+ * @return the SecurityConnectorsClient object.
+ */
+ public SecurityConnectorsClient getSecurityConnectors() {
+ return this.securityConnectors;
+ }
+
+ /** The SecurityOperatorsClient object to access its operations. */
+ private final SecurityOperatorsClient securityOperators;
+
+ /**
+ * Gets the SecurityOperatorsClient object to access its operations.
+ *
+ * @return the SecurityOperatorsClient object.
+ */
+ public SecurityOperatorsClient getSecurityOperators() {
+ return this.securityOperators;
+ }
+
/**
* Initializes an instance of SecurityCenter client.
*
@@ -944,7 +957,6 @@ public SqlVulnerabilityAssessmentBaselineRulesClient getSqlVulnerabilityAssessme
this.settings = new SettingsClientImpl(this);
this.ingestionSettings = new IngestionSettingsClientImpl(this);
this.softwareInventories = new SoftwareInventoriesClientImpl(this);
- this.securityConnectors = new SecurityConnectorsClientImpl(this);
this.governanceRules = new GovernanceRulesClientImpl(this);
this.governanceAssignments = new GovernanceAssignmentsClientImpl(this);
this.applications = new ApplicationsClientImpl(this);
@@ -959,6 +971,8 @@ public SqlVulnerabilityAssessmentBaselineRulesClient getSqlVulnerabilityAssessme
this.sqlVulnerabilityAssessmentScans = new SqlVulnerabilityAssessmentScansClientImpl(this);
this.sqlVulnerabilityAssessmentScanResults = new SqlVulnerabilityAssessmentScanResultsClientImpl(this);
this.sqlVulnerabilityAssessmentBaselineRules = new SqlVulnerabilityAssessmentBaselineRulesClientImpl(this);
+ this.securityConnectors = new SecurityConnectorsClientImpl(this);
+ this.securityOperators = new SecurityOperatorsClientImpl(this);
}
/**
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorsClientImpl.java
index 4512b90537ab..2092e42d6eb4 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorsClientImpl.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityConnectorsClientImpl.java
@@ -186,7 +186,7 @@ private Mono> listSinglePageAsync() {
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2022-08-01-preview";
+ final String apiVersion = "2023-03-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -230,7 +230,7 @@ private Mono> listSinglePageAsync(Context
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2022-08-01-preview";
+ final String apiVersion = "2023-03-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -333,7 +333,7 @@ private Mono> listByResourceGroupSinglePag
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
- final String apiVersion = "2022-08-01-preview";
+ final String apiVersion = "2023-03-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -390,7 +390,7 @@ private Mono> listByResourceGroupSinglePag
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
- final String apiVersion = "2022-08-01-preview";
+ final String apiVersion = "2023-03-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -516,7 +516,7 @@ private Mono> getByResourceGroupWithResponseAsy
return Mono
.error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null."));
}
- final String apiVersion = "2022-08-01-preview";
+ final String apiVersion = "2023-03-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -568,7 +568,7 @@ private Mono> getByResourceGroupWithResponseAsy
return Mono
.error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null."));
}
- final String apiVersion = "2022-08-01-preview";
+ final String apiVersion = "2023-03-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -676,7 +676,7 @@ private Mono> createOrUpdateWithResponseAsync(
} else {
securityConnector.validate();
}
- final String apiVersion = "2022-08-01-preview";
+ final String apiVersion = "2023-03-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -740,7 +740,7 @@ private Mono> createOrUpdateWithResponseAsync(
} else {
securityConnector.validate();
}
- final String apiVersion = "2022-08-01-preview";
+ final String apiVersion = "2023-03-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -860,7 +860,7 @@ private Mono> updateWithResponseAsync(
} else {
securityConnector.validate();
}
- final String apiVersion = "2022-08-01-preview";
+ final String apiVersion = "2023-03-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -923,7 +923,7 @@ private Mono> updateWithResponseAsync(
} else {
securityConnector.validate();
}
- final String apiVersion = "2022-08-01-preview";
+ final String apiVersion = "2023-03-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1030,7 +1030,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S
return Mono
.error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null."));
}
- final String apiVersion = "2022-08-01-preview";
+ final String apiVersion = "2023-03-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1082,7 +1082,7 @@ private Mono> deleteWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null."));
}
- final String apiVersion = "2022-08-01-preview";
+ final String apiVersion = "2023-03-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorImpl.java
new file mode 100644
index 000000000000..3564896ce8d3
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorImpl.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.implementation;
+
+import com.azure.resourcemanager.security.fluent.models.SecurityOperatorInner;
+import com.azure.resourcemanager.security.models.Identity;
+import com.azure.resourcemanager.security.models.SecurityOperator;
+
+public final class SecurityOperatorImpl implements SecurityOperator {
+ private SecurityOperatorInner innerObject;
+
+ private final com.azure.resourcemanager.security.SecurityManager serviceManager;
+
+ SecurityOperatorImpl(
+ SecurityOperatorInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public Identity identity() {
+ return this.innerModel().identity();
+ }
+
+ public SecurityOperatorInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.security.SecurityManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorListImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorListImpl.java
new file mode 100644
index 000000000000..7298243843b0
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorListImpl.java
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.implementation;
+
+import com.azure.resourcemanager.security.fluent.models.SecurityOperatorInner;
+import com.azure.resourcemanager.security.fluent.models.SecurityOperatorListInner;
+import com.azure.resourcemanager.security.models.SecurityOperator;
+import com.azure.resourcemanager.security.models.SecurityOperatorList;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public final class SecurityOperatorListImpl implements SecurityOperatorList {
+ private SecurityOperatorListInner innerObject;
+
+ private final com.azure.resourcemanager.security.SecurityManager serviceManager;
+
+ SecurityOperatorListImpl(
+ SecurityOperatorListInner innerObject, com.azure.resourcemanager.security.SecurityManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public List value() {
+ List inner = this.innerModel().value();
+ if (inner != null) {
+ return Collections
+ .unmodifiableList(
+ inner
+ .stream()
+ .map(inner1 -> new SecurityOperatorImpl(inner1, this.manager()))
+ .collect(Collectors.toList()));
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public SecurityOperatorListInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.security.SecurityManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorsClientImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorsClientImpl.java
new file mode 100644
index 000000000000..cf7c403898ff
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorsClientImpl.java
@@ -0,0 +1,661 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.implementation;
+
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.security.fluent.SecurityOperatorsClient;
+import com.azure.resourcemanager.security.fluent.models.SecurityOperatorInner;
+import com.azure.resourcemanager.security.fluent.models.SecurityOperatorListInner;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in SecurityOperatorsClient. */
+public final class SecurityOperatorsClientImpl implements SecurityOperatorsClient {
+ /** The proxy service used to perform REST calls. */
+ private final SecurityOperatorsService service;
+
+ /** The service client containing this operation class. */
+ private final SecurityCenterImpl client;
+
+ /**
+ * Initializes an instance of SecurityOperatorsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ SecurityOperatorsClientImpl(SecurityCenterImpl client) {
+ this.service =
+ RestProxy.create(SecurityOperatorsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for SecurityCenterSecurityOperators to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "SecurityCenterSecuri")
+ public interface SecurityOperatorsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}/securityOperators")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("pricingName") String pricingName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}/securityOperators/{securityOperatorName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("pricingName") String pricingName,
+ @PathParam("securityOperatorName") String securityOperatorName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}/securityOperators/{securityOperatorName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("pricingName") String pricingName,
+ @PathParam("securityOperatorName") String securityOperatorName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}/securityOperators/{securityOperatorName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("pricingName") String pricingName,
+ @PathParam("securityOperatorName") String securityOperatorName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Lists Microsoft Defender for Cloud securityOperators in the subscription.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of SecurityOperator response along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listWithResponseAsync(String pricingName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (pricingName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter pricingName is required and cannot be null."));
+ }
+ final String apiVersion = "2023-01-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ pricingName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists Microsoft Defender for Cloud securityOperators in the subscription.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of SecurityOperator response along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listWithResponseAsync(String pricingName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (pricingName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter pricingName is required and cannot be null."));
+ }
+ final String apiVersion = "2023-01-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), pricingName, accept, context);
+ }
+
+ /**
+ * Lists Microsoft Defender for Cloud securityOperators in the subscription.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of SecurityOperator response on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono listAsync(String pricingName) {
+ return listWithResponseAsync(pricingName).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Lists Microsoft Defender for Cloud securityOperators in the subscription.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of SecurityOperator response along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response listWithResponse(String pricingName, Context context) {
+ return listWithResponseAsync(pricingName, context).block();
+ }
+
+ /**
+ * Lists Microsoft Defender for Cloud securityOperators in the subscription.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of SecurityOperator response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SecurityOperatorListInner list(String pricingName) {
+ return listWithResponse(pricingName, Context.NONE).getValue();
+ }
+
+ /**
+ * Get a specific security operator for the requested scope.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a specific security operator for the requested scope along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String pricingName, String securityOperatorName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (pricingName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter pricingName is required and cannot be null."));
+ }
+ if (securityOperatorName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter securityOperatorName is required and cannot be null."));
+ }
+ final String apiVersion = "2023-01-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ pricingName,
+ securityOperatorName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a specific security operator for the requested scope.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a specific security operator for the requested scope along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String pricingName, String securityOperatorName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (pricingName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter pricingName is required and cannot be null."));
+ }
+ if (securityOperatorName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter securityOperatorName is required and cannot be null."));
+ }
+ final String apiVersion = "2023-01-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ pricingName,
+ securityOperatorName,
+ accept,
+ context);
+ }
+
+ /**
+ * Get a specific security operator for the requested scope.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a specific security operator for the requested scope on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String pricingName, String securityOperatorName) {
+ return getWithResponseAsync(pricingName, securityOperatorName).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a specific security operator for the requested scope.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a specific security operator for the requested scope along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String pricingName, String securityOperatorName, Context context) {
+ return getWithResponseAsync(pricingName, securityOperatorName, context).block();
+ }
+
+ /**
+ * Get a specific security operator for the requested scope.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a specific security operator for the requested scope.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SecurityOperatorInner get(String pricingName, String securityOperatorName) {
+ return getWithResponse(pricingName, securityOperatorName, Context.NONE).getValue();
+ }
+
+ /**
+ * Creates Microsoft Defender for Cloud security operator on the given scope.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return security operator under a given subscription and pricing along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String pricingName, String securityOperatorName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (pricingName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter pricingName is required and cannot be null."));
+ }
+ if (securityOperatorName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter securityOperatorName is required and cannot be null."));
+ }
+ final String apiVersion = "2023-01-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ pricingName,
+ securityOperatorName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates Microsoft Defender for Cloud security operator on the given scope.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return security operator under a given subscription and pricing along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String pricingName, String securityOperatorName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (pricingName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter pricingName is required and cannot be null."));
+ }
+ if (securityOperatorName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter securityOperatorName is required and cannot be null."));
+ }
+ final String apiVersion = "2023-01-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ pricingName,
+ securityOperatorName,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates Microsoft Defender for Cloud security operator on the given scope.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return security operator under a given subscription and pricing on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String pricingName, String securityOperatorName) {
+ return createOrUpdateWithResponseAsync(pricingName, securityOperatorName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Creates Microsoft Defender for Cloud security operator on the given scope.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return security operator under a given subscription and pricing along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(
+ String pricingName, String securityOperatorName, Context context) {
+ return createOrUpdateWithResponseAsync(pricingName, securityOperatorName, context).block();
+ }
+
+ /**
+ * Creates Microsoft Defender for Cloud security operator on the given scope.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return security operator under a given subscription and pricing.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SecurityOperatorInner createOrUpdate(String pricingName, String securityOperatorName) {
+ return createOrUpdateWithResponse(pricingName, securityOperatorName, Context.NONE).getValue();
+ }
+
+ /**
+ * Delete Microsoft Defender for Cloud securityOperator in the subscription.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(String pricingName, String securityOperatorName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (pricingName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter pricingName is required and cannot be null."));
+ }
+ if (securityOperatorName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter securityOperatorName is required and cannot be null."));
+ }
+ final String apiVersion = "2023-01-01-preview";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ pricingName,
+ securityOperatorName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete Microsoft Defender for Cloud securityOperator in the subscription.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String pricingName, String securityOperatorName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (pricingName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter pricingName is required and cannot be null."));
+ }
+ if (securityOperatorName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter securityOperatorName is required and cannot be null."));
+ }
+ final String apiVersion = "2023-01-01-preview";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ pricingName,
+ securityOperatorName,
+ accept,
+ context);
+ }
+
+ /**
+ * Delete Microsoft Defender for Cloud securityOperator in the subscription.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String pricingName, String securityOperatorName) {
+ return deleteWithResponseAsync(pricingName, securityOperatorName).flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * Delete Microsoft Defender for Cloud securityOperator in the subscription.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(String pricingName, String securityOperatorName, Context context) {
+ return deleteWithResponseAsync(pricingName, securityOperatorName, context).block();
+ }
+
+ /**
+ * Delete Microsoft Defender for Cloud securityOperator in the subscription.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String pricingName, String securityOperatorName) {
+ deleteWithResponse(pricingName, securityOperatorName, Context.NONE);
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorsImpl.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorsImpl.java
new file mode 100644
index 000000000000..57bc55c28211
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SecurityOperatorsImpl.java
@@ -0,0 +1,117 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.security.fluent.SecurityOperatorsClient;
+import com.azure.resourcemanager.security.fluent.models.SecurityOperatorInner;
+import com.azure.resourcemanager.security.fluent.models.SecurityOperatorListInner;
+import com.azure.resourcemanager.security.models.SecurityOperator;
+import com.azure.resourcemanager.security.models.SecurityOperatorList;
+import com.azure.resourcemanager.security.models.SecurityOperators;
+
+public final class SecurityOperatorsImpl implements SecurityOperators {
+ private static final ClientLogger LOGGER = new ClientLogger(SecurityOperatorsImpl.class);
+
+ private final SecurityOperatorsClient innerClient;
+
+ private final com.azure.resourcemanager.security.SecurityManager serviceManager;
+
+ public SecurityOperatorsImpl(
+ SecurityOperatorsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response listWithResponse(String pricingName, Context context) {
+ Response inner = this.serviceClient().listWithResponse(pricingName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new SecurityOperatorListImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public SecurityOperatorList list(String pricingName) {
+ SecurityOperatorListInner inner = this.serviceClient().list(pricingName);
+ if (inner != null) {
+ return new SecurityOperatorListImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String pricingName, String securityOperatorName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(pricingName, securityOperatorName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new SecurityOperatorImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public SecurityOperator get(String pricingName, String securityOperatorName) {
+ SecurityOperatorInner inner = this.serviceClient().get(pricingName, securityOperatorName);
+ if (inner != null) {
+ return new SecurityOperatorImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response createOrUpdateWithResponse(
+ String pricingName, String securityOperatorName, Context context) {
+ Response inner =
+ this.serviceClient().createOrUpdateWithResponse(pricingName, securityOperatorName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new SecurityOperatorImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public SecurityOperator createOrUpdate(String pricingName, String securityOperatorName) {
+ SecurityOperatorInner inner = this.serviceClient().createOrUpdate(pricingName, securityOperatorName);
+ if (inner != null) {
+ return new SecurityOperatorImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response deleteByResourceGroupWithResponse(
+ String pricingName, String securityOperatorName, Context context) {
+ return this.serviceClient().deleteWithResponse(pricingName, securityOperatorName, context);
+ }
+
+ public void deleteByResourceGroup(String pricingName, String securityOperatorName) {
+ this.serviceClient().delete(pricingName, securityOperatorName);
+ }
+
+ private SecurityOperatorsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.security.SecurityManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsEnvironmentData.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsEnvironmentData.java
index a07591446a21..bfcd9c358cfd 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsEnvironmentData.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsEnvironmentData.java
@@ -8,8 +8,9 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
+import java.util.List;
-/** The aws connector environment data. */
+/** The AWS connector environment data. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "environmentType")
@JsonTypeName("AwsAccount")
@Fluent
@@ -20,6 +21,18 @@ public final class AwsEnvironmentData extends EnvironmentData {
@JsonProperty(value = "organizationalData")
private AwsOrganizationalData organizationalData;
+ /*
+ * list of regions to scan
+ */
+ @JsonProperty(value = "regions")
+ private List regions;
+
+ /*
+ * The AWS account name
+ */
+ @JsonProperty(value = "accountName", access = JsonProperty.Access.WRITE_ONLY)
+ private String accountName;
+
/** Creates an instance of AwsEnvironmentData class. */
public AwsEnvironmentData() {
}
@@ -44,6 +57,35 @@ public AwsEnvironmentData withOrganizationalData(AwsOrganizationalData organizat
return this;
}
+ /**
+ * Get the regions property: list of regions to scan.
+ *
+ * @return the regions value.
+ */
+ public List regions() {
+ return this.regions;
+ }
+
+ /**
+ * Set the regions property: list of regions to scan.
+ *
+ * @param regions the regions value to set.
+ * @return the AwsEnvironmentData object itself.
+ */
+ public AwsEnvironmentData withRegions(List regions) {
+ this.regions = regions;
+ return this;
+ }
+
+ /**
+ * Get the accountName property: The AWS account name.
+ *
+ * @return the accountName value.
+ */
+ public String accountName() {
+ return this.accountName;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsOrganizationalData.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsOrganizationalData.java
index 21cb27804c13..01da3de98d1f 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsOrganizationalData.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsOrganizationalData.java
@@ -9,7 +9,7 @@
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
-/** The awsOrganization data. */
+/** The AWS organization data. */
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.PROPERTY,
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsOrganizationalDataMaster.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsOrganizationalDataMaster.java
index a70cfc52287f..b7b8ffb22a08 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsOrganizationalDataMaster.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsOrganizationalDataMaster.java
@@ -10,7 +10,7 @@
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.List;
-/** The awsOrganization data for the master account. */
+/** The AWS organization data for the master account. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "organizationMembershipType")
@JsonTypeName("Organization")
@Fluent
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsOrganizationalDataMember.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsOrganizationalDataMember.java
index de2ed6cfe388..6951419d2b76 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsOrganizationalDataMember.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/AwsOrganizationalDataMember.java
@@ -9,7 +9,7 @@
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
-/** The awsOrganization data for the member account. */
+/** The AWS organization data for the member account. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "organizationMembershipType")
@JsonTypeName("Member")
@Fluent
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CloudName.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CloudName.java
index 83f88aa12596..667eb58402de 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CloudName.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CloudName.java
@@ -25,6 +25,9 @@ public final class CloudName extends ExpandableStringEnum {
/** Static value AzureDevOps for CloudName. */
public static final CloudName AZURE_DEV_OPS = fromString("AzureDevOps");
+ /** Static value GitLab for CloudName. */
+ public static final CloudName GIT_LAB = fromString("GitLab");
+
/**
* Creates a new instance of CloudName value.
*
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CloudOffering.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CloudOffering.java
index 8898d612405d..d1a7b48b8634 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CloudOffering.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CloudOffering.java
@@ -32,7 +32,9 @@
@JsonSubTypes.Type(name = "DefenderCspmAws", value = DefenderCspmAwsOffering.class),
@JsonSubTypes.Type(name = "DefenderCspmGcp", value = DefenderCspmGcpOffering.class),
@JsonSubTypes.Type(name = "DefenderForDevOpsGithub", value = DefenderForDevOpsGithubOffering.class),
- @JsonSubTypes.Type(name = "DefenderForDevOpsAzureDevOps", value = DefenderForDevOpsAzureDevOpsOffering.class)
+ @JsonSubTypes.Type(name = "DefenderForDevOpsAzureDevOps", value = DefenderForDevOpsAzureDevOpsOffering.class),
+ @JsonSubTypes.Type(name = "CspmMonitorGitLab", value = CspmMonitorGitLabOffering.class),
+ @JsonSubTypes.Type(name = "DefenderForDevOpsGitLab", value = DefenderForDevOpsGitLabOffering.class)
})
@Immutable
public class CloudOffering {
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Code.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Code.java
new file mode 100644
index 000000000000..487d31012408
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Code.java
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** The operation status code. */
+public final class Code extends ExpandableStringEnum {
+ /** Static value Succeeded for Code. */
+ public static final Code SUCCEEDED = fromString("Succeeded");
+
+ /** Static value Failed for Code. */
+ public static final Code FAILED = fromString("Failed");
+
+ /**
+ * Creates a new instance of Code value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public Code() {
+ }
+
+ /**
+ * Creates or finds a Code from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding Code.
+ */
+ @JsonCreator
+ public static Code fromString(String name) {
+ return fromString(name, Code.class);
+ }
+
+ /**
+ * Gets known Code values.
+ *
+ * @return known Code values.
+ */
+ public static Collection values() {
+ return values(Code.class);
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorGitLabOffering.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorGitLabOffering.java
new file mode 100644
index 000000000000..c4968ba49cf1
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/CspmMonitorGitLabOffering.java
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+/** The CSPM (Cloud security posture management) monitoring for gitlab offering. */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "offeringType")
+@JsonTypeName("CspmMonitorGitLab")
+@Immutable
+public final class CspmMonitorGitLabOffering extends CloudOffering {
+ /** Creates an instance of CspmMonitorGitLabOffering class. */
+ public CspmMonitorGitLabOffering() {
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOffering.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOffering.java
index a044f1dcc498..0d4bb91cd0c7 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOffering.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOffering.java
@@ -9,7 +9,7 @@
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
-/** The CSPM P1 for Aws offering. */
+/** The CSPM P1 for AWS offering. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "offeringType")
@JsonTypeName("DefenderCspmAws")
@Fluent
@@ -20,6 +20,18 @@ public final class DefenderCspmAwsOffering extends CloudOffering {
@JsonProperty(value = "vmScanners")
private DefenderCspmAwsOfferingVmScanners vmScanners;
+ /*
+ * The Microsoft Defender Data Sensitivity discovery configuration
+ */
+ @JsonProperty(value = "dataSensitivityDiscovery")
+ private DefenderCspmAwsOfferingDataSensitivityDiscovery dataSensitivityDiscovery;
+
+ /*
+ * The databases DSPM configuration
+ */
+ @JsonProperty(value = "databasesDspm")
+ private DefenderCspmAwsOfferingDatabasesDspm databasesDspm;
+
/** Creates an instance of DefenderCspmAwsOffering class. */
public DefenderCspmAwsOffering() {
}
@@ -44,6 +56,47 @@ public DefenderCspmAwsOffering withVmScanners(DefenderCspmAwsOfferingVmScanners
return this;
}
+ /**
+ * Get the dataSensitivityDiscovery property: The Microsoft Defender Data Sensitivity discovery configuration.
+ *
+ * @return the dataSensitivityDiscovery value.
+ */
+ public DefenderCspmAwsOfferingDataSensitivityDiscovery dataSensitivityDiscovery() {
+ return this.dataSensitivityDiscovery;
+ }
+
+ /**
+ * Set the dataSensitivityDiscovery property: The Microsoft Defender Data Sensitivity discovery configuration.
+ *
+ * @param dataSensitivityDiscovery the dataSensitivityDiscovery value to set.
+ * @return the DefenderCspmAwsOffering object itself.
+ */
+ public DefenderCspmAwsOffering withDataSensitivityDiscovery(
+ DefenderCspmAwsOfferingDataSensitivityDiscovery dataSensitivityDiscovery) {
+ this.dataSensitivityDiscovery = dataSensitivityDiscovery;
+ return this;
+ }
+
+ /**
+ * Get the databasesDspm property: The databases DSPM configuration.
+ *
+ * @return the databasesDspm value.
+ */
+ public DefenderCspmAwsOfferingDatabasesDspm databasesDspm() {
+ return this.databasesDspm;
+ }
+
+ /**
+ * Set the databasesDspm property: The databases DSPM configuration.
+ *
+ * @param databasesDspm the databasesDspm value to set.
+ * @return the DefenderCspmAwsOffering object itself.
+ */
+ public DefenderCspmAwsOffering withDatabasesDspm(DefenderCspmAwsOfferingDatabasesDspm databasesDspm) {
+ this.databasesDspm = databasesDspm;
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -55,5 +108,11 @@ public void validate() {
if (vmScanners() != null) {
vmScanners().validate();
}
+ if (dataSensitivityDiscovery() != null) {
+ dataSensitivityDiscovery().validate();
+ }
+ if (databasesDspm() != null) {
+ databasesDspm().validate();
+ }
}
}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingDataSensitivityDiscovery.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingDataSensitivityDiscovery.java
new file mode 100644
index 000000000000..4db399753ec8
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingDataSensitivityDiscovery.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The Microsoft Defender Data Sensitivity discovery configuration. */
+@Fluent
+public final class DefenderCspmAwsOfferingDataSensitivityDiscovery {
+ /*
+ * Is Microsoft Defender Data Sensitivity discovery enabled
+ */
+ @JsonProperty(value = "enabled")
+ private Boolean enabled;
+
+ /*
+ * The cloud role ARN in AWS for this feature
+ */
+ @JsonProperty(value = "cloudRoleArn")
+ private String cloudRoleArn;
+
+ /** Creates an instance of DefenderCspmAwsOfferingDataSensitivityDiscovery class. */
+ public DefenderCspmAwsOfferingDataSensitivityDiscovery() {
+ }
+
+ /**
+ * Get the enabled property: Is Microsoft Defender Data Sensitivity discovery enabled.
+ *
+ * @return the enabled value.
+ */
+ public Boolean enabled() {
+ return this.enabled;
+ }
+
+ /**
+ * Set the enabled property: Is Microsoft Defender Data Sensitivity discovery enabled.
+ *
+ * @param enabled the enabled value to set.
+ * @return the DefenderCspmAwsOfferingDataSensitivityDiscovery object itself.
+ */
+ public DefenderCspmAwsOfferingDataSensitivityDiscovery withEnabled(Boolean enabled) {
+ this.enabled = enabled;
+ return this;
+ }
+
+ /**
+ * Get the cloudRoleArn property: The cloud role ARN in AWS for this feature.
+ *
+ * @return the cloudRoleArn value.
+ */
+ public String cloudRoleArn() {
+ return this.cloudRoleArn;
+ }
+
+ /**
+ * Set the cloudRoleArn property: The cloud role ARN in AWS for this feature.
+ *
+ * @param cloudRoleArn the cloudRoleArn value to set.
+ * @return the DefenderCspmAwsOfferingDataSensitivityDiscovery object itself.
+ */
+ public DefenderCspmAwsOfferingDataSensitivityDiscovery withCloudRoleArn(String cloudRoleArn) {
+ this.cloudRoleArn = cloudRoleArn;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingDatabasesDspm.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingDatabasesDspm.java
new file mode 100644
index 000000000000..15821e5d425b
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingDatabasesDspm.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The databases DSPM configuration. */
+@Fluent
+public final class DefenderCspmAwsOfferingDatabasesDspm {
+ /*
+ * Is databases DSPM protection enabled
+ */
+ @JsonProperty(value = "enabled")
+ private Boolean enabled;
+
+ /*
+ * The cloud role ARN in AWS for this feature
+ */
+ @JsonProperty(value = "cloudRoleArn")
+ private String cloudRoleArn;
+
+ /** Creates an instance of DefenderCspmAwsOfferingDatabasesDspm class. */
+ public DefenderCspmAwsOfferingDatabasesDspm() {
+ }
+
+ /**
+ * Get the enabled property: Is databases DSPM protection enabled.
+ *
+ * @return the enabled value.
+ */
+ public Boolean enabled() {
+ return this.enabled;
+ }
+
+ /**
+ * Set the enabled property: Is databases DSPM protection enabled.
+ *
+ * @param enabled the enabled value to set.
+ * @return the DefenderCspmAwsOfferingDatabasesDspm object itself.
+ */
+ public DefenderCspmAwsOfferingDatabasesDspm withEnabled(Boolean enabled) {
+ this.enabled = enabled;
+ return this;
+ }
+
+ /**
+ * Get the cloudRoleArn property: The cloud role ARN in AWS for this feature.
+ *
+ * @return the cloudRoleArn value.
+ */
+ public String cloudRoleArn() {
+ return this.cloudRoleArn;
+ }
+
+ /**
+ * Set the cloudRoleArn property: The cloud role ARN in AWS for this feature.
+ *
+ * @param cloudRoleArn the cloudRoleArn value to set.
+ * @return the DefenderCspmAwsOfferingDatabasesDspm object itself.
+ */
+ public DefenderCspmAwsOfferingDatabasesDspm withCloudRoleArn(String cloudRoleArn) {
+ this.cloudRoleArn = cloudRoleArn;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingVmScannersConfiguration.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingVmScannersConfiguration.java
index 56d1856c6efb..e70b7f13e8c2 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingVmScannersConfiguration.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderCspmAwsOfferingVmScannersConfiguration.java
@@ -19,7 +19,7 @@ public final class DefenderCspmAwsOfferingVmScannersConfiguration {
private String cloudRoleArn;
/*
- * The scanning mode for the vm scan.
+ * The scanning mode for the VM scan.
*/
@JsonProperty(value = "scanningMode")
private ScanningMode scanningMode;
@@ -56,7 +56,7 @@ public DefenderCspmAwsOfferingVmScannersConfiguration withCloudRoleArn(String cl
}
/**
- * Get the scanningMode property: The scanning mode for the vm scan.
+ * Get the scanningMode property: The scanning mode for the VM scan.
*
* @return the scanningMode value.
*/
@@ -65,7 +65,7 @@ public ScanningMode scanningMode() {
}
/**
- * Set the scanningMode property: The scanning mode for the vm scan.
+ * Set the scanningMode property: The scanning mode for the VM scan.
*
* @param scanningMode the scanningMode value to set.
* @return the DefenderCspmAwsOfferingVmScannersConfiguration object itself.
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOffering.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOffering.java
index bb9a22aac0c2..d95d5ca67fb6 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOffering.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOffering.java
@@ -26,6 +26,12 @@ public final class DefenderFoDatabasesAwsOffering extends CloudOffering {
@JsonProperty(value = "rds")
private DefenderFoDatabasesAwsOfferingRds rds;
+ /*
+ * The databases data security posture management (DSPM) configuration
+ */
+ @JsonProperty(value = "databasesDspm")
+ private DefenderFoDatabasesAwsOfferingDatabasesDspm databasesDspm;
+
/** Creates an instance of DefenderFoDatabasesAwsOffering class. */
public DefenderFoDatabasesAwsOffering() {
}
@@ -71,6 +77,26 @@ public DefenderFoDatabasesAwsOffering withRds(DefenderFoDatabasesAwsOfferingRds
return this;
}
+ /**
+ * Get the databasesDspm property: The databases data security posture management (DSPM) configuration.
+ *
+ * @return the databasesDspm value.
+ */
+ public DefenderFoDatabasesAwsOfferingDatabasesDspm databasesDspm() {
+ return this.databasesDspm;
+ }
+
+ /**
+ * Set the databasesDspm property: The databases data security posture management (DSPM) configuration.
+ *
+ * @param databasesDspm the databasesDspm value to set.
+ * @return the DefenderFoDatabasesAwsOffering object itself.
+ */
+ public DefenderFoDatabasesAwsOffering withDatabasesDspm(DefenderFoDatabasesAwsOfferingDatabasesDspm databasesDspm) {
+ this.databasesDspm = databasesDspm;
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -85,5 +111,8 @@ public void validate() {
if (rds() != null) {
rds().validate();
}
+ if (databasesDspm() != null) {
+ databasesDspm().validate();
+ }
}
}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingArcAutoProvisioning.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingArcAutoProvisioning.java
index 0b038370f4ab..b08183d5e9f3 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingArcAutoProvisioning.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingArcAutoProvisioning.java
@@ -22,6 +22,12 @@ public final class DefenderFoDatabasesAwsOfferingArcAutoProvisioning {
@JsonProperty(value = "cloudRoleArn")
private String cloudRoleArn;
+ /*
+ * Configuration for servers Arc auto provisioning
+ */
+ @JsonProperty(value = "configuration")
+ private DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration configuration;
+
/** Creates an instance of DefenderFoDatabasesAwsOfferingArcAutoProvisioning class. */
public DefenderFoDatabasesAwsOfferingArcAutoProvisioning() {
}
@@ -66,11 +72,35 @@ public DefenderFoDatabasesAwsOfferingArcAutoProvisioning withCloudRoleArn(String
return this;
}
+ /**
+ * Get the configuration property: Configuration for servers Arc auto provisioning.
+ *
+ * @return the configuration value.
+ */
+ public DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration configuration() {
+ return this.configuration;
+ }
+
+ /**
+ * Set the configuration property: Configuration for servers Arc auto provisioning.
+ *
+ * @param configuration the configuration value to set.
+ * @return the DefenderFoDatabasesAwsOfferingArcAutoProvisioning object itself.
+ */
+ public DefenderFoDatabasesAwsOfferingArcAutoProvisioning withConfiguration(
+ DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration configuration) {
+ this.configuration = configuration;
+ return this;
+ }
+
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (configuration() != null) {
+ configuration().validate();
+ }
}
}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration.java
new file mode 100644
index 000000000000..a4796bf24775
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration.java
@@ -0,0 +1,77 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Configuration for servers Arc auto provisioning. */
+@Fluent
+public final class DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration {
+ /*
+ * Optional http proxy endpoint to use for the Arc agent
+ */
+ @JsonProperty(value = "proxy")
+ private String proxy;
+
+ /*
+ * Optional Arc private link scope resource id to link the Arc agent
+ */
+ @JsonProperty(value = "privateLinkScope")
+ private String privateLinkScope;
+
+ /** Creates an instance of DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration class. */
+ public DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration() {
+ }
+
+ /**
+ * Get the proxy property: Optional http proxy endpoint to use for the Arc agent.
+ *
+ * @return the proxy value.
+ */
+ public String proxy() {
+ return this.proxy;
+ }
+
+ /**
+ * Set the proxy property: Optional http proxy endpoint to use for the Arc agent.
+ *
+ * @param proxy the proxy value to set.
+ * @return the DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration object itself.
+ */
+ public DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration withProxy(String proxy) {
+ this.proxy = proxy;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkScope property: Optional Arc private link scope resource id to link the Arc agent.
+ *
+ * @return the privateLinkScope value.
+ */
+ public String privateLinkScope() {
+ return this.privateLinkScope;
+ }
+
+ /**
+ * Set the privateLinkScope property: Optional Arc private link scope resource id to link the Arc agent.
+ *
+ * @param privateLinkScope the privateLinkScope value to set.
+ * @return the DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration object itself.
+ */
+ public DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration withPrivateLinkScope(
+ String privateLinkScope) {
+ this.privateLinkScope = privateLinkScope;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingDatabasesDspm.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingDatabasesDspm.java
new file mode 100644
index 000000000000..f4e4b88c8735
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderFoDatabasesAwsOfferingDatabasesDspm.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The databases data security posture management (DSPM) configuration. */
+@Fluent
+public final class DefenderFoDatabasesAwsOfferingDatabasesDspm {
+ /*
+ * Is databases data security posture management (DSPM) protection enabled
+ */
+ @JsonProperty(value = "enabled")
+ private Boolean enabled;
+
+ /*
+ * The cloud role ARN in AWS for this feature
+ */
+ @JsonProperty(value = "cloudRoleArn")
+ private String cloudRoleArn;
+
+ /** Creates an instance of DefenderFoDatabasesAwsOfferingDatabasesDspm class. */
+ public DefenderFoDatabasesAwsOfferingDatabasesDspm() {
+ }
+
+ /**
+ * Get the enabled property: Is databases data security posture management (DSPM) protection enabled.
+ *
+ * @return the enabled value.
+ */
+ public Boolean enabled() {
+ return this.enabled;
+ }
+
+ /**
+ * Set the enabled property: Is databases data security posture management (DSPM) protection enabled.
+ *
+ * @param enabled the enabled value to set.
+ * @return the DefenderFoDatabasesAwsOfferingDatabasesDspm object itself.
+ */
+ public DefenderFoDatabasesAwsOfferingDatabasesDspm withEnabled(Boolean enabled) {
+ this.enabled = enabled;
+ return this;
+ }
+
+ /**
+ * Get the cloudRoleArn property: The cloud role ARN in AWS for this feature.
+ *
+ * @return the cloudRoleArn value.
+ */
+ public String cloudRoleArn() {
+ return this.cloudRoleArn;
+ }
+
+ /**
+ * Set the cloudRoleArn property: The cloud role ARN in AWS for this feature.
+ *
+ * @param cloudRoleArn the cloudRoleArn value to set.
+ * @return the DefenderFoDatabasesAwsOfferingDatabasesDspm object itself.
+ */
+ public DefenderFoDatabasesAwsOfferingDatabasesDspm withCloudRoleArn(String cloudRoleArn) {
+ this.cloudRoleArn = cloudRoleArn;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDatabasesGcpOfferingArcAutoProvisioning.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDatabasesGcpOfferingArcAutoProvisioning.java
index 6217e826a9c6..a1af1380b1b1 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDatabasesGcpOfferingArcAutoProvisioning.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDatabasesGcpOfferingArcAutoProvisioning.java
@@ -16,6 +16,12 @@ public final class DefenderForDatabasesGcpOfferingArcAutoProvisioning {
@JsonProperty(value = "enabled")
private Boolean enabled;
+ /*
+ * Configuration for servers Arc auto provisioning
+ */
+ @JsonProperty(value = "configuration")
+ private DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration configuration;
+
/** Creates an instance of DefenderForDatabasesGcpOfferingArcAutoProvisioning class. */
public DefenderForDatabasesGcpOfferingArcAutoProvisioning() {
}
@@ -40,11 +46,35 @@ public DefenderForDatabasesGcpOfferingArcAutoProvisioning withEnabled(Boolean en
return this;
}
+ /**
+ * Get the configuration property: Configuration for servers Arc auto provisioning.
+ *
+ * @return the configuration value.
+ */
+ public DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration configuration() {
+ return this.configuration;
+ }
+
+ /**
+ * Set the configuration property: Configuration for servers Arc auto provisioning.
+ *
+ * @param configuration the configuration value to set.
+ * @return the DefenderForDatabasesGcpOfferingArcAutoProvisioning object itself.
+ */
+ public DefenderForDatabasesGcpOfferingArcAutoProvisioning withConfiguration(
+ DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration configuration) {
+ this.configuration = configuration;
+ return this;
+ }
+
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (configuration() != null) {
+ configuration().validate();
+ }
}
}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration.java
new file mode 100644
index 000000000000..e44b9dc662fe
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration.java
@@ -0,0 +1,77 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Configuration for servers Arc auto provisioning. */
+@Fluent
+public final class DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration {
+ /*
+ * Optional http proxy endpoint to use for the Arc agent
+ */
+ @JsonProperty(value = "proxy")
+ private String proxy;
+
+ /*
+ * Optional Arc private link scope resource id to link the Arc agent
+ */
+ @JsonProperty(value = "privateLinkScope")
+ private String privateLinkScope;
+
+ /** Creates an instance of DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration class. */
+ public DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration() {
+ }
+
+ /**
+ * Get the proxy property: Optional http proxy endpoint to use for the Arc agent.
+ *
+ * @return the proxy value.
+ */
+ public String proxy() {
+ return this.proxy;
+ }
+
+ /**
+ * Set the proxy property: Optional http proxy endpoint to use for the Arc agent.
+ *
+ * @param proxy the proxy value to set.
+ * @return the DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration object itself.
+ */
+ public DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration withProxy(String proxy) {
+ this.proxy = proxy;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkScope property: Optional Arc private link scope resource id to link the Arc agent.
+ *
+ * @return the privateLinkScope value.
+ */
+ public String privateLinkScope() {
+ return this.privateLinkScope;
+ }
+
+ /**
+ * Set the privateLinkScope property: Optional Arc private link scope resource id to link the Arc agent.
+ *
+ * @param privateLinkScope the privateLinkScope value to set.
+ * @return the DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration object itself.
+ */
+ public DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration withPrivateLinkScope(
+ String privateLinkScope) {
+ this.privateLinkScope = privateLinkScope;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDevOpsGitLabOffering.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDevOpsGitLabOffering.java
new file mode 100644
index 000000000000..e194b6df990b
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForDevOpsGitLabOffering.java
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+/** The Defender for DevOps for Gitlab offering. */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "offeringType")
+@JsonTypeName("DefenderForDevOpsGitLab")
+@Immutable
+public final class DefenderForDevOpsGitLabOffering extends CloudOffering {
+ /** Creates an instance of DefenderForDevOpsGitLabOffering class. */
+ public DefenderForDevOpsGitLabOffering() {
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingArcAutoProvisioning.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingArcAutoProvisioning.java
index f78f734dedda..0d1ff8f1543e 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingArcAutoProvisioning.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingArcAutoProvisioning.java
@@ -22,6 +22,12 @@ public final class DefenderForServersAwsOfferingArcAutoProvisioning {
@JsonProperty(value = "cloudRoleArn")
private String cloudRoleArn;
+ /*
+ * Configuration for servers Arc auto provisioning
+ */
+ @JsonProperty(value = "configuration")
+ private DefenderForServersAwsOfferingArcAutoProvisioningConfiguration configuration;
+
/** Creates an instance of DefenderForServersAwsOfferingArcAutoProvisioning class. */
public DefenderForServersAwsOfferingArcAutoProvisioning() {
}
@@ -66,11 +72,35 @@ public DefenderForServersAwsOfferingArcAutoProvisioning withCloudRoleArn(String
return this;
}
+ /**
+ * Get the configuration property: Configuration for servers Arc auto provisioning.
+ *
+ * @return the configuration value.
+ */
+ public DefenderForServersAwsOfferingArcAutoProvisioningConfiguration configuration() {
+ return this.configuration;
+ }
+
+ /**
+ * Set the configuration property: Configuration for servers Arc auto provisioning.
+ *
+ * @param configuration the configuration value to set.
+ * @return the DefenderForServersAwsOfferingArcAutoProvisioning object itself.
+ */
+ public DefenderForServersAwsOfferingArcAutoProvisioning withConfiguration(
+ DefenderForServersAwsOfferingArcAutoProvisioningConfiguration configuration) {
+ this.configuration = configuration;
+ return this;
+ }
+
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (configuration() != null) {
+ configuration().validate();
+ }
}
}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingArcAutoProvisioningConfiguration.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingArcAutoProvisioningConfiguration.java
new file mode 100644
index 000000000000..327bf081344c
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingArcAutoProvisioningConfiguration.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Configuration for servers Arc auto provisioning. */
+@Fluent
+public final class DefenderForServersAwsOfferingArcAutoProvisioningConfiguration {
+ /*
+ * Optional HTTP proxy endpoint to use for the Arc agent
+ */
+ @JsonProperty(value = "proxy")
+ private String proxy;
+
+ /*
+ * Optional Arc private link scope resource id to link the Arc agent
+ */
+ @JsonProperty(value = "privateLinkScope")
+ private String privateLinkScope;
+
+ /** Creates an instance of DefenderForServersAwsOfferingArcAutoProvisioningConfiguration class. */
+ public DefenderForServersAwsOfferingArcAutoProvisioningConfiguration() {
+ }
+
+ /**
+ * Get the proxy property: Optional HTTP proxy endpoint to use for the Arc agent.
+ *
+ * @return the proxy value.
+ */
+ public String proxy() {
+ return this.proxy;
+ }
+
+ /**
+ * Set the proxy property: Optional HTTP proxy endpoint to use for the Arc agent.
+ *
+ * @param proxy the proxy value to set.
+ * @return the DefenderForServersAwsOfferingArcAutoProvisioningConfiguration object itself.
+ */
+ public DefenderForServersAwsOfferingArcAutoProvisioningConfiguration withProxy(String proxy) {
+ this.proxy = proxy;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkScope property: Optional Arc private link scope resource id to link the Arc agent.
+ *
+ * @return the privateLinkScope value.
+ */
+ public String privateLinkScope() {
+ return this.privateLinkScope;
+ }
+
+ /**
+ * Set the privateLinkScope property: Optional Arc private link scope resource id to link the Arc agent.
+ *
+ * @param privateLinkScope the privateLinkScope value to set.
+ * @return the DefenderForServersAwsOfferingArcAutoProvisioningConfiguration object itself.
+ */
+ public DefenderForServersAwsOfferingArcAutoProvisioningConfiguration withPrivateLinkScope(String privateLinkScope) {
+ this.privateLinkScope = privateLinkScope;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingVmScannersConfiguration.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingVmScannersConfiguration.java
index b864cb7a0392..0d8b78178250 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingVmScannersConfiguration.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersAwsOfferingVmScannersConfiguration.java
@@ -19,7 +19,7 @@ public final class DefenderForServersAwsOfferingVmScannersConfiguration {
private String cloudRoleArn;
/*
- * The scanning mode for the vm scan.
+ * The scanning mode for the VM scan.
*/
@JsonProperty(value = "scanningMode")
private ScanningMode scanningMode;
@@ -56,7 +56,7 @@ public DefenderForServersAwsOfferingVmScannersConfiguration withCloudRoleArn(Str
}
/**
- * Get the scanningMode property: The scanning mode for the vm scan.
+ * Get the scanningMode property: The scanning mode for the VM scan.
*
* @return the scanningMode value.
*/
@@ -65,7 +65,7 @@ public ScanningMode scanningMode() {
}
/**
- * Set the scanningMode property: The scanning mode for the vm scan.
+ * Set the scanningMode property: The scanning mode for the VM scan.
*
* @param scanningMode the scanningMode value to set.
* @return the DefenderForServersAwsOfferingVmScannersConfiguration object itself.
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOffering.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOffering.java
index 058b4a0bab36..336fa465a9c9 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOffering.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOffering.java
@@ -44,6 +44,12 @@ public final class DefenderForServersGcpOffering extends CloudOffering {
@JsonProperty(value = "subPlan")
private DefenderForServersGcpOfferingSubPlan subPlan;
+ /*
+ * The Microsoft Defender for Server VM scanning configuration
+ */
+ @JsonProperty(value = "vmScanners")
+ private DefenderForServersGcpOfferingVmScanners vmScanners;
+
/** Creates an instance of DefenderForServersGcpOffering class. */
public DefenderForServersGcpOffering() {
}
@@ -152,6 +158,26 @@ public DefenderForServersGcpOffering withSubPlan(DefenderForServersGcpOfferingSu
return this;
}
+ /**
+ * Get the vmScanners property: The Microsoft Defender for Server VM scanning configuration.
+ *
+ * @return the vmScanners value.
+ */
+ public DefenderForServersGcpOfferingVmScanners vmScanners() {
+ return this.vmScanners;
+ }
+
+ /**
+ * Set the vmScanners property: The Microsoft Defender for Server VM scanning configuration.
+ *
+ * @param vmScanners the vmScanners value to set.
+ * @return the DefenderForServersGcpOffering object itself.
+ */
+ public DefenderForServersGcpOffering withVmScanners(DefenderForServersGcpOfferingVmScanners vmScanners) {
+ this.vmScanners = vmScanners;
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -175,5 +201,8 @@ public void validate() {
if (subPlan() != null) {
subPlan().validate();
}
+ if (vmScanners() != null) {
+ vmScanners().validate();
+ }
}
}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingArcAutoProvisioning.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingArcAutoProvisioning.java
index 79452d71a581..62a8766f49c5 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingArcAutoProvisioning.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingArcAutoProvisioning.java
@@ -16,6 +16,12 @@ public final class DefenderForServersGcpOfferingArcAutoProvisioning {
@JsonProperty(value = "enabled")
private Boolean enabled;
+ /*
+ * Configuration for servers Arc auto provisioning
+ */
+ @JsonProperty(value = "configuration")
+ private DefenderForServersGcpOfferingArcAutoProvisioningConfiguration configuration;
+
/** Creates an instance of DefenderForServersGcpOfferingArcAutoProvisioning class. */
public DefenderForServersGcpOfferingArcAutoProvisioning() {
}
@@ -40,11 +46,35 @@ public DefenderForServersGcpOfferingArcAutoProvisioning withEnabled(Boolean enab
return this;
}
+ /**
+ * Get the configuration property: Configuration for servers Arc auto provisioning.
+ *
+ * @return the configuration value.
+ */
+ public DefenderForServersGcpOfferingArcAutoProvisioningConfiguration configuration() {
+ return this.configuration;
+ }
+
+ /**
+ * Set the configuration property: Configuration for servers Arc auto provisioning.
+ *
+ * @param configuration the configuration value to set.
+ * @return the DefenderForServersGcpOfferingArcAutoProvisioning object itself.
+ */
+ public DefenderForServersGcpOfferingArcAutoProvisioning withConfiguration(
+ DefenderForServersGcpOfferingArcAutoProvisioningConfiguration configuration) {
+ this.configuration = configuration;
+ return this;
+ }
+
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (configuration() != null) {
+ configuration().validate();
+ }
}
}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingArcAutoProvisioningConfiguration.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingArcAutoProvisioningConfiguration.java
new file mode 100644
index 000000000000..ff5655dfab0a
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingArcAutoProvisioningConfiguration.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Configuration for servers Arc auto provisioning. */
+@Fluent
+public final class DefenderForServersGcpOfferingArcAutoProvisioningConfiguration {
+ /*
+ * Optional HTTP proxy endpoint to use for the Arc agent
+ */
+ @JsonProperty(value = "proxy")
+ private String proxy;
+
+ /*
+ * Optional Arc private link scope resource id to link the Arc agent
+ */
+ @JsonProperty(value = "privateLinkScope")
+ private String privateLinkScope;
+
+ /** Creates an instance of DefenderForServersGcpOfferingArcAutoProvisioningConfiguration class. */
+ public DefenderForServersGcpOfferingArcAutoProvisioningConfiguration() {
+ }
+
+ /**
+ * Get the proxy property: Optional HTTP proxy endpoint to use for the Arc agent.
+ *
+ * @return the proxy value.
+ */
+ public String proxy() {
+ return this.proxy;
+ }
+
+ /**
+ * Set the proxy property: Optional HTTP proxy endpoint to use for the Arc agent.
+ *
+ * @param proxy the proxy value to set.
+ * @return the DefenderForServersGcpOfferingArcAutoProvisioningConfiguration object itself.
+ */
+ public DefenderForServersGcpOfferingArcAutoProvisioningConfiguration withProxy(String proxy) {
+ this.proxy = proxy;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkScope property: Optional Arc private link scope resource id to link the Arc agent.
+ *
+ * @return the privateLinkScope value.
+ */
+ public String privateLinkScope() {
+ return this.privateLinkScope;
+ }
+
+ /**
+ * Set the privateLinkScope property: Optional Arc private link scope resource id to link the Arc agent.
+ *
+ * @param privateLinkScope the privateLinkScope value to set.
+ * @return the DefenderForServersGcpOfferingArcAutoProvisioningConfiguration object itself.
+ */
+ public DefenderForServersGcpOfferingArcAutoProvisioningConfiguration withPrivateLinkScope(String privateLinkScope) {
+ this.privateLinkScope = privateLinkScope;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingVmScanners.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingVmScanners.java
new file mode 100644
index 000000000000..d530ace03cb6
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingVmScanners.java
@@ -0,0 +1,80 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The Microsoft Defender for Server VM scanning configuration. */
+@Fluent
+public final class DefenderForServersGcpOfferingVmScanners {
+ /*
+ * Is Microsoft Defender for Server VM scanning enabled
+ */
+ @JsonProperty(value = "enabled")
+ private Boolean enabled;
+
+ /*
+ * configuration for Microsoft Defender for Server VM scanning
+ */
+ @JsonProperty(value = "configuration")
+ private DefenderForServersGcpOfferingVmScannersConfiguration configuration;
+
+ /** Creates an instance of DefenderForServersGcpOfferingVmScanners class. */
+ public DefenderForServersGcpOfferingVmScanners() {
+ }
+
+ /**
+ * Get the enabled property: Is Microsoft Defender for Server VM scanning enabled.
+ *
+ * @return the enabled value.
+ */
+ public Boolean enabled() {
+ return this.enabled;
+ }
+
+ /**
+ * Set the enabled property: Is Microsoft Defender for Server VM scanning enabled.
+ *
+ * @param enabled the enabled value to set.
+ * @return the DefenderForServersGcpOfferingVmScanners object itself.
+ */
+ public DefenderForServersGcpOfferingVmScanners withEnabled(Boolean enabled) {
+ this.enabled = enabled;
+ return this;
+ }
+
+ /**
+ * Get the configuration property: configuration for Microsoft Defender for Server VM scanning.
+ *
+ * @return the configuration value.
+ */
+ public DefenderForServersGcpOfferingVmScannersConfiguration configuration() {
+ return this.configuration;
+ }
+
+ /**
+ * Set the configuration property: configuration for Microsoft Defender for Server VM scanning.
+ *
+ * @param configuration the configuration value to set.
+ * @return the DefenderForServersGcpOfferingVmScanners object itself.
+ */
+ public DefenderForServersGcpOfferingVmScanners withConfiguration(
+ DefenderForServersGcpOfferingVmScannersConfiguration configuration) {
+ this.configuration = configuration;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (configuration() != null) {
+ configuration().validate();
+ }
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingVmScannersConfiguration.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingVmScannersConfiguration.java
new file mode 100644
index 000000000000..aedf865b1f86
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/DefenderForServersGcpOfferingVmScannersConfiguration.java
@@ -0,0 +1,79 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** configuration for Microsoft Defender for Server VM scanning. */
+@Fluent
+public final class DefenderForServersGcpOfferingVmScannersConfiguration {
+ /*
+ * The scanning mode for the VM scan.
+ */
+ @JsonProperty(value = "scanningMode")
+ private ScanningMode scanningMode;
+
+ /*
+ * VM tags that indicate that VM should not be scanned
+ */
+ @JsonProperty(value = "exclusionTags")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map exclusionTags;
+
+ /** Creates an instance of DefenderForServersGcpOfferingVmScannersConfiguration class. */
+ public DefenderForServersGcpOfferingVmScannersConfiguration() {
+ }
+
+ /**
+ * Get the scanningMode property: The scanning mode for the VM scan.
+ *
+ * @return the scanningMode value.
+ */
+ public ScanningMode scanningMode() {
+ return this.scanningMode;
+ }
+
+ /**
+ * Set the scanningMode property: The scanning mode for the VM scan.
+ *
+ * @param scanningMode the scanningMode value to set.
+ * @return the DefenderForServersGcpOfferingVmScannersConfiguration object itself.
+ */
+ public DefenderForServersGcpOfferingVmScannersConfiguration withScanningMode(ScanningMode scanningMode) {
+ this.scanningMode = scanningMode;
+ return this;
+ }
+
+ /**
+ * Get the exclusionTags property: VM tags that indicate that VM should not be scanned.
+ *
+ * @return the exclusionTags value.
+ */
+ public Map exclusionTags() {
+ return this.exclusionTags;
+ }
+
+ /**
+ * Set the exclusionTags property: VM tags that indicate that VM should not be scanned.
+ *
+ * @param exclusionTags the exclusionTags value to set.
+ * @return the DefenderForServersGcpOfferingVmScannersConfiguration object itself.
+ */
+ public DefenderForServersGcpOfferingVmScannersConfiguration withExclusionTags(Map exclusionTags) {
+ this.exclusionTags = exclusionTags;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnvironmentData.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnvironmentData.java
index ce839b5a9e24..105f62c59a09 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnvironmentData.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnvironmentData.java
@@ -20,7 +20,8 @@
@JsonSubTypes.Type(name = "AwsAccount", value = AwsEnvironmentData.class),
@JsonSubTypes.Type(name = "GcpProject", value = GcpProjectEnvironmentData.class),
@JsonSubTypes.Type(name = "GithubScope", value = GithubScopeEnvironmentData.class),
- @JsonSubTypes.Type(name = "AzureDevOpsScope", value = AzureDevOpsScopeEnvironmentData.class)
+ @JsonSubTypes.Type(name = "AzureDevOpsScope", value = AzureDevOpsScopeEnvironmentData.class),
+ @JsonSubTypes.Type(name = "GitlabScope", value = GitlabScopeEnvironmentData.class)
})
@Immutable
public class EnvironmentData {
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnvironmentType.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnvironmentType.java
index 89732b66ea80..c70a011dfa98 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnvironmentType.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/EnvironmentType.java
@@ -22,6 +22,9 @@ public final class EnvironmentType extends ExpandableStringEnum
/** Static value AzureDevOpsScope for EnvironmentType. */
public static final EnvironmentType AZURE_DEV_OPS_SCOPE = fromString("AzureDevOpsScope");
+ /** Static value GitlabScope for EnvironmentType. */
+ public static final EnvironmentType GITLAB_SCOPE = fromString("GitlabScope");
+
/**
* Creates a new instance of EnvironmentType value.
*
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Extension.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Extension.java
new file mode 100644
index 000000000000..08661bf27476
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Extension.java
@@ -0,0 +1,170 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** A plan's extension properties. */
+@Fluent
+public final class Extension {
+ /*
+ * The extension name. Supported values are:
**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.
**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.
**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.
**ContainerRegistriesVulnerabilityAssessments** -
+ * Provides vulnerability management for images stored in your container registries.
+ * Available for CloudPosture and Containers plans.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /*
+ * Indicates whether the extension is enabled.
+ */
+ @JsonProperty(value = "isEnabled", required = true)
+ private IsEnabled isEnabled;
+
+ /*
+ * Property values associated with the extension.
+ */
+ @JsonProperty(value = "additionalExtensionProperties")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map additionalExtensionProperties;
+
+ /*
+ * Optional. A status describing the success/failure of the extension's enablement/disablement operation.
+ */
+ @JsonProperty(value = "operationStatus", access = JsonProperty.Access.WRITE_ONLY)
+ private OperationStatus operationStatus;
+
+ /** Creates an instance of Extension class. */
+ public Extension() {
+ }
+
+ /**
+ * Get the name property: 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.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: 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.
+ *
+ * @param name the name value to set.
+ * @return the Extension object itself.
+ */
+ public Extension withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the isEnabled property: Indicates whether the extension is enabled.
+ *
+ * @return the isEnabled value.
+ */
+ public IsEnabled isEnabled() {
+ return this.isEnabled;
+ }
+
+ /**
+ * Set the isEnabled property: Indicates whether the extension is enabled.
+ *
+ * @param isEnabled the isEnabled value to set.
+ * @return the Extension object itself.
+ */
+ public Extension withIsEnabled(IsEnabled isEnabled) {
+ this.isEnabled = isEnabled;
+ return this;
+ }
+
+ /**
+ * Get the additionalExtensionProperties property: Property values associated with the extension.
+ *
+ * @return the additionalExtensionProperties value.
+ */
+ public Map additionalExtensionProperties() {
+ return this.additionalExtensionProperties;
+ }
+
+ /**
+ * Set the additionalExtensionProperties property: Property values associated with the extension.
+ *
+ * @param additionalExtensionProperties the additionalExtensionProperties value to set.
+ * @return the Extension object itself.
+ */
+ public Extension withAdditionalExtensionProperties(Map additionalExtensionProperties) {
+ this.additionalExtensionProperties = additionalExtensionProperties;
+ return this;
+ }
+
+ /**
+ * Get the operationStatus property: Optional. A status describing the success/failure of the extension's
+ * enablement/disablement operation.
+ *
+ * @return the operationStatus value.
+ */
+ public OperationStatus operationStatus() {
+ return this.operationStatus;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (name() == null) {
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Extension"));
+ }
+ if (isEnabled() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property isEnabled in model Extension"));
+ }
+ if (operationStatus() != null) {
+ operationStatus().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(Extension.class);
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpOrganizationalDataOrganization.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpOrganizationalDataOrganization.java
index f318643fba89..fc324cde8326 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpOrganizationalDataOrganization.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpOrganizationalDataOrganization.java
@@ -34,6 +34,12 @@ public final class GcpOrganizationalDataOrganization extends GcpOrganizationalDa
@JsonProperty(value = "workloadIdentityProviderId")
private String workloadIdentityProviderId;
+ /*
+ * GCP organization name
+ */
+ @JsonProperty(value = "organizationName", access = JsonProperty.Access.WRITE_ONLY)
+ private String organizationName;
+
/** Creates an instance of GcpOrganizationalDataOrganization class. */
public GcpOrganizationalDataOrganization() {
}
@@ -104,6 +110,15 @@ public GcpOrganizationalDataOrganization withWorkloadIdentityProviderId(String w
return this;
}
+ /**
+ * Get the organizationName property: GCP organization name.
+ *
+ * @return the organizationName value.
+ */
+ public String organizationName() {
+ return this.organizationName;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpProjectDetails.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpProjectDetails.java
index 5fea623f6d41..ac6bbd2acf3f 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpProjectDetails.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GcpProjectDetails.java
@@ -28,6 +28,12 @@ public final class GcpProjectDetails {
@JsonProperty(value = "workloadIdentityPoolId", access = JsonProperty.Access.WRITE_ONLY)
private String workloadIdentityPoolId;
+ /*
+ * GCP project name
+ */
+ @JsonProperty(value = "projectName", access = JsonProperty.Access.WRITE_ONLY)
+ private String projectName;
+
/** Creates an instance of GcpProjectDetails class. */
public GcpProjectDetails() {
}
@@ -81,6 +87,15 @@ public String workloadIdentityPoolId() {
return this.workloadIdentityPoolId;
}
+ /**
+ * Get the projectName property: GCP project name.
+ *
+ * @return the projectName value.
+ */
+ public String projectName() {
+ return this.projectName;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GitlabScopeEnvironmentData.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GitlabScopeEnvironmentData.java
new file mode 100644
index 000000000000..514c6e578d4f
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/GitlabScopeEnvironmentData.java
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+/** The GitLab scope connector's environment data. */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "environmentType")
+@JsonTypeName("GitlabScope")
+@Immutable
+public final class GitlabScopeEnvironmentData extends EnvironmentData {
+ /** Creates an instance of GitlabScopeEnvironmentData class. */
+ public GitlabScopeEnvironmentData() {
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Identity.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Identity.java
new file mode 100644
index 000000000000..dd91ed5e0a1a
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Identity.java
@@ -0,0 +1,80 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Identity for the resource. */
+@Fluent
+public final class Identity {
+ /*
+ * The principal ID of resource identity.
+ */
+ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
+ private String principalId;
+
+ /*
+ * The tenant ID of resource.
+ */
+ @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY)
+ private String tenantId;
+
+ /*
+ * The identity type.
+ */
+ @JsonProperty(value = "type")
+ private ResourceIdentityType type;
+
+ /** Creates an instance of Identity class. */
+ public Identity() {
+ }
+
+ /**
+ * Get the principalId property: The principal ID of resource identity.
+ *
+ * @return the principalId value.
+ */
+ public String principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Get the tenantId property: The tenant ID of resource.
+ *
+ * @return the tenantId value.
+ */
+ public String tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Get the type property: The identity type.
+ *
+ * @return the type value.
+ */
+ public ResourceIdentityType type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: The identity type.
+ *
+ * @param type the type value to set.
+ * @return the Identity object itself.
+ */
+ public Identity withType(ResourceIdentityType type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IsEnabled.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IsEnabled.java
new file mode 100644
index 000000000000..ac17c1b7f94d
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IsEnabled.java
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Indicates whether the extension is enabled. */
+public final class IsEnabled extends ExpandableStringEnum {
+ /** Static value True for IsEnabled. */
+ public static final IsEnabled TRUE = fromString("True");
+
+ /** Static value False for IsEnabled. */
+ public static final IsEnabled FALSE = fromString("False");
+
+ /**
+ * Creates a new instance of IsEnabled value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public IsEnabled() {
+ }
+
+ /**
+ * Creates or finds a IsEnabled from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding IsEnabled.
+ */
+ @JsonCreator
+ public static IsEnabled fromString(String name) {
+ return fromString(name, IsEnabled.class);
+ }
+
+ /**
+ * Gets known IsEnabled values.
+ *
+ * @return known IsEnabled values.
+ */
+ public static Collection values() {
+ return values(IsEnabled.class);
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OfferingType.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OfferingType.java
index 814cb32f98e1..5f81cfb875f7 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OfferingType.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OfferingType.java
@@ -55,6 +55,12 @@ public final class OfferingType extends ExpandableStringEnum {
/** Static value DefenderForDevOpsAzureDevOps for OfferingType. */
public static final OfferingType DEFENDER_FOR_DEV_OPS_AZURE_DEV_OPS = fromString("DefenderForDevOpsAzureDevOps");
+ /** Static value CspmMonitorGitLab for OfferingType. */
+ public static final OfferingType CSPM_MONITOR_GIT_LAB = fromString("CspmMonitorGitLab");
+
+ /** Static value DefenderForDevOpsGitLab for OfferingType. */
+ public static final OfferingType DEFENDER_FOR_DEV_OPS_GIT_LAB = fromString("DefenderForDevOpsGitLab");
+
/**
* Creates a new instance of OfferingType value.
*
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OperationStatus.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OperationStatus.java
new file mode 100644
index 000000000000..1f1c9e6b0ad7
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/OperationStatus.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A status describing the success/failure of the extension's enablement/disablement operation. */
+@Fluent
+public final class OperationStatus {
+ /*
+ * The operation status code.
+ */
+ @JsonProperty(value = "code")
+ private Code code;
+
+ /*
+ * Additional information regarding the success/failure of the operation.
+ */
+ @JsonProperty(value = "message")
+ private String message;
+
+ /** Creates an instance of OperationStatus class. */
+ public OperationStatus() {
+ }
+
+ /**
+ * Get the code property: The operation status code.
+ *
+ * @return the code value.
+ */
+ public Code code() {
+ return this.code;
+ }
+
+ /**
+ * Set the code property: The operation status code.
+ *
+ * @param code the code value to set.
+ * @return the OperationStatus object itself.
+ */
+ public OperationStatus withCode(Code code) {
+ this.code = code;
+ return this;
+ }
+
+ /**
+ * Get the message property: Additional information regarding the success/failure of the operation.
+ *
+ * @return the message value.
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Set the message property: Additional information regarding the success/failure of the operation.
+ *
+ * @param message the message value to set.
+ * @return the OperationStatus object itself.
+ */
+ public OperationStatus withMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Pricing.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Pricing.java
index 2d7cff518c3c..a0fa3bb7d5fd 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Pricing.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Pricing.java
@@ -6,6 +6,7 @@
import com.azure.resourcemanager.security.fluent.models.PricingInner;
import java.time.Duration;
+import java.time.OffsetDateTime;
import java.util.List;
/** An immutable client-side representation of Pricing. */
@@ -33,8 +34,8 @@ public interface Pricing {
/**
* Gets the pricingTier property: The pricing tier value. Microsoft Defender for Cloud is provided in two pricing
- * tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced
- * security capabilities, while the free tier offers basic security features.
+ * tiers: free and standard. The standard tier offers advanced security capabilities, while the free tier offers
+ * basic security features.
*
* @return the pricingTier value.
*/
@@ -57,6 +58,14 @@ public interface Pricing {
*/
Duration freeTrialRemainingTime();
+ /**
+ * Gets the enablementTime property: 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).
+ *
+ * @return the enablementTime value.
+ */
+ OffsetDateTime enablementTime();
+
/**
* Gets the deprecated property: Optional. True if the plan is deprecated. If there are replacing plans they will
* appear in `replacedBy` property.
@@ -73,6 +82,13 @@ public interface Pricing {
*/
List replacedBy();
+ /**
+ * Gets the extensions property: Optional. List of extensions offered under a plan.
+ *
+ * @return the extensions value.
+ */
+ List extensions();
+
/**
* Gets the inner com.azure.resourcemanager.security.fluent.models.PricingInner object.
*
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PricingTier.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PricingTier.java
index 7d3cb3b976d2..3c6477e503c4 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PricingTier.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/PricingTier.java
@@ -9,9 +9,8 @@
import java.util.Collection;
/**
- * The pricing tier value. Microsoft Defender for Cloud is provided in two pricing tiers: free and standard, with the
- * standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free
- * tier offers basic security features.
+ * 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.
*/
public final class PricingTier extends ExpandableStringEnum {
/** Static value Free for PricingTier. */
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Pricings.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Pricings.java
index e45fd5412a3a..6942c5681305 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Pricings.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/Pricings.java
@@ -63,8 +63,8 @@ public interface Pricings {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard, with the standard tier
- * available with a trial period along with {@link Response}.
+ * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard along with {@link
+ * Response}.
*/
Response updateWithResponse(String pricingName, PricingInner pricing, Context context);
@@ -76,8 +76,7 @@ public interface Pricings {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard, with the standard tier
- * available with a trial period.
+ * @return microsoft Defender for Cloud is provided in two pricing tiers: free and standard.
*/
Pricing update(String pricingName, PricingInner pricing);
}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ResourceIdentityType.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ResourceIdentityType.java
new file mode 100644
index 000000000000..7b4a4da64f69
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ResourceIdentityType.java
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.models;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/** The identity type. */
+public enum ResourceIdentityType {
+ /** Enum value SystemAssigned. */
+ SYSTEM_ASSIGNED("SystemAssigned");
+
+ /** The actual serialized value for a ResourceIdentityType instance. */
+ private final String value;
+
+ ResourceIdentityType(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a ResourceIdentityType instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed ResourceIdentityType object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static ResourceIdentityType fromString(String value) {
+ if (value == null) {
+ return null;
+ }
+ ResourceIdentityType[] items = ResourceIdentityType.values();
+ for (ResourceIdentityType item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ /** {@inheritDoc} */
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ScanningMode.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ScanningMode.java
index 29bcdf0f1394..57c620d277c1 100644
--- a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ScanningMode.java
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ScanningMode.java
@@ -8,7 +8,7 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
-/** The scanning mode for the vm scan. */
+/** The scanning mode for the VM scan. */
public final class ScanningMode extends ExpandableStringEnum {
/** Static value Default for ScanningMode. */
public static final ScanningMode DEFAULT = fromString("Default");
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SecurityOperator.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SecurityOperator.java
new file mode 100644
index 000000000000..344eb52f9891
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SecurityOperator.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.models;
+
+import com.azure.resourcemanager.security.fluent.models.SecurityOperatorInner;
+
+/** An immutable client-side representation of SecurityOperator. */
+public interface SecurityOperator {
+ /**
+ * Gets the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * Gets the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * Gets the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * Gets the identity property: Identity for the resource.
+ *
+ * @return the identity value.
+ */
+ Identity identity();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.security.fluent.models.SecurityOperatorInner object.
+ *
+ * @return the inner object.
+ */
+ SecurityOperatorInner innerModel();
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SecurityOperatorList.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SecurityOperatorList.java
new file mode 100644
index 000000000000..6eff74dba183
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SecurityOperatorList.java
@@ -0,0 +1,25 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.models;
+
+import com.azure.resourcemanager.security.fluent.models.SecurityOperatorListInner;
+import java.util.List;
+
+/** An immutable client-side representation of SecurityOperatorList. */
+public interface SecurityOperatorList {
+ /**
+ * Gets the value property: List of SecurityOperator configurations.
+ *
+ * @return the value value.
+ */
+ List value();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.security.fluent.models.SecurityOperatorListInner object.
+ *
+ * @return the inner object.
+ */
+ SecurityOperatorListInner innerModel();
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SecurityOperators.java b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SecurityOperators.java
new file mode 100644
index 000000000000..3695ca0ca4f9
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/SecurityOperators.java
@@ -0,0 +1,109 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.models;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+
+/** Resource collection API of SecurityOperators. */
+public interface SecurityOperators {
+ /**
+ * Lists Microsoft Defender for Cloud securityOperators in the subscription.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of SecurityOperator response along with {@link Response}.
+ */
+ Response listWithResponse(String pricingName, Context context);
+
+ /**
+ * Lists Microsoft Defender for Cloud securityOperators in the subscription.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of SecurityOperator response.
+ */
+ SecurityOperatorList list(String pricingName);
+
+ /**
+ * Get a specific security operator for the requested scope.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a specific security operator for the requested scope along with {@link Response}.
+ */
+ Response getWithResponse(String pricingName, String securityOperatorName, Context context);
+
+ /**
+ * Get a specific security operator for the requested scope.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a specific security operator for the requested scope.
+ */
+ SecurityOperator get(String pricingName, String securityOperatorName);
+
+ /**
+ * Creates Microsoft Defender for Cloud security operator on the given scope.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return security operator under a given subscription and pricing along with {@link Response}.
+ */
+ Response createOrUpdateWithResponse(
+ String pricingName, String securityOperatorName, Context context);
+
+ /**
+ * Creates Microsoft Defender for Cloud security operator on the given scope.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return security operator under a given subscription and pricing.
+ */
+ SecurityOperator createOrUpdate(String pricingName, String securityOperatorName);
+
+ /**
+ * Delete Microsoft Defender for Cloud securityOperator in the subscription.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ Response deleteByResourceGroupWithResponse(String pricingName, String securityOperatorName, Context context);
+
+ /**
+ * Delete Microsoft Defender for Cloud securityOperator in the subscription.
+ *
+ * @param pricingName name of the pricing configuration.
+ * @param securityOperatorName name of the securityOperator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ void deleteByResourceGroup(String pricingName, String securityOperatorName);
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/PricingsGetSamples.java b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/PricingsGetSamples.java
index 00100d9230d1..e8d83047aa5d 100644
--- a/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/PricingsGetSamples.java
+++ b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/PricingsGetSamples.java
@@ -7,14 +7,66 @@
/** Samples for Pricings Get. */
public final class PricingsGetSamples {
/*
- * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-03-01/examples/Pricings/GetPricingByName_example.json
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-01-01/examples/Pricings/GetPricingByNameCloudPosture_example.json
*/
/**
- * Sample code: Get pricings on subscription.
+ * Sample code: Get pricings on subscription - CloudPosture plan.
*
* @param manager Entry point to SecurityManager.
*/
- public static void getPricingsOnSubscription(com.azure.resourcemanager.security.SecurityManager manager) {
+ public static void getPricingsOnSubscriptionCloudPosturePlan(
+ com.azure.resourcemanager.security.SecurityManager manager) {
+ manager.pricings().getWithResponse("CloudPosture", com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-01-01/examples/Pricings/GetPricingByNameDns_example.json
+ */
+ /**
+ * Sample code: Get pricings on subscription - Dns plan.
+ *
+ * @param manager Entry point to SecurityManager.
+ */
+ public static void getPricingsOnSubscriptionDnsPlan(com.azure.resourcemanager.security.SecurityManager manager) {
+ manager.pricings().getWithResponse("Dns", com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-01-01/examples/Pricings/GetPricingByNameContainers_example.json
+ */
+ /**
+ * Sample code: Get pricings on subscription - Containers plan.
+ *
+ * @param manager Entry point to SecurityManager.
+ */
+ public static void getPricingsOnSubscriptionContainersPlan(
+ com.azure.resourcemanager.security.SecurityManager manager) {
+ manager.pricings().getWithResponse("Containers", com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-01-01/examples/Pricings/GetPricingByNameStorageAccounts_example.json
+ */
+ /**
+ * Sample code: Get pricings on subscription - StorageAccounts plan.
+ *
+ * @param manager Entry point to SecurityManager.
+ */
+ public static void getPricingsOnSubscriptionStorageAccountsPlan(
+ com.azure.resourcemanager.security.SecurityManager manager) {
+ manager.pricings().getWithResponse("StorageAccounts", com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-01-01/examples/Pricings/GetPricingByNameVirtualMachines_example.json
+ */
+ /**
+ * Sample code: Get pricings on subscription - VirtualMachines plan.
+ *
+ * @param manager Entry point to SecurityManager.
+ */
+ public static void getPricingsOnSubscriptionVirtualMachinesPlan(
+ com.azure.resourcemanager.security.SecurityManager manager) {
manager.pricings().getWithResponse("VirtualMachines", com.azure.core.util.Context.NONE);
}
}
diff --git a/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/PricingsListSamples.java b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/PricingsListSamples.java
index 57707d29659a..d60f200d034d 100644
--- a/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/PricingsListSamples.java
+++ b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/PricingsListSamples.java
@@ -7,7 +7,7 @@
/** Samples for Pricings List. */
public final class PricingsListSamples {
/*
- * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-03-01/examples/Pricings/ListPricings_example.json
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-01-01/examples/Pricings/ListPricings_example.json
*/
/**
* Sample code: Get pricings on subscription.
diff --git a/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/PricingsUpdateSamples.java b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/PricingsUpdateSamples.java
index 87d52ed76d48..633b37ca924d 100644
--- a/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/PricingsUpdateSamples.java
+++ b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/PricingsUpdateSamples.java
@@ -10,7 +10,25 @@
/** Samples for Pricings Update. */
public final class PricingsUpdateSamples {
/*
- * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-03-01/examples/Pricings/PutPricingByName_example.json
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-01-01/examples/Pricings/PutPricingByNamePartialSuccess_example.json
+ */
+ /**
+ * Sample code: Update pricing on subscription - partial success.
+ *
+ * @param manager Entry point to SecurityManager.
+ */
+ public static void updatePricingOnSubscriptionPartialSuccess(
+ com.azure.resourcemanager.security.SecurityManager manager) {
+ manager
+ .pricings()
+ .updateWithResponse(
+ "CloudPosture",
+ new PricingInner().withPricingTier(PricingTier.STANDARD),
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-01-01/examples/Pricings/PutPricingByName_example.json
*/
/**
* Sample code: Update pricing on subscription.
@@ -21,8 +39,8 @@ public static void updatePricingOnSubscription(com.azure.resourcemanager.securit
manager
.pricings()
.updateWithResponse(
- "VirtualMachines",
- new PricingInner().withPricingTier(PricingTier.STANDARD).withSubPlan("P2"),
+ "CloudPosture",
+ new PricingInner().withPricingTier(PricingTier.STANDARD),
com.azure.core.util.Context.NONE);
}
}
diff --git a/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityConnectorsCreateOrUpdateSamples.java b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityConnectorsCreateOrUpdateSamples.java
index c966e7a32b80..50662f107f7b 100644
--- a/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityConnectorsCreateOrUpdateSamples.java
+++ b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityConnectorsCreateOrUpdateSamples.java
@@ -15,7 +15,7 @@
/** Samples for SecurityConnectors CreateOrUpdate. */
public final class SecurityConnectorsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-08-01-preview/examples/SecurityConnectors/PutSecurityConnector_example.json
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-03-01-preview/examples/SecurityConnectors/PutSecurityConnector_example.json
*/
/**
* Sample code: Create or update a security connector.
diff --git a/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityConnectorsDeleteSamples.java b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityConnectorsDeleteSamples.java
index 5ae158541103..7efdb44bb18b 100644
--- a/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityConnectorsDeleteSamples.java
+++ b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityConnectorsDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for SecurityConnectors Delete. */
public final class SecurityConnectorsDeleteSamples {
/*
- * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-08-01-preview/examples/SecurityConnectors/DeleteSecurityConnector_example.json
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-03-01-preview/examples/SecurityConnectors/DeleteSecurityConnector_example.json
*/
/**
* Sample code: Delete a security connector.
diff --git a/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityConnectorsGetByResourceGroupSamples.java b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityConnectorsGetByResourceGroupSamples.java
index 71658c80acaa..1f308e583139 100644
--- a/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityConnectorsGetByResourceGroupSamples.java
+++ b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityConnectorsGetByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for SecurityConnectors GetByResourceGroup. */
public final class SecurityConnectorsGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-08-01-preview/examples/SecurityConnectors/GetSecurityConnectorSingleResource_example.json
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-03-01-preview/examples/SecurityConnectors/GetSecurityConnectorSingleResource_example.json
*/
/**
* Sample code: Retrieve a security connector.
diff --git a/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityConnectorsListByResourceGroupSamples.java b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityConnectorsListByResourceGroupSamples.java
index 7ef176cdabd6..649474989719 100644
--- a/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityConnectorsListByResourceGroupSamples.java
+++ b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityConnectorsListByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for SecurityConnectors ListByResourceGroup. */
public final class SecurityConnectorsListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-08-01-preview/examples/SecurityConnectors/GetSecurityConnectorsResourceGroup_example.json
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-03-01-preview/examples/SecurityConnectors/GetSecurityConnectorsResourceGroup_example.json
*/
/**
* Sample code: List all security connectors of a specified resource group.
diff --git a/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityConnectorsListSamples.java b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityConnectorsListSamples.java
index 7ffad4112de9..d2178cf30549 100644
--- a/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityConnectorsListSamples.java
+++ b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityConnectorsListSamples.java
@@ -7,7 +7,7 @@
/** Samples for SecurityConnectors List. */
public final class SecurityConnectorsListSamples {
/*
- * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-08-01-preview/examples/SecurityConnectors/GetSecurityConnectorsSubscription_example.json
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-03-01-preview/examples/SecurityConnectors/GetSecurityConnectorsSubscription_example.json
*/
/**
* Sample code: List all security connectors of a specified subscription.
diff --git a/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityConnectorsUpdateSamples.java b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityConnectorsUpdateSamples.java
index 69c6877ab806..9f3ffaccc23a 100644
--- a/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityConnectorsUpdateSamples.java
+++ b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityConnectorsUpdateSamples.java
@@ -16,7 +16,7 @@
/** Samples for SecurityConnectors Update. */
public final class SecurityConnectorsUpdateSamples {
/*
- * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-08-01-preview/examples/SecurityConnectors/PatchSecurityConnector_example.json
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-03-01-preview/examples/SecurityConnectors/PatchSecurityConnector_example.json
*/
/**
* Sample code: Update a security connector.
diff --git a/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityOperatorsCreateOrUpdateSamples.java b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityOperatorsCreateOrUpdateSamples.java
new file mode 100644
index 000000000000..7c3df1c5f7af
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityOperatorsCreateOrUpdateSamples.java
@@ -0,0 +1,24 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.generated;
+
+/** Samples for SecurityOperators CreateOrUpdate. */
+public final class SecurityOperatorsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-01-01-preview/examples/SecurityOperators/PutSecurityOperatorByName_example.json
+ */
+ /**
+ * Sample code: Create a security operator on the given scope.
+ *
+ * @param manager Entry point to SecurityManager.
+ */
+ public static void createASecurityOperatorOnTheGivenScope(
+ com.azure.resourcemanager.security.SecurityManager manager) {
+ manager
+ .securityOperators()
+ .createOrUpdateWithResponse(
+ "CloudPosture", "DefenderCSPMSecurityOperator", com.azure.core.util.Context.NONE);
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityOperatorsDeleteSamples.java b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityOperatorsDeleteSamples.java
new file mode 100644
index 000000000000..adcfb5eca9b0
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityOperatorsDeleteSamples.java
@@ -0,0 +1,24 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.generated;
+
+/** Samples for SecurityOperators Delete. */
+public final class SecurityOperatorsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-01-01-preview/examples/SecurityOperators/DeleteSecurityOperatorByName_example.json
+ */
+ /**
+ * Sample code: Delete SecurityOperator on subscription.
+ *
+ * @param manager Entry point to SecurityManager.
+ */
+ public static void deleteSecurityOperatorOnSubscription(
+ com.azure.resourcemanager.security.SecurityManager manager) {
+ manager
+ .securityOperators()
+ .deleteByResourceGroupWithResponse(
+ "CloudPosture", "DefenderCSPMSecurityOperator", com.azure.core.util.Context.NONE);
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityOperatorsGetSamples.java b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityOperatorsGetSamples.java
new file mode 100644
index 000000000000..ad5c63907d76
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityOperatorsGetSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.generated;
+
+/** Samples for SecurityOperators Get. */
+public final class SecurityOperatorsGetSamples {
+ /*
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-01-01-preview/examples/SecurityOperators/GetSecurityOperatorByName_example.json
+ */
+ /**
+ * Sample code: Get a specific security operator by scope and securityOperatorName.
+ *
+ * @param manager Entry point to SecurityManager.
+ */
+ public static void getASpecificSecurityOperatorByScopeAndSecurityOperatorName(
+ com.azure.resourcemanager.security.SecurityManager manager) {
+ manager
+ .securityOperators()
+ .getWithResponse("CloudPosture", "DefenderCSPMSecurityOperator", com.azure.core.util.Context.NONE);
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityOperatorsListSamples.java b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityOperatorsListSamples.java
new file mode 100644
index 000000000000..9261288d508d
--- /dev/null
+++ b/sdk/security/azure-resourcemanager-security/src/samples/java/com/azure/resourcemanager/security/generated/SecurityOperatorsListSamples.java
@@ -0,0 +1,20 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.security.generated;
+
+/** Samples for SecurityOperators List. */
+public final class SecurityOperatorsListSamples {
+ /*
+ * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-01-01-preview/examples/SecurityOperators/ListSecurityOperators_example.json
+ */
+ /**
+ * Sample code: List SecurityOperators.
+ *
+ * @param manager Entry point to SecurityManager.
+ */
+ public static void listSecurityOperators(com.azure.resourcemanager.security.SecurityManager manager) {
+ manager.securityOperators().listWithResponse("CloudPosture", com.azure.core.util.Context.NONE);
+ }
+}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AadConnectivityStateAutoGeneratedTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AadConnectivityStateAutoGeneratedTests.java
deleted file mode 100644
index 6017d8ddf8b6..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AadConnectivityStateAutoGeneratedTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AadConnectivityState;
-import com.azure.resourcemanager.security.models.AadConnectivityStateAutoGenerated;
-import org.junit.jupiter.api.Assertions;
-
-public final class AadConnectivityStateAutoGeneratedTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AadConnectivityStateAutoGenerated model =
- BinaryData
- .fromString("{\"connectivityState\":\"NotLicensed\"}")
- .toObject(AadConnectivityStateAutoGenerated.class);
- Assertions.assertEquals(AadConnectivityState.NOT_LICENSED, model.connectivityState());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AadConnectivityStateAutoGenerated model =
- new AadConnectivityStateAutoGenerated().withConnectivityState(AadConnectivityState.NOT_LICENSED);
- model = BinaryData.fromObject(model).toObject(AadConnectivityStateAutoGenerated.class);
- Assertions.assertEquals(AadConnectivityState.NOT_LICENSED, model.connectivityState());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AadExternalSecuritySolutionTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AadExternalSecuritySolutionTests.java
deleted file mode 100644
index 95f0df9939ab..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AadExternalSecuritySolutionTests.java
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AadConnectivityState;
-import com.azure.resourcemanager.security.models.AadExternalSecuritySolution;
-import com.azure.resourcemanager.security.models.AadSolutionProperties;
-import com.azure.resourcemanager.security.models.ConnectedWorkspace;
-import org.junit.jupiter.api.Assertions;
-
-public final class AadExternalSecuritySolutionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AadExternalSecuritySolution model =
- BinaryData
- .fromString(
- "{\"kind\":\"AAD\",\"properties\":{\"connectivityState\":\"Connected\",\"deviceVendor\":\"bbxbhmed\",\"deviceType\":\"lbjywfcfxzirzzih\",\"workspace\":{\"id\":\"pusuv\"},\"\":{\"vxadqacfrgnawbab\":\"dataczwciidjsllfryvd\",\"yq\":\"datafbktyjmfczlf\"}},\"location\":\"rbzg\",\"id\":\"woxqm\",\"name\":\"ea\",\"type\":\"cxn\"}")
- .toObject(AadExternalSecuritySolution.class);
- Assertions.assertEquals("bbxbhmed", model.properties().deviceVendor());
- Assertions.assertEquals("lbjywfcfxzirzzih", model.properties().deviceType());
- Assertions.assertEquals("pusuv", model.properties().workspace().id());
- Assertions.assertEquals(AadConnectivityState.CONNECTED, model.properties().connectivityState());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AadExternalSecuritySolution model =
- new AadExternalSecuritySolution()
- .withProperties(
- new AadSolutionProperties()
- .withDeviceVendor("bbxbhmed")
- .withDeviceType("lbjywfcfxzirzzih")
- .withWorkspace(new ConnectedWorkspace().withId("pusuv"))
- .withConnectivityState(AadConnectivityState.CONNECTED));
- model = BinaryData.fromObject(model).toObject(AadExternalSecuritySolution.class);
- Assertions.assertEquals("bbxbhmed", model.properties().deviceVendor());
- Assertions.assertEquals("lbjywfcfxzirzzih", model.properties().deviceType());
- Assertions.assertEquals("pusuv", model.properties().workspace().id());
- Assertions.assertEquals(AadConnectivityState.CONNECTED, model.properties().connectivityState());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AadSolutionPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AadSolutionPropertiesTests.java
deleted file mode 100644
index 7f55778858a6..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AadSolutionPropertiesTests.java
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AadConnectivityState;
-import com.azure.resourcemanager.security.models.AadSolutionProperties;
-import com.azure.resourcemanager.security.models.ConnectedWorkspace;
-import org.junit.jupiter.api.Assertions;
-
-public final class AadSolutionPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AadSolutionProperties model =
- BinaryData
- .fromString(
- "{\"connectivityState\":\"Connected\",\"deviceVendor\":\"hlusrvxisi\",\"deviceType\":\"ceagbjqvlsumywz\",\"workspace\":{\"id\":\"xgo\"},\"\":{\"ebgvo\":\"datajfqipubyznclkfk\",\"tuoqujlyegqavni\":\"datae\",\"fvabmvmsxba\":\"dataflqqbtnyjpylxd\"}}")
- .toObject(AadSolutionProperties.class);
- Assertions.assertEquals("hlusrvxisi", model.deviceVendor());
- Assertions.assertEquals("ceagbjqvlsumywz", model.deviceType());
- Assertions.assertEquals("xgo", model.workspace().id());
- Assertions.assertEquals(AadConnectivityState.CONNECTED, model.connectivityState());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AadSolutionProperties model =
- new AadSolutionProperties()
- .withDeviceVendor("hlusrvxisi")
- .withDeviceType("ceagbjqvlsumywz")
- .withWorkspace(new ConnectedWorkspace().withId("xgo"))
- .withConnectivityState(AadConnectivityState.CONNECTED);
- model = BinaryData.fromObject(model).toObject(AadSolutionProperties.class);
- Assertions.assertEquals("hlusrvxisi", model.deviceVendor());
- Assertions.assertEquals("ceagbjqvlsumywz", model.deviceType());
- Assertions.assertEquals("xgo", model.workspace().id());
- Assertions.assertEquals(AadConnectivityState.CONNECTED, model.connectivityState());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ActiveConnectionsNotInAllowedRangeTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ActiveConnectionsNotInAllowedRangeTests.java
deleted file mode 100644
index eb12e14bc564..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ActiveConnectionsNotInAllowedRangeTests.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.ActiveConnectionsNotInAllowedRange;
-import java.time.Duration;
-import org.junit.jupiter.api.Assertions;
-
-public final class ActiveConnectionsNotInAllowedRangeTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ActiveConnectionsNotInAllowedRange model =
- BinaryData
- .fromString(
- "{\"ruleType\":\"ActiveConnectionsNotInAllowedRange\",\"timeWindowSize\":\"PT80H24M54S\",\"minThreshold\":1003409215,\"maxThreshold\":1392264110,\"displayName\":\"zykmktpvwxqcse\",\"description\":\"hkhufm\",\"isEnabled\":false}")
- .toObject(ActiveConnectionsNotInAllowedRange.class);
- Assertions.assertEquals(false, model.isEnabled());
- Assertions.assertEquals(1003409215, model.minThreshold());
- Assertions.assertEquals(1392264110, model.maxThreshold());
- Assertions.assertEquals(Duration.parse("PT80H24M54S"), model.timeWindowSize());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ActiveConnectionsNotInAllowedRange model =
- new ActiveConnectionsNotInAllowedRange()
- .withIsEnabled(false)
- .withMinThreshold(1003409215)
- .withMaxThreshold(1392264110)
- .withTimeWindowSize(Duration.parse("PT80H24M54S"));
- model = BinaryData.fromObject(model).toObject(ActiveConnectionsNotInAllowedRange.class);
- Assertions.assertEquals(false, model.isEnabled());
- Assertions.assertEquals(1003409215, model.minThreshold());
- Assertions.assertEquals(1392264110, model.maxThreshold());
- Assertions.assertEquals(Duration.parse("PT80H24M54S"), model.timeWindowSize());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveApplicationControlGroupDataTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveApplicationControlGroupDataTests.java
deleted file mode 100644
index 05cb8413a6c2..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveApplicationControlGroupDataTests.java
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.AdaptiveApplicationControlGroupData;
-import com.azure.resourcemanager.security.models.ConfigurationStatus;
-import com.azure.resourcemanager.security.models.EnforcementMode;
-import com.azure.resourcemanager.security.models.EnforcementSupport;
-import com.azure.resourcemanager.security.models.FileType;
-import com.azure.resourcemanager.security.models.PathRecommendation;
-import com.azure.resourcemanager.security.models.ProtectionMode;
-import com.azure.resourcemanager.security.models.PublisherInfo;
-import com.azure.resourcemanager.security.models.RecommendationAction;
-import com.azure.resourcemanager.security.models.RecommendationType;
-import com.azure.resourcemanager.security.models.VmRecommendation;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AdaptiveApplicationControlGroupDataTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AdaptiveApplicationControlGroupData model =
- BinaryData
- .fromString(
- "{\"enforcementMode\":\"Audit\",\"protectionMode\":{\"exe\":\"None\",\"msi\":\"None\",\"script\":\"None\",\"executable\":\"Audit\"},\"configurationStatus\":\"InProgress\",\"recommendationStatus\":\"NotRecommended\",\"issues\":[{\"issue\":\"RulesViolatedManually\",\"numberOfVms\":15.610468}],\"sourceSystem\":\"Azure_AuditD\",\"vmRecommendations\":[{\"configurationStatus\":\"NoStatus\",\"recommendationAction\":\"Recommended\",\"resourceId\":\"hlf\",\"enforcementSupport\":\"Supported\"}],\"pathRecommendations\":[{\"path\":\"wahfbousnfepgfew\",\"action\":\"Add\",\"type\":\"IoT_SharedCredentials\",\"publisherInfo\":{\"publisherName\":\"ncxykxhdjhlimm\",\"productName\":\"x\",\"binaryName\":\"bcporxvxcjzhqizx\",\"version\":\"xtgqscjavftjuh\"},\"common\":true,\"userSids\":[\"mtggu\"],\"usernames\":[],\"fileType\":\"Script\",\"configurationStatus\":\"Failed\"}]}")
- .toObject(AdaptiveApplicationControlGroupData.class);
- Assertions.assertEquals(EnforcementMode.AUDIT, model.enforcementMode());
- Assertions.assertEquals(EnforcementMode.NONE, model.protectionMode().exe());
- Assertions.assertEquals(EnforcementMode.NONE, model.protectionMode().msi());
- Assertions.assertEquals(EnforcementMode.NONE, model.protectionMode().script());
- Assertions.assertEquals(EnforcementMode.AUDIT, model.protectionMode().executable());
- Assertions.assertEquals(ConfigurationStatus.NO_STATUS, model.vmRecommendations().get(0).configurationStatus());
- Assertions
- .assertEquals(RecommendationAction.RECOMMENDED, model.vmRecommendations().get(0).recommendationAction());
- Assertions.assertEquals("hlf", model.vmRecommendations().get(0).resourceId());
- Assertions.assertEquals(EnforcementSupport.SUPPORTED, model.vmRecommendations().get(0).enforcementSupport());
- Assertions.assertEquals("wahfbousnfepgfew", model.pathRecommendations().get(0).path());
- Assertions.assertEquals(RecommendationAction.ADD, model.pathRecommendations().get(0).action());
- Assertions.assertEquals(RecommendationType.IO_T_SHARED_CREDENTIALS, model.pathRecommendations().get(0).type());
- Assertions.assertEquals("ncxykxhdjhlimm", model.pathRecommendations().get(0).publisherInfo().publisherName());
- Assertions.assertEquals("x", model.pathRecommendations().get(0).publisherInfo().productName());
- Assertions.assertEquals("bcporxvxcjzhqizx", model.pathRecommendations().get(0).publisherInfo().binaryName());
- Assertions.assertEquals("xtgqscjavftjuh", model.pathRecommendations().get(0).publisherInfo().version());
- Assertions.assertEquals(true, model.pathRecommendations().get(0).common());
- Assertions.assertEquals("mtggu", model.pathRecommendations().get(0).userSids().get(0));
- Assertions.assertEquals(FileType.SCRIPT, model.pathRecommendations().get(0).fileType());
- Assertions.assertEquals(ConfigurationStatus.FAILED, model.pathRecommendations().get(0).configurationStatus());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AdaptiveApplicationControlGroupData model =
- new AdaptiveApplicationControlGroupData()
- .withEnforcementMode(EnforcementMode.AUDIT)
- .withProtectionMode(
- new ProtectionMode()
- .withExe(EnforcementMode.NONE)
- .withMsi(EnforcementMode.NONE)
- .withScript(EnforcementMode.NONE)
- .withExecutable(EnforcementMode.AUDIT))
- .withVmRecommendations(
- Arrays
- .asList(
- new VmRecommendation()
- .withConfigurationStatus(ConfigurationStatus.NO_STATUS)
- .withRecommendationAction(RecommendationAction.RECOMMENDED)
- .withResourceId("hlf")
- .withEnforcementSupport(EnforcementSupport.SUPPORTED)))
- .withPathRecommendations(
- Arrays
- .asList(
- new PathRecommendation()
- .withPath("wahfbousnfepgfew")
- .withAction(RecommendationAction.ADD)
- .withType(RecommendationType.IO_T_SHARED_CREDENTIALS)
- .withPublisherInfo(
- new PublisherInfo()
- .withPublisherName("ncxykxhdjhlimm")
- .withProductName("x")
- .withBinaryName("bcporxvxcjzhqizx")
- .withVersion("xtgqscjavftjuh"))
- .withCommon(true)
- .withUserSids(Arrays.asList("mtggu"))
- .withUsernames(Arrays.asList())
- .withFileType(FileType.SCRIPT)
- .withConfigurationStatus(ConfigurationStatus.FAILED)));
- model = BinaryData.fromObject(model).toObject(AdaptiveApplicationControlGroupData.class);
- Assertions.assertEquals(EnforcementMode.AUDIT, model.enforcementMode());
- Assertions.assertEquals(EnforcementMode.NONE, model.protectionMode().exe());
- Assertions.assertEquals(EnforcementMode.NONE, model.protectionMode().msi());
- Assertions.assertEquals(EnforcementMode.NONE, model.protectionMode().script());
- Assertions.assertEquals(EnforcementMode.AUDIT, model.protectionMode().executable());
- Assertions.assertEquals(ConfigurationStatus.NO_STATUS, model.vmRecommendations().get(0).configurationStatus());
- Assertions
- .assertEquals(RecommendationAction.RECOMMENDED, model.vmRecommendations().get(0).recommendationAction());
- Assertions.assertEquals("hlf", model.vmRecommendations().get(0).resourceId());
- Assertions.assertEquals(EnforcementSupport.SUPPORTED, model.vmRecommendations().get(0).enforcementSupport());
- Assertions.assertEquals("wahfbousnfepgfew", model.pathRecommendations().get(0).path());
- Assertions.assertEquals(RecommendationAction.ADD, model.pathRecommendations().get(0).action());
- Assertions.assertEquals(RecommendationType.IO_T_SHARED_CREDENTIALS, model.pathRecommendations().get(0).type());
- Assertions.assertEquals("ncxykxhdjhlimm", model.pathRecommendations().get(0).publisherInfo().publisherName());
- Assertions.assertEquals("x", model.pathRecommendations().get(0).publisherInfo().productName());
- Assertions.assertEquals("bcporxvxcjzhqizx", model.pathRecommendations().get(0).publisherInfo().binaryName());
- Assertions.assertEquals("xtgqscjavftjuh", model.pathRecommendations().get(0).publisherInfo().version());
- Assertions.assertEquals(true, model.pathRecommendations().get(0).common());
- Assertions.assertEquals("mtggu", model.pathRecommendations().get(0).userSids().get(0));
- Assertions.assertEquals(FileType.SCRIPT, model.pathRecommendations().get(0).fileType());
- Assertions.assertEquals(ConfigurationStatus.FAILED, model.pathRecommendations().get(0).configurationStatus());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveApplicationControlGroupInnerTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveApplicationControlGroupInnerTests.java
deleted file mode 100644
index 77f3305d4bde..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveApplicationControlGroupInnerTests.java
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.AdaptiveApplicationControlGroupInner;
-import com.azure.resourcemanager.security.models.ConfigurationStatus;
-import com.azure.resourcemanager.security.models.EnforcementMode;
-import com.azure.resourcemanager.security.models.EnforcementSupport;
-import com.azure.resourcemanager.security.models.FileType;
-import com.azure.resourcemanager.security.models.PathRecommendation;
-import com.azure.resourcemanager.security.models.ProtectionMode;
-import com.azure.resourcemanager.security.models.RecommendationAction;
-import com.azure.resourcemanager.security.models.RecommendationType;
-import com.azure.resourcemanager.security.models.VmRecommendation;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AdaptiveApplicationControlGroupInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AdaptiveApplicationControlGroupInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"enforcementMode\":\"Enforce\",\"protectionMode\":{\"exe\":\"Audit\",\"msi\":\"Enforce\",\"script\":\"None\",\"executable\":\"Audit\"},\"configurationStatus\":\"Configured\",\"recommendationStatus\":\"NoStatus\",\"issues\":[{\"issue\":\"ExecutableViolationsAudited\",\"numberOfVms\":81.69838},{\"issue\":\"ExecutableViolationsAudited\",\"numberOfVms\":25.884687},{\"issue\":\"ViolationsBlocked\",\"numberOfVms\":0.6237805}],\"sourceSystem\":\"None\",\"vmRecommendations\":[{\"configurationStatus\":\"Failed\",\"recommendationAction\":\"Remove\",\"resourceId\":\"hlabrq\",\"enforcementSupport\":\"Unknown\"},{\"configurationStatus\":\"NoStatus\",\"recommendationAction\":\"Recommended\",\"resourceId\":\"trgaehvv\",\"enforcementSupport\":\"NotSupported\"},{\"configurationStatus\":\"NoStatus\",\"recommendationAction\":\"Remove\",\"resourceId\":\"oqbeitpkxzt\",\"enforcementSupport\":\"Supported\"},{\"configurationStatus\":\"InProgress\",\"recommendationAction\":\"Remove\",\"resourceId\":\"idgfc\",\"enforcementSupport\":\"NotSupported\"}],\"pathRecommendations\":[{\"path\":\"aqxzhemjyho\",\"action\":\"Remove\",\"type\":\"IoT_EdgeLoggingOptions\",\"common\":true,\"userSids\":[],\"usernames\":[],\"fileType\":\"Script\",\"configurationStatus\":\"Configured\"}]},\"location\":\"kb\",\"id\":\"wpfaj\",\"name\":\"jwltlwtjjgu\",\"type\":\"talhsnvkcdmxzr\"}")
- .toObject(AdaptiveApplicationControlGroupInner.class);
- Assertions.assertEquals(EnforcementMode.ENFORCE, model.enforcementMode());
- Assertions.assertEquals(EnforcementMode.AUDIT, model.protectionMode().exe());
- Assertions.assertEquals(EnforcementMode.ENFORCE, model.protectionMode().msi());
- Assertions.assertEquals(EnforcementMode.NONE, model.protectionMode().script());
- Assertions.assertEquals(EnforcementMode.AUDIT, model.protectionMode().executable());
- Assertions.assertEquals(ConfigurationStatus.FAILED, model.vmRecommendations().get(0).configurationStatus());
- Assertions.assertEquals(RecommendationAction.REMOVE, model.vmRecommendations().get(0).recommendationAction());
- Assertions.assertEquals("hlabrq", model.vmRecommendations().get(0).resourceId());
- Assertions.assertEquals(EnforcementSupport.UNKNOWN, model.vmRecommendations().get(0).enforcementSupport());
- Assertions.assertEquals("aqxzhemjyho", model.pathRecommendations().get(0).path());
- Assertions.assertEquals(RecommendationAction.REMOVE, model.pathRecommendations().get(0).action());
- Assertions
- .assertEquals(RecommendationType.IO_T_EDGE_LOGGING_OPTIONS, model.pathRecommendations().get(0).type());
- Assertions.assertEquals(true, model.pathRecommendations().get(0).common());
- Assertions.assertEquals(FileType.SCRIPT, model.pathRecommendations().get(0).fileType());
- Assertions
- .assertEquals(ConfigurationStatus.CONFIGURED, model.pathRecommendations().get(0).configurationStatus());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AdaptiveApplicationControlGroupInner model =
- new AdaptiveApplicationControlGroupInner()
- .withEnforcementMode(EnforcementMode.ENFORCE)
- .withProtectionMode(
- new ProtectionMode()
- .withExe(EnforcementMode.AUDIT)
- .withMsi(EnforcementMode.ENFORCE)
- .withScript(EnforcementMode.NONE)
- .withExecutable(EnforcementMode.AUDIT))
- .withVmRecommendations(
- Arrays
- .asList(
- new VmRecommendation()
- .withConfigurationStatus(ConfigurationStatus.FAILED)
- .withRecommendationAction(RecommendationAction.REMOVE)
- .withResourceId("hlabrq")
- .withEnforcementSupport(EnforcementSupport.UNKNOWN),
- new VmRecommendation()
- .withConfigurationStatus(ConfigurationStatus.NO_STATUS)
- .withRecommendationAction(RecommendationAction.RECOMMENDED)
- .withResourceId("trgaehvv")
- .withEnforcementSupport(EnforcementSupport.NOT_SUPPORTED),
- new VmRecommendation()
- .withConfigurationStatus(ConfigurationStatus.NO_STATUS)
- .withRecommendationAction(RecommendationAction.REMOVE)
- .withResourceId("oqbeitpkxzt")
- .withEnforcementSupport(EnforcementSupport.SUPPORTED),
- new VmRecommendation()
- .withConfigurationStatus(ConfigurationStatus.IN_PROGRESS)
- .withRecommendationAction(RecommendationAction.REMOVE)
- .withResourceId("idgfc")
- .withEnforcementSupport(EnforcementSupport.NOT_SUPPORTED)))
- .withPathRecommendations(
- Arrays
- .asList(
- new PathRecommendation()
- .withPath("aqxzhemjyho")
- .withAction(RecommendationAction.REMOVE)
- .withType(RecommendationType.IO_T_EDGE_LOGGING_OPTIONS)
- .withCommon(true)
- .withUserSids(Arrays.asList())
- .withUsernames(Arrays.asList())
- .withFileType(FileType.SCRIPT)
- .withConfigurationStatus(ConfigurationStatus.CONFIGURED)));
- model = BinaryData.fromObject(model).toObject(AdaptiveApplicationControlGroupInner.class);
- Assertions.assertEquals(EnforcementMode.ENFORCE, model.enforcementMode());
- Assertions.assertEquals(EnforcementMode.AUDIT, model.protectionMode().exe());
- Assertions.assertEquals(EnforcementMode.ENFORCE, model.protectionMode().msi());
- Assertions.assertEquals(EnforcementMode.NONE, model.protectionMode().script());
- Assertions.assertEquals(EnforcementMode.AUDIT, model.protectionMode().executable());
- Assertions.assertEquals(ConfigurationStatus.FAILED, model.vmRecommendations().get(0).configurationStatus());
- Assertions.assertEquals(RecommendationAction.REMOVE, model.vmRecommendations().get(0).recommendationAction());
- Assertions.assertEquals("hlabrq", model.vmRecommendations().get(0).resourceId());
- Assertions.assertEquals(EnforcementSupport.UNKNOWN, model.vmRecommendations().get(0).enforcementSupport());
- Assertions.assertEquals("aqxzhemjyho", model.pathRecommendations().get(0).path());
- Assertions.assertEquals(RecommendationAction.REMOVE, model.pathRecommendations().get(0).action());
- Assertions
- .assertEquals(RecommendationType.IO_T_EDGE_LOGGING_OPTIONS, model.pathRecommendations().get(0).type());
- Assertions.assertEquals(true, model.pathRecommendations().get(0).common());
- Assertions.assertEquals(FileType.SCRIPT, model.pathRecommendations().get(0).fileType());
- Assertions
- .assertEquals(ConfigurationStatus.CONFIGURED, model.pathRecommendations().get(0).configurationStatus());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveApplicationControlGroupsInnerTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveApplicationControlGroupsInnerTests.java
deleted file mode 100644
index 3dc11f75363d..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveApplicationControlGroupsInnerTests.java
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.AdaptiveApplicationControlGroupInner;
-import com.azure.resourcemanager.security.fluent.models.AdaptiveApplicationControlGroupsInner;
-import com.azure.resourcemanager.security.models.EnforcementMode;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AdaptiveApplicationControlGroupsInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AdaptiveApplicationControlGroupsInner model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"enforcementMode\":\"Audit\",\"configurationStatus\":\"InProgress\",\"recommendationStatus\":\"Recommended\",\"issues\":[],\"sourceSystem\":\"None\",\"vmRecommendations\":[],\"pathRecommendations\":[]},\"location\":\"cojocqwogfnzjvus\",\"id\":\"zldmozuxy\",\"name\":\"fsbtkad\",\"type\":\"ysownbtgkbug\"},{\"properties\":{\"enforcementMode\":\"Enforce\",\"configurationStatus\":\"Failed\",\"recommendationStatus\":\"NotRecommended\",\"issues\":[],\"sourceSystem\":\"None\",\"vmRecommendations\":[],\"pathRecommendations\":[]},\"location\":\"eypefojyqd\",\"id\":\"cuplcplcwkhih\",\"name\":\"hlhzdsqtzbsrgno\",\"type\":\"cjhfgmvecactxmw\"},{\"properties\":{\"enforcementMode\":\"None\",\"configurationStatus\":\"InProgress\",\"recommendationStatus\":\"NotAvailable\",\"issues\":[],\"sourceSystem\":\"Azure_AppLocker\",\"vmRecommendations\":[],\"pathRecommendations\":[]},\"location\":\"qvgqouw\",\"id\":\"fzmpjwyivq\",\"name\":\"kfxcvhrfs\",\"type\":\"huagrttikteusqc\"},{\"properties\":{\"enforcementMode\":\"Audit\",\"configurationStatus\":\"Failed\",\"recommendationStatus\":\"NotAvailable\",\"issues\":[],\"sourceSystem\":\"NonAzure_AuditD\",\"vmRecommendations\":[],\"pathRecommendations\":[]},\"location\":\"mmfblcqcuubgqib\",\"id\":\"talmett\",\"name\":\"wgdsl\",\"type\":\"xih\"}]}")
- .toObject(AdaptiveApplicationControlGroupsInner.class);
- Assertions.assertEquals(EnforcementMode.AUDIT, model.value().get(0).enforcementMode());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AdaptiveApplicationControlGroupsInner model =
- new AdaptiveApplicationControlGroupsInner()
- .withValue(
- Arrays
- .asList(
- new AdaptiveApplicationControlGroupInner()
- .withEnforcementMode(EnforcementMode.AUDIT)
- .withVmRecommendations(Arrays.asList())
- .withPathRecommendations(Arrays.asList()),
- new AdaptiveApplicationControlGroupInner()
- .withEnforcementMode(EnforcementMode.ENFORCE)
- .withVmRecommendations(Arrays.asList())
- .withPathRecommendations(Arrays.asList()),
- new AdaptiveApplicationControlGroupInner()
- .withEnforcementMode(EnforcementMode.NONE)
- .withVmRecommendations(Arrays.asList())
- .withPathRecommendations(Arrays.asList()),
- new AdaptiveApplicationControlGroupInner()
- .withEnforcementMode(EnforcementMode.AUDIT)
- .withVmRecommendations(Arrays.asList())
- .withPathRecommendations(Arrays.asList())));
- model = BinaryData.fromObject(model).toObject(AdaptiveApplicationControlGroupsInner.class);
- Assertions.assertEquals(EnforcementMode.AUDIT, model.value().get(0).enforcementMode());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveApplicationControlIssueSummaryTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveApplicationControlIssueSummaryTests.java
deleted file mode 100644
index 697071e2a2b5..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveApplicationControlIssueSummaryTests.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AdaptiveApplicationControlIssue;
-import com.azure.resourcemanager.security.models.AdaptiveApplicationControlIssueSummary;
-import org.junit.jupiter.api.Assertions;
-
-public final class AdaptiveApplicationControlIssueSummaryTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AdaptiveApplicationControlIssueSummary model =
- BinaryData
- .fromString("{\"issue\":\"ViolationsAudited\",\"numberOfVms\":60.195232}")
- .toObject(AdaptiveApplicationControlIssueSummary.class);
- Assertions.assertEquals(AdaptiveApplicationControlIssue.VIOLATIONS_AUDITED, model.issue());
- Assertions.assertEquals(60.195232F, model.numberOfVms());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AdaptiveApplicationControlIssueSummary model =
- new AdaptiveApplicationControlIssueSummary()
- .withIssue(AdaptiveApplicationControlIssue.VIOLATIONS_AUDITED)
- .withNumberOfVms(60.195232F);
- model = BinaryData.fromObject(model).toObject(AdaptiveApplicationControlIssueSummary.class);
- Assertions.assertEquals(AdaptiveApplicationControlIssue.VIOLATIONS_AUDITED, model.issue());
- Assertions.assertEquals(60.195232F, model.numberOfVms());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveApplicationControlsDeleteByResourceGroupWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveApplicationControlsDeleteByResourceGroupWithResponseMockTests.java
deleted file mode 100644
index ab16e3375f8e..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveApplicationControlsDeleteByResourceGroupWithResponseMockTests.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AdaptiveApplicationControlsDeleteByResourceGroupWithResponseMockTests {
- @Test
- public void testDeleteWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .adaptiveApplicationControls()
- .deleteByResourceGroupWithResponse("nm", "wgpterdiuw", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveApplicationControlsGetWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveApplicationControlsGetWithResponseMockTests.java
deleted file mode 100644
index ed1ee3a08a69..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveApplicationControlsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.AdaptiveApplicationControlGroup;
-import com.azure.resourcemanager.security.models.EnforcementMode;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AdaptiveApplicationControlsGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"enforcementMode\":\"Enforce\",\"protectionMode\":{\"exe\":\"Audit\",\"msi\":\"Enforce\",\"script\":\"Audit\",\"executable\":\"None\"},\"configurationStatus\":\"InProgress\",\"recommendationStatus\":\"NotRecommended\",\"issues\":[],\"sourceSystem\":\"Azure_AppLocker\",\"vmRecommendations\":[],\"pathRecommendations\":[]},\"location\":\"ouvmrsiflik\",\"id\":\"ypzkg\",\"name\":\"fxfmyrqsdb\",\"type\":\"oksz\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- AdaptiveApplicationControlGroup response =
- manager
- .adaptiveApplicationControls()
- .getWithResponse("ydjufbnklbl", "xpegj", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals(EnforcementMode.ENFORCE, response.enforcementMode());
- Assertions.assertEquals(EnforcementMode.AUDIT, response.protectionMode().exe());
- Assertions.assertEquals(EnforcementMode.ENFORCE, response.protectionMode().msi());
- Assertions.assertEquals(EnforcementMode.AUDIT, response.protectionMode().script());
- Assertions.assertEquals(EnforcementMode.NONE, response.protectionMode().executable());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveApplicationControlsListWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveApplicationControlsListWithResponseMockTests.java
deleted file mode 100644
index e9e74e54557a..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveApplicationControlsListWithResponseMockTests.java
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.AdaptiveApplicationControlGroups;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AdaptiveApplicationControlsListWithResponseMockTests {
- @Test
- public void testListWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"location\":\"qggweeiwdh\",\"id\":\"mnc\",\"name\":\"bf\",\"type\":\"uscstunmlh\"},{\"location\":\"fbklciichgjsysmv\",\"id\":\"o\",\"name\":\"gwxfkzsi\",\"type\":\"cuvbdujgcwxvec\"},{\"location\":\"wjtrdxriza\",\"id\":\"bbgiarksykpgdqxw\",\"name\":\"b\",\"type\":\"rwiqrxhacl\"},{\"location\":\"osqkptjqgk\",\"id\":\"fmmainwhedxkpbq\",\"name\":\"unt\",\"type\":\"buizazzelwg\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- AdaptiveApplicationControlGroups response =
- manager
- .adaptiveApplicationControls()
- .listWithResponse(false, true, com.azure.core.util.Context.NONE)
- .getValue();
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveApplicationControlsPutWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveApplicationControlsPutWithResponseMockTests.java
deleted file mode 100644
index d836d1a2163c..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveApplicationControlsPutWithResponseMockTests.java
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.AdaptiveApplicationControlGroup;
-import com.azure.resourcemanager.security.models.EnforcementMode;
-import com.azure.resourcemanager.security.models.ProtectionMode;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AdaptiveApplicationControlsPutWithResponseMockTests {
- @Test
- public void testPutWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"enforcementMode\":\"None\",\"protectionMode\":{\"exe\":\"Audit\",\"msi\":\"Audit\",\"script\":\"None\",\"executable\":\"Audit\"},\"configurationStatus\":\"NotConfigured\",\"recommendationStatus\":\"NotRecommended\",\"issues\":[],\"sourceSystem\":\"NonAzure_AuditD\",\"vmRecommendations\":[],\"pathRecommendations\":[]},\"location\":\"xrjnbsconxav\",\"id\":\"pney\",\"name\":\"hbjizqfsgnwdx\",\"type\":\"edpqlrfbo\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- AdaptiveApplicationControlGroup response =
- manager
- .adaptiveApplicationControls()
- .define("kskw")
- .withExistingLocation("i")
- .withEnforcementMode(EnforcementMode.AUDIT)
- .withProtectionMode(
- new ProtectionMode()
- .withExe(EnforcementMode.ENFORCE)
- .withMsi(EnforcementMode.AUDIT)
- .withScript(EnforcementMode.ENFORCE)
- .withExecutable(EnforcementMode.NONE))
- .withVmRecommendations(Arrays.asList())
- .withPathRecommendations(Arrays.asList())
- .create();
-
- Assertions.assertEquals(EnforcementMode.NONE, response.enforcementMode());
- Assertions.assertEquals(EnforcementMode.AUDIT, response.protectionMode().exe());
- Assertions.assertEquals(EnforcementMode.AUDIT, response.protectionMode().msi());
- Assertions.assertEquals(EnforcementMode.NONE, response.protectionMode().script());
- Assertions.assertEquals(EnforcementMode.AUDIT, response.protectionMode().executable());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveNetworkHardeningEnforceRequestTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveNetworkHardeningEnforceRequestTests.java
deleted file mode 100644
index 42e85757a0fb..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveNetworkHardeningEnforceRequestTests.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AdaptiveNetworkHardeningEnforceRequest;
-import com.azure.resourcemanager.security.models.Direction;
-import com.azure.resourcemanager.security.models.Rule;
-import com.azure.resourcemanager.security.models.TransportProtocol;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AdaptiveNetworkHardeningEnforceRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AdaptiveNetworkHardeningEnforceRequest model =
- BinaryData
- .fromString(
- "{\"rules\":[{\"name\":\"vyc\",\"direction\":\"Inbound\",\"destinationPort\":1491139189,\"protocols\":[\"UDP\"],\"ipAddresses\":[\"nfnw\",\"btmvpdvjdhttza\",\"fedxihchrphkm\",\"rjdqnsdfzp\"]}],\"networkSecurityGroups\":[\"tg\",\"ylkdghrje\",\"utlwxezwzhok\"]}")
- .toObject(AdaptiveNetworkHardeningEnforceRequest.class);
- Assertions.assertEquals("vyc", model.rules().get(0).name());
- Assertions.assertEquals(Direction.INBOUND, model.rules().get(0).direction());
- Assertions.assertEquals(1491139189, model.rules().get(0).destinationPort());
- Assertions.assertEquals(TransportProtocol.UDP, model.rules().get(0).protocols().get(0));
- Assertions.assertEquals("nfnw", model.rules().get(0).ipAddresses().get(0));
- Assertions.assertEquals("tg", model.networkSecurityGroups().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AdaptiveNetworkHardeningEnforceRequest model =
- new AdaptiveNetworkHardeningEnforceRequest()
- .withRules(
- Arrays
- .asList(
- new Rule()
- .withName("vyc")
- .withDirection(Direction.INBOUND)
- .withDestinationPort(1491139189)
- .withProtocols(Arrays.asList(TransportProtocol.UDP))
- .withIpAddresses(
- Arrays.asList("nfnw", "btmvpdvjdhttza", "fedxihchrphkm", "rjdqnsdfzp"))))
- .withNetworkSecurityGroups(Arrays.asList("tg", "ylkdghrje", "utlwxezwzhok"));
- model = BinaryData.fromObject(model).toObject(AdaptiveNetworkHardeningEnforceRequest.class);
- Assertions.assertEquals("vyc", model.rules().get(0).name());
- Assertions.assertEquals(Direction.INBOUND, model.rules().get(0).direction());
- Assertions.assertEquals(1491139189, model.rules().get(0).destinationPort());
- Assertions.assertEquals(TransportProtocol.UDP, model.rules().get(0).protocols().get(0));
- Assertions.assertEquals("nfnw", model.rules().get(0).ipAddresses().get(0));
- Assertions.assertEquals("tg", model.networkSecurityGroups().get(0));
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveNetworkHardeningInnerTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveNetworkHardeningInnerTests.java
deleted file mode 100644
index da41e2e59d87..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveNetworkHardeningInnerTests.java
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.AdaptiveNetworkHardeningInner;
-import com.azure.resourcemanager.security.models.Direction;
-import com.azure.resourcemanager.security.models.EffectiveNetworkSecurityGroups;
-import com.azure.resourcemanager.security.models.Rule;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AdaptiveNetworkHardeningInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AdaptiveNetworkHardeningInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"rules\":[{\"name\":\"rfe\",\"direction\":\"Outbound\",\"destinationPort\":301630864,\"protocols\":[],\"ipAddresses\":[]},{\"name\":\"hcans\",\"direction\":\"Inbound\",\"destinationPort\":1800110701,\"protocols\":[],\"ipAddresses\":[]},{\"name\":\"igdivbkbxg\",\"direction\":\"Inbound\",\"destinationPort\":2081513021,\"protocols\":[],\"ipAddresses\":[]},{\"name\":\"sqvdaeyygux\",\"direction\":\"Outbound\",\"destinationPort\":1119953964,\"protocols\":[],\"ipAddresses\":[]}],\"rulesCalculationTime\":\"2021-01-11T12:34:59Z\",\"effectiveNetworkSecurityGroups\":[{\"networkInterface\":\"gims\",\"networkSecurityGroups\":[]},{\"networkInterface\":\"asi\",\"networkSecurityGroups\":[]}]},\"id\":\"dyvvjskgfmocwahp\",\"name\":\"gat\",\"type\":\"eaahhvjhhn\"}")
- .toObject(AdaptiveNetworkHardeningInner.class);
- Assertions.assertEquals("rfe", model.rules().get(0).name());
- Assertions.assertEquals(Direction.OUTBOUND, model.rules().get(0).direction());
- Assertions.assertEquals(301630864, model.rules().get(0).destinationPort());
- Assertions.assertEquals(OffsetDateTime.parse("2021-01-11T12:34:59Z"), model.rulesCalculationTime());
- Assertions.assertEquals("gims", model.effectiveNetworkSecurityGroups().get(0).networkInterface());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AdaptiveNetworkHardeningInner model =
- new AdaptiveNetworkHardeningInner()
- .withRules(
- Arrays
- .asList(
- new Rule()
- .withName("rfe")
- .withDirection(Direction.OUTBOUND)
- .withDestinationPort(301630864)
- .withProtocols(Arrays.asList())
- .withIpAddresses(Arrays.asList()),
- new Rule()
- .withName("hcans")
- .withDirection(Direction.INBOUND)
- .withDestinationPort(1800110701)
- .withProtocols(Arrays.asList())
- .withIpAddresses(Arrays.asList()),
- new Rule()
- .withName("igdivbkbxg")
- .withDirection(Direction.INBOUND)
- .withDestinationPort(2081513021)
- .withProtocols(Arrays.asList())
- .withIpAddresses(Arrays.asList()),
- new Rule()
- .withName("sqvdaeyygux")
- .withDirection(Direction.OUTBOUND)
- .withDestinationPort(1119953964)
- .withProtocols(Arrays.asList())
- .withIpAddresses(Arrays.asList())))
- .withRulesCalculationTime(OffsetDateTime.parse("2021-01-11T12:34:59Z"))
- .withEffectiveNetworkSecurityGroups(
- Arrays
- .asList(
- new EffectiveNetworkSecurityGroups()
- .withNetworkInterface("gims")
- .withNetworkSecurityGroups(Arrays.asList()),
- new EffectiveNetworkSecurityGroups()
- .withNetworkInterface("asi")
- .withNetworkSecurityGroups(Arrays.asList())));
- model = BinaryData.fromObject(model).toObject(AdaptiveNetworkHardeningInner.class);
- Assertions.assertEquals("rfe", model.rules().get(0).name());
- Assertions.assertEquals(Direction.OUTBOUND, model.rules().get(0).direction());
- Assertions.assertEquals(301630864, model.rules().get(0).destinationPort());
- Assertions.assertEquals(OffsetDateTime.parse("2021-01-11T12:34:59Z"), model.rulesCalculationTime());
- Assertions.assertEquals("gims", model.effectiveNetworkSecurityGroups().get(0).networkInterface());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveNetworkHardeningPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveNetworkHardeningPropertiesTests.java
deleted file mode 100644
index 171862be894e..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveNetworkHardeningPropertiesTests.java
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.AdaptiveNetworkHardeningProperties;
-import com.azure.resourcemanager.security.models.Direction;
-import com.azure.resourcemanager.security.models.EffectiveNetworkSecurityGroups;
-import com.azure.resourcemanager.security.models.Rule;
-import com.azure.resourcemanager.security.models.TransportProtocol;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AdaptiveNetworkHardeningPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AdaptiveNetworkHardeningProperties model =
- BinaryData
- .fromString(
- "{\"rules\":[{\"name\":\"bbjjidjksyxk\",\"direction\":\"Inbound\",\"destinationPort\":1732474011,\"protocols\":[\"TCP\",\"UDP\"],\"ipAddresses\":[\"dnlj\",\"age\"]},{\"name\":\"ulxunsmjbnkpp\",\"direction\":\"Outbound\",\"destinationPort\":2047909976,\"protocols\":[\"TCP\",\"TCP\",\"TCP\",\"TCP\"],\"ipAddresses\":[\"gwklnsr\"]}],\"rulesCalculationTime\":\"2021-08-04T15:57:37Z\",\"effectiveNetworkSecurityGroups\":[{\"networkInterface\":\"xcktpiymerteeamm\",\"networkSecurityGroups\":[\"ekkkzd\",\"rtkgdojbmxvavref\",\"eesvecu\",\"jpxtxsuwprtuj\"]},{\"networkInterface\":\"awddjibab\",\"networkSecurityGroups\":[\"titvtzeexavox\",\"fglecdmdqbwp\",\"pqtgsfjac\",\"slhhxudbxv\"]},{\"networkInterface\":\"htnsi\",\"networkSecurityGroups\":[\"hzmme\",\"ckdlpag\",\"rcxfailcfxwmdb\"]}]}")
- .toObject(AdaptiveNetworkHardeningProperties.class);
- Assertions.assertEquals("bbjjidjksyxk", model.rules().get(0).name());
- Assertions.assertEquals(Direction.INBOUND, model.rules().get(0).direction());
- Assertions.assertEquals(1732474011, model.rules().get(0).destinationPort());
- Assertions.assertEquals(TransportProtocol.TCP, model.rules().get(0).protocols().get(0));
- Assertions.assertEquals("dnlj", model.rules().get(0).ipAddresses().get(0));
- Assertions.assertEquals(OffsetDateTime.parse("2021-08-04T15:57:37Z"), model.rulesCalculationTime());
- Assertions.assertEquals("xcktpiymerteeamm", model.effectiveNetworkSecurityGroups().get(0).networkInterface());
- Assertions.assertEquals("ekkkzd", model.effectiveNetworkSecurityGroups().get(0).networkSecurityGroups().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AdaptiveNetworkHardeningProperties model =
- new AdaptiveNetworkHardeningProperties()
- .withRules(
- Arrays
- .asList(
- new Rule()
- .withName("bbjjidjksyxk")
- .withDirection(Direction.INBOUND)
- .withDestinationPort(1732474011)
- .withProtocols(Arrays.asList(TransportProtocol.TCP, TransportProtocol.UDP))
- .withIpAddresses(Arrays.asList("dnlj", "age")),
- new Rule()
- .withName("ulxunsmjbnkpp")
- .withDirection(Direction.OUTBOUND)
- .withDestinationPort(2047909976)
- .withProtocols(
- Arrays
- .asList(
- TransportProtocol.TCP,
- TransportProtocol.TCP,
- TransportProtocol.TCP,
- TransportProtocol.TCP))
- .withIpAddresses(Arrays.asList("gwklnsr"))))
- .withRulesCalculationTime(OffsetDateTime.parse("2021-08-04T15:57:37Z"))
- .withEffectiveNetworkSecurityGroups(
- Arrays
- .asList(
- new EffectiveNetworkSecurityGroups()
- .withNetworkInterface("xcktpiymerteeamm")
- .withNetworkSecurityGroups(
- Arrays.asList("ekkkzd", "rtkgdojbmxvavref", "eesvecu", "jpxtxsuwprtuj")),
- new EffectiveNetworkSecurityGroups()
- .withNetworkInterface("awddjibab")
- .withNetworkSecurityGroups(
- Arrays.asList("titvtzeexavox", "fglecdmdqbwp", "pqtgsfjac", "slhhxudbxv")),
- new EffectiveNetworkSecurityGroups()
- .withNetworkInterface("htnsi")
- .withNetworkSecurityGroups(Arrays.asList("hzmme", "ckdlpag", "rcxfailcfxwmdb"))));
- model = BinaryData.fromObject(model).toObject(AdaptiveNetworkHardeningProperties.class);
- Assertions.assertEquals("bbjjidjksyxk", model.rules().get(0).name());
- Assertions.assertEquals(Direction.INBOUND, model.rules().get(0).direction());
- Assertions.assertEquals(1732474011, model.rules().get(0).destinationPort());
- Assertions.assertEquals(TransportProtocol.TCP, model.rules().get(0).protocols().get(0));
- Assertions.assertEquals("dnlj", model.rules().get(0).ipAddresses().get(0));
- Assertions.assertEquals(OffsetDateTime.parse("2021-08-04T15:57:37Z"), model.rulesCalculationTime());
- Assertions.assertEquals("xcktpiymerteeamm", model.effectiveNetworkSecurityGroups().get(0).networkInterface());
- Assertions.assertEquals("ekkkzd", model.effectiveNetworkSecurityGroups().get(0).networkSecurityGroups().get(0));
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveNetworkHardeningsEnforceMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveNetworkHardeningsEnforceMockTests.java
deleted file mode 100644
index 0208474697f0..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveNetworkHardeningsEnforceMockTests.java
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.AdaptiveNetworkHardeningEnforceRequest;
-import com.azure.resourcemanager.security.models.Direction;
-import com.azure.resourcemanager.security.models.Rule;
-import com.azure.resourcemanager.security.models.TransportProtocol;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AdaptiveNetworkHardeningsEnforceMockTests {
- @Test
- public void testEnforce() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .adaptiveNetworkHardenings()
- .enforce(
- "mgm",
- "dorgmynltw",
- "p",
- "tmfoeajogsyxwet",
- "mfd",
- new AdaptiveNetworkHardeningEnforceRequest()
- .withRules(
- Arrays
- .asList(
- new Rule()
- .withName("lkpzwbhnrecchd")
- .withDirection(Direction.OUTBOUND)
- .withDestinationPort(1565024992)
- .withProtocols(
- Arrays
- .asList(
- TransportProtocol.UDP,
- TransportProtocol.UDP,
- TransportProtocol.TCP,
- TransportProtocol.TCP))
- .withIpAddresses(Arrays.asList("biuc", "khhwmj", "jbweunxcqr", "ihufoihp")),
- new Rule()
- .withName("ybxvgn")
- .withDirection(Direction.INBOUND)
- .withDestinationPort(588866023)
- .withProtocols(
- Arrays
- .asList(
- TransportProtocol.TCP,
- TransportProtocol.UDP,
- TransportProtocol.TCP,
- TransportProtocol.TCP))
- .withIpAddresses(Arrays.asList("uzvkunhdimjuk", "irzkaugpucdo", "fq", "lwgofm")),
- new Rule()
- .withName("wrjlvzkl")
- .withDirection(Direction.OUTBOUND)
- .withDestinationPort(679903472)
- .withProtocols(
- Arrays
- .asList(
- TransportProtocol.TCP, TransportProtocol.TCP, TransportProtocol.UDP))
- .withIpAddresses(
- Arrays.asList("vlbishjvpzapt", "oskaoizji", "wfgcdiykkcxwn", "jvqynvavitmdm")),
- new Rule()
- .withName("ohhihraxqud")
- .withDirection(Direction.INBOUND)
- .withDestinationPort(1198903362)
- .withProtocols(
- Arrays
- .asList(
- TransportProtocol.UDP,
- TransportProtocol.UDP,
- TransportProtocol.UDP,
- TransportProtocol.TCP))
- .withIpAddresses(Arrays.asList("vzadbwenn"))))
- .withNetworkSecurityGroups(Arrays.asList("afhxrzfrmvztiuc", "viqlluk", "krcqx")),
- com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveNetworkHardeningsGetWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveNetworkHardeningsGetWithResponseMockTests.java
deleted file mode 100644
index b730839fa8a3..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveNetworkHardeningsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.AdaptiveNetworkHardening;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AdaptiveNetworkHardeningsGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"rules\":[],\"rulesCalculationTime\":\"2021-07-26T18:28:35Z\",\"effectiveNetworkSecurityGroups\":[]},\"id\":\"mnn\",\"name\":\"ixyxvqbanosjt\",\"type\":\"irnb\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- AdaptiveNetworkHardening response =
- manager
- .adaptiveNetworkHardenings()
- .getWithResponse("q", "btimpkjblor", "s", "hqhud", "musuaawja", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals(OffsetDateTime.parse("2021-07-26T18:28:35Z"), response.rulesCalculationTime());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveNetworkHardeningsListByExtendedResourceMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveNetworkHardeningsListByExtendedResourceMockTests.java
deleted file mode 100644
index 246c65bfd2dc..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveNetworkHardeningsListByExtendedResourceMockTests.java
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.AdaptiveNetworkHardening;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AdaptiveNetworkHardeningsListByExtendedResourceMockTests {
- @Test
- public void testListByExtendedResource() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"rules\":[],\"rulesCalculationTime\":\"2021-06-10T22:12:36Z\",\"effectiveNetworkSecurityGroups\":[]},\"id\":\"h\",\"name\":\"shthmgpczqu\",\"type\":\"ptkbvcpxtzhi\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager
- .adaptiveNetworkHardenings()
- .listByExtendedResource("xi", "mlnfyz", "vfrbypic", "bkpdjtaqhsmq", com.azure.core.util.Context.NONE);
-
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-06-10T22:12:36Z"), response.iterator().next().rulesCalculationTime());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveNetworkHardeningsListTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveNetworkHardeningsListTests.java
deleted file mode 100644
index dbf2ff91a164..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdaptiveNetworkHardeningsListTests.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.AdaptiveNetworkHardeningInner;
-import com.azure.resourcemanager.security.models.AdaptiveNetworkHardeningsList;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AdaptiveNetworkHardeningsListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AdaptiveNetworkHardeningsList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"rules\":[],\"rulesCalculationTime\":\"2021-02-04T03:03:52Z\",\"effectiveNetworkSecurityGroups\":[]},\"id\":\"pgclrciv\",\"name\":\"soxfrken\",\"type\":\"pmyyefrpmpdnqq\"},{\"properties\":{\"rules\":[],\"rulesCalculationTime\":\"2021-07-14T06:34:32Z\",\"effectiveNetworkSecurityGroups\":[]},\"id\":\"qvmmbn\",\"name\":\"qfr\",\"type\":\"qlkzme\"}],\"nextLink\":\"itgvkx\"}")
- .toObject(AdaptiveNetworkHardeningsList.class);
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-02-04T03:03:52Z"), model.value().get(0).rulesCalculationTime());
- Assertions.assertEquals("itgvkx", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AdaptiveNetworkHardeningsList model =
- new AdaptiveNetworkHardeningsList()
- .withValue(
- Arrays
- .asList(
- new AdaptiveNetworkHardeningInner()
- .withRules(Arrays.asList())
- .withRulesCalculationTime(OffsetDateTime.parse("2021-02-04T03:03:52Z"))
- .withEffectiveNetworkSecurityGroups(Arrays.asList()),
- new AdaptiveNetworkHardeningInner()
- .withRules(Arrays.asList())
- .withRulesCalculationTime(OffsetDateTime.parse("2021-07-14T06:34:32Z"))
- .withEffectiveNetworkSecurityGroups(Arrays.asList())))
- .withNextLink("itgvkx");
- model = BinaryData.fromObject(model).toObject(AdaptiveNetworkHardeningsList.class);
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-02-04T03:03:52Z"), model.value().get(0).rulesCalculationTime());
- Assertions.assertEquals("itgvkx", model.nextLink());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdditionalDataTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdditionalDataTests.java
deleted file mode 100644
index eba091dd52f7..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdditionalDataTests.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AdditionalData;
-
-public final class AdditionalDataTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AdditionalData model =
- BinaryData.fromString("{\"assessedResourceType\":\"AdditionalData\"}").toObject(AdditionalData.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AdditionalData model = new AdditionalData();
- model = BinaryData.fromObject(model).toObject(AdditionalData.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdditionalWorkspacesPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdditionalWorkspacesPropertiesTests.java
deleted file mode 100644
index d6a5a12cda1c..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdditionalWorkspacesPropertiesTests.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AdditionalWorkspaceDataType;
-import com.azure.resourcemanager.security.models.AdditionalWorkspaceType;
-import com.azure.resourcemanager.security.models.AdditionalWorkspacesProperties;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AdditionalWorkspacesPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AdditionalWorkspacesProperties model =
- BinaryData
- .fromString("{\"workspace\":\"yq\",\"type\":\"Sentinel\",\"dataTypes\":[\"Alerts\",\"RawEvents\"]}")
- .toObject(AdditionalWorkspacesProperties.class);
- Assertions.assertEquals("yq", model.workspace());
- Assertions.assertEquals(AdditionalWorkspaceType.SENTINEL, model.type());
- Assertions.assertEquals(AdditionalWorkspaceDataType.ALERTS, model.dataTypes().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AdditionalWorkspacesProperties model =
- new AdditionalWorkspacesProperties()
- .withWorkspace("yq")
- .withType(AdditionalWorkspaceType.SENTINEL)
- .withDataTypes(
- Arrays.asList(AdditionalWorkspaceDataType.ALERTS, AdditionalWorkspaceDataType.RAW_EVENTS));
- model = BinaryData.fromObject(model).toObject(AdditionalWorkspacesProperties.class);
- Assertions.assertEquals("yq", model.workspace());
- Assertions.assertEquals(AdditionalWorkspaceType.SENTINEL, model.type());
- Assertions.assertEquals(AdditionalWorkspaceDataType.ALERTS, model.dataTypes().get(0));
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdvancedThreatProtectionPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdvancedThreatProtectionPropertiesTests.java
deleted file mode 100644
index 9e6973a0c200..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdvancedThreatProtectionPropertiesTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.AdvancedThreatProtectionProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class AdvancedThreatProtectionPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AdvancedThreatProtectionProperties model =
- BinaryData.fromString("{\"isEnabled\":true}").toObject(AdvancedThreatProtectionProperties.class);
- Assertions.assertEquals(true, model.isEnabled());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AdvancedThreatProtectionProperties model = new AdvancedThreatProtectionProperties().withIsEnabled(true);
- model = BinaryData.fromObject(model).toObject(AdvancedThreatProtectionProperties.class);
- Assertions.assertEquals(true, model.isEnabled());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdvancedThreatProtectionSettingInnerTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdvancedThreatProtectionSettingInnerTests.java
deleted file mode 100644
index e95933a8732c..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdvancedThreatProtectionSettingInnerTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.AdvancedThreatProtectionSettingInner;
-import org.junit.jupiter.api.Assertions;
-
-public final class AdvancedThreatProtectionSettingInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AdvancedThreatProtectionSettingInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"isEnabled\":false},\"id\":\"gbquxigj\",\"name\":\"jgzjaoyfhrtx\",\"type\":\"lnerkujysvleju\"}")
- .toObject(AdvancedThreatProtectionSettingInner.class);
- Assertions.assertEquals(false, model.isEnabled());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AdvancedThreatProtectionSettingInner model = new AdvancedThreatProtectionSettingInner().withIsEnabled(false);
- model = BinaryData.fromObject(model).toObject(AdvancedThreatProtectionSettingInner.class);
- Assertions.assertEquals(false, model.isEnabled());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdvancedThreatProtectionsCreateWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdvancedThreatProtectionsCreateWithResponseMockTests.java
deleted file mode 100644
index a133c83381fc..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdvancedThreatProtectionsCreateWithResponseMockTests.java
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.AdvancedThreatProtectionSetting;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AdvancedThreatProtectionsCreateWithResponseMockTests {
- @Test
- public void testCreateWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"isEnabled\":false},\"id\":\"j\",\"name\":\"nqzocrdzg\",\"type\":\"zeunt\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- AdvancedThreatProtectionSetting response =
- manager
- .advancedThreatProtections()
- .define()
- .withExistingResourceId("xdqaolfylnkkb")
- .withIsEnabled(false)
- .create();
-
- Assertions.assertEquals(false, response.isEnabled());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdvancedThreatProtectionsGetWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdvancedThreatProtectionsGetWithResponseMockTests.java
deleted file mode 100644
index d2d6b5fab1e2..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AdvancedThreatProtectionsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.AdvancedThreatProtectionSetting;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AdvancedThreatProtectionsGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"isEnabled\":true},\"id\":\"jtnqjil\",\"name\":\"ywkdcwmqsy\",\"type\":\"ilm\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- AdvancedThreatProtectionSetting response =
- manager.advancedThreatProtections().getWithResponse("pglaoh", com.azure.core.util.Context.NONE).getValue();
-
- Assertions.assertEquals(true, response.isEnabled());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertEntityTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertEntityTests.java
deleted file mode 100644
index 8db52d56935a..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertEntityTests.java
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AlertEntity;
-import java.util.HashMap;
-import java.util.Map;
-
-public final class AlertEntityTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AlertEntity model =
- BinaryData
- .fromString(
- "{\"type\":\"hqjjys\",\"\":{\"mpqvwwsk\":\"datalpshhkvpedwqslsr\",\"uvqejosovyrrle\":\"datandcbrwi\"}}")
- .toObject(AlertEntity.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AlertEntity model = new AlertEntity().withAdditionalProperties(mapOf("type", "hqjjys"));
- model = BinaryData.fromObject(model).toObject(AlertEntity.class);
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertPropertiesSupportingEvidenceTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertPropertiesSupportingEvidenceTests.java
deleted file mode 100644
index dce644a75666..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertPropertiesSupportingEvidenceTests.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AlertPropertiesSupportingEvidence;
-import java.util.HashMap;
-import java.util.Map;
-
-public final class AlertPropertiesSupportingEvidenceTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AlertPropertiesSupportingEvidence model =
- BinaryData
- .fromString(
- "{\"type\":\"sinuqtljqobbpih\",\"\":{\"bmpxdlvykfrexc\":\"dataecybmrqbrj\",\"qwjksghudgz\":\"datas\",\"ggsvoujkxibdaf\":\"dataxog\",\"xfbvfb\":\"datarkmdyom\"}}")
- .toObject(AlertPropertiesSupportingEvidence.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AlertPropertiesSupportingEvidence model =
- new AlertPropertiesSupportingEvidence().withAdditionalProperties(mapOf("type", "sinuqtljqobbpih"));
- model = BinaryData.fromObject(model).toObject(AlertPropertiesSupportingEvidence.class);
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertSimulatorBundlesRequestPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertSimulatorBundlesRequestPropertiesTests.java
deleted file mode 100644
index 5015fb2973f5..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertSimulatorBundlesRequestPropertiesTests.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AlertSimulatorBundlesRequestProperties;
-import com.azure.resourcemanager.security.models.BundleType;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AlertSimulatorBundlesRequestPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AlertSimulatorBundlesRequestProperties model =
- BinaryData
- .fromString(
- "{\"kind\":\"Bundles\",\"bundles\":[\"StorageAccounts\",\"VirtualMachines\",\"CosmosDbs\"],\"\":{\"czjnc\":\"dataybjufptb\"}}")
- .toObject(AlertSimulatorBundlesRequestProperties.class);
- Assertions.assertEquals(BundleType.STORAGE_ACCOUNTS, model.bundles().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AlertSimulatorBundlesRequestProperties model =
- new AlertSimulatorBundlesRequestProperties()
- .withBundles(
- Arrays.asList(BundleType.STORAGE_ACCOUNTS, BundleType.VIRTUAL_MACHINES, BundleType.COSMOS_DBS));
- model = BinaryData.fromObject(model).toObject(AlertSimulatorBundlesRequestProperties.class);
- Assertions.assertEquals(BundleType.STORAGE_ACCOUNTS, model.bundles().get(0));
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertSimulatorRequestBodyTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertSimulatorRequestBodyTests.java
deleted file mode 100644
index 346f3c6d98e1..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertSimulatorRequestBodyTests.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AlertSimulatorRequestBody;
-import com.azure.resourcemanager.security.models.AlertSimulatorRequestProperties;
-import java.util.HashMap;
-import java.util.Map;
-
-public final class AlertSimulatorRequestBodyTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AlertSimulatorRequestBody model =
- BinaryData
- .fromString(
- "{\"properties\":{\"kind\":\"AlertSimulatorRequestProperties\",\"\":{\"gddeimaw\":\"datarhpw\"}}}")
- .toObject(AlertSimulatorRequestBody.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AlertSimulatorRequestBody model =
- new AlertSimulatorRequestBody()
- .withProperties(
- new AlertSimulatorRequestProperties()
- .withAdditionalProperties(mapOf("kind", "AlertSimulatorRequestProperties")));
- model = BinaryData.fromObject(model).toObject(AlertSimulatorRequestBody.class);
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertSimulatorRequestPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertSimulatorRequestPropertiesTests.java
deleted file mode 100644
index e6ff4dc8f323..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertSimulatorRequestPropertiesTests.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AlertSimulatorRequestProperties;
-import java.util.HashMap;
-import java.util.Map;
-
-public final class AlertSimulatorRequestPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AlertSimulatorRequestProperties model =
- BinaryData
- .fromString("{\"kind\":\"AlertSimulatorRequestProperties\",\"\":{\"aztb\":\"datagkkumuikjcj\"}}")
- .toObject(AlertSimulatorRequestProperties.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AlertSimulatorRequestProperties model =
- new AlertSimulatorRequestProperties()
- .withAdditionalProperties(mapOf("kind", "AlertSimulatorRequestProperties"));
- model = BinaryData.fromObject(model).toObject(AlertSimulatorRequestProperties.class);
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertSyncSettingPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertSyncSettingPropertiesTests.java
deleted file mode 100644
index cf8e971c1c3d..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertSyncSettingPropertiesTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.AlertSyncSettingProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class AlertSyncSettingPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AlertSyncSettingProperties model =
- BinaryData.fromString("{\"enabled\":false}").toObject(AlertSyncSettingProperties.class);
- Assertions.assertEquals(false, model.enabled());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AlertSyncSettingProperties model = new AlertSyncSettingProperties().withEnabled(false);
- model = BinaryData.fromObject(model).toObject(AlertSyncSettingProperties.class);
- Assertions.assertEquals(false, model.enabled());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertSyncSettingsTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertSyncSettingsTests.java
deleted file mode 100644
index d2e91ab08ab5..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertSyncSettingsTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AlertSyncSettings;
-import org.junit.jupiter.api.Assertions;
-
-public final class AlertSyncSettingsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AlertSyncSettings model =
- BinaryData
- .fromString(
- "{\"kind\":\"AlertSyncSettings\",\"properties\":{\"enabled\":true},\"id\":\"cfsrhkhgsn\",\"name\":\"uww\",\"type\":\"pphefsbzx\"}")
- .toObject(AlertSyncSettings.class);
- Assertions.assertEquals(true, model.enabled());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AlertSyncSettings model = new AlertSyncSettings().withEnabled(true);
- model = BinaryData.fromObject(model).toObject(AlertSyncSettings.class);
- Assertions.assertEquals(true, model.enabled());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsSuppressionRuleInnerTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsSuppressionRuleInnerTests.java
deleted file mode 100644
index 579dcb7c5fe3..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsSuppressionRuleInnerTests.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.AlertsSuppressionRuleInner;
-import com.azure.resourcemanager.security.models.RuleState;
-import com.azure.resourcemanager.security.models.SuppressionAlertsScope;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AlertsSuppressionRuleInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AlertsSuppressionRuleInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"alertType\":\"vhmxtdrjfu\",\"lastModifiedUtc\":\"2021-09-25T19:58:32Z\",\"expirationDateUtc\":\"2021-07-27T22:13:32Z\",\"reason\":\"bj\",\"state\":\"Expired\",\"comment\":\"zcjznmwcpmgua\",\"suppressionAlertsScope\":{\"allOf\":[]}},\"id\":\"aufactkahzovajjz\",\"name\":\"uxxpshne\",\"type\":\"kulfg\"}")
- .toObject(AlertsSuppressionRuleInner.class);
- Assertions.assertEquals("vhmxtdrjfu", model.alertType());
- Assertions.assertEquals(OffsetDateTime.parse("2021-07-27T22:13:32Z"), model.expirationDateUtc());
- Assertions.assertEquals("bj", model.reason());
- Assertions.assertEquals(RuleState.EXPIRED, model.state());
- Assertions.assertEquals("zcjznmwcpmgua", model.comment());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AlertsSuppressionRuleInner model =
- new AlertsSuppressionRuleInner()
- .withAlertType("vhmxtdrjfu")
- .withExpirationDateUtc(OffsetDateTime.parse("2021-07-27T22:13:32Z"))
- .withReason("bj")
- .withState(RuleState.EXPIRED)
- .withComment("zcjznmwcpmgua")
- .withSuppressionAlertsScope(new SuppressionAlertsScope().withAllOf(Arrays.asList()));
- model = BinaryData.fromObject(model).toObject(AlertsSuppressionRuleInner.class);
- Assertions.assertEquals("vhmxtdrjfu", model.alertType());
- Assertions.assertEquals(OffsetDateTime.parse("2021-07-27T22:13:32Z"), model.expirationDateUtc());
- Assertions.assertEquals("bj", model.reason());
- Assertions.assertEquals(RuleState.EXPIRED, model.state());
- Assertions.assertEquals("zcjznmwcpmgua", model.comment());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsSuppressionRulePropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsSuppressionRulePropertiesTests.java
deleted file mode 100644
index 431476f96438..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsSuppressionRulePropertiesTests.java
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.AlertsSuppressionRuleProperties;
-import com.azure.resourcemanager.security.models.RuleState;
-import com.azure.resourcemanager.security.models.ScopeElement;
-import com.azure.resourcemanager.security.models.SuppressionAlertsScope;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class AlertsSuppressionRulePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AlertsSuppressionRuleProperties model =
- BinaryData
- .fromString(
- "{\"alertType\":\"lqubkwdlen\",\"lastModifiedUtc\":\"2021-02-18T06:07:47Z\",\"expirationDateUtc\":\"2021-03-05T15:56:58Z\",\"reason\":\"ujbazpjuohminyfl\",\"state\":\"Enabled\",\"comment\":\"wmd\",\"suppressionAlertsScope\":{\"allOf\":[{\"field\":\"klvxwmyg\",\"\":{}},{\"field\":\"gpqch\",\"\":{}}]}}")
- .toObject(AlertsSuppressionRuleProperties.class);
- Assertions.assertEquals("lqubkwdlen", model.alertType());
- Assertions.assertEquals(OffsetDateTime.parse("2021-03-05T15:56:58Z"), model.expirationDateUtc());
- Assertions.assertEquals("ujbazpjuohminyfl", model.reason());
- Assertions.assertEquals(RuleState.ENABLED, model.state());
- Assertions.assertEquals("wmd", model.comment());
- Assertions.assertEquals("klvxwmyg", model.suppressionAlertsScope().allOf().get(0).field());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AlertsSuppressionRuleProperties model =
- new AlertsSuppressionRuleProperties()
- .withAlertType("lqubkwdlen")
- .withExpirationDateUtc(OffsetDateTime.parse("2021-03-05T15:56:58Z"))
- .withReason("ujbazpjuohminyfl")
- .withState(RuleState.ENABLED)
- .withComment("wmd")
- .withSuppressionAlertsScope(
- new SuppressionAlertsScope()
- .withAllOf(
- Arrays
- .asList(
- new ScopeElement().withField("klvxwmyg").withAdditionalProperties(mapOf()),
- new ScopeElement().withField("gpqch").withAdditionalProperties(mapOf()))));
- model = BinaryData.fromObject(model).toObject(AlertsSuppressionRuleProperties.class);
- Assertions.assertEquals("lqubkwdlen", model.alertType());
- Assertions.assertEquals(OffsetDateTime.parse("2021-03-05T15:56:58Z"), model.expirationDateUtc());
- Assertions.assertEquals("ujbazpjuohminyfl", model.reason());
- Assertions.assertEquals(RuleState.ENABLED, model.state());
- Assertions.assertEquals("wmd", model.comment());
- Assertions.assertEquals("klvxwmyg", model.suppressionAlertsScope().allOf().get(0).field());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsSuppressionRulesDeleteWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsSuppressionRulesDeleteWithResponseMockTests.java
deleted file mode 100644
index 3c7c509ae21e..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsSuppressionRulesDeleteWithResponseMockTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AlertsSuppressionRulesDeleteWithResponseMockTests {
- @Test
- public void testDeleteWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(204);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager.alertsSuppressionRules().deleteWithResponse("q", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsSuppressionRulesGetWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsSuppressionRulesGetWithResponseMockTests.java
deleted file mode 100644
index 4e418d248eae..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsSuppressionRulesGetWithResponseMockTests.java
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.AlertsSuppressionRule;
-import com.azure.resourcemanager.security.models.RuleState;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AlertsSuppressionRulesGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"alertType\":\"vsk\",\"lastModifiedUtc\":\"2020-12-26T02:18:32Z\",\"expirationDateUtc\":\"2021-04-29T21:58:55Z\",\"reason\":\"geumexm\",\"state\":\"Enabled\",\"comment\":\"cbccwkqmt\",\"suppressionAlertsScope\":{\"allOf\":[]}},\"id\":\"p\",\"name\":\"qis\",\"type\":\"rpilgftrqrejdaah\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- AlertsSuppressionRule response =
- manager.alertsSuppressionRules().getWithResponse("by", com.azure.core.util.Context.NONE).getValue();
-
- Assertions.assertEquals("vsk", response.alertType());
- Assertions.assertEquals(OffsetDateTime.parse("2021-04-29T21:58:55Z"), response.expirationDateUtc());
- Assertions.assertEquals("geumexm", response.reason());
- Assertions.assertEquals(RuleState.ENABLED, response.state());
- Assertions.assertEquals("cbccwkqmt", response.comment());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsSuppressionRulesListMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsSuppressionRulesListMockTests.java
deleted file mode 100644
index 871850e57b9d..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsSuppressionRulesListMockTests.java
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.AlertsSuppressionRule;
-import com.azure.resourcemanager.security.models.RuleState;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AlertsSuppressionRulesListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"alertType\":\"cgrvkcxzznnuifer\",\"lastModifiedUtc\":\"2021-08-19T01:31:44Z\",\"expirationDateUtc\":\"2020-12-20T21:14:16Z\",\"reason\":\"prkjg\",\"state\":\"Disabled\",\"comment\":\"jmwvvbtuqkxxi\",\"suppressionAlertsScope\":{\"allOf\":[]}},\"id\":\"gxql\",\"name\":\"ekotjgxi\",\"type\":\"qfkyfhiwvjaqu\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.alertsSuppressionRules().list("ltfokyksyim", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("cgrvkcxzznnuifer", response.iterator().next().alertType());
- Assertions
- .assertEquals(OffsetDateTime.parse("2020-12-20T21:14:16Z"), response.iterator().next().expirationDateUtc());
- Assertions.assertEquals("prkjg", response.iterator().next().reason());
- Assertions.assertEquals(RuleState.DISABLED, response.iterator().next().state());
- Assertions.assertEquals("jmwvvbtuqkxxi", response.iterator().next().comment());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsSuppressionRulesListTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsSuppressionRulesListTests.java
deleted file mode 100644
index be6e6b5ea835..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsSuppressionRulesListTests.java
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.AlertsSuppressionRuleInner;
-import com.azure.resourcemanager.security.models.AlertsSuppressionRulesList;
-import com.azure.resourcemanager.security.models.RuleState;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AlertsSuppressionRulesListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AlertsSuppressionRulesList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"alertType\":\"hvbbxuripltfnh\",\"lastModifiedUtc\":\"2021-05-19T04:32:03Z\",\"expirationDateUtc\":\"2021-08-21T19:13:45Z\",\"reason\":\"gx\",\"state\":\"Expired\",\"comment\":\"ckpyklyhplu\"},\"id\":\"pvruudlg\",\"name\":\"ibthostgktstvd\",\"type\":\"eclze\"},{\"properties\":{\"alertType\":\"bcvhzlhpl\",\"lastModifiedUtc\":\"2021-07-07T17:09:43Z\",\"expirationDateUtc\":\"2021-05-30T19:04:16Z\",\"reason\":\"lwwqfbumlkxtrqj\",\"state\":\"Disabled\",\"comment\":\"lmbtxhwgfwsrt\"},\"id\":\"coezbrhubskh\",\"name\":\"dyg\",\"type\":\"ookk\"},{\"properties\":{\"alertType\":\"qjbvleorfmlu\",\"lastModifiedUtc\":\"2021-07-18T04:19:58Z\",\"expirationDateUtc\":\"2021-10-19T17:51:06Z\",\"reason\":\"fa\",\"state\":\"Disabled\",\"comment\":\"nqqyba\"},\"id\":\"euayjkqabqgzsles\",\"name\":\"cbhernntiewdj\",\"type\":\"vbquwr\"}],\"nextLink\":\"hwagohbuffkmrqe\"}")
- .toObject(AlertsSuppressionRulesList.class);
- Assertions.assertEquals("hvbbxuripltfnh", model.value().get(0).alertType());
- Assertions.assertEquals(OffsetDateTime.parse("2021-08-21T19:13:45Z"), model.value().get(0).expirationDateUtc());
- Assertions.assertEquals("gx", model.value().get(0).reason());
- Assertions.assertEquals(RuleState.EXPIRED, model.value().get(0).state());
- Assertions.assertEquals("ckpyklyhplu", model.value().get(0).comment());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AlertsSuppressionRulesList model =
- new AlertsSuppressionRulesList()
- .withValue(
- Arrays
- .asList(
- new AlertsSuppressionRuleInner()
- .withAlertType("hvbbxuripltfnh")
- .withExpirationDateUtc(OffsetDateTime.parse("2021-08-21T19:13:45Z"))
- .withReason("gx")
- .withState(RuleState.EXPIRED)
- .withComment("ckpyklyhplu"),
- new AlertsSuppressionRuleInner()
- .withAlertType("bcvhzlhpl")
- .withExpirationDateUtc(OffsetDateTime.parse("2021-05-30T19:04:16Z"))
- .withReason("lwwqfbumlkxtrqj")
- .withState(RuleState.DISABLED)
- .withComment("lmbtxhwgfwsrt"),
- new AlertsSuppressionRuleInner()
- .withAlertType("qjbvleorfmlu")
- .withExpirationDateUtc(OffsetDateTime.parse("2021-10-19T17:51:06Z"))
- .withReason("fa")
- .withState(RuleState.DISABLED)
- .withComment("nqqyba")));
- model = BinaryData.fromObject(model).toObject(AlertsSuppressionRulesList.class);
- Assertions.assertEquals("hvbbxuripltfnh", model.value().get(0).alertType());
- Assertions.assertEquals(OffsetDateTime.parse("2021-08-21T19:13:45Z"), model.value().get(0).expirationDateUtc());
- Assertions.assertEquals("gx", model.value().get(0).reason());
- Assertions.assertEquals(RuleState.EXPIRED, model.value().get(0).state());
- Assertions.assertEquals("ckpyklyhplu", model.value().get(0).comment());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsSuppressionRulesUpdateWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsSuppressionRulesUpdateWithResponseMockTests.java
deleted file mode 100644
index e22d67ac0ba1..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsSuppressionRulesUpdateWithResponseMockTests.java
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.fluent.models.AlertsSuppressionRuleInner;
-import com.azure.resourcemanager.security.models.AlertsSuppressionRule;
-import com.azure.resourcemanager.security.models.RuleState;
-import com.azure.resourcemanager.security.models.SuppressionAlertsScope;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AlertsSuppressionRulesUpdateWithResponseMockTests {
- @Test
- public void testUpdateWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"alertType\":\"wjzebecuvlb\",\"lastModifiedUtc\":\"2021-07-23T18:20:37Z\",\"expirationDateUtc\":\"2021-07-04T12:46:10Z\",\"reason\":\"ljkxpylrwoxz\",\"state\":\"Enabled\",\"comment\":\"syxjijeyp\",\"suppressionAlertsScope\":{\"allOf\":[]}},\"id\":\"rbkerdkd\",\"name\":\"gaw\",\"type\":\"wjxildfkcefeyg\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- AlertsSuppressionRule response =
- manager
- .alertsSuppressionRules()
- .updateWithResponse(
- "qimlda",
- new AlertsSuppressionRuleInner()
- .withAlertType("fx")
- .withExpirationDateUtc(OffsetDateTime.parse("2021-01-13T16:49:18Z"))
- .withReason("muadjnfsncski")
- .withState(RuleState.ENABLED)
- .withComment("hjgczetyb")
- .withSuppressionAlertsScope(new SuppressionAlertsScope().withAllOf(Arrays.asList())),
- com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("wjzebecuvlb", response.alertType());
- Assertions.assertEquals(OffsetDateTime.parse("2021-07-04T12:46:10Z"), response.expirationDateUtc());
- Assertions.assertEquals("ljkxpylrwoxz", response.reason());
- Assertions.assertEquals(RuleState.ENABLED, response.state());
- Assertions.assertEquals("syxjijeyp", response.comment());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsUpdateResourceGroupLevelStateToActivateWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsUpdateResourceGroupLevelStateToActivateWithResponseMockTests.java
deleted file mode 100644
index 693aecc921b7..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsUpdateResourceGroupLevelStateToActivateWithResponseMockTests.java
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AlertsUpdateResourceGroupLevelStateToActivateWithResponseMockTests {
- @Test
- public void testUpdateResourceGroupLevelStateToActivateWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(204);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .alerts()
- .updateResourceGroupLevelStateToActivateWithResponse(
- "nsmy", "jow", "yeyzm", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsUpdateResourceGroupLevelStateToDismissWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsUpdateResourceGroupLevelStateToDismissWithResponseMockTests.java
deleted file mode 100644
index eebf59cddf94..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsUpdateResourceGroupLevelStateToDismissWithResponseMockTests.java
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AlertsUpdateResourceGroupLevelStateToDismissWithResponseMockTests {
- @Test
- public void testUpdateResourceGroupLevelStateToDismissWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(204);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .alerts()
- .updateResourceGroupLevelStateToDismissWithResponse(
- "ayyzivrmitc", "qlhchwhrktjle", "fibfiplhx", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsUpdateResourceGroupLevelStateToInProgressWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsUpdateResourceGroupLevelStateToInProgressWithResponseMockTests.java
deleted file mode 100644
index 596b4b141a9f..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsUpdateResourceGroupLevelStateToInProgressWithResponseMockTests.java
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AlertsUpdateResourceGroupLevelStateToInProgressWithResponseMockTests {
- @Test
- public void testUpdateResourceGroupLevelStateToInProgressWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(204);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .alerts()
- .updateResourceGroupLevelStateToInProgressWithResponse(
- "dsqcmhnxl", "buwodmachbkv", "rpbj", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsUpdateResourceGroupLevelStateToResolveWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsUpdateResourceGroupLevelStateToResolveWithResponseMockTests.java
deleted file mode 100644
index ac1ce74c6326..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsUpdateResourceGroupLevelStateToResolveWithResponseMockTests.java
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AlertsUpdateResourceGroupLevelStateToResolveWithResponseMockTests {
- @Test
- public void testUpdateResourceGroupLevelStateToResolveWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(204);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .alerts()
- .updateResourceGroupLevelStateToResolveWithResponse(
- "ktfowzkroyrdur", "flzqjimejtgzjxx", "fejlzuqloiw", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsUpdateSubscriptionLevelStateToActivateWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsUpdateSubscriptionLevelStateToActivateWithResponseMockTests.java
deleted file mode 100644
index b9c26c899cf5..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsUpdateSubscriptionLevelStateToActivateWithResponseMockTests.java
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AlertsUpdateSubscriptionLevelStateToActivateWithResponseMockTests {
- @Test
- public void testUpdateSubscriptionLevelStateToActivateWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(204);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .alerts()
- .updateSubscriptionLevelStateToActivateWithResponse(
- "qtrotpvclp", "fyrlmwkptskwxj", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsUpdateSubscriptionLevelStateToDismissWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsUpdateSubscriptionLevelStateToDismissWithResponseMockTests.java
deleted file mode 100644
index b4f95539737c..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsUpdateSubscriptionLevelStateToDismissWithResponseMockTests.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AlertsUpdateSubscriptionLevelStateToDismissWithResponseMockTests {
- @Test
- public void testUpdateSubscriptionLevelStateToDismissWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(204);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .alerts()
- .updateSubscriptionLevelStateToDismissWithResponse("clngy", "nhr", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsUpdateSubscriptionLevelStateToInProgressWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsUpdateSubscriptionLevelStateToInProgressWithResponseMockTests.java
deleted file mode 100644
index aadafb23e8aa..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsUpdateSubscriptionLevelStateToInProgressWithResponseMockTests.java
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AlertsUpdateSubscriptionLevelStateToInProgressWithResponseMockTests {
- @Test
- public void testUpdateSubscriptionLevelStateToInProgressWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(204);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .alerts()
- .updateSubscriptionLevelStateToInProgressWithResponse(
- "vhxccbmkakmkoo", "bputmgvmuyakml", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsUpdateSubscriptionLevelStateToResolveWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsUpdateSubscriptionLevelStateToResolveWithResponseMockTests.java
deleted file mode 100644
index 1aa266ae0fdc..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AlertsUpdateSubscriptionLevelStateToResolveWithResponseMockTests.java
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AlertsUpdateSubscriptionLevelStateToResolveWithResponseMockTests {
- @Test
- public void testUpdateSubscriptionLevelStateToResolveWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(204);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .alerts()
- .updateSubscriptionLevelStateToResolveWithResponse(
- "ombcdtajdopggo", "wj", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AllowedConnectionsGetWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AllowedConnectionsGetWithResponseMockTests.java
deleted file mode 100644
index b523c23fb7cc..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AllowedConnectionsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.AllowedConnectionsResource;
-import com.azure.resourcemanager.security.models.ConnectionType;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AllowedConnectionsGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"calculatedDateTime\":\"2021-09-12T09:57:29Z\",\"connectableResources\":[]},\"location\":\"udoejtighsxjp\",\"id\":\"tnkqbala\",\"name\":\"ovu\",\"type\":\"wxhmehjnhjiot\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- AllowedConnectionsResource response =
- manager
- .allowedConnections()
- .getWithResponse("laslgacizux", "r", ConnectionType.INTERNAL, com.azure.core.util.Context.NONE)
- .getValue();
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AllowedConnectionsListByHomeRegionMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AllowedConnectionsListByHomeRegionMockTests.java
deleted file mode 100644
index 45dc54cff1ce..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AllowedConnectionsListByHomeRegionMockTests.java
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.AllowedConnectionsResource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AllowedConnectionsListByHomeRegionMockTests {
- @Test
- public void testListByHomeRegion() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"calculatedDateTime\":\"2021-07-04T20:58:12Z\",\"connectableResources\":[]},\"location\":\"balkjnbkbdhl\",\"id\":\"tqstqkqsygxiyne\",\"name\":\"ovagzkheuban\",\"type\":\"xunpqcckqiawzlz\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.allowedConnections().listByHomeRegion("itxnmxgnmgu", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AllowedConnectionsListMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AllowedConnectionsListMockTests.java
deleted file mode 100644
index ee62808cf233..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AllowedConnectionsListMockTests.java
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.AllowedConnectionsResource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AllowedConnectionsListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"calculatedDateTime\":\"2021-08-28T13:01:37Z\",\"connectableResources\":[]},\"location\":\"mqcbpokstsinv\",\"id\":\"gov\",\"name\":\"yhdrxb\",\"type\":\"dvcehqw\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.allowedConnections().list(com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AllowedConnectionsListTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AllowedConnectionsListTests.java
deleted file mode 100644
index 35d06482012a..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AllowedConnectionsListTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AllowedConnectionsList;
-
-public final class AllowedConnectionsListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AllowedConnectionsList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"calculatedDateTime\":\"2021-08-31T13:06:45Z\",\"connectableResources\":[]},\"location\":\"lgehg\",\"id\":\"pipifh\",\"name\":\"f\",\"type\":\"oajvgcxtxjcs\"},{\"properties\":{\"calculatedDateTime\":\"2021-01-13T18:57:24Z\",\"connectableResources\":[]},\"location\":\"ltugsresmkssjhoi\",\"id\":\"txfkfweg\",\"name\":\"rhptilluc\",\"type\":\"iqtgdqoh\"},{\"properties\":{\"calculatedDateTime\":\"2021-03-25T09:14:26Z\",\"connectableResources\":[]},\"location\":\"riz\",\"id\":\"tpwb\",\"name\":\"a\",\"type\":\"llibphbqzmizak\"},{\"properties\":{\"calculatedDateTime\":\"2021-02-12T00:07:30Z\",\"connectableResources\":[]},\"location\":\"p\",\"id\":\"n\",\"name\":\"zhajoylhjlmuo\",\"type\":\"xprimrsop\"}],\"nextLink\":\"ecj\"}")
- .toObject(AllowedConnectionsList.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AllowedConnectionsList model = new AllowedConnectionsList();
- model = BinaryData.fromObject(model).toObject(AllowedConnectionsList.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AllowedConnectionsResourceInnerTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AllowedConnectionsResourceInnerTests.java
deleted file mode 100644
index ea05528b8a62..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AllowedConnectionsResourceInnerTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.AllowedConnectionsResourceInner;
-
-public final class AllowedConnectionsResourceInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AllowedConnectionsResourceInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"calculatedDateTime\":\"2021-01-03T12:26:20Z\",\"connectableResources\":[{\"id\":\"vasylwxdzau\",\"inboundConnectedResources\":[],\"outboundConnectedResources\":[]},{\"id\":\"ohguuf\",\"inboundConnectedResources\":[],\"outboundConnectedResources\":[]},{\"id\":\"yjathwtzo\",\"inboundConnectedResources\":[],\"outboundConnectedResources\":[]},{\"id\":\"mwmdxmebwjscjpa\",\"inboundConnectedResources\":[],\"outboundConnectedResources\":[]}]},\"location\":\"eabfqxnm\",\"id\":\"mqt\",\"name\":\"bxyijddtvq\",\"type\":\"ttadijae\"}")
- .toObject(AllowedConnectionsResourceInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AllowedConnectionsResourceInner model = new AllowedConnectionsResourceInner();
- model = BinaryData.fromObject(model).toObject(AllowedConnectionsResourceInner.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AllowedConnectionsResourcePropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AllowedConnectionsResourcePropertiesTests.java
deleted file mode 100644
index a64ed5ef9566..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AllowedConnectionsResourcePropertiesTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.AllowedConnectionsResourceProperties;
-
-public final class AllowedConnectionsResourcePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AllowedConnectionsResourceProperties model =
- BinaryData
- .fromString(
- "{\"calculatedDateTime\":\"2021-07-31T17:06:26Z\",\"connectableResources\":[{\"id\":\"eekpndz\",\"inboundConnectedResources\":[],\"outboundConnectedResources\":[]},{\"id\":\"qmeqwigpibudqwyx\",\"inboundConnectedResources\":[],\"outboundConnectedResources\":[]},{\"id\":\"mzznrtffyaqitmhh\",\"inboundConnectedResources\":[],\"outboundConnectedResources\":[]},{\"id\":\"hvseufuqyrx\",\"inboundConnectedResources\":[],\"outboundConnectedResources\":[]}]}")
- .toObject(AllowedConnectionsResourceProperties.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AllowedConnectionsResourceProperties model = new AllowedConnectionsResourceProperties();
- model = BinaryData.fromObject(model).toObject(AllowedConnectionsResourceProperties.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AllowlistCustomAlertRuleTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AllowlistCustomAlertRuleTests.java
deleted file mode 100644
index 48a97fcd05f2..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AllowlistCustomAlertRuleTests.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AllowlistCustomAlertRule;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AllowlistCustomAlertRuleTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AllowlistCustomAlertRule model =
- BinaryData
- .fromString(
- "{\"ruleType\":\"AllowlistCustomAlertRule\",\"allowlistValues\":[\"ugw\",\"kcglhslaz\",\"dyggdtjixhbku\"],\"valueType\":\"String\",\"displayName\":\"e\",\"description\":\"hmenevfyexfwhybc\",\"isEnabled\":true}")
- .toObject(AllowlistCustomAlertRule.class);
- Assertions.assertEquals(true, model.isEnabled());
- Assertions.assertEquals("ugw", model.allowlistValues().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AllowlistCustomAlertRule model =
- new AllowlistCustomAlertRule()
- .withIsEnabled(true)
- .withAllowlistValues(Arrays.asList("ugw", "kcglhslaz", "dyggdtjixhbku"));
- model = BinaryData.fromObject(model).toObject(AllowlistCustomAlertRule.class);
- Assertions.assertEquals(true, model.isEnabled());
- Assertions.assertEquals("ugw", model.allowlistValues().get(0));
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AmqpC2DMessagesNotInAllowedRangeTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AmqpC2DMessagesNotInAllowedRangeTests.java
deleted file mode 100644
index 0a969f525c4e..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AmqpC2DMessagesNotInAllowedRangeTests.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AmqpC2DMessagesNotInAllowedRange;
-import java.time.Duration;
-import org.junit.jupiter.api.Assertions;
-
-public final class AmqpC2DMessagesNotInAllowedRangeTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AmqpC2DMessagesNotInAllowedRange model =
- BinaryData
- .fromString(
- "{\"ruleType\":\"AmqpC2DMessagesNotInAllowedRange\",\"timeWindowSize\":\"PT3H37M12S\",\"minThreshold\":1550533701,\"maxThreshold\":65789280,\"displayName\":\"jgydzul\",\"description\":\"saeuzanhsfnhsenw\",\"isEnabled\":false}")
- .toObject(AmqpC2DMessagesNotInAllowedRange.class);
- Assertions.assertEquals(false, model.isEnabled());
- Assertions.assertEquals(1550533701, model.minThreshold());
- Assertions.assertEquals(65789280, model.maxThreshold());
- Assertions.assertEquals(Duration.parse("PT3H37M12S"), model.timeWindowSize());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AmqpC2DMessagesNotInAllowedRange model =
- new AmqpC2DMessagesNotInAllowedRange()
- .withIsEnabled(false)
- .withMinThreshold(1550533701)
- .withMaxThreshold(65789280)
- .withTimeWindowSize(Duration.parse("PT3H37M12S"));
- model = BinaryData.fromObject(model).toObject(AmqpC2DMessagesNotInAllowedRange.class);
- Assertions.assertEquals(false, model.isEnabled());
- Assertions.assertEquals(1550533701, model.minThreshold());
- Assertions.assertEquals(65789280, model.maxThreshold());
- Assertions.assertEquals(Duration.parse("PT3H37M12S"), model.timeWindowSize());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AmqpC2DRejectedMessagesNotInAllowedRangeTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AmqpC2DRejectedMessagesNotInAllowedRangeTests.java
deleted file mode 100644
index bdb93629b054..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AmqpC2DRejectedMessagesNotInAllowedRangeTests.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AmqpC2DRejectedMessagesNotInAllowedRange;
-import java.time.Duration;
-import org.junit.jupiter.api.Assertions;
-
-public final class AmqpC2DRejectedMessagesNotInAllowedRangeTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AmqpC2DRejectedMessagesNotInAllowedRange model =
- BinaryData
- .fromString(
- "{\"ruleType\":\"AmqpC2DRejectedMessagesNotInAllowedRange\",\"timeWindowSize\":\"PT13H41M23S\",\"minThreshold\":101751518,\"maxThreshold\":826900900,\"displayName\":\"ytxtdgu\",\"description\":\"lbpktg\",\"isEnabled\":false}")
- .toObject(AmqpC2DRejectedMessagesNotInAllowedRange.class);
- Assertions.assertEquals(false, model.isEnabled());
- Assertions.assertEquals(101751518, model.minThreshold());
- Assertions.assertEquals(826900900, model.maxThreshold());
- Assertions.assertEquals(Duration.parse("PT13H41M23S"), model.timeWindowSize());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AmqpC2DRejectedMessagesNotInAllowedRange model =
- new AmqpC2DRejectedMessagesNotInAllowedRange()
- .withIsEnabled(false)
- .withMinThreshold(101751518)
- .withMaxThreshold(826900900)
- .withTimeWindowSize(Duration.parse("PT13H41M23S"));
- model = BinaryData.fromObject(model).toObject(AmqpC2DRejectedMessagesNotInAllowedRange.class);
- Assertions.assertEquals(false, model.isEnabled());
- Assertions.assertEquals(101751518, model.minThreshold());
- Assertions.assertEquals(826900900, model.maxThreshold());
- Assertions.assertEquals(Duration.parse("PT13H41M23S"), model.timeWindowSize());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AmqpD2CMessagesNotInAllowedRangeTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AmqpD2CMessagesNotInAllowedRangeTests.java
deleted file mode 100644
index 3a2ae82d14ee..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AmqpD2CMessagesNotInAllowedRangeTests.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AmqpD2CMessagesNotInAllowedRange;
-import java.time.Duration;
-import org.junit.jupiter.api.Assertions;
-
-public final class AmqpD2CMessagesNotInAllowedRangeTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AmqpD2CMessagesNotInAllowedRange model =
- BinaryData
- .fromString(
- "{\"ruleType\":\"AmqpD2CMessagesNotInAllowedRange\",\"timeWindowSize\":\"PT166H13M47S\",\"minThreshold\":911391877,\"maxThreshold\":1094059149,\"displayName\":\"fanraybfu\",\"description\":\"frojsydgr\",\"isEnabled\":true}")
- .toObject(AmqpD2CMessagesNotInAllowedRange.class);
- Assertions.assertEquals(true, model.isEnabled());
- Assertions.assertEquals(911391877, model.minThreshold());
- Assertions.assertEquals(1094059149, model.maxThreshold());
- Assertions.assertEquals(Duration.parse("PT166H13M47S"), model.timeWindowSize());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AmqpD2CMessagesNotInAllowedRange model =
- new AmqpD2CMessagesNotInAllowedRange()
- .withIsEnabled(true)
- .withMinThreshold(911391877)
- .withMaxThreshold(1094059149)
- .withTimeWindowSize(Duration.parse("PT166H13M47S"));
- model = BinaryData.fromObject(model).toObject(AmqpD2CMessagesNotInAllowedRange.class);
- Assertions.assertEquals(true, model.isEnabled());
- Assertions.assertEquals(911391877, model.minThreshold());
- Assertions.assertEquals(1094059149, model.maxThreshold());
- Assertions.assertEquals(Duration.parse("PT166H13M47S"), model.timeWindowSize());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionOffboardingsDeleteWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionOffboardingsDeleteWithResponseMockTests.java
deleted file mode 100644
index 0e220f8ce822..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionOffboardingsDeleteWithResponseMockTests.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ApiCollectionOffboardingsDeleteWithResponseMockTests {
- @Test
- public void testDeleteWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .apiCollectionOffboardings()
- .deleteWithResponse("yyhigqkzjuqw", "ajquzxpixhyoi", "nfdbgsoscienezf", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionOnboardingsCreateWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionOnboardingsCreateWithResponseMockTests.java
deleted file mode 100644
index 669d45bae639..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionOnboardingsCreateWithResponseMockTests.java
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.ApiCollectionResponse;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ApiCollectionOnboardingsCreateWithResponseMockTests {
- @Test
- public void testCreateWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"displayName\":\"mpe\",\"additionalData\":{\"snstl\":\"giqasifub\",\"uweuiy\":\"wqpjnxjkhtupsvy\",\"b\":\"fwkztsms\"}},\"id\":\"vy\",\"name\":\"lznfhkqytkztado\",\"type\":\"gfzdgjfcycrsvl\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- ApiCollectionResponse response =
- manager
- .apiCollectionOnboardings()
- .createWithResponse("xplhpeva", "yntvzjyielbq", "vvbq", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("mpe", response.displayName());
- Assertions.assertEquals("giqasifub", response.additionalData().get("snstl"));
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionPropertiesTests.java
deleted file mode 100644
index 1aa9221a2eea..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionPropertiesTests.java
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.ApiCollectionProperties;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ApiCollectionPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ApiCollectionProperties model =
- BinaryData
- .fromString(
- "{\"displayName\":\"tgqztwhghmup\",\"additionalData\":{\"bklqpxz\":\"jtcdxabbujftaben\",\"nlzafwxudgnh\":\"cafeddw\",\"pbeme\":\"ookrtalvnbw\",\"kyrdnqodx\":\"uclvdjj\"}}")
- .toObject(ApiCollectionProperties.class);
- Assertions.assertEquals("tgqztwhghmup", model.displayName());
- Assertions.assertEquals("jtcdxabbujftaben", model.additionalData().get("bklqpxz"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ApiCollectionProperties model =
- new ApiCollectionProperties()
- .withDisplayName("tgqztwhghmup")
- .withAdditionalData(
- mapOf(
- "bklqpxz",
- "jtcdxabbujftaben",
- "nlzafwxudgnh",
- "cafeddw",
- "pbeme",
- "ookrtalvnbw",
- "kyrdnqodx",
- "uclvdjj"));
- model = BinaryData.fromObject(model).toObject(ApiCollectionProperties.class);
- Assertions.assertEquals("tgqztwhghmup", model.displayName());
- Assertions.assertEquals("jtcdxabbujftaben", model.additionalData().get("bklqpxz"));
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionResponseInnerTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionResponseInnerTests.java
deleted file mode 100644
index ade5b09541cf..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionResponseInnerTests.java
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.ApiCollectionResponseInner;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ApiCollectionResponseInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ApiCollectionResponseInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"displayName\":\"qxuwyvca\",\"additionalData\":{\"vbsizusjszlbscm\":\"v\"}},\"id\":\"lzijiufehgmvflnw\",\"name\":\"v\",\"type\":\"kxrerlniylylyfwx\"}")
- .toObject(ApiCollectionResponseInner.class);
- Assertions.assertEquals("qxuwyvca", model.displayName());
- Assertions.assertEquals("v", model.additionalData().get("vbsizusjszlbscm"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ApiCollectionResponseInner model =
- new ApiCollectionResponseInner()
- .withDisplayName("qxuwyvca")
- .withAdditionalData(mapOf("vbsizusjszlbscm", "v"));
- model = BinaryData.fromObject(model).toObject(ApiCollectionResponseInner.class);
- Assertions.assertEquals("qxuwyvca", model.displayName());
- Assertions.assertEquals("v", model.additionalData().get("vbsizusjszlbscm"));
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionResponseListTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionResponseListTests.java
deleted file mode 100644
index a4b0d467a0e6..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionResponseListTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.ApiCollectionResponseList;
-
-public final class ApiCollectionResponseListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ApiCollectionResponseList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"displayName\":\"ewijymrhbguz\",\"additionalData\":{}},\"id\":\"kyewnfnzhhhqo\",\"name\":\"mffjkutycyarn\",\"type\":\"oohguabzoghkt\"},{\"properties\":{\"displayName\":\"czhcoeocnh\",\"additionalData\":{}},\"id\":\"rottjzcfyjzptw\",\"name\":\"lohap\",\"type\":\"infsz\"},{\"properties\":{\"displayName\":\"lqdhmrjzr\",\"additionalData\":{}},\"id\":\"cxpjbyypsj\",\"name\":\"qcjenkyhf\",\"type\":\"zv\"}],\"nextLink\":\"xfxjelgcmpzqj\"}")
- .toObject(ApiCollectionResponseList.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ApiCollectionResponseList model = new ApiCollectionResponseList();
- model = BinaryData.fromObject(model).toObject(ApiCollectionResponseList.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionsGetWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionsGetWithResponseMockTests.java
deleted file mode 100644
index 9a4c90c6fcb2..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.ApiCollectionResponse;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ApiCollectionsGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"displayName\":\"uy\",\"additionalData\":{\"mqowiuasfgqg\":\"skowkrbhzhrbkh\",\"zkgyfpeoe\":\"cyhfaimqvdru\"}},\"id\":\"gfmq\",\"name\":\"sk\",\"type\":\"ixvlz\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- ApiCollectionResponse response =
- manager
- .apiCollections()
- .getWithResponse("ydtnaczkfwfatgaw", "hnskivdwgtqcume", "saaqgoq", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("uy", response.displayName());
- Assertions.assertEquals("skowkrbhzhrbkh", response.additionalData().get("mqowiuasfgqg"));
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionsListMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionsListMockTests.java
deleted file mode 100644
index 0e81dfccbdd2..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApiCollectionsListMockTests.java
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.ApiCollectionResponse;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ApiCollectionsListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"displayName\":\"kqiyvnd\",\"additionalData\":{\"esymzqh\":\"g\",\"ujqbbgsimwejl\":\"qpfzlpejtznxlue\"}},\"id\":\"bkbpjzobd\",\"name\":\"bcpr\",\"type\":\"swku\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.apiCollections().list("ti", "gufy", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("kqiyvnd", response.iterator().next().displayName());
- Assertions.assertEquals("g", response.iterator().next().additionalData().get("esymzqh"));
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApplicationInnerTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApplicationInnerTests.java
deleted file mode 100644
index a4491b2caa3e..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApplicationInnerTests.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.ApplicationInner;
-import com.azure.resourcemanager.security.models.ApplicationSourceResourceType;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ApplicationInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ApplicationInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"displayName\":\"fqlwxldykalsy\",\"description\":\"olnjpnnbmjksibj\",\"sourceResourceType\":\"Assessments\",\"conditionSets\":[\"datajxxahmrnad\",\"datayqegx\",\"dataiv\",\"datainbmh\"]},\"id\":\"bjijkgqxnh\",\"name\":\"bkezn\",\"type\":\"aujvaa\"}")
- .toObject(ApplicationInner.class);
- Assertions.assertEquals("fqlwxldykalsy", model.displayName());
- Assertions.assertEquals("olnjpnnbmjksibj", model.description());
- Assertions.assertEquals(ApplicationSourceResourceType.ASSESSMENTS, model.sourceResourceType());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ApplicationInner model =
- new ApplicationInner()
- .withDisplayName("fqlwxldykalsy")
- .withDescription("olnjpnnbmjksibj")
- .withSourceResourceType(ApplicationSourceResourceType.ASSESSMENTS)
- .withConditionSets(Arrays.asList("datajxxahmrnad", "datayqegx", "dataiv", "datainbmh"));
- model = BinaryData.fromObject(model).toObject(ApplicationInner.class);
- Assertions.assertEquals("fqlwxldykalsy", model.displayName());
- Assertions.assertEquals("olnjpnnbmjksibj", model.description());
- Assertions.assertEquals(ApplicationSourceResourceType.ASSESSMENTS, model.sourceResourceType());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApplicationOperationsCreateOrUpdateWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApplicationOperationsCreateOrUpdateWithResponseMockTests.java
deleted file mode 100644
index ab7ad8e9f2bc..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApplicationOperationsCreateOrUpdateWithResponseMockTests.java
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.Application;
-import com.azure.resourcemanager.security.models.ApplicationSourceResourceType;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ApplicationOperationsCreateOrUpdateWithResponseMockTests {
- @Test
- public void testCreateOrUpdateWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"displayName\":\"wlxrhgt\",\"description\":\"vtqqy\",\"sourceResourceType\":\"Assessments\",\"conditionSets\":[\"datakteo\"]},\"id\":\"ejogmkor\",\"name\":\"vmvm\",\"type\":\"ofnqhlbs\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- Application response =
- manager
- .applicationOperations()
- .define("ekwuyckyvn")
- .withDisplayName("muffiwjbctvbpzu")
- .withDescription("jtotdxposcs")
- .withSourceResourceType(ApplicationSourceResourceType.ASSESSMENTS)
- .withConditionSets(Arrays.asList("datauusiecktybh", "datauxidhhxomilddxj", "datad"))
- .create();
-
- Assertions.assertEquals("wlxrhgt", response.displayName());
- Assertions.assertEquals("vtqqy", response.description());
- Assertions.assertEquals(ApplicationSourceResourceType.ASSESSMENTS, response.sourceResourceType());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApplicationOperationsDeleteWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApplicationOperationsDeleteWithResponseMockTests.java
deleted file mode 100644
index 33c18132fc37..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApplicationOperationsDeleteWithResponseMockTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ApplicationOperationsDeleteWithResponseMockTests {
- @Test
- public void testDeleteWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager.applicationOperations().deleteWithResponse("canzb", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApplicationOperationsGetWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApplicationOperationsGetWithResponseMockTests.java
deleted file mode 100644
index 2011f333e046..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApplicationOperationsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.Application;
-import com.azure.resourcemanager.security.models.ApplicationSourceResourceType;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ApplicationOperationsGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"displayName\":\"nwosstfj\",\"description\":\"v\",\"sourceResourceType\":\"Assessments\",\"conditionSets\":[\"datazqfcwrriomxee\",\"datawyhjmbjiqegmxdbs\"]},\"id\":\"hc\",\"name\":\"hpyvdkgdet\",\"type\":\"z\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- Application response =
- manager.applicationOperations().getWithResponse("f", com.azure.core.util.Context.NONE).getValue();
-
- Assertions.assertEquals("nwosstfj", response.displayName());
- Assertions.assertEquals("v", response.description());
- Assertions.assertEquals(ApplicationSourceResourceType.ASSESSMENTS, response.sourceResourceType());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApplicationPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApplicationPropertiesTests.java
deleted file mode 100644
index 624d900564a2..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApplicationPropertiesTests.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.ApplicationProperties;
-import com.azure.resourcemanager.security.models.ApplicationSourceResourceType;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ApplicationPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ApplicationProperties model =
- BinaryData
- .fromString(
- "{\"displayName\":\"ggiycwkdtaawxwf\",\"description\":\"aumrrqmbzmqkrat\",\"sourceResourceType\":\"Assessments\",\"conditionSets\":[\"datawbjsidbirkf\",\"datakso\"]}")
- .toObject(ApplicationProperties.class);
- Assertions.assertEquals("ggiycwkdtaawxwf", model.displayName());
- Assertions.assertEquals("aumrrqmbzmqkrat", model.description());
- Assertions.assertEquals(ApplicationSourceResourceType.ASSESSMENTS, model.sourceResourceType());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ApplicationProperties model =
- new ApplicationProperties()
- .withDisplayName("ggiycwkdtaawxwf")
- .withDescription("aumrrqmbzmqkrat")
- .withSourceResourceType(ApplicationSourceResourceType.ASSESSMENTS)
- .withConditionSets(Arrays.asList("datawbjsidbirkf", "datakso"));
- model = BinaryData.fromObject(model).toObject(ApplicationProperties.class);
- Assertions.assertEquals("ggiycwkdtaawxwf", model.displayName());
- Assertions.assertEquals("aumrrqmbzmqkrat", model.description());
- Assertions.assertEquals(ApplicationSourceResourceType.ASSESSMENTS, model.sourceResourceType());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApplicationsListMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApplicationsListMockTests.java
deleted file mode 100644
index b8f81f208e80..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApplicationsListMockTests.java
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.Application;
-import com.azure.resourcemanager.security.models.ApplicationSourceResourceType;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ApplicationsListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"displayName\":\"soriobijeiydyeu\",\"description\":\"hbo\",\"sourceResourceType\":\"Assessments\",\"conditionSets\":[\"datar\",\"datawybriopdwe\"]},\"id\":\"f\",\"name\":\"norwaigsio\",\"type\":\"tqkmvjanxvzf\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response = manager.applications().list(com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("soriobijeiydyeu", response.iterator().next().displayName());
- Assertions.assertEquals("hbo", response.iterator().next().description());
- Assertions
- .assertEquals(ApplicationSourceResourceType.ASSESSMENTS, response.iterator().next().sourceResourceType());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApplicationsListTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApplicationsListTests.java
deleted file mode 100644
index 6d61edb2e16c..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ApplicationsListTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.ApplicationsList;
-
-public final class ApplicationsListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ApplicationsList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"displayName\":\"faymxbulpz\",\"description\":\"lbm\",\"sourceResourceType\":\"Assessments\",\"conditionSets\":[]},\"id\":\"yojwyvfkmbtsu\",\"name\":\"hxsgxj\",\"type\":\"mmzrrscub\"},{\"properties\":{\"displayName\":\"drnpxqwodiff\",\"description\":\"cjrmmua\",\"sourceResourceType\":\"Assessments\",\"conditionSets\":[]},\"id\":\"ibvjogjonmcy\",\"name\":\"foyzbamwineof\",\"type\":\"fkak\"},{\"properties\":{\"displayName\":\"dt\",\"description\":\"vboclzhzjk\",\"sourceResourceType\":\"Assessments\",\"conditionSets\":[]},\"id\":\"uxgvttxpnr\",\"name\":\"pzaamrdixtreki\",\"type\":\"swyskbruffg\"},{\"properties\":{\"displayName\":\"k\",\"description\":\"tvlxhrpqh\",\"sourceResourceType\":\"Assessments\",\"conditionSets\":[]},\"id\":\"blcouqehbhbcdszi\",\"name\":\"yr\",\"type\":\"ndo\"}],\"nextLink\":\"mbltoo\"}")
- .toObject(ApplicationsList.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ApplicationsList model = new ApplicationsList();
- model = BinaryData.fromObject(model).toObject(ApplicationsList.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AscLocationInnerTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AscLocationInnerTests.java
deleted file mode 100644
index ca0b19baf373..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AscLocationInnerTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.AscLocationInner;
-
-public final class AscLocationInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AscLocationInner model =
- BinaryData
- .fromString(
- "{\"properties\":\"datasdqrhzoymibmrq\",\"id\":\"ibahwflus\",\"name\":\"dtmhrkwofyyvoqa\",\"type\":\"piexpbtgiw\"}")
- .toObject(AscLocationInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AscLocationInner model = new AscLocationInner().withProperties("datasdqrhzoymibmrq");
- model = BinaryData.fromObject(model).toObject(AscLocationInner.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AscLocationListTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AscLocationListTests.java
deleted file mode 100644
index acef2fad6e2a..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AscLocationListTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AscLocationList;
-
-public final class AscLocationListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AscLocationList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":\"datasmond\",\"id\":\"mquxvypo\",\"name\":\"gkopkwhojvpajqgx\",\"type\":\"smocmbq\"},{\"properties\":\"datavmkcx\",\"id\":\"zapvhelx\",\"name\":\"rgly\",\"type\":\"tddckcb\"}],\"nextLink\":\"ejrjxgciqibrho\"}")
- .toObject(AscLocationList.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AscLocationList model = new AscLocationList();
- model = BinaryData.fromObject(model).toObject(AscLocationList.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AssessmentLinksTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AssessmentLinksTests.java
deleted file mode 100644
index c415b483f63c..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AssessmentLinksTests.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AssessmentLinks;
-
-public final class AssessmentLinksTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AssessmentLinks model =
- BinaryData.fromString("{\"azurePortalUri\":\"ycavodggxdbees\"}").toObject(AssessmentLinks.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AssessmentLinks model = new AssessmentLinks();
- model = BinaryData.fromObject(model).toObject(AssessmentLinks.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AssessmentsDeleteByResourceGroupWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AssessmentsDeleteByResourceGroupWithResponseMockTests.java
deleted file mode 100644
index 7c1043cebe3e..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AssessmentsDeleteByResourceGroupWithResponseMockTests.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AssessmentsDeleteByResourceGroupWithResponseMockTests {
- @Test
- public void testDeleteWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .assessments()
- .deleteByResourceGroupWithResponse("crzge", "qxbpiatwfauje", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AssessmentsMetadatasDeleteInSubscriptionWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AssessmentsMetadatasDeleteInSubscriptionWithResponseMockTests.java
deleted file mode 100644
index e1955a35e445..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AssessmentsMetadatasDeleteInSubscriptionWithResponseMockTests.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AssessmentsMetadatasDeleteInSubscriptionWithResponseMockTests {
- @Test
- public void testDeleteInSubscriptionWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .assessmentsMetadatas()
- .deleteInSubscriptionWithResponse("hdeeljslkyozdsfz", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AtaExternalSecuritySolutionTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AtaExternalSecuritySolutionTests.java
deleted file mode 100644
index 3f14f858e2bf..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AtaExternalSecuritySolutionTests.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AtaExternalSecuritySolution;
-import com.azure.resourcemanager.security.models.AtaSolutionProperties;
-import com.azure.resourcemanager.security.models.ConnectedWorkspace;
-import org.junit.jupiter.api.Assertions;
-
-public final class AtaExternalSecuritySolutionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AtaExternalSecuritySolution model =
- BinaryData
- .fromString(
- "{\"kind\":\"ATA\",\"properties\":{\"lastEventReceived\":\"vpyigdaqq\",\"deviceVendor\":\"zdcduwjoedxng\",\"deviceType\":\"aifpaurwwgil\",\"workspace\":{\"id\":\"qacdmkxwxdcvjwcy\"},\"\":{\"iw\":\"datakeciqchxrtuicd\",\"hzzwvywrgyngy\":\"datafmmp\",\"clamgglvlmfejdoq\":\"datagrpxncakiqaondjr\"}},\"location\":\"kgltyg\",\"id\":\"hqfgqkayejsx\",\"name\":\"lgflwfg\",\"type\":\"ii\"}")
- .toObject(AtaExternalSecuritySolution.class);
- Assertions.assertEquals("zdcduwjoedxng", model.properties().deviceVendor());
- Assertions.assertEquals("aifpaurwwgil", model.properties().deviceType());
- Assertions.assertEquals("qacdmkxwxdcvjwcy", model.properties().workspace().id());
- Assertions.assertEquals("vpyigdaqq", model.properties().lastEventReceived());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AtaExternalSecuritySolution model =
- new AtaExternalSecuritySolution()
- .withProperties(
- new AtaSolutionProperties()
- .withDeviceVendor("zdcduwjoedxng")
- .withDeviceType("aifpaurwwgil")
- .withWorkspace(new ConnectedWorkspace().withId("qacdmkxwxdcvjwcy"))
- .withLastEventReceived("vpyigdaqq"));
- model = BinaryData.fromObject(model).toObject(AtaExternalSecuritySolution.class);
- Assertions.assertEquals("zdcduwjoedxng", model.properties().deviceVendor());
- Assertions.assertEquals("aifpaurwwgil", model.properties().deviceType());
- Assertions.assertEquals("qacdmkxwxdcvjwcy", model.properties().workspace().id());
- Assertions.assertEquals("vpyigdaqq", model.properties().lastEventReceived());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AtaSolutionPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AtaSolutionPropertiesTests.java
deleted file mode 100644
index 68f321f65617..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AtaSolutionPropertiesTests.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AtaSolutionProperties;
-import com.azure.resourcemanager.security.models.ConnectedWorkspace;
-import org.junit.jupiter.api.Assertions;
-
-public final class AtaSolutionPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AtaSolutionProperties model =
- BinaryData
- .fromString(
- "{\"lastEventReceived\":\"ijjcea\",\"deviceVendor\":\"ijjj\",\"deviceType\":\"va\",\"workspace\":{\"id\":\"szknxkvccxe\"},\"\":{\"nohikkgq\":\"datakunmi\",\"wpin\":\"datag\"}}")
- .toObject(AtaSolutionProperties.class);
- Assertions.assertEquals("ijjj", model.deviceVendor());
- Assertions.assertEquals("va", model.deviceType());
- Assertions.assertEquals("szknxkvccxe", model.workspace().id());
- Assertions.assertEquals("ijjcea", model.lastEventReceived());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AtaSolutionProperties model =
- new AtaSolutionProperties()
- .withDeviceVendor("ijjj")
- .withDeviceType("va")
- .withWorkspace(new ConnectedWorkspace().withId("szknxkvccxe"))
- .withLastEventReceived("ijjcea");
- model = BinaryData.fromObject(model).toObject(AtaSolutionProperties.class);
- Assertions.assertEquals("ijjj", model.deviceVendor());
- Assertions.assertEquals("va", model.deviceType());
- Assertions.assertEquals("szknxkvccxe", model.workspace().id());
- Assertions.assertEquals("ijjcea", model.lastEventReceived());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AuthenticationDetailsPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AuthenticationDetailsPropertiesTests.java
deleted file mode 100644
index 590dc411410c..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AuthenticationDetailsPropertiesTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AuthenticationDetailsProperties;
-
-public final class AuthenticationDetailsPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AuthenticationDetailsProperties model =
- BinaryData
- .fromString(
- "{\"authenticationType\":\"AuthenticationDetailsProperties\",\"authenticationProvisioningState\":\"Valid\",\"grantedPermissions\":[\"AWS::AWSSecurityHubReadOnlyAccess\",\"AWS::AmazonSSMAutomationRole\",\"AWS::SecurityAudit\"]}")
- .toObject(AuthenticationDetailsProperties.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AuthenticationDetailsProperties model = new AuthenticationDetailsProperties();
- model = BinaryData.fromObject(model).toObject(AuthenticationDetailsProperties.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutoProvisioningSettingInnerTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutoProvisioningSettingInnerTests.java
deleted file mode 100644
index dd38cf540c13..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutoProvisioningSettingInnerTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.AutoProvisioningSettingInner;
-import com.azure.resourcemanager.security.models.AutoProvision;
-import org.junit.jupiter.api.Assertions;
-
-public final class AutoProvisioningSettingInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AutoProvisioningSettingInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"autoProvision\":\"On\"},\"id\":\"ikh\",\"name\":\"yf\",\"type\":\"hdgqggeb\"}")
- .toObject(AutoProvisioningSettingInner.class);
- Assertions.assertEquals(AutoProvision.ON, model.autoProvision());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AutoProvisioningSettingInner model = new AutoProvisioningSettingInner().withAutoProvision(AutoProvision.ON);
- model = BinaryData.fromObject(model).toObject(AutoProvisioningSettingInner.class);
- Assertions.assertEquals(AutoProvision.ON, model.autoProvision());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutoProvisioningSettingListTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutoProvisioningSettingListTests.java
deleted file mode 100644
index 00d317e22087..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutoProvisioningSettingListTests.java
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.AutoProvisioningSettingInner;
-import com.azure.resourcemanager.security.models.AutoProvision;
-import com.azure.resourcemanager.security.models.AutoProvisioningSettingList;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AutoProvisioningSettingListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AutoProvisioningSettingList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"autoProvision\":\"On\"},\"id\":\"irels\",\"name\":\"eae\",\"type\":\"wabfatkl\"},{\"properties\":{\"autoProvision\":\"Off\"},\"id\":\"bjhwuaan\",\"name\":\"zjosp\",\"type\":\"youlp\"},{\"properties\":{\"autoProvision\":\"On\"},\"id\":\"xagl\",\"name\":\"vimjwos\",\"type\":\"tx\"}],\"nextLink\":\"cskfcktqumiekk\"}")
- .toObject(AutoProvisioningSettingList.class);
- Assertions.assertEquals(AutoProvision.ON, model.value().get(0).autoProvision());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AutoProvisioningSettingList model =
- new AutoProvisioningSettingList()
- .withValue(
- Arrays
- .asList(
- new AutoProvisioningSettingInner().withAutoProvision(AutoProvision.ON),
- new AutoProvisioningSettingInner().withAutoProvision(AutoProvision.OFF),
- new AutoProvisioningSettingInner().withAutoProvision(AutoProvision.ON)));
- model = BinaryData.fromObject(model).toObject(AutoProvisioningSettingList.class);
- Assertions.assertEquals(AutoProvision.ON, model.value().get(0).autoProvision());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutoProvisioningSettingPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutoProvisioningSettingPropertiesTests.java
deleted file mode 100644
index 4c07192125e5..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutoProvisioningSettingPropertiesTests.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.AutoProvisioningSettingProperties;
-import com.azure.resourcemanager.security.models.AutoProvision;
-import org.junit.jupiter.api.Assertions;
-
-public final class AutoProvisioningSettingPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AutoProvisioningSettingProperties model =
- BinaryData.fromString("{\"autoProvision\":\"Off\"}").toObject(AutoProvisioningSettingProperties.class);
- Assertions.assertEquals(AutoProvision.OFF, model.autoProvision());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AutoProvisioningSettingProperties model =
- new AutoProvisioningSettingProperties().withAutoProvision(AutoProvision.OFF);
- model = BinaryData.fromObject(model).toObject(AutoProvisioningSettingProperties.class);
- Assertions.assertEquals(AutoProvision.OFF, model.autoProvision());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutoProvisioningSettingsCreateWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutoProvisioningSettingsCreateWithResponseMockTests.java
deleted file mode 100644
index 008f4f24dab5..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutoProvisioningSettingsCreateWithResponseMockTests.java
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.AutoProvision;
-import com.azure.resourcemanager.security.models.AutoProvisioningSetting;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AutoProvisioningSettingsCreateWithResponseMockTests {
- @Test
- public void testCreateWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"autoProvision\":\"Off\"},\"id\":\"dxe\",\"name\":\"hhkvguavtptbk\",\"type\":\"wkqyns\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- AutoProvisioningSetting response =
- manager.autoProvisioningSettings().define("gmghginztxlujkhn").withAutoProvision(AutoProvision.OFF).create();
-
- Assertions.assertEquals(AutoProvision.OFF, response.autoProvision());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutoProvisioningSettingsGetWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutoProvisioningSettingsGetWithResponseMockTests.java
deleted file mode 100644
index eba826392f54..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutoProvisioningSettingsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.AutoProvision;
-import com.azure.resourcemanager.security.models.AutoProvisioningSetting;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AutoProvisioningSettingsGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"autoProvision\":\"Off\"},\"id\":\"fkwdvbtbrekqh\",\"name\":\"qhtfpwpqbye\",\"type\":\"uwyqwdq\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- AutoProvisioningSetting response =
- manager.autoProvisioningSettings().getWithResponse("h", com.azure.core.util.Context.NONE).getValue();
-
- Assertions.assertEquals(AutoProvision.OFF, response.autoProvision());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutoProvisioningSettingsListMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutoProvisioningSettingsListMockTests.java
deleted file mode 100644
index 3617c75527ea..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutoProvisioningSettingsListMockTests.java
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.AutoProvision;
-import com.azure.resourcemanager.security.models.AutoProvisioningSetting;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AutoProvisioningSettingsListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"autoProvision\":\"Off\"},\"id\":\"vstclg\",\"name\":\"rvwerfwxbsmtb\",\"type\":\"jj\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.autoProvisioningSettings().list(com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals(AutoProvision.OFF, response.iterator().next().autoProvision());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationActionEventHubTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationActionEventHubTests.java
deleted file mode 100644
index 0f4c67623883..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationActionEventHubTests.java
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AutomationActionEventHub;
-import org.junit.jupiter.api.Assertions;
-
-public final class AutomationActionEventHubTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AutomationActionEventHub model =
- BinaryData
- .fromString(
- "{\"actionType\":\"EventHub\",\"eventHubResourceId\":\"brlbpgs\",\"sasPolicyName\":\"agnchjhgemuowaky\",\"connectionString\":\"lhjym\"}")
- .toObject(AutomationActionEventHub.class);
- Assertions.assertEquals("brlbpgs", model.eventHubResourceId());
- Assertions.assertEquals("lhjym", model.connectionString());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AutomationActionEventHub model =
- new AutomationActionEventHub().withEventHubResourceId("brlbpgs").withConnectionString("lhjym");
- model = BinaryData.fromObject(model).toObject(AutomationActionEventHub.class);
- Assertions.assertEquals("brlbpgs", model.eventHubResourceId());
- Assertions.assertEquals("lhjym", model.connectionString());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationActionLogicAppTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationActionLogicAppTests.java
deleted file mode 100644
index 9224d9fd8e62..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationActionLogicAppTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AutomationActionLogicApp;
-import org.junit.jupiter.api.Assertions;
-
-public final class AutomationActionLogicAppTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AutomationActionLogicApp model =
- BinaryData
- .fromString("{\"actionType\":\"LogicApp\",\"logicAppResourceId\":\"kxhnegknj\",\"uri\":\"bhtmeplvuk\"}")
- .toObject(AutomationActionLogicApp.class);
- Assertions.assertEquals("kxhnegknj", model.logicAppResourceId());
- Assertions.assertEquals("bhtmeplvuk", model.uri());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AutomationActionLogicApp model =
- new AutomationActionLogicApp().withLogicAppResourceId("kxhnegknj").withUri("bhtmeplvuk");
- model = BinaryData.fromObject(model).toObject(AutomationActionLogicApp.class);
- Assertions.assertEquals("kxhnegknj", model.logicAppResourceId());
- Assertions.assertEquals("bhtmeplvuk", model.uri());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationActionTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationActionTests.java
deleted file mode 100644
index 8b8800223b67..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationActionTests.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AutomationAction;
-
-public final class AutomationActionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AutomationAction model =
- BinaryData.fromString("{\"actionType\":\"AutomationAction\"}").toObject(AutomationAction.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AutomationAction model = new AutomationAction();
- model = BinaryData.fromObject(model).toObject(AutomationAction.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationActionWorkspaceTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationActionWorkspaceTests.java
deleted file mode 100644
index c2bc7ccad07f..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationActionWorkspaceTests.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AutomationActionWorkspace;
-import org.junit.jupiter.api.Assertions;
-
-public final class AutomationActionWorkspaceTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AutomationActionWorkspace model =
- BinaryData
- .fromString("{\"actionType\":\"Workspace\",\"workspaceResourceId\":\"gqtagd\"}")
- .toObject(AutomationActionWorkspace.class);
- Assertions.assertEquals("gqtagd", model.workspaceResourceId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AutomationActionWorkspace model = new AutomationActionWorkspace().withWorkspaceResourceId("gqtagd");
- model = BinaryData.fromObject(model).toObject(AutomationActionWorkspace.class);
- Assertions.assertEquals("gqtagd", model.workspaceResourceId());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationInnerTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationInnerTests.java
deleted file mode 100644
index a3f329e64d64..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationInnerTests.java
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.AutomationInner;
-import com.azure.resourcemanager.security.models.AutomationAction;
-import com.azure.resourcemanager.security.models.AutomationScope;
-import com.azure.resourcemanager.security.models.AutomationSource;
-import com.azure.resourcemanager.security.models.EventSource;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class AutomationInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AutomationInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"description\":\"opqgikyzirtxdyux\",\"isEnabled\":true,\"scopes\":[{\"description\":\"sewgioilqukr\",\"scopePath\":\"xtqmieoxor\"},{\"description\":\"ufhyaomtbgh\",\"scopePath\":\"vgrvkffo\"}],\"sources\":[{\"eventSource\":\"Alerts\",\"ruleSets\":[]}],\"actions\":[{\"actionType\":\"AutomationAction\"},{\"actionType\":\"AutomationAction\"},{\"actionType\":\"AutomationAction\"},{\"actionType\":\"AutomationAction\"}]},\"location\":\"bgj\",\"tags\":{\"ovwxnbkfezzxsc\":\"umvfclu\",\"omvzzbtd\":\"hwzdgirujbz\",\"yujviylwdshfssn\":\"qvpn\"},\"id\":\"bgye\",\"name\":\"rymsgaojfmw\",\"type\":\"cotmr\"}")
- .toObject(AutomationInner.class);
- Assertions.assertEquals("bgj", model.location());
- Assertions.assertEquals("umvfclu", model.tags().get("ovwxnbkfezzxsc"));
- Assertions.assertEquals("opqgikyzirtxdyux", model.description());
- Assertions.assertEquals(true, model.isEnabled());
- Assertions.assertEquals("sewgioilqukr", model.scopes().get(0).description());
- Assertions.assertEquals("xtqmieoxor", model.scopes().get(0).scopePath());
- Assertions.assertEquals(EventSource.ALERTS, model.sources().get(0).eventSource());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AutomationInner model =
- new AutomationInner()
- .withLocation("bgj")
- .withTags(mapOf("ovwxnbkfezzxsc", "umvfclu", "omvzzbtd", "hwzdgirujbz", "yujviylwdshfssn", "qvpn"))
- .withDescription("opqgikyzirtxdyux")
- .withIsEnabled(true)
- .withScopes(
- Arrays
- .asList(
- new AutomationScope().withDescription("sewgioilqukr").withScopePath("xtqmieoxor"),
- new AutomationScope().withDescription("ufhyaomtbgh").withScopePath("vgrvkffo")))
- .withSources(
- Arrays
- .asList(
- new AutomationSource().withEventSource(EventSource.ALERTS).withRuleSets(Arrays.asList())))
- .withActions(
- Arrays
- .asList(
- new AutomationAction(),
- new AutomationAction(),
- new AutomationAction(),
- new AutomationAction()));
- model = BinaryData.fromObject(model).toObject(AutomationInner.class);
- Assertions.assertEquals("bgj", model.location());
- Assertions.assertEquals("umvfclu", model.tags().get("ovwxnbkfezzxsc"));
- Assertions.assertEquals("opqgikyzirtxdyux", model.description());
- Assertions.assertEquals(true, model.isEnabled());
- Assertions.assertEquals("sewgioilqukr", model.scopes().get(0).description());
- Assertions.assertEquals("xtqmieoxor", model.scopes().get(0).scopePath());
- Assertions.assertEquals(EventSource.ALERTS, model.sources().get(0).eventSource());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationListTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationListTests.java
deleted file mode 100644
index 0103de6de228..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationListTests.java
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.AutomationInner;
-import com.azure.resourcemanager.security.models.AutomationList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class AutomationListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AutomationList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"description\":\"jpqqmted\",\"isEnabled\":false,\"scopes\":[],\"sources\":[],\"actions\":[]},\"location\":\"hyeozphvwau\",\"tags\":{\"gupkvipmdscwxq\":\"c\"},\"id\":\"pevzhfst\",\"name\":\"txhojujb\",\"type\":\"pelmcuvhixbjxyf\"},{\"properties\":{\"description\":\"lrcoolsttpki\",\"isEnabled\":false,\"scopes\":[],\"sources\":[],\"actions\":[]},\"location\":\"jrywvtylbfpnc\",\"tags\":{\"cbihwqk\":\"oiwiithtywub\",\"umwctondz\":\"fdntwjchrdgoih\"},\"id\":\"luudfdlwggytsb\",\"name\":\"tov\",\"type\":\"tgseinqfiufxqkn\"},{\"properties\":{\"description\":\"gnepttwqmsni\",\"isEnabled\":false,\"scopes\":[],\"sources\":[],\"actions\":[]},\"location\":\"nrojlpijnkr\",\"tags\":{\"nasx\":\"ddhcratizzr\"},\"id\":\"ft\",\"name\":\"zq\",\"type\":\"zh\"},{\"properties\":{\"description\":\"esgogc\",\"isEnabled\":true,\"scopes\":[],\"sources\":[],\"actions\":[]},\"location\":\"krlgnyhm\",\"tags\":{\"thrrgh\":\"xkk\",\"gf\":\"jbdhqxvc\"},\"id\":\"pdso\",\"name\":\"bshrnsvbuswd\",\"type\":\"z\"}],\"nextLink\":\"bycnunvjsrtkf\"}")
- .toObject(AutomationList.class);
- Assertions.assertEquals("hyeozphvwau", model.value().get(0).location());
- Assertions.assertEquals("c", model.value().get(0).tags().get("gupkvipmdscwxq"));
- Assertions.assertEquals("jpqqmted", model.value().get(0).description());
- Assertions.assertEquals(false, model.value().get(0).isEnabled());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AutomationList model =
- new AutomationList()
- .withValue(
- Arrays
- .asList(
- new AutomationInner()
- .withLocation("hyeozphvwau")
- .withTags(mapOf("gupkvipmdscwxq", "c"))
- .withDescription("jpqqmted")
- .withIsEnabled(false)
- .withScopes(Arrays.asList())
- .withSources(Arrays.asList())
- .withActions(Arrays.asList()),
- new AutomationInner()
- .withLocation("jrywvtylbfpnc")
- .withTags(mapOf("cbihwqk", "oiwiithtywub", "umwctondz", "fdntwjchrdgoih"))
- .withDescription("lrcoolsttpki")
- .withIsEnabled(false)
- .withScopes(Arrays.asList())
- .withSources(Arrays.asList())
- .withActions(Arrays.asList()),
- new AutomationInner()
- .withLocation("nrojlpijnkr")
- .withTags(mapOf("nasx", "ddhcratizzr"))
- .withDescription("gnepttwqmsni")
- .withIsEnabled(false)
- .withScopes(Arrays.asList())
- .withSources(Arrays.asList())
- .withActions(Arrays.asList()),
- new AutomationInner()
- .withLocation("krlgnyhm")
- .withTags(mapOf("thrrgh", "xkk", "gf", "jbdhqxvc"))
- .withDescription("esgogc")
- .withIsEnabled(true)
- .withScopes(Arrays.asList())
- .withSources(Arrays.asList())
- .withActions(Arrays.asList())));
- model = BinaryData.fromObject(model).toObject(AutomationList.class);
- Assertions.assertEquals("hyeozphvwau", model.value().get(0).location());
- Assertions.assertEquals("c", model.value().get(0).tags().get("gupkvipmdscwxq"));
- Assertions.assertEquals("jpqqmted", model.value().get(0).description());
- Assertions.assertEquals(false, model.value().get(0).isEnabled());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationPropertiesTests.java
deleted file mode 100644
index 8e374d423f4c..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationPropertiesTests.java
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.AutomationProperties;
-import com.azure.resourcemanager.security.models.AutomationAction;
-import com.azure.resourcemanager.security.models.AutomationScope;
-import com.azure.resourcemanager.security.models.AutomationSource;
-import com.azure.resourcemanager.security.models.EventSource;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AutomationPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AutomationProperties model =
- BinaryData
- .fromString(
- "{\"description\":\"irctymoxoftpipiw\",\"isEnabled\":false,\"scopes\":[{\"description\":\"a\",\"scopePath\":\"qjlihhyuspska\"},{\"description\":\"vlmfwdgzxulucv\",\"scopePath\":\"mrsreuzvxurisjnh\"},{\"description\":\"txifqj\",\"scopePath\":\"xmrhu\"},{\"description\":\"wp\",\"scopePath\":\"sutrgjup\"}],\"sources\":[{\"eventSource\":\"SubAssessmentsSnapshot\",\"ruleSets\":[]},{\"eventSource\":\"RegulatoryComplianceAssessment\",\"ruleSets\":[]},{\"eventSource\":\"Alerts\",\"ruleSets\":[]},{\"eventSource\":\"RegulatoryComplianceAssessmentSnapshot\",\"ruleSets\":[]}],\"actions\":[{\"actionType\":\"AutomationAction\"},{\"actionType\":\"AutomationAction\"},{\"actionType\":\"AutomationAction\"},{\"actionType\":\"AutomationAction\"}]}")
- .toObject(AutomationProperties.class);
- Assertions.assertEquals("irctymoxoftpipiw", model.description());
- Assertions.assertEquals(false, model.isEnabled());
- Assertions.assertEquals("a", model.scopes().get(0).description());
- Assertions.assertEquals("qjlihhyuspska", model.scopes().get(0).scopePath());
- Assertions.assertEquals(EventSource.SUB_ASSESSMENTS_SNAPSHOT, model.sources().get(0).eventSource());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AutomationProperties model =
- new AutomationProperties()
- .withDescription("irctymoxoftpipiw")
- .withIsEnabled(false)
- .withScopes(
- Arrays
- .asList(
- new AutomationScope().withDescription("a").withScopePath("qjlihhyuspska"),
- new AutomationScope().withDescription("vlmfwdgzxulucv").withScopePath("mrsreuzvxurisjnh"),
- new AutomationScope().withDescription("txifqj").withScopePath("xmrhu"),
- new AutomationScope().withDescription("wp").withScopePath("sutrgjup")))
- .withSources(
- Arrays
- .asList(
- new AutomationSource()
- .withEventSource(EventSource.SUB_ASSESSMENTS_SNAPSHOT)
- .withRuleSets(Arrays.asList()),
- new AutomationSource()
- .withEventSource(EventSource.REGULATORY_COMPLIANCE_ASSESSMENT)
- .withRuleSets(Arrays.asList()),
- new AutomationSource().withEventSource(EventSource.ALERTS).withRuleSets(Arrays.asList()),
- new AutomationSource()
- .withEventSource(EventSource.REGULATORY_COMPLIANCE_ASSESSMENT_SNAPSHOT)
- .withRuleSets(Arrays.asList())))
- .withActions(
- Arrays
- .asList(
- new AutomationAction(),
- new AutomationAction(),
- new AutomationAction(),
- new AutomationAction()));
- model = BinaryData.fromObject(model).toObject(AutomationProperties.class);
- Assertions.assertEquals("irctymoxoftpipiw", model.description());
- Assertions.assertEquals(false, model.isEnabled());
- Assertions.assertEquals("a", model.scopes().get(0).description());
- Assertions.assertEquals("qjlihhyuspska", model.scopes().get(0).scopePath());
- Assertions.assertEquals(EventSource.SUB_ASSESSMENTS_SNAPSHOT, model.sources().get(0).eventSource());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationRuleSetTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationRuleSetTests.java
deleted file mode 100644
index c41517f68b2d..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationRuleSetTests.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AutomationRuleSet;
-import com.azure.resourcemanager.security.models.AutomationTriggeringRule;
-import com.azure.resourcemanager.security.models.Operator;
-import com.azure.resourcemanager.security.models.PropertyType;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AutomationRuleSetTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AutomationRuleSet model =
- BinaryData
- .fromString(
- "{\"rules\":[{\"propertyJPath\":\"hvygdyftumr\",\"propertyType\":\"Boolean\",\"expectedValue\":\"wjslbiwkojgcyzt\",\"operator\":\"LesserThan\"}]}")
- .toObject(AutomationRuleSet.class);
- Assertions.assertEquals("hvygdyftumr", model.rules().get(0).propertyJPath());
- Assertions.assertEquals(PropertyType.BOOLEAN, model.rules().get(0).propertyType());
- Assertions.assertEquals("wjslbiwkojgcyzt", model.rules().get(0).expectedValue());
- Assertions.assertEquals(Operator.LESSER_THAN, model.rules().get(0).operator());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AutomationRuleSet model =
- new AutomationRuleSet()
- .withRules(
- Arrays
- .asList(
- new AutomationTriggeringRule()
- .withPropertyJPath("hvygdyftumr")
- .withPropertyType(PropertyType.BOOLEAN)
- .withExpectedValue("wjslbiwkojgcyzt")
- .withOperator(Operator.LESSER_THAN)));
- model = BinaryData.fromObject(model).toObject(AutomationRuleSet.class);
- Assertions.assertEquals("hvygdyftumr", model.rules().get(0).propertyJPath());
- Assertions.assertEquals(PropertyType.BOOLEAN, model.rules().get(0).propertyType());
- Assertions.assertEquals("wjslbiwkojgcyzt", model.rules().get(0).expectedValue());
- Assertions.assertEquals(Operator.LESSER_THAN, model.rules().get(0).operator());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationScopeTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationScopeTests.java
deleted file mode 100644
index 18bc6495f4c0..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationScopeTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AutomationScope;
-import org.junit.jupiter.api.Assertions;
-
-public final class AutomationScopeTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AutomationScope model =
- BinaryData
- .fromString("{\"description\":\"tcypsxjvfoim\",\"scopePath\":\"slirciz\"}")
- .toObject(AutomationScope.class);
- Assertions.assertEquals("tcypsxjvfoim", model.description());
- Assertions.assertEquals("slirciz", model.scopePath());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AutomationScope model = new AutomationScope().withDescription("tcypsxjvfoim").withScopePath("slirciz");
- model = BinaryData.fromObject(model).toObject(AutomationScope.class);
- Assertions.assertEquals("tcypsxjvfoim", model.description());
- Assertions.assertEquals("slirciz", model.scopePath());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationSourceTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationSourceTests.java
deleted file mode 100644
index 7379f70c7554..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationSourceTests.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AutomationRuleSet;
-import com.azure.resourcemanager.security.models.AutomationSource;
-import com.azure.resourcemanager.security.models.EventSource;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AutomationSourceTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AutomationSource model =
- BinaryData
- .fromString("{\"eventSource\":\"SubAssessmentsSnapshot\",\"ruleSets\":[{\"rules\":[]},{\"rules\":[]}]}")
- .toObject(AutomationSource.class);
- Assertions.assertEquals(EventSource.SUB_ASSESSMENTS_SNAPSHOT, model.eventSource());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AutomationSource model =
- new AutomationSource()
- .withEventSource(EventSource.SUB_ASSESSMENTS_SNAPSHOT)
- .withRuleSets(
- Arrays
- .asList(
- new AutomationRuleSet().withRules(Arrays.asList()),
- new AutomationRuleSet().withRules(Arrays.asList())));
- model = BinaryData.fromObject(model).toObject(AutomationSource.class);
- Assertions.assertEquals(EventSource.SUB_ASSESSMENTS_SNAPSHOT, model.eventSource());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationTriggeringRuleTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationTriggeringRuleTests.java
deleted file mode 100644
index e0d355d4af39..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationTriggeringRuleTests.java
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AutomationTriggeringRule;
-import com.azure.resourcemanager.security.models.Operator;
-import com.azure.resourcemanager.security.models.PropertyType;
-import org.junit.jupiter.api.Assertions;
-
-public final class AutomationTriggeringRuleTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AutomationTriggeringRule model =
- BinaryData
- .fromString(
- "{\"propertyJPath\":\"nbaeqphchqn\",\"propertyType\":\"Integer\",\"expectedValue\":\"x\",\"operator\":\"LesserThan\"}")
- .toObject(AutomationTriggeringRule.class);
- Assertions.assertEquals("nbaeqphchqn", model.propertyJPath());
- Assertions.assertEquals(PropertyType.INTEGER, model.propertyType());
- Assertions.assertEquals("x", model.expectedValue());
- Assertions.assertEquals(Operator.LESSER_THAN, model.operator());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AutomationTriggeringRule model =
- new AutomationTriggeringRule()
- .withPropertyJPath("nbaeqphchqn")
- .withPropertyType(PropertyType.INTEGER)
- .withExpectedValue("x")
- .withOperator(Operator.LESSER_THAN);
- model = BinaryData.fromObject(model).toObject(AutomationTriggeringRule.class);
- Assertions.assertEquals("nbaeqphchqn", model.propertyJPath());
- Assertions.assertEquals(PropertyType.INTEGER, model.propertyType());
- Assertions.assertEquals("x", model.expectedValue());
- Assertions.assertEquals(Operator.LESSER_THAN, model.operator());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationValidationStatusInnerTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationValidationStatusInnerTests.java
deleted file mode 100644
index aad3a0708105..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationValidationStatusInnerTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.AutomationValidationStatusInner;
-import org.junit.jupiter.api.Assertions;
-
-public final class AutomationValidationStatusInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AutomationValidationStatusInner model =
- BinaryData
- .fromString("{\"isValid\":false,\"message\":\"tczheydbsdshmkx\"}")
- .toObject(AutomationValidationStatusInner.class);
- Assertions.assertEquals(false, model.isValid());
- Assertions.assertEquals("tczheydbsdshmkx", model.message());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AutomationValidationStatusInner model =
- new AutomationValidationStatusInner().withIsValid(false).withMessage("tczheydbsdshmkx");
- model = BinaryData.fromObject(model).toObject(AutomationValidationStatusInner.class);
- Assertions.assertEquals(false, model.isValid());
- Assertions.assertEquals("tczheydbsdshmkx", model.message());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationsCreateOrUpdateWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationsCreateOrUpdateWithResponseMockTests.java
deleted file mode 100644
index 47a027adeaf4..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationsCreateOrUpdateWithResponseMockTests.java
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.Automation;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AutomationsCreateOrUpdateWithResponseMockTests {
- @Test
- public void testCreateOrUpdateWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"description\":\"huulriqbyo\",\"isEnabled\":false,\"scopes\":[],\"sources\":[],\"actions\":[]},\"location\":\"br\",\"tags\":{\"oardnagttpu\":\"tfyhcdjws\",\"plkys\":\"pbpgnrholhujbfwx\",\"yjprxslw\":\"l\",\"hfvhuwzbxpcqz\":\"dmcvhtbbz\"},\"id\":\"ihotjecohmxv\",\"name\":\"lrrskap\",\"type\":\"xwieexuyade\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- Automation response =
- manager
- .automations()
- .define("sdohz")
- .withRegion("wktlepowa")
- .withExistingResourceGroup("atecaa")
- .withTags(mapOf("jgcq", "xu"))
- .withDescription("cbdaom")
- .withIsEnabled(false)
- .withScopes(Arrays.asList())
- .withSources(Arrays.asList())
- .withActions(Arrays.asList())
- .create();
-
- Assertions.assertEquals("br", response.location());
- Assertions.assertEquals("tfyhcdjws", response.tags().get("oardnagttpu"));
- Assertions.assertEquals("huulriqbyo", response.description());
- Assertions.assertEquals(false, response.isEnabled());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationsDeleteByResourceGroupWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationsDeleteByResourceGroupWithResponseMockTests.java
deleted file mode 100644
index 3d2e140bc7f4..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationsDeleteByResourceGroupWithResponseMockTests.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AutomationsDeleteByResourceGroupWithResponseMockTests {
- @Test
- public void testDeleteWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(204);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .automations()
- .deleteByResourceGroupWithResponse("jjrlhiqlwix", "tbouguxtnd", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationsGetByResourceGroupWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationsGetByResourceGroupWithResponseMockTests.java
deleted file mode 100644
index 7347d597b752..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationsGetByResourceGroupWithResponseMockTests.java
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.Automation;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AutomationsGetByResourceGroupWithResponseMockTests {
- @Test
- public void testGetByResourceGroupWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"description\":\"iqm\",\"isEnabled\":true,\"scopes\":[],\"sources\":[],\"actions\":[]},\"location\":\"grvgpomxp\",\"tags\":{\"wiqbuoutm\":\"tsdfjyieso\",\"gbww\":\"yzgleofjs\"},\"id\":\"vdajfwn\",\"name\":\"cf\",\"type\":\"aciq\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- Automation response =
- manager
- .automations()
- .getByResourceGroupWithResponse("hazyntacihnco", "mip", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("grvgpomxp", response.location());
- Assertions.assertEquals("tsdfjyieso", response.tags().get("wiqbuoutm"));
- Assertions.assertEquals("iqm", response.description());
- Assertions.assertEquals(true, response.isEnabled());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationsListByResourceGroupMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationsListByResourceGroupMockTests.java
deleted file mode 100644
index 6ad5629e6f6f..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationsListByResourceGroupMockTests.java
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.Automation;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AutomationsListByResourceGroupMockTests {
- @Test
- public void testListByResourceGroup() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"description\":\"svkolru\",\"isEnabled\":true,\"scopes\":[],\"sources\":[],\"actions\":[]},\"location\":\"yebrazwzlpzbtzu\",\"tags\":{\"ocmbezacf\":\"kipfsdyepf\",\"yqejga\":\"ztgaz\",\"zmffngdyfcixrh\":\"okctgkppgkqzkc\"},\"id\":\"cqvhoejgoiutgwrm\",\"name\":\"a\",\"type\":\"p\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.automations().listByResourceGroup("kxitds", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("yebrazwzlpzbtzu", response.iterator().next().location());
- Assertions.assertEquals("kipfsdyepf", response.iterator().next().tags().get("ocmbezacf"));
- Assertions.assertEquals("svkolru", response.iterator().next().description());
- Assertions.assertEquals(true, response.iterator().next().isEnabled());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationsListMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationsListMockTests.java
deleted file mode 100644
index 7e467f6608b4..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationsListMockTests.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.Automation;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AutomationsListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"description\":\"vftwaiv\",\"isEnabled\":false,\"scopes\":[],\"sources\":[],\"actions\":[]},\"location\":\"ypanhxmpdxxzet\",\"tags\":{\"x\":\"jwotnxlkfhglhrf\",\"nhpcselqx\":\"wecr\",\"ukklvzrlr\":\"vppqi\",\"cme\":\"l\"},\"id\":\"jsczivfqbqnasdsy\",\"name\":\"nzsieuscplh\",\"type\":\"vdgxly\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response = manager.automations().list(com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("ypanhxmpdxxzet", response.iterator().next().location());
- Assertions.assertEquals("jwotnxlkfhglhrf", response.iterator().next().tags().get("x"));
- Assertions.assertEquals("vftwaiv", response.iterator().next().description());
- Assertions.assertEquals(false, response.iterator().next().isEnabled());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationsValidateWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationsValidateWithResponseMockTests.java
deleted file mode 100644
index 496d5f2fbb75..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AutomationsValidateWithResponseMockTests.java
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.fluent.models.AutomationInner;
-import com.azure.resourcemanager.security.models.AutomationValidationStatus;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AutomationsValidateWithResponseMockTests {
- @Test
- public void testValidateWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{\"isValid\":true,\"message\":\"dh\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- AutomationValidationStatus response =
- manager
- .automations()
- .validateWithResponse(
- "pg",
- "ttbas",
- new AutomationInner()
- .withLocation("kixvvlwy")
- .withTags(mapOf("zfe", "bfqvzfjmspu"))
- .withDescription("ap")
- .withIsEnabled(false)
- .withScopes(Arrays.asList())
- .withSources(Arrays.asList())
- .withActions(Arrays.asList()),
- com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals(true, response.isValid());
- Assertions.assertEquals("dh", response.message());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AwAssumeRoleAuthenticationDetailsPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AwAssumeRoleAuthenticationDetailsPropertiesTests.java
deleted file mode 100644
index 645bede43f11..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AwAssumeRoleAuthenticationDetailsPropertiesTests.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AwAssumeRoleAuthenticationDetailsProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class AwAssumeRoleAuthenticationDetailsPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AwAssumeRoleAuthenticationDetailsProperties model =
- BinaryData
- .fromString(
- "{\"authenticationType\":\"awsAssumeRole\",\"accountId\":\"kzwjiqullq\",\"awsAssumeRoleArn\":\"bdmvrscmqerndbr\",\"awsExternalId\":\"yeofltfnnxrkad\",\"authenticationProvisioningState\":\"Expired\",\"grantedPermissions\":[\"AWS::AWSSecurityHubReadOnlyAccess\",\"AWS::AWSSecurityHubReadOnlyAccess\",\"AWS::AWSSecurityHubReadOnlyAccess\"]}")
- .toObject(AwAssumeRoleAuthenticationDetailsProperties.class);
- Assertions.assertEquals("bdmvrscmqerndbr", model.awsAssumeRoleArn());
- Assertions.assertEquals("yeofltfnnxrkad", model.awsExternalId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AwAssumeRoleAuthenticationDetailsProperties model =
- new AwAssumeRoleAuthenticationDetailsProperties()
- .withAwsAssumeRoleArn("bdmvrscmqerndbr")
- .withAwsExternalId("yeofltfnnxrkad");
- model = BinaryData.fromObject(model).toObject(AwAssumeRoleAuthenticationDetailsProperties.class);
- Assertions.assertEquals("bdmvrscmqerndbr", model.awsAssumeRoleArn());
- Assertions.assertEquals("yeofltfnnxrkad", model.awsExternalId());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AwsEnvironmentDataTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AwsEnvironmentDataTests.java
deleted file mode 100644
index 1624af3a7551..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AwsEnvironmentDataTests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AwsEnvironmentData;
-import com.azure.resourcemanager.security.models.AwsOrganizationalData;
-
-public final class AwsEnvironmentDataTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AwsEnvironmentData model =
- BinaryData
- .fromString(
- "{\"environmentType\":\"AwsAccount\",\"organizationalData\":{\"organizationMembershipType\":\"AwsOrganizationalData\"}}")
- .toObject(AwsEnvironmentData.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AwsEnvironmentData model = new AwsEnvironmentData().withOrganizationalData(new AwsOrganizationalData());
- model = BinaryData.fromObject(model).toObject(AwsEnvironmentData.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AwsOrganizationalDataMasterTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AwsOrganizationalDataMasterTests.java
deleted file mode 100644
index a972993a150a..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AwsOrganizationalDataMasterTests.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AwsOrganizationalDataMaster;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AwsOrganizationalDataMasterTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AwsOrganizationalDataMaster model =
- BinaryData
- .fromString(
- "{\"organizationMembershipType\":\"Organization\",\"stacksetName\":\"omeikjcl\",\"excludedAccountIds\":[\"cnmwpfsuqtaa\",\"yqbxyxoyf\",\"uqqiqezxlhd\",\"zq\"]}")
- .toObject(AwsOrganizationalDataMaster.class);
- Assertions.assertEquals("omeikjcl", model.stacksetName());
- Assertions.assertEquals("cnmwpfsuqtaa", model.excludedAccountIds().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AwsOrganizationalDataMaster model =
- new AwsOrganizationalDataMaster()
- .withStacksetName("omeikjcl")
- .withExcludedAccountIds(Arrays.asList("cnmwpfsuqtaa", "yqbxyxoyf", "uqqiqezxlhd", "zq"));
- model = BinaryData.fromObject(model).toObject(AwsOrganizationalDataMaster.class);
- Assertions.assertEquals("omeikjcl", model.stacksetName());
- Assertions.assertEquals("cnmwpfsuqtaa", model.excludedAccountIds().get(0));
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AwsOrganizationalDataMemberTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AwsOrganizationalDataMemberTests.java
deleted file mode 100644
index 3161cf68d561..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AwsOrganizationalDataMemberTests.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AwsOrganizationalDataMember;
-import org.junit.jupiter.api.Assertions;
-
-public final class AwsOrganizationalDataMemberTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AwsOrganizationalDataMember model =
- BinaryData
- .fromString("{\"organizationMembershipType\":\"Member\",\"parentHierarchyId\":\"a\"}")
- .toObject(AwsOrganizationalDataMember.class);
- Assertions.assertEquals("a", model.parentHierarchyId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AwsOrganizationalDataMember model = new AwsOrganizationalDataMember().withParentHierarchyId("a");
- model = BinaryData.fromObject(model).toObject(AwsOrganizationalDataMember.class);
- Assertions.assertEquals("a", model.parentHierarchyId());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AwsOrganizationalDataTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AwsOrganizationalDataTests.java
deleted file mode 100644
index 2832b96e508c..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AwsOrganizationalDataTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AwsOrganizationalData;
-
-public final class AwsOrganizationalDataTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AwsOrganizationalData model =
- BinaryData
- .fromString("{\"organizationMembershipType\":\"AwsOrganizationalData\"}")
- .toObject(AwsOrganizationalData.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AwsOrganizationalData model = new AwsOrganizationalData();
- model = BinaryData.fromObject(model).toObject(AwsOrganizationalData.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureDevOpsScopeEnvironmentDataTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureDevOpsScopeEnvironmentDataTests.java
deleted file mode 100644
index b2306356746b..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureDevOpsScopeEnvironmentDataTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AzureDevOpsScopeEnvironmentData;
-
-public final class AzureDevOpsScopeEnvironmentDataTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureDevOpsScopeEnvironmentData model =
- BinaryData
- .fromString("{\"environmentType\":\"AzureDevOpsScope\"}")
- .toObject(AzureDevOpsScopeEnvironmentData.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureDevOpsScopeEnvironmentData model = new AzureDevOpsScopeEnvironmentData();
- model = BinaryData.fromObject(model).toObject(AzureDevOpsScopeEnvironmentData.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureResourceDetailsTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureResourceDetailsTests.java
deleted file mode 100644
index 558a77b66239..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureResourceDetailsTests.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AzureResourceDetails;
-
-public final class AzureResourceDetailsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureResourceDetails model =
- BinaryData.fromString("{\"source\":\"Azure\",\"id\":\"yrth\"}").toObject(AzureResourceDetails.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureResourceDetails model = new AzureResourceDetails();
- model = BinaryData.fromObject(model).toObject(AzureResourceDetails.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureResourceIdentifierTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureResourceIdentifierTests.java
deleted file mode 100644
index a25bd7242706..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureResourceIdentifierTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AzureResourceIdentifier;
-
-public final class AzureResourceIdentifierTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureResourceIdentifier model =
- BinaryData
- .fromString("{\"type\":\"AzureResource\",\"azureResourceId\":\"uyrsrziuctix\"}")
- .toObject(AzureResourceIdentifier.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureResourceIdentifier model = new AzureResourceIdentifier();
- model = BinaryData.fromObject(model).toObject(AzureResourceIdentifier.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureResourceLinkTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureResourceLinkTests.java
deleted file mode 100644
index 1363a09cc59c..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureResourceLinkTests.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AzureResourceLink;
-
-public final class AzureResourceLinkTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureResourceLink model =
- BinaryData.fromString("{\"id\":\"cbuewmrswnjlxuz\"}").toObject(AzureResourceLink.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureResourceLink model = new AzureResourceLink();
- model = BinaryData.fromObject(model).toObject(AzureResourceLink.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureTrackedResourceLocationTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureTrackedResourceLocationTests.java
deleted file mode 100644
index 485e00c4dd5a..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/AzureTrackedResourceLocationTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.AzureTrackedResourceLocation;
-import org.junit.jupiter.api.Assertions;
-
-public final class AzureTrackedResourceLocationTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureTrackedResourceLocation model =
- BinaryData.fromString("{\"location\":\"ltducea\"}").toObject(AzureTrackedResourceLocation.class);
- Assertions.assertEquals("ltducea", model.location());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureTrackedResourceLocation model = new AzureTrackedResourceLocation().withLocation("ltducea");
- model = BinaryData.fromObject(model).toObject(AzureTrackedResourceLocation.class);
- Assertions.assertEquals("ltducea", model.location());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/BaselineAdjustedResultTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/BaselineAdjustedResultTests.java
deleted file mode 100644
index 22f5587f686f..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/BaselineAdjustedResultTests.java
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.Baseline;
-import com.azure.resourcemanager.security.models.BaselineAdjustedResult;
-import com.azure.resourcemanager.security.models.RuleStatus;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class BaselineAdjustedResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- BaselineAdjustedResult model =
- BinaryData
- .fromString(
- "{\"baseline\":{\"expectedResults\":[[\"oqc\"]],\"updatedTime\":\"2021-03-15T06:39:11Z\"},\"status\":\"InternalError\",\"resultsNotInBaseline\":[[\"kuejk\",\"vbiztjofqcv\"],[\"juf\",\"csjml\",\"e\"]],\"resultsOnlyInBaseline\":[[\"iriuxegthortu\",\"awlpjfelqerpp\"]]}")
- .toObject(BaselineAdjustedResult.class);
- Assertions.assertEquals("oqc", model.baseline().expectedResults().get(0).get(0));
- Assertions.assertEquals(OffsetDateTime.parse("2021-03-15T06:39:11Z"), model.baseline().updatedTime());
- Assertions.assertEquals(RuleStatus.INTERNAL_ERROR, model.status());
- Assertions.assertEquals("kuejk", model.resultsNotInBaseline().get(0).get(0));
- Assertions.assertEquals("iriuxegthortu", model.resultsOnlyInBaseline().get(0).get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- BaselineAdjustedResult model =
- new BaselineAdjustedResult()
- .withBaseline(
- new Baseline()
- .withExpectedResults(Arrays.asList(Arrays.asList("oqc")))
- .withUpdatedTime(OffsetDateTime.parse("2021-03-15T06:39:11Z")))
- .withStatus(RuleStatus.INTERNAL_ERROR)
- .withResultsNotInBaseline(
- Arrays.asList(Arrays.asList("kuejk", "vbiztjofqcv"), Arrays.asList("juf", "csjml", "e")))
- .withResultsOnlyInBaseline(Arrays.asList(Arrays.asList("iriuxegthortu", "awlpjfelqerpp")));
- model = BinaryData.fromObject(model).toObject(BaselineAdjustedResult.class);
- Assertions.assertEquals("oqc", model.baseline().expectedResults().get(0).get(0));
- Assertions.assertEquals(OffsetDateTime.parse("2021-03-15T06:39:11Z"), model.baseline().updatedTime());
- Assertions.assertEquals(RuleStatus.INTERNAL_ERROR, model.status());
- Assertions.assertEquals("kuejk", model.resultsNotInBaseline().get(0).get(0));
- Assertions.assertEquals("iriuxegthortu", model.resultsOnlyInBaseline().get(0).get(0));
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/BaselineTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/BaselineTests.java
deleted file mode 100644
index f8128fc541b3..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/BaselineTests.java
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.Baseline;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class BaselineTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- Baseline model =
- BinaryData
- .fromString(
- "{\"expectedResults\":[[\"qnzmnhiil\",\"alwcjgckbb\"],[\"cgzpraoxnyu\",\"fa\",\"sgftipwc\"]],\"updatedTime\":\"2021-01-22T16:26:57Z\"}")
- .toObject(Baseline.class);
- Assertions.assertEquals("qnzmnhiil", model.expectedResults().get(0).get(0));
- Assertions.assertEquals(OffsetDateTime.parse("2021-01-22T16:26:57Z"), model.updatedTime());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- Baseline model =
- new Baseline()
- .withExpectedResults(
- Arrays
- .asList(
- Arrays.asList("qnzmnhiil", "alwcjgckbb"), Arrays.asList("cgzpraoxnyu", "fa", "sgftipwc")))
- .withUpdatedTime(OffsetDateTime.parse("2021-01-22T16:26:57Z"));
- model = BinaryData.fromObject(model).toObject(Baseline.class);
- Assertions.assertEquals("qnzmnhiil", model.expectedResults().get(0).get(0));
- Assertions.assertEquals(OffsetDateTime.parse("2021-01-22T16:26:57Z"), model.updatedTime());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/BenchmarkReferenceTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/BenchmarkReferenceTests.java
deleted file mode 100644
index bc4e25608c56..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/BenchmarkReferenceTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.BenchmarkReference;
-import org.junit.jupiter.api.Assertions;
-
-public final class BenchmarkReferenceTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- BenchmarkReference model =
- BinaryData
- .fromString("{\"benchmark\":\"n\",\"reference\":\"miljpnwynud\"}")
- .toObject(BenchmarkReference.class);
- Assertions.assertEquals("n", model.benchmark());
- Assertions.assertEquals("miljpnwynud", model.reference());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- BenchmarkReference model = new BenchmarkReference().withBenchmark("n").withReference("miljpnwynud");
- model = BinaryData.fromObject(model).toObject(BenchmarkReference.class);
- Assertions.assertEquals("n", model.benchmark());
- Assertions.assertEquals("miljpnwynud", model.reference());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CefExternalSecuritySolutionTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CefExternalSecuritySolutionTests.java
deleted file mode 100644
index e46b0403f9ee..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CefExternalSecuritySolutionTests.java
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.CefExternalSecuritySolution;
-import com.azure.resourcemanager.security.models.CefSolutionProperties;
-import com.azure.resourcemanager.security.models.ConnectedWorkspace;
-import org.junit.jupiter.api.Assertions;
-
-public final class CefExternalSecuritySolutionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CefExternalSecuritySolution model =
- BinaryData
- .fromString(
- "{\"kind\":\"CEF\",\"properties\":{\"hostname\":\"ssoljom\",\"agent\":\"tfy\",\"lastEventReceived\":\"lbvgjc\",\"deviceVendor\":\"kk\",\"deviceType\":\"iiy\",\"workspace\":{\"id\":\"ikizbcu\"},\"\":{\"hcekxgnlykm\":\"datavntnrgmqso\",\"doksqdtiwlwxlbon\":\"datacpwzv\",\"qicqchygt\":\"dataqba\",\"epubdp\":\"dataxbyja\"}},\"location\":\"yqvgxia\",\"id\":\"detv\",\"name\":\"hkxdxuwsaifmc\",\"type\":\"nosbz\"}")
- .toObject(CefExternalSecuritySolution.class);
- Assertions.assertEquals("kk", model.properties().deviceVendor());
- Assertions.assertEquals("iiy", model.properties().deviceType());
- Assertions.assertEquals("ikizbcu", model.properties().workspace().id());
- Assertions.assertEquals("ssoljom", model.properties().hostname());
- Assertions.assertEquals("tfy", model.properties().agent());
- Assertions.assertEquals("lbvgjc", model.properties().lastEventReceived());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CefExternalSecuritySolution model =
- new CefExternalSecuritySolution()
- .withProperties(
- new CefSolutionProperties()
- .withDeviceVendor("kk")
- .withDeviceType("iiy")
- .withWorkspace(new ConnectedWorkspace().withId("ikizbcu"))
- .withHostname("ssoljom")
- .withAgent("tfy")
- .withLastEventReceived("lbvgjc"));
- model = BinaryData.fromObject(model).toObject(CefExternalSecuritySolution.class);
- Assertions.assertEquals("kk", model.properties().deviceVendor());
- Assertions.assertEquals("iiy", model.properties().deviceType());
- Assertions.assertEquals("ikizbcu", model.properties().workspace().id());
- Assertions.assertEquals("ssoljom", model.properties().hostname());
- Assertions.assertEquals("tfy", model.properties().agent());
- Assertions.assertEquals("lbvgjc", model.properties().lastEventReceived());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CefSolutionPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CefSolutionPropertiesTests.java
deleted file mode 100644
index b94447a687e0..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CefSolutionPropertiesTests.java
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.CefSolutionProperties;
-import com.azure.resourcemanager.security.models.ConnectedWorkspace;
-import org.junit.jupiter.api.Assertions;
-
-public final class CefSolutionPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CefSolutionProperties model =
- BinaryData
- .fromString(
- "{\"hostname\":\"hg\",\"agent\":\"kb\",\"lastEventReceived\":\"njolgjyyxpv\",\"deviceVendor\":\"szerqzevxoqei\",\"deviceType\":\"xwaljgl\",\"workspace\":{\"id\":\"lqwa\"},\"\":{\"bhdvafjrqpjiy\":\"dataqulhmzy\"}}")
- .toObject(CefSolutionProperties.class);
- Assertions.assertEquals("szerqzevxoqei", model.deviceVendor());
- Assertions.assertEquals("xwaljgl", model.deviceType());
- Assertions.assertEquals("lqwa", model.workspace().id());
- Assertions.assertEquals("hg", model.hostname());
- Assertions.assertEquals("kb", model.agent());
- Assertions.assertEquals("njolgjyyxpv", model.lastEventReceived());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CefSolutionProperties model =
- new CefSolutionProperties()
- .withDeviceVendor("szerqzevxoqei")
- .withDeviceType("xwaljgl")
- .withWorkspace(new ConnectedWorkspace().withId("lqwa"))
- .withHostname("hg")
- .withAgent("kb")
- .withLastEventReceived("njolgjyyxpv");
- model = BinaryData.fromObject(model).toObject(CefSolutionProperties.class);
- Assertions.assertEquals("szerqzevxoqei", model.deviceVendor());
- Assertions.assertEquals("xwaljgl", model.deviceType());
- Assertions.assertEquals("lqwa", model.workspace().id());
- Assertions.assertEquals("hg", model.hostname());
- Assertions.assertEquals("kb", model.agent());
- Assertions.assertEquals("njolgjyyxpv", model.lastEventReceived());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CloudOfferingTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CloudOfferingTests.java
deleted file mode 100644
index 87c5fd0ed518..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CloudOfferingTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.CloudOffering;
-
-public final class CloudOfferingTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CloudOffering model =
- BinaryData
- .fromString("{\"offeringType\":\"CloudOffering\",\"description\":\"opwbeonrlkwzd\"}")
- .toObject(CloudOffering.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CloudOffering model = new CloudOffering();
- model = BinaryData.fromObject(model).toObject(CloudOffering.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ComplianceInnerTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ComplianceInnerTests.java
deleted file mode 100644
index 0543972aa28a..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ComplianceInnerTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.ComplianceInner;
-
-public final class ComplianceInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ComplianceInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"assessmentTimestampUtcDate\":\"2021-08-15T01:34:53Z\",\"resourceCount\":207967373,\"assessmentResult\":[{\"segmentType\":\"dpfrxtrthzvaytdw\",\"percentage\":34.16180582030333},{\"segmentType\":\"ubpaxhe\",\"percentage\":1.5196984611925868}]},\"id\":\"ivpdtiir\",\"name\":\"tdqoaxoruzfgsq\",\"type\":\"yfxrx\"}")
- .toObject(ComplianceInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ComplianceInner model = new ComplianceInner();
- model = BinaryData.fromObject(model).toObject(ComplianceInner.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ComplianceListTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ComplianceListTests.java
deleted file mode 100644
index 0209720593c4..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ComplianceListTests.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.ComplianceInner;
-import com.azure.resourcemanager.security.models.ComplianceList;
-import java.util.Arrays;
-
-public final class ComplianceListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ComplianceList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"assessmentTimestampUtcDate\":\"2021-08-25T09:33:34Z\",\"resourceCount\":624778524,\"assessmentResult\":[]},\"id\":\"bqfatpxllrxcyjmo\",\"name\":\"dsuvarmywdmjsjqb\",\"type\":\"hhyxxrw\"},{\"properties\":{\"assessmentTimestampUtcDate\":\"2021-02-04T08:50:40Z\",\"resourceCount\":803302222,\"assessmentResult\":[]},\"id\":\"p\",\"name\":\"xkgymareqnajxqu\",\"type\":\"jhkycub\"},{\"properties\":{\"assessmentTimestampUtcDate\":\"2021-03-22T14:35:21Z\",\"resourceCount\":2056337569,\"assessmentResult\":[]},\"id\":\"fwqmzqalkrmn\",\"name\":\"i\",\"type\":\"pxacqqudfn\"},{\"properties\":{\"assessmentTimestampUtcDate\":\"2021-06-13T18:20:41Z\",\"resourceCount\":1365725065,\"assessmentResult\":[]},\"id\":\"bjyvay\",\"name\":\"fimrzrtuzqogse\",\"type\":\"nevfdnw\"}],\"nextLink\":\"mewzsyyc\"}")
- .toObject(ComplianceList.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ComplianceList model =
- new ComplianceList()
- .withValue(
- Arrays
- .asList(
- new ComplianceInner(),
- new ComplianceInner(),
- new ComplianceInner(),
- new ComplianceInner()));
- model = BinaryData.fromObject(model).toObject(ComplianceList.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CompliancePropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CompliancePropertiesTests.java
deleted file mode 100644
index 421d502a6a5c..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CompliancePropertiesTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.ComplianceProperties;
-
-public final class CompliancePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ComplianceProperties model =
- BinaryData
- .fromString(
- "{\"assessmentTimestampUtcDate\":\"2021-11-22T21:44:45Z\",\"resourceCount\":2043686923,\"assessmentResult\":[{\"segmentType\":\"xje\",\"percentage\":84.10933716066732},{\"segmentType\":\"wxuqlcvydypatdoo\",\"percentage\":48.53263087805991},{\"segmentType\":\"iodkooebwnujhem\",\"percentage\":70.84255746706634}]}")
- .toObject(ComplianceProperties.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ComplianceProperties model = new ComplianceProperties();
- model = BinaryData.fromObject(model).toObject(ComplianceProperties.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ComplianceResultInnerTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ComplianceResultInnerTests.java
deleted file mode 100644
index 16b9ae57355e..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ComplianceResultInnerTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.ComplianceResultInner;
-
-public final class ComplianceResultInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ComplianceResultInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"resourceStatus\":\"NotApplicable\"},\"id\":\"jdous\",\"name\":\"cqvkocrcjdkwtn\",\"type\":\"xbnjbiksq\"}")
- .toObject(ComplianceResultInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ComplianceResultInner model = new ComplianceResultInner();
- model = BinaryData.fromObject(model).toObject(ComplianceResultInner.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ComplianceResultListTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ComplianceResultListTests.java
deleted file mode 100644
index a44d8e55a67e..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ComplianceResultListTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.ComplianceResultInner;
-import com.azure.resourcemanager.security.models.ComplianceResultList;
-import java.util.Arrays;
-
-public final class ComplianceResultListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ComplianceResultList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"resourceStatus\":\"Healthy\"},\"id\":\"rnfygxgispem\",\"name\":\"tzfkufubl\",\"type\":\"ofx\"},{\"properties\":{\"resourceStatus\":\"NotApplicable\"},\"id\":\"jaeq\",\"name\":\"hqjbasvmsmj\",\"type\":\"ulngsntn\"}],\"nextLink\":\"bkzgcwrwclx\"}")
- .toObject(ComplianceResultList.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ComplianceResultList model =
- new ComplianceResultList()
- .withValue(Arrays.asList(new ComplianceResultInner(), new ComplianceResultInner()));
- model = BinaryData.fromObject(model).toObject(ComplianceResultList.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ComplianceResultPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ComplianceResultPropertiesTests.java
deleted file mode 100644
index 2d0a41a99328..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ComplianceResultPropertiesTests.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.ComplianceResultProperties;
-
-public final class ComplianceResultPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ComplianceResultProperties model =
- BinaryData.fromString("{\"resourceStatus\":\"NotApplicable\"}").toObject(ComplianceResultProperties.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ComplianceResultProperties model = new ComplianceResultProperties();
- model = BinaryData.fromObject(model).toObject(ComplianceResultProperties.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ComplianceResultsGetWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ComplianceResultsGetWithResponseMockTests.java
deleted file mode 100644
index 4691e1e8b266..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ComplianceResultsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.ComplianceResult;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ComplianceResultsGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"resourceStatus\":\"Healthy\"},\"id\":\"punytjl\",\"name\":\"esmmpathubtahd\",\"type\":\"an\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- ComplianceResult response =
- manager
- .complianceResults()
- .getWithResponse("i", "ehqbeivdlhydwbdb", com.azure.core.util.Context.NONE)
- .getValue();
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ComplianceResultsListMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ComplianceResultsListMockTests.java
deleted file mode 100644
index 8073d928caf7..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ComplianceResultsListMockTests.java
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.ComplianceResult;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ComplianceResultsListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"resourceStatus\":\"NotApplicable\"},\"id\":\"ciklh\",\"name\":\"yek\",\"type\":\"drenxol\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.complianceResults().list("e", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ComplianceSegmentTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ComplianceSegmentTests.java
deleted file mode 100644
index d31b157d0059..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ComplianceSegmentTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.ComplianceSegment;
-
-public final class ComplianceSegmentTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ComplianceSegment model =
- BinaryData
- .fromString("{\"segmentType\":\"kcrodtjinfw\",\"percentage\":48.601111864993506}")
- .toObject(ComplianceSegment.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ComplianceSegment model = new ComplianceSegment();
- model = BinaryData.fromObject(model).toObject(ComplianceSegment.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CompliancesGetWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CompliancesGetWithResponseMockTests.java
deleted file mode 100644
index ddcb0c58903b..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CompliancesGetWithResponseMockTests.java
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.Compliance;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class CompliancesGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"assessmentTimestampUtcDate\":\"2021-10-16T21:55:46Z\",\"resourceCount\":1151163794,\"assessmentResult\":[]},\"id\":\"zytzarogatmolj\",\"name\":\"ywmpinmzvfkneer\",\"type\":\"ztrknsj\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- Compliance response =
- manager
- .compliances()
- .getWithResponse("jtrpzuyud", "vbxnhsqeaeonqe", com.azure.core.util.Context.NONE)
- .getValue();
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CompliancesListMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CompliancesListMockTests.java
deleted file mode 100644
index 93a5d3671386..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CompliancesListMockTests.java
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.Compliance;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class CompliancesListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"assessmentTimestampUtcDate\":\"2021-04-01T07:50:21Z\",\"resourceCount\":1815121568,\"assessmentResult\":[]},\"id\":\"okmyr\",\"name\":\"jialz\",\"type\":\"nobrqlpb\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response = manager.compliances().list("gbvoffbkk", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectableResourceTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectableResourceTests.java
deleted file mode 100644
index 2918460962da..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectableResourceTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.ConnectableResource;
-
-public final class ConnectableResourceTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ConnectableResource model =
- BinaryData
- .fromString(
- "{\"id\":\"lsismjqfrd\",\"inboundConnectedResources\":[{\"connectedResourceId\":\"quhiosrsjuivf\",\"tcpPorts\":\"is\",\"udpPorts\":\"rnxzh\"}],\"outboundConnectedResources\":[{\"connectedResourceId\":\"rxzbujr\",\"tcpPorts\":\"hqvwrevkhgnlnzon\",\"udpPorts\":\"rpiqywncv\"},{\"connectedResourceId\":\"szcofizeht\",\"tcpPorts\":\"gbjkvreljeamur\",\"udpPorts\":\"mlovuanashcxl\"},{\"connectedResourceId\":\"jerbdkelvidizozs\",\"tcpPorts\":\"ccxjm\",\"udpPorts\":\"fdgnwncypuuwwlt\"},{\"connectedResourceId\":\"qjctzenkeif\",\"tcpPorts\":\"hmkdasvfl\",\"udpPorts\":\"bxcudchx\"}]}")
- .toObject(ConnectableResource.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ConnectableResource model = new ConnectableResource();
- model = BinaryData.fromObject(model).toObject(ConnectableResource.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectedResourceTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectedResourceTests.java
deleted file mode 100644
index 01ee1f296ed7..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectedResourceTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.ConnectedResource;
-
-public final class ConnectedResourceTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ConnectedResource model =
- BinaryData
- .fromString("{\"connectedResourceId\":\"rb\",\"tcpPorts\":\"d\",\"udpPorts\":\"robwjlvizbfhf\"}")
- .toObject(ConnectedResource.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ConnectedResource model = new ConnectedResource();
- model = BinaryData.fromObject(model).toObject(ConnectedResource.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectedWorkspaceTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectedWorkspaceTests.java
deleted file mode 100644
index c39f87bebebc..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectedWorkspaceTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.ConnectedWorkspace;
-import org.junit.jupiter.api.Assertions;
-
-public final class ConnectedWorkspaceTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ConnectedWorkspace model = BinaryData.fromString("{\"id\":\"xsaetg\"}").toObject(ConnectedWorkspace.class);
- Assertions.assertEquals("xsaetg", model.id());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ConnectedWorkspace model = new ConnectedWorkspace().withId("xsaetg");
- model = BinaryData.fromObject(model).toObject(ConnectedWorkspace.class);
- Assertions.assertEquals("xsaetg", model.id());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectionFromIpNotAllowedTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectionFromIpNotAllowedTests.java
deleted file mode 100644
index 3170173766f3..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectionFromIpNotAllowedTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.ConnectionFromIpNotAllowed;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ConnectionFromIpNotAllowedTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ConnectionFromIpNotAllowed model =
- BinaryData
- .fromString(
- "{\"ruleType\":\"ConnectionFromIpNotAllowed\",\"allowlistValues\":[\"lubses\"],\"valueType\":\"IpCidr\",\"displayName\":\"artr\",\"description\":\"nlp\",\"isEnabled\":true}")
- .toObject(ConnectionFromIpNotAllowed.class);
- Assertions.assertEquals(true, model.isEnabled());
- Assertions.assertEquals("lubses", model.allowlistValues().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ConnectionFromIpNotAllowed model =
- new ConnectionFromIpNotAllowed().withIsEnabled(true).withAllowlistValues(Arrays.asList("lubses"));
- model = BinaryData.fromObject(model).toObject(ConnectionFromIpNotAllowed.class);
- Assertions.assertEquals(true, model.isEnabled());
- Assertions.assertEquals("lubses", model.allowlistValues().get(0));
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectionStringsInnerTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectionStringsInnerTests.java
deleted file mode 100644
index 3ff0385b3852..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectionStringsInnerTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.ConnectionStringsInner;
-import com.azure.resourcemanager.security.models.IngestionConnectionString;
-import java.util.Arrays;
-
-public final class ConnectionStringsInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ConnectionStringsInner model =
- BinaryData
- .fromString(
- "{\"value\":[{\"location\":\"qd\",\"value\":\"jgwdtgukranbl\"},{\"location\":\"hqlkccuzgygqwaho\",\"value\":\"lwgniiprglvawu\"}]}")
- .toObject(ConnectionStringsInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ConnectionStringsInner model =
- new ConnectionStringsInner()
- .withValue(Arrays.asList(new IngestionConnectionString(), new IngestionConnectionString()));
- model = BinaryData.fromObject(model).toObject(ConnectionStringsInner.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectionToIpNotAllowedTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectionToIpNotAllowedTests.java
deleted file mode 100644
index ffd2da1bc91d..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectionToIpNotAllowedTests.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.ConnectionToIpNotAllowed;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ConnectionToIpNotAllowedTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ConnectionToIpNotAllowed model =
- BinaryData
- .fromString(
- "{\"ruleType\":\"ConnectionToIpNotAllowed\",\"allowlistValues\":[\"ixldzyyfy\",\"pqsixymmp\",\"jivyqlkjuv\",\"mbmslzoyov\"],\"valueType\":\"String\",\"displayName\":\"pqvyb\",\"description\":\"gvmxnok\",\"isEnabled\":true}")
- .toObject(ConnectionToIpNotAllowed.class);
- Assertions.assertEquals(true, model.isEnabled());
- Assertions.assertEquals("ixldzyyfy", model.allowlistValues().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ConnectionToIpNotAllowed model =
- new ConnectionToIpNotAllowed()
- .withIsEnabled(true)
- .withAllowlistValues(Arrays.asList("ixldzyyfy", "pqsixymmp", "jivyqlkjuv", "mbmslzoyov"));
- model = BinaryData.fromObject(model).toObject(ConnectionToIpNotAllowed.class);
- Assertions.assertEquals(true, model.isEnabled());
- Assertions.assertEquals("ixldzyyfy", model.allowlistValues().get(0));
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectorSettingInnerTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectorSettingInnerTests.java
deleted file mode 100644
index fc22fd5efea8..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectorSettingInnerTests.java
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.ConnectorSettingInner;
-import com.azure.resourcemanager.security.models.AuthenticationDetailsProperties;
-import com.azure.resourcemanager.security.models.AutoProvision;
-import com.azure.resourcemanager.security.models.HybridComputeSettingsProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class ConnectorSettingInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ConnectorSettingInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"hybridComputeSettings\":{\"hybridComputeProvisioningState\":\"Invalid\",\"autoProvision\":\"Off\",\"resourceGroupName\":\"enl\",\"region\":\"htkln\"},\"authenticationDetails\":{\"authenticationType\":\"AuthenticationDetailsProperties\",\"authenticationProvisioningState\":\"IncorrectPolicy\",\"grantedPermissions\":[\"AWS::AWSSecurityHubReadOnlyAccess\",\"AWS::AWSSecurityHubReadOnlyAccess\",\"AWS::SecurityAudit\"]}},\"id\":\"ev\",\"name\":\"bo\",\"type\":\"lcqxypokk\"}")
- .toObject(ConnectorSettingInner.class);
- Assertions.assertEquals(AutoProvision.OFF, model.hybridComputeSettings().autoProvision());
- Assertions.assertEquals("enl", model.hybridComputeSettings().resourceGroupName());
- Assertions.assertEquals("htkln", model.hybridComputeSettings().region());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ConnectorSettingInner model =
- new ConnectorSettingInner()
- .withHybridComputeSettings(
- new HybridComputeSettingsProperties()
- .withAutoProvision(AutoProvision.OFF)
- .withResourceGroupName("enl")
- .withRegion("htkln"))
- .withAuthenticationDetails(new AuthenticationDetailsProperties());
- model = BinaryData.fromObject(model).toObject(ConnectorSettingInner.class);
- Assertions.assertEquals(AutoProvision.OFF, model.hybridComputeSettings().autoProvision());
- Assertions.assertEquals("enl", model.hybridComputeSettings().resourceGroupName());
- Assertions.assertEquals("htkln", model.hybridComputeSettings().region());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectorSettingListTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectorSettingListTests.java
deleted file mode 100644
index 069f35ab6d3d..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectorSettingListTests.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.ConnectorSettingInner;
-import com.azure.resourcemanager.security.models.ConnectorSettingList;
-import java.util.Arrays;
-
-public final class ConnectorSettingListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ConnectorSettingList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{},\"id\":\"kzmkwklsnoxaxmqe\",\"name\":\"alhhjnhgwydyynfs\",\"type\":\"khgb\"},{\"properties\":{},\"id\":\"narfdlpukhpyrn\",\"name\":\"izjcpeog\",\"type\":\"hnmgbroux\"},{\"properties\":{},\"id\":\"fhp\",\"name\":\"paz\",\"type\":\"zoyw\"},{\"properties\":{},\"id\":\"dulontacn\",\"name\":\"qwtehtuevr\",\"type\":\"rljyoogwxhnsdu\"}],\"nextLink\":\"wbsreur\"}")
- .toObject(ConnectorSettingList.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ConnectorSettingList model =
- new ConnectorSettingList()
- .withValue(
- Arrays
- .asList(
- new ConnectorSettingInner(),
- new ConnectorSettingInner(),
- new ConnectorSettingInner(),
- new ConnectorSettingInner()));
- model = BinaryData.fromObject(model).toObject(ConnectorSettingList.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectorsCreateOrUpdateWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectorsCreateOrUpdateWithResponseMockTests.java
deleted file mode 100644
index fb9620ed23b2..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectorsCreateOrUpdateWithResponseMockTests.java
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.AuthenticationDetailsProperties;
-import com.azure.resourcemanager.security.models.AutoProvision;
-import com.azure.resourcemanager.security.models.ConnectorSetting;
-import com.azure.resourcemanager.security.models.HybridComputeSettingsProperties;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ConnectorsCreateOrUpdateWithResponseMockTests {
- @Test
- public void testCreateOrUpdateWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"hybridComputeSettings\":{\"hybridComputeProvisioningState\":\"Valid\",\"autoProvision\":\"Off\",\"resourceGroupName\":\"sdixchwkibmg\",\"region\":\"mncj\"},\"authenticationDetails\":{\"authenticationType\":\"AuthenticationDetailsProperties\",\"authenticationProvisioningState\":\"Invalid\",\"grantedPermissions\":[]}},\"id\":\"cqzoofjnqjsve\",\"name\":\"fbhtleberp\",\"type\":\"ljekn\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- ConnectorSetting response =
- manager
- .connectors()
- .define("xfkjqutibh")
- .withHybridComputeSettings(
- new HybridComputeSettingsProperties()
- .withAutoProvision(AutoProvision.ON)
- .withResourceGroupName("rkp")
- .withRegion("bduxvzmlghnys"))
- .withAuthenticationDetails(new AuthenticationDetailsProperties())
- .create();
-
- Assertions.assertEquals(AutoProvision.OFF, response.hybridComputeSettings().autoProvision());
- Assertions.assertEquals("sdixchwkibmg", response.hybridComputeSettings().resourceGroupName());
- Assertions.assertEquals("mncj", response.hybridComputeSettings().region());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectorsDeleteWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectorsDeleteWithResponseMockTests.java
deleted file mode 100644
index 08da187a96e2..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectorsDeleteWithResponseMockTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ConnectorsDeleteWithResponseMockTests {
- @Test
- public void testDeleteWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager.connectors().deleteWithResponse("bafeb", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectorsGetWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectorsGetWithResponseMockTests.java
deleted file mode 100644
index 7cf7ec9cc875..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectorsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.AutoProvision;
-import com.azure.resourcemanager.security.models.ConnectorSetting;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ConnectorsGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"hybridComputeSettings\":{\"hybridComputeProvisioningState\":\"Expired\",\"autoProvision\":\"Off\",\"resourceGroupName\":\"xezm\",\"region\":\"kjgpjeuxsphlokfp\"},\"authenticationDetails\":{\"authenticationType\":\"AuthenticationDetailsProperties\",\"authenticationProvisioningState\":\"Invalid\",\"grantedPermissions\":[]}},\"id\":\"vfbhwb\",\"name\":\"qufv\",\"type\":\"gnrglaqrwyamb\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- ConnectorSetting response =
- manager.connectors().getWithResponse("dr", com.azure.core.util.Context.NONE).getValue();
-
- Assertions.assertEquals(AutoProvision.OFF, response.hybridComputeSettings().autoProvision());
- Assertions.assertEquals("xezm", response.hybridComputeSettings().resourceGroupName());
- Assertions.assertEquals("kjgpjeuxsphlokfp", response.hybridComputeSettings().region());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectorsListMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectorsListMockTests.java
deleted file mode 100644
index d82582b78674..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ConnectorsListMockTests.java
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.AutoProvision;
-import com.azure.resourcemanager.security.models.ConnectorSetting;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ConnectorsListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"hybridComputeSettings\":{\"hybridComputeProvisioningState\":\"Invalid\",\"autoProvision\":\"On\",\"resourceGroupName\":\"npipcwybszfncn\",\"region\":\"tpf\"},\"authenticationDetails\":{\"authenticationType\":\"AuthenticationDetailsProperties\",\"authenticationProvisioningState\":\"Valid\",\"grantedPermissions\":[]}},\"id\":\"whxorpwaltz\",\"name\":\"ugexojfccylht\",\"type\":\"hthvazjpwex\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response = manager.connectors().list(com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals(AutoProvision.ON, response.iterator().next().hybridComputeSettings().autoProvision());
- Assertions
- .assertEquals("npipcwybszfncn", response.iterator().next().hybridComputeSettings().resourceGroupName());
- Assertions.assertEquals("tpf", response.iterator().next().hybridComputeSettings().region());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ContainerRegistryVulnerabilityPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ContainerRegistryVulnerabilityPropertiesTests.java
deleted file mode 100644
index 9461cacd73f8..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ContainerRegistryVulnerabilityPropertiesTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.ContainerRegistryVulnerabilityProperties;
-
-public final class ContainerRegistryVulnerabilityPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ContainerRegistryVulnerabilityProperties model =
- BinaryData
- .fromString(
- "{\"assessedResourceType\":\"ContainerRegistryVulnerability\",\"type\":\"l\",\"cvss\":{\"iotzbpdbollgryfq\":{\"base\":32.276623}},\"patchable\":true,\"cve\":[{\"title\":\"rowsocnequy\",\"link\":\"jboq\"}],\"publishedTime\":\"2020-12-20T14:11:53Z\",\"vendorReferences\":[{\"title\":\"kqevadrmmw\",\"link\":\"awvcmjzkxiid\"},{\"title\":\"czskoswoqiqazu\",\"link\":\"mxzkr\"},{\"title\":\"oiisbamnppcce\",\"link\":\"ztdsbeza\"},{\"title\":\"f\",\"link\":\"zxuizhyhnepkpe\"}],\"repositoryName\":\"arxqiubx\",\"imageDigest\":\"kecpxdazvdh\"}")
- .toObject(ContainerRegistryVulnerabilityProperties.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ContainerRegistryVulnerabilityProperties model = new ContainerRegistryVulnerabilityProperties();
- model = BinaryData.fromObject(model).toObject(ContainerRegistryVulnerabilityProperties.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CspmMonitorAwsOfferingNativeCloudConnectionTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CspmMonitorAwsOfferingNativeCloudConnectionTests.java
deleted file mode 100644
index ba90424e91d0..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CspmMonitorAwsOfferingNativeCloudConnectionTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.CspmMonitorAwsOfferingNativeCloudConnection;
-import org.junit.jupiter.api.Assertions;
-
-public final class CspmMonitorAwsOfferingNativeCloudConnectionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CspmMonitorAwsOfferingNativeCloudConnection model =
- BinaryData
- .fromString("{\"cloudRoleArn\":\"absol\"}")
- .toObject(CspmMonitorAwsOfferingNativeCloudConnection.class);
- Assertions.assertEquals("absol", model.cloudRoleArn());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CspmMonitorAwsOfferingNativeCloudConnection model =
- new CspmMonitorAwsOfferingNativeCloudConnection().withCloudRoleArn("absol");
- model = BinaryData.fromObject(model).toObject(CspmMonitorAwsOfferingNativeCloudConnection.class);
- Assertions.assertEquals("absol", model.cloudRoleArn());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CspmMonitorAwsOfferingTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CspmMonitorAwsOfferingTests.java
deleted file mode 100644
index 545907659300..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CspmMonitorAwsOfferingTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.CspmMonitorAwsOffering;
-import com.azure.resourcemanager.security.models.CspmMonitorAwsOfferingNativeCloudConnection;
-import org.junit.jupiter.api.Assertions;
-
-public final class CspmMonitorAwsOfferingTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CspmMonitorAwsOffering model =
- BinaryData
- .fromString(
- "{\"offeringType\":\"CspmMonitorAws\",\"nativeCloudConnection\":{\"cloudRoleArn\":\"izjixlq\"},\"description\":\"ef\"}")
- .toObject(CspmMonitorAwsOffering.class);
- Assertions.assertEquals("izjixlq", model.nativeCloudConnection().cloudRoleArn());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CspmMonitorAwsOffering model =
- new CspmMonitorAwsOffering()
- .withNativeCloudConnection(
- new CspmMonitorAwsOfferingNativeCloudConnection().withCloudRoleArn("izjixlq"));
- model = BinaryData.fromObject(model).toObject(CspmMonitorAwsOffering.class);
- Assertions.assertEquals("izjixlq", model.nativeCloudConnection().cloudRoleArn());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CspmMonitorAzureDevOpsOfferingTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CspmMonitorAzureDevOpsOfferingTests.java
deleted file mode 100644
index c2f6b9b2f0c4..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CspmMonitorAzureDevOpsOfferingTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.CspmMonitorAzureDevOpsOffering;
-
-public final class CspmMonitorAzureDevOpsOfferingTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CspmMonitorAzureDevOpsOffering model =
- BinaryData
- .fromString("{\"offeringType\":\"CspmMonitorAzureDevOps\",\"description\":\"qqrsmpcbbprtugav\"}")
- .toObject(CspmMonitorAzureDevOpsOffering.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CspmMonitorAzureDevOpsOffering model = new CspmMonitorAzureDevOpsOffering();
- model = BinaryData.fromObject(model).toObject(CspmMonitorAzureDevOpsOffering.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CspmMonitorGcpOfferingNativeCloudConnectionTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CspmMonitorGcpOfferingNativeCloudConnectionTests.java
deleted file mode 100644
index c6aaca4eafda..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CspmMonitorGcpOfferingNativeCloudConnectionTests.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.CspmMonitorGcpOfferingNativeCloudConnection;
-import org.junit.jupiter.api.Assertions;
-
-public final class CspmMonitorGcpOfferingNativeCloudConnectionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CspmMonitorGcpOfferingNativeCloudConnection model =
- BinaryData
- .fromString(
- "{\"workloadIdentityProviderId\":\"llxricc\",\"serviceAccountEmailAddress\":\"wmuqqoajxeiygle\"}")
- .toObject(CspmMonitorGcpOfferingNativeCloudConnection.class);
- Assertions.assertEquals("llxricc", model.workloadIdentityProviderId());
- Assertions.assertEquals("wmuqqoajxeiygle", model.serviceAccountEmailAddress());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CspmMonitorGcpOfferingNativeCloudConnection model =
- new CspmMonitorGcpOfferingNativeCloudConnection()
- .withWorkloadIdentityProviderId("llxricc")
- .withServiceAccountEmailAddress("wmuqqoajxeiygle");
- model = BinaryData.fromObject(model).toObject(CspmMonitorGcpOfferingNativeCloudConnection.class);
- Assertions.assertEquals("llxricc", model.workloadIdentityProviderId());
- Assertions.assertEquals("wmuqqoajxeiygle", model.serviceAccountEmailAddress());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CspmMonitorGcpOfferingTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CspmMonitorGcpOfferingTests.java
deleted file mode 100644
index f3c2b4ffdfc0..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CspmMonitorGcpOfferingTests.java
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.CspmMonitorGcpOffering;
-import com.azure.resourcemanager.security.models.CspmMonitorGcpOfferingNativeCloudConnection;
-import org.junit.jupiter.api.Assertions;
-
-public final class CspmMonitorGcpOfferingTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CspmMonitorGcpOffering model =
- BinaryData
- .fromString(
- "{\"offeringType\":\"CspmMonitorGcp\",\"nativeCloudConnection\":{\"workloadIdentityProviderId\":\"s\",\"serviceAccountEmailAddress\":\"tkbtnqlrngl\"},\"description\":\"biipsnawwlqkznx\"}")
- .toObject(CspmMonitorGcpOffering.class);
- Assertions.assertEquals("s", model.nativeCloudConnection().workloadIdentityProviderId());
- Assertions.assertEquals("tkbtnqlrngl", model.nativeCloudConnection().serviceAccountEmailAddress());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CspmMonitorGcpOffering model =
- new CspmMonitorGcpOffering()
- .withNativeCloudConnection(
- new CspmMonitorGcpOfferingNativeCloudConnection()
- .withWorkloadIdentityProviderId("s")
- .withServiceAccountEmailAddress("tkbtnqlrngl"));
- model = BinaryData.fromObject(model).toObject(CspmMonitorGcpOffering.class);
- Assertions.assertEquals("s", model.nativeCloudConnection().workloadIdentityProviderId());
- Assertions.assertEquals("tkbtnqlrngl", model.nativeCloudConnection().serviceAccountEmailAddress());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CspmMonitorGithubOfferingTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CspmMonitorGithubOfferingTests.java
deleted file mode 100644
index 81a6c03211af..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CspmMonitorGithubOfferingTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.CspmMonitorGithubOffering;
-
-public final class CspmMonitorGithubOfferingTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CspmMonitorGithubOffering model =
- BinaryData
- .fromString("{\"offeringType\":\"CspmMonitorGithub\",\"description\":\"bzsx\"}")
- .toObject(CspmMonitorGithubOffering.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CspmMonitorGithubOffering model = new CspmMonitorGithubOffering();
- model = BinaryData.fromObject(model).toObject(CspmMonitorGithubOffering.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomAlertRuleTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomAlertRuleTests.java
deleted file mode 100644
index 6af4ab1acfa7..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomAlertRuleTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.CustomAlertRule;
-import org.junit.jupiter.api.Assertions;
-
-public final class CustomAlertRuleTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CustomAlertRule model =
- BinaryData
- .fromString(
- "{\"ruleType\":\"CustomAlertRule\",\"displayName\":\"usue\",\"description\":\"zwdejbavor\",\"isEnabled\":true}")
- .toObject(CustomAlertRule.class);
- Assertions.assertEquals(true, model.isEnabled());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CustomAlertRule model = new CustomAlertRule().withIsEnabled(true);
- model = BinaryData.fromObject(model).toObject(CustomAlertRule.class);
- Assertions.assertEquals(true, model.isEnabled());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomAssessmentAutomationRequestPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomAssessmentAutomationRequestPropertiesTests.java
deleted file mode 100644
index aa455a49be3f..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomAssessmentAutomationRequestPropertiesTests.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.CustomAssessmentAutomationRequestProperties;
-import com.azure.resourcemanager.security.models.SeverityEnum;
-import com.azure.resourcemanager.security.models.SupportedCloudEnum;
-import org.junit.jupiter.api.Assertions;
-
-public final class CustomAssessmentAutomationRequestPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CustomAssessmentAutomationRequestProperties model =
- BinaryData
- .fromString(
- "{\"compressedQuery\":\"cbjy\",\"supportedCloud\":\"AWS\",\"severity\":\"Low\",\"displayName\":\"xqhabi\",\"description\":\"ikxwc\",\"remediationDescription\":\"yscnpqxu\"}")
- .toObject(CustomAssessmentAutomationRequestProperties.class);
- Assertions.assertEquals("cbjy", model.compressedQuery());
- Assertions.assertEquals(SupportedCloudEnum.AWS, model.supportedCloud());
- Assertions.assertEquals(SeverityEnum.LOW, model.severity());
- Assertions.assertEquals("xqhabi", model.displayName());
- Assertions.assertEquals("ikxwc", model.description());
- Assertions.assertEquals("yscnpqxu", model.remediationDescription());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CustomAssessmentAutomationRequestProperties model =
- new CustomAssessmentAutomationRequestProperties()
- .withCompressedQuery("cbjy")
- .withSupportedCloud(SupportedCloudEnum.AWS)
- .withSeverity(SeverityEnum.LOW)
- .withDisplayName("xqhabi")
- .withDescription("ikxwc")
- .withRemediationDescription("yscnpqxu");
- model = BinaryData.fromObject(model).toObject(CustomAssessmentAutomationRequestProperties.class);
- Assertions.assertEquals("cbjy", model.compressedQuery());
- Assertions.assertEquals(SupportedCloudEnum.AWS, model.supportedCloud());
- Assertions.assertEquals(SeverityEnum.LOW, model.severity());
- Assertions.assertEquals("xqhabi", model.displayName());
- Assertions.assertEquals("ikxwc", model.description());
- Assertions.assertEquals("yscnpqxu", model.remediationDescription());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomAssessmentAutomationRequestTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomAssessmentAutomationRequestTests.java
deleted file mode 100644
index 1ba48761ba0d..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomAssessmentAutomationRequestTests.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.CustomAssessmentAutomationRequest;
-import com.azure.resourcemanager.security.models.SeverityEnum;
-import com.azure.resourcemanager.security.models.SupportedCloudEnum;
-import org.junit.jupiter.api.Assertions;
-
-public final class CustomAssessmentAutomationRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CustomAssessmentAutomationRequest model =
- BinaryData
- .fromString(
- "{\"properties\":{\"compressedQuery\":\"xhekuksjtxukcdm\",\"supportedCloud\":\"GCP\",\"severity\":\"Low\",\"displayName\":\"uanzwuxzdx\",\"description\":\"yrlhmwhfpmrqobm\",\"remediationDescription\":\"kknryrtihf\"},\"id\":\"tijbpzvgnwzsymgl\",\"name\":\"uf\",\"type\":\"yzkohdbihanuf\"}")
- .toObject(CustomAssessmentAutomationRequest.class);
- Assertions.assertEquals("xhekuksjtxukcdm", model.compressedQuery());
- Assertions.assertEquals(SupportedCloudEnum.GCP, model.supportedCloud());
- Assertions.assertEquals(SeverityEnum.LOW, model.severity());
- Assertions.assertEquals("uanzwuxzdx", model.displayName());
- Assertions.assertEquals("yrlhmwhfpmrqobm", model.description());
- Assertions.assertEquals("kknryrtihf", model.remediationDescription());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CustomAssessmentAutomationRequest model =
- new CustomAssessmentAutomationRequest()
- .withCompressedQuery("xhekuksjtxukcdm")
- .withSupportedCloud(SupportedCloudEnum.GCP)
- .withSeverity(SeverityEnum.LOW)
- .withDisplayName("uanzwuxzdx")
- .withDescription("yrlhmwhfpmrqobm")
- .withRemediationDescription("kknryrtihf");
- model = BinaryData.fromObject(model).toObject(CustomAssessmentAutomationRequest.class);
- Assertions.assertEquals("xhekuksjtxukcdm", model.compressedQuery());
- Assertions.assertEquals(SupportedCloudEnum.GCP, model.supportedCloud());
- Assertions.assertEquals(SeverityEnum.LOW, model.severity());
- Assertions.assertEquals("uanzwuxzdx", model.displayName());
- Assertions.assertEquals("yrlhmwhfpmrqobm", model.description());
- Assertions.assertEquals("kknryrtihf", model.remediationDescription());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomAssessmentAutomationsDeleteByResourceGroupWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomAssessmentAutomationsDeleteByResourceGroupWithResponseMockTests.java
deleted file mode 100644
index 9dd6004f0f3a..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomAssessmentAutomationsDeleteByResourceGroupWithResponseMockTests.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class CustomAssessmentAutomationsDeleteByResourceGroupWithResponseMockTests {
- @Test
- public void testDeleteWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .customAssessmentAutomations()
- .deleteByResourceGroupWithResponse("ka", "n", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentInnerTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentInnerTests.java
deleted file mode 100644
index 7760b93bbfb5..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentInnerTests.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.CustomEntityStoreAssignmentInner;
-import org.junit.jupiter.api.Assertions;
-
-public final class CustomEntityStoreAssignmentInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CustomEntityStoreAssignmentInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"principal\":\"ipjoxzjnchgejs\",\"entityStoreDatabaseLink\":\"dmailzydehojw\"},\"id\":\"ahuxinpm\",\"name\":\"njaqwixjspro\",\"type\":\"vcputegj\"}")
- .toObject(CustomEntityStoreAssignmentInner.class);
- Assertions.assertEquals("ipjoxzjnchgejs", model.principal());
- Assertions.assertEquals("dmailzydehojw", model.entityStoreDatabaseLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CustomEntityStoreAssignmentInner model =
- new CustomEntityStoreAssignmentInner()
- .withPrincipal("ipjoxzjnchgejs")
- .withEntityStoreDatabaseLink("dmailzydehojw");
- model = BinaryData.fromObject(model).toObject(CustomEntityStoreAssignmentInner.class);
- Assertions.assertEquals("ipjoxzjnchgejs", model.principal());
- Assertions.assertEquals("dmailzydehojw", model.entityStoreDatabaseLink());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentPropertiesTests.java
deleted file mode 100644
index 6109b55d00ce..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentPropertiesTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.CustomEntityStoreAssignmentProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class CustomEntityStoreAssignmentPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CustomEntityStoreAssignmentProperties model =
- BinaryData
- .fromString("{\"principal\":\"mfdatscmdvpj\",\"entityStoreDatabaseLink\":\"lsuuvmkjozkrwfnd\"}")
- .toObject(CustomEntityStoreAssignmentProperties.class);
- Assertions.assertEquals("mfdatscmdvpj", model.principal());
- Assertions.assertEquals("lsuuvmkjozkrwfnd", model.entityStoreDatabaseLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CustomEntityStoreAssignmentProperties model =
- new CustomEntityStoreAssignmentProperties()
- .withPrincipal("mfdatscmdvpj")
- .withEntityStoreDatabaseLink("lsuuvmkjozkrwfnd");
- model = BinaryData.fromObject(model).toObject(CustomEntityStoreAssignmentProperties.class);
- Assertions.assertEquals("mfdatscmdvpj", model.principal());
- Assertions.assertEquals("lsuuvmkjozkrwfnd", model.entityStoreDatabaseLink());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentRequestPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentRequestPropertiesTests.java
deleted file mode 100644
index 70cd0dc9b2ad..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentRequestPropertiesTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.CustomEntityStoreAssignmentRequestProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class CustomEntityStoreAssignmentRequestPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CustomEntityStoreAssignmentRequestProperties model =
- BinaryData
- .fromString("{\"principal\":\"wryoqpsoacc\"}")
- .toObject(CustomEntityStoreAssignmentRequestProperties.class);
- Assertions.assertEquals("wryoqpsoacc", model.principal());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CustomEntityStoreAssignmentRequestProperties model =
- new CustomEntityStoreAssignmentRequestProperties().withPrincipal("wryoqpsoacc");
- model = BinaryData.fromObject(model).toObject(CustomEntityStoreAssignmentRequestProperties.class);
- Assertions.assertEquals("wryoqpsoacc", model.principal());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentRequestTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentRequestTests.java
deleted file mode 100644
index 56bb9c135e80..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentRequestTests.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.CustomEntityStoreAssignmentRequest;
-import org.junit.jupiter.api.Assertions;
-
-public final class CustomEntityStoreAssignmentRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CustomEntityStoreAssignmentRequest model =
- BinaryData
- .fromString("{\"properties\":{\"principal\":\"jpslwejd\"}}")
- .toObject(CustomEntityStoreAssignmentRequest.class);
- Assertions.assertEquals("jpslwejd", model.principal());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CustomEntityStoreAssignmentRequest model = new CustomEntityStoreAssignmentRequest().withPrincipal("jpslwejd");
- model = BinaryData.fromObject(model).toObject(CustomEntityStoreAssignmentRequest.class);
- Assertions.assertEquals("jpslwejd", model.principal());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentsCreateWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentsCreateWithResponseMockTests.java
deleted file mode 100644
index 8fc84a219736..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentsCreateWithResponseMockTests.java
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.CustomEntityStoreAssignment;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class CustomEntityStoreAssignmentsCreateWithResponseMockTests {
- @Test
- public void testCreateWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"principal\":\"kya\",\"entityStoreDatabaseLink\":\"hpmwhqnucsk\"},\"id\":\"hsidsjtdlpbnin\",\"name\":\"gazlsvbz\",\"type\":\"cpuo\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- CustomEntityStoreAssignment response =
- manager
- .customEntityStoreAssignments()
- .define("agyw")
- .withExistingResourceGroup("glxpnovyoanfbcsw")
- .withPrincipal("igvjrktp")
- .create();
-
- Assertions.assertEquals("kya", response.principal());
- Assertions.assertEquals("hpmwhqnucsk", response.entityStoreDatabaseLink());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentsDeleteByResourceGroupWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentsDeleteByResourceGroupWithResponseMockTests.java
deleted file mode 100644
index 519620e3dac7..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentsDeleteByResourceGroupWithResponseMockTests.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class CustomEntityStoreAssignmentsDeleteByResourceGroupWithResponseMockTests {
- @Test
- public void testDeleteWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .customEntityStoreAssignments()
- .deleteByResourceGroupWithResponse("fbcpaqktkrumzu", "dkyzbfvxov", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentsGetByResourceGroupWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentsGetByResourceGroupWithResponseMockTests.java
deleted file mode 100644
index 4085d3287b0f..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentsGetByResourceGroupWithResponseMockTests.java
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.CustomEntityStoreAssignment;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class CustomEntityStoreAssignmentsGetByResourceGroupWithResponseMockTests {
- @Test
- public void testGetByResourceGroupWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"principal\":\"aowuzo\",\"entityStoreDatabaseLink\":\"uohdkcprgukxr\"},\"id\":\"tiochlutixmqr\",\"name\":\"djizcbf\",\"type\":\"mcrunfhiucn\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- CustomEntityStoreAssignment response =
- manager
- .customEntityStoreAssignments()
- .getByResourceGroupWithResponse("upet", "svvoqsbpkflanfk", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("aowuzo", response.principal());
- Assertions.assertEquals("uohdkcprgukxr", response.entityStoreDatabaseLink());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentsListByResourceGroupMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentsListByResourceGroupMockTests.java
deleted file mode 100644
index 4c6e28ba10cd..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentsListByResourceGroupMockTests.java
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.CustomEntityStoreAssignment;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class CustomEntityStoreAssignmentsListByResourceGroupMockTests {
- @Test
- public void testListByResourceGroup() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"principal\":\"lwcjsqggjhffb\",\"entityStoreDatabaseLink\":\"qrkijpeuq\"},\"id\":\"sdxeqztvxwmwwmjs\",\"name\":\"en\",\"type\":\"wwa\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.customEntityStoreAssignments().listByResourceGroup("kxiuxqggvqr", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("lwcjsqggjhffb", response.iterator().next().principal());
- Assertions.assertEquals("qrkijpeuq", response.iterator().next().entityStoreDatabaseLink());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentsListMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentsListMockTests.java
deleted file mode 100644
index 4b2e4e0bdada..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentsListMockTests.java
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.CustomEntityStoreAssignment;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class CustomEntityStoreAssignmentsListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"principal\":\"eq\",\"entityStoreDatabaseLink\":\"ulndhzyoeo\"},\"id\":\"ht\",\"name\":\"llhsvidmyt\",\"type\":\"l\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.customEntityStoreAssignments().list(com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("eq", response.iterator().next().principal());
- Assertions.assertEquals("ulndhzyoeo", response.iterator().next().entityStoreDatabaseLink());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentsListResultTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentsListResultTests.java
deleted file mode 100644
index 8b522177114b..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CustomEntityStoreAssignmentsListResultTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.CustomEntityStoreAssignmentsListResult;
-import org.junit.jupiter.api.Assertions;
-
-public final class CustomEntityStoreAssignmentsListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CustomEntityStoreAssignmentsListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"principal\":\"j\",\"entityStoreDatabaseLink\":\"hbcryffdfdosyge\"},\"id\":\"paojakhmsbzjh\",\"name\":\"rzevdphlxaol\",\"type\":\"hqtrgqjbpf\"},{\"properties\":{\"principal\":\"n\",\"entityStoreDatabaseLink\":\"v\"},\"id\":\"cjrwzoxxjtfellu\",\"name\":\"fziton\",\"type\":\"eqfpj\"},{\"properties\":{\"principal\":\"ofpdvh\",\"entityStoreDatabaseLink\":\"xxypininmay\"},\"id\":\"uybbkpodep\",\"name\":\"oginuvamiheognar\",\"type\":\"zxtheotusivyevcc\"}],\"nextLink\":\"ihnhun\"}")
- .toObject(CustomEntityStoreAssignmentsListResult.class);
- Assertions.assertEquals("ihnhun", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CustomEntityStoreAssignmentsListResult model =
- new CustomEntityStoreAssignmentsListResult().withNextLink("ihnhun");
- model = BinaryData.fromObject(model).toObject(CustomEntityStoreAssignmentsListResult.class);
- Assertions.assertEquals("ihnhun", model.nextLink());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CveTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CveTests.java
deleted file mode 100644
index 4d92803dfd54..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CveTests.java
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.Cve;
-
-public final class CveTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- Cve model = BinaryData.fromString("{\"title\":\"koszu\",\"link\":\"lnsntrpc\"}").toObject(Cve.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- Cve model = new Cve();
- model = BinaryData.fromObject(model).toObject(Cve.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CvssTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CvssTests.java
deleted file mode 100644
index a5afe8982d15..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/CvssTests.java
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.Cvss;
-
-public final class CvssTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- Cvss model = BinaryData.fromString("{\"base\":53.688263}").toObject(Cvss.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- Cvss model = new Cvss();
- model = BinaryData.fromObject(model).toObject(Cvss.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DataExportSettingPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DataExportSettingPropertiesTests.java
deleted file mode 100644
index 8d6455d3fe04..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DataExportSettingPropertiesTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.DataExportSettingProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class DataExportSettingPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DataExportSettingProperties model =
- BinaryData.fromString("{\"enabled\":false}").toObject(DataExportSettingProperties.class);
- Assertions.assertEquals(false, model.enabled());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DataExportSettingProperties model = new DataExportSettingProperties().withEnabled(false);
- model = BinaryData.fromObject(model).toObject(DataExportSettingProperties.class);
- Assertions.assertEquals(false, model.enabled());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DataExportSettingsTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DataExportSettingsTests.java
deleted file mode 100644
index 38736af7bfa3..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DataExportSettingsTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DataExportSettings;
-import org.junit.jupiter.api.Assertions;
-
-public final class DataExportSettingsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DataExportSettings model =
- BinaryData
- .fromString(
- "{\"kind\":\"DataExportSettings\",\"properties\":{\"enabled\":true},\"id\":\"yqv\",\"name\":\"daswvpp\",\"type\":\"sqqzlgcndhz\"}")
- .toObject(DataExportSettings.class);
- Assertions.assertEquals(true, model.enabled());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DataExportSettings model = new DataExportSettings().withEnabled(true);
- model = BinaryData.fromObject(model).toObject(DataExportSettings.class);
- Assertions.assertEquals(true, model.enabled());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderCspmAwsOfferingTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderCspmAwsOfferingTests.java
deleted file mode 100644
index 285e062691bc..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderCspmAwsOfferingTests.java
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderCspmAwsOffering;
-import com.azure.resourcemanager.security.models.DefenderCspmAwsOfferingVmScanners;
-import com.azure.resourcemanager.security.models.DefenderCspmAwsOfferingVmScannersConfiguration;
-import com.azure.resourcemanager.security.models.ScanningMode;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderCspmAwsOfferingTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderCspmAwsOffering model =
- BinaryData
- .fromString(
- "{\"offeringType\":\"DefenderCspmAws\",\"vmScanners\":{\"enabled\":true,\"configuration\":{\"cloudRoleArn\":\"sivmfogdrtbfcmk\",\"scanningMode\":\"Default\",\"exclusionTags\":{\"xkecifhocj\":\"cwjjxsgmbawvif\",\"txvcm\":\"wkloozr\",\"yeyng\":\"funlcpxxvi\",\"rquv\":\"g\"}}},\"description\":\"gglpmcrdcuelj\"}")
- .toObject(DefenderCspmAwsOffering.class);
- Assertions.assertEquals(true, model.vmScanners().enabled());
- Assertions.assertEquals("sivmfogdrtbfcmk", model.vmScanners().configuration().cloudRoleArn());
- Assertions.assertEquals(ScanningMode.DEFAULT, model.vmScanners().configuration().scanningMode());
- Assertions.assertEquals("cwjjxsgmbawvif", model.vmScanners().configuration().exclusionTags().get("xkecifhocj"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderCspmAwsOffering model =
- new DefenderCspmAwsOffering()
- .withVmScanners(
- new DefenderCspmAwsOfferingVmScanners()
- .withEnabled(true)
- .withConfiguration(
- new DefenderCspmAwsOfferingVmScannersConfiguration()
- .withCloudRoleArn("sivmfogdrtbfcmk")
- .withScanningMode(ScanningMode.DEFAULT)
- .withExclusionTags(
- mapOf(
- "xkecifhocj",
- "cwjjxsgmbawvif",
- "txvcm",
- "wkloozr",
- "yeyng",
- "funlcpxxvi",
- "rquv",
- "g"))));
- model = BinaryData.fromObject(model).toObject(DefenderCspmAwsOffering.class);
- Assertions.assertEquals(true, model.vmScanners().enabled());
- Assertions.assertEquals("sivmfogdrtbfcmk", model.vmScanners().configuration().cloudRoleArn());
- Assertions.assertEquals(ScanningMode.DEFAULT, model.vmScanners().configuration().scanningMode());
- Assertions.assertEquals("cwjjxsgmbawvif", model.vmScanners().configuration().exclusionTags().get("xkecifhocj"));
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderCspmAwsOfferingVmScannersConfigurationTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderCspmAwsOfferingVmScannersConfigurationTests.java
deleted file mode 100644
index 8426e8ef2ec5..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderCspmAwsOfferingVmScannersConfigurationTests.java
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderCspmAwsOfferingVmScannersConfiguration;
-import com.azure.resourcemanager.security.models.ScanningMode;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderCspmAwsOfferingVmScannersConfigurationTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderCspmAwsOfferingVmScannersConfiguration model =
- BinaryData
- .fromString(
- "{\"cloudRoleArn\":\"djxyxgbkkqvjcteo\",\"scanningMode\":\"Default\",\"exclusionTags\":{\"zdpv\":\"lskkzpxvj\",\"fsnggytexvzilm\":\"cojhpcnabx\"}}")
- .toObject(DefenderCspmAwsOfferingVmScannersConfiguration.class);
- Assertions.assertEquals("djxyxgbkkqvjcteo", model.cloudRoleArn());
- Assertions.assertEquals(ScanningMode.DEFAULT, model.scanningMode());
- Assertions.assertEquals("lskkzpxvj", model.exclusionTags().get("zdpv"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderCspmAwsOfferingVmScannersConfiguration model =
- new DefenderCspmAwsOfferingVmScannersConfiguration()
- .withCloudRoleArn("djxyxgbkkqvjcteo")
- .withScanningMode(ScanningMode.DEFAULT)
- .withExclusionTags(mapOf("zdpv", "lskkzpxvj", "fsnggytexvzilm", "cojhpcnabx"));
- model = BinaryData.fromObject(model).toObject(DefenderCspmAwsOfferingVmScannersConfiguration.class);
- Assertions.assertEquals("djxyxgbkkqvjcteo", model.cloudRoleArn());
- Assertions.assertEquals(ScanningMode.DEFAULT, model.scanningMode());
- Assertions.assertEquals("lskkzpxvj", model.exclusionTags().get("zdpv"));
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderCspmAwsOfferingVmScannersTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderCspmAwsOfferingVmScannersTests.java
deleted file mode 100644
index 58a2e5d88dd4..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderCspmAwsOfferingVmScannersTests.java
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderCspmAwsOfferingVmScanners;
-import com.azure.resourcemanager.security.models.DefenderCspmAwsOfferingVmScannersConfiguration;
-import com.azure.resourcemanager.security.models.ScanningMode;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderCspmAwsOfferingVmScannersTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderCspmAwsOfferingVmScanners model =
- BinaryData
- .fromString(
- "{\"enabled\":false,\"configuration\":{\"cloudRoleArn\":\"m\",\"scanningMode\":\"Default\",\"exclusionTags\":{\"zqbglcjkays\":\"rvs\",\"oskkfmk\":\"thzodubtlmjtgbl\"}}}")
- .toObject(DefenderCspmAwsOfferingVmScanners.class);
- Assertions.assertEquals(false, model.enabled());
- Assertions.assertEquals("m", model.configuration().cloudRoleArn());
- Assertions.assertEquals(ScanningMode.DEFAULT, model.configuration().scanningMode());
- Assertions.assertEquals("rvs", model.configuration().exclusionTags().get("zqbglcjkays"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderCspmAwsOfferingVmScanners model =
- new DefenderCspmAwsOfferingVmScanners()
- .withEnabled(false)
- .withConfiguration(
- new DefenderCspmAwsOfferingVmScannersConfiguration()
- .withCloudRoleArn("m")
- .withScanningMode(ScanningMode.DEFAULT)
- .withExclusionTags(mapOf("zqbglcjkays", "rvs", "oskkfmk", "thzodubtlmjtgbl")));
- model = BinaryData.fromObject(model).toObject(DefenderCspmAwsOfferingVmScanners.class);
- Assertions.assertEquals(false, model.enabled());
- Assertions.assertEquals("m", model.configuration().cloudRoleArn());
- Assertions.assertEquals(ScanningMode.DEFAULT, model.configuration().scanningMode());
- Assertions.assertEquals("rvs", model.configuration().exclusionTags().get("zqbglcjkays"));
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderCspmGcpOfferingTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderCspmGcpOfferingTests.java
deleted file mode 100644
index ff655be984a6..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderCspmGcpOfferingTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderCspmGcpOffering;
-
-public final class DefenderCspmGcpOfferingTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderCspmGcpOffering model =
- BinaryData
- .fromString("{\"offeringType\":\"DefenderCspmGcp\",\"description\":\"vzkwwwncknr\"}")
- .toObject(DefenderCspmGcpOffering.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderCspmGcpOffering model = new DefenderCspmGcpOffering();
- model = BinaryData.fromObject(model).toObject(DefenderCspmGcpOffering.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderFoDatabasesAwsOfferingArcAutoProvisioningTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderFoDatabasesAwsOfferingArcAutoProvisioningTests.java
deleted file mode 100644
index bb9f233f0067..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderFoDatabasesAwsOfferingArcAutoProvisioningTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderFoDatabasesAwsOfferingArcAutoProvisioning;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderFoDatabasesAwsOfferingArcAutoProvisioningTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderFoDatabasesAwsOfferingArcAutoProvisioning model =
- BinaryData
- .fromString("{\"enabled\":true,\"cloudRoleArn\":\"slxlhu\"}")
- .toObject(DefenderFoDatabasesAwsOfferingArcAutoProvisioning.class);
- Assertions.assertEquals(true, model.enabled());
- Assertions.assertEquals("slxlhu", model.cloudRoleArn());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderFoDatabasesAwsOfferingArcAutoProvisioning model =
- new DefenderFoDatabasesAwsOfferingArcAutoProvisioning().withEnabled(true).withCloudRoleArn("slxlhu");
- model = BinaryData.fromObject(model).toObject(DefenderFoDatabasesAwsOfferingArcAutoProvisioning.class);
- Assertions.assertEquals(true, model.enabled());
- Assertions.assertEquals("slxlhu", model.cloudRoleArn());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderFoDatabasesAwsOfferingRdsTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderFoDatabasesAwsOfferingRdsTests.java
deleted file mode 100644
index ccc435969620..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderFoDatabasesAwsOfferingRdsTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderFoDatabasesAwsOfferingRds;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderFoDatabasesAwsOfferingRdsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderFoDatabasesAwsOfferingRds model =
- BinaryData
- .fromString("{\"enabled\":true,\"cloudRoleArn\":\"muk\"}")
- .toObject(DefenderFoDatabasesAwsOfferingRds.class);
- Assertions.assertEquals(true, model.enabled());
- Assertions.assertEquals("muk", model.cloudRoleArn());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderFoDatabasesAwsOfferingRds model =
- new DefenderFoDatabasesAwsOfferingRds().withEnabled(true).withCloudRoleArn("muk");
- model = BinaryData.fromObject(model).toObject(DefenderFoDatabasesAwsOfferingRds.class);
- Assertions.assertEquals(true, model.enabled());
- Assertions.assertEquals("muk", model.cloudRoleArn());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderFoDatabasesAwsOfferingTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderFoDatabasesAwsOfferingTests.java
deleted file mode 100644
index ed6c034cd87c..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderFoDatabasesAwsOfferingTests.java
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderFoDatabasesAwsOffering;
-import com.azure.resourcemanager.security.models.DefenderFoDatabasesAwsOfferingArcAutoProvisioning;
-import com.azure.resourcemanager.security.models.DefenderFoDatabasesAwsOfferingRds;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderFoDatabasesAwsOfferingTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderFoDatabasesAwsOffering model =
- BinaryData
- .fromString(
- "{\"offeringType\":\"DefenderForDatabasesAws\",\"arcAutoProvisioning\":{\"enabled\":true,\"cloudRoleArn\":\"cgsuthhlln\"},\"rds\":{\"enabled\":true,\"cloudRoleArn\":\"fxexlfciatxtjrr\"},\"description\":\"mdskjhhxdlajfoxc\"}")
- .toObject(DefenderFoDatabasesAwsOffering.class);
- Assertions.assertEquals(true, model.arcAutoProvisioning().enabled());
- Assertions.assertEquals("cgsuthhlln", model.arcAutoProvisioning().cloudRoleArn());
- Assertions.assertEquals(true, model.rds().enabled());
- Assertions.assertEquals("fxexlfciatxtjrr", model.rds().cloudRoleArn());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderFoDatabasesAwsOffering model =
- new DefenderFoDatabasesAwsOffering()
- .withArcAutoProvisioning(
- new DefenderFoDatabasesAwsOfferingArcAutoProvisioning()
- .withEnabled(true)
- .withCloudRoleArn("cgsuthhlln"))
- .withRds(new DefenderFoDatabasesAwsOfferingRds().withEnabled(true).withCloudRoleArn("fxexlfciatxtjrr"));
- model = BinaryData.fromObject(model).toObject(DefenderFoDatabasesAwsOffering.class);
- Assertions.assertEquals(true, model.arcAutoProvisioning().enabled());
- Assertions.assertEquals("cgsuthhlln", model.arcAutoProvisioning().cloudRoleArn());
- Assertions.assertEquals(true, model.rds().enabled());
- Assertions.assertEquals("fxexlfciatxtjrr", model.rds().cloudRoleArn());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersAwsOfferingCloudWatchToKinesisTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersAwsOfferingCloudWatchToKinesisTests.java
deleted file mode 100644
index b479fd345132..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersAwsOfferingCloudWatchToKinesisTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForContainersAwsOfferingCloudWatchToKinesis;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForContainersAwsOfferingCloudWatchToKinesisTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForContainersAwsOfferingCloudWatchToKinesis model =
- BinaryData
- .fromString("{\"cloudRoleArn\":\"kcrr\"}")
- .toObject(DefenderForContainersAwsOfferingCloudWatchToKinesis.class);
- Assertions.assertEquals("kcrr", model.cloudRoleArn());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForContainersAwsOfferingCloudWatchToKinesis model =
- new DefenderForContainersAwsOfferingCloudWatchToKinesis().withCloudRoleArn("kcrr");
- model = BinaryData.fromObject(model).toObject(DefenderForContainersAwsOfferingCloudWatchToKinesis.class);
- Assertions.assertEquals("kcrr", model.cloudRoleArn());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTaskTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTaskTests.java
deleted file mode 100644
index 5d1eba55ffe7..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTaskTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTaskTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask model =
- BinaryData
- .fromString("{\"cloudRoleArn\":\"bcbgydlqidywmhm\"}")
- .toObject(DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask.class);
- Assertions.assertEquals("bcbgydlqidywmhm", model.cloudRoleArn());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask model =
- new DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask()
- .withCloudRoleArn("bcbgydlqidywmhm");
- model =
- BinaryData
- .fromObject(model)
- .toObject(DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask.class);
- Assertions.assertEquals("bcbgydlqidywmhm", model.cloudRoleArn());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTests.java
deleted file mode 100644
index 8cc27eb42970..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTests.java
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForContainersAwsOfferingContainerVulnerabilityAssessment;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForContainersAwsOfferingContainerVulnerabilityAssessment model =
- BinaryData
- .fromString("{\"cloudRoleArn\":\"uehogdd\"}")
- .toObject(DefenderForContainersAwsOfferingContainerVulnerabilityAssessment.class);
- Assertions.assertEquals("uehogdd", model.cloudRoleArn());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForContainersAwsOfferingContainerVulnerabilityAssessment model =
- new DefenderForContainersAwsOfferingContainerVulnerabilityAssessment().withCloudRoleArn("uehogdd");
- model =
- BinaryData
- .fromObject(model)
- .toObject(DefenderForContainersAwsOfferingContainerVulnerabilityAssessment.class);
- Assertions.assertEquals("uehogdd", model.cloudRoleArn());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersAwsOfferingKinesisToS3Tests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersAwsOfferingKinesisToS3Tests.java
deleted file mode 100644
index 1a7478f26c8f..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersAwsOfferingKinesisToS3Tests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForContainersAwsOfferingKinesisToS3;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForContainersAwsOfferingKinesisToS3Tests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForContainersAwsOfferingKinesisToS3 model =
- BinaryData
- .fromString("{\"cloudRoleArn\":\"eek\"}")
- .toObject(DefenderForContainersAwsOfferingKinesisToS3.class);
- Assertions.assertEquals("eek", model.cloudRoleArn());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForContainersAwsOfferingKinesisToS3 model =
- new DefenderForContainersAwsOfferingKinesisToS3().withCloudRoleArn("eek");
- model = BinaryData.fromObject(model).toObject(DefenderForContainersAwsOfferingKinesisToS3.class);
- Assertions.assertEquals("eek", model.cloudRoleArn());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersAwsOfferingKubernetesScubaReaderTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersAwsOfferingKubernetesScubaReaderTests.java
deleted file mode 100644
index b8baa2b0c45c..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersAwsOfferingKubernetesScubaReaderTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForContainersAwsOfferingKubernetesScubaReader;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForContainersAwsOfferingKubernetesScubaReaderTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForContainersAwsOfferingKubernetesScubaReader model =
- BinaryData
- .fromString("{\"cloudRoleArn\":\"vkiwrsiwdyjqu\"}")
- .toObject(DefenderForContainersAwsOfferingKubernetesScubaReader.class);
- Assertions.assertEquals("vkiwrsiwdyjqu", model.cloudRoleArn());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForContainersAwsOfferingKubernetesScubaReader model =
- new DefenderForContainersAwsOfferingKubernetesScubaReader().withCloudRoleArn("vkiwrsiwdyjqu");
- model = BinaryData.fromObject(model).toObject(DefenderForContainersAwsOfferingKubernetesScubaReader.class);
- Assertions.assertEquals("vkiwrsiwdyjqu", model.cloudRoleArn());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersAwsOfferingKubernetesServiceTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersAwsOfferingKubernetesServiceTests.java
deleted file mode 100644
index f804be60d86f..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersAwsOfferingKubernetesServiceTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForContainersAwsOfferingKubernetesService;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForContainersAwsOfferingKubernetesServiceTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForContainersAwsOfferingKubernetesService model =
- BinaryData
- .fromString("{\"cloudRoleArn\":\"abjkdtfohfao\"}")
- .toObject(DefenderForContainersAwsOfferingKubernetesService.class);
- Assertions.assertEquals("abjkdtfohfao", model.cloudRoleArn());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForContainersAwsOfferingKubernetesService model =
- new DefenderForContainersAwsOfferingKubernetesService().withCloudRoleArn("abjkdtfohfao");
- model = BinaryData.fromObject(model).toObject(DefenderForContainersAwsOfferingKubernetesService.class);
- Assertions.assertEquals("abjkdtfohfao", model.cloudRoleArn());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersAwsOfferingTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersAwsOfferingTests.java
deleted file mode 100644
index 4110dc8e6229..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersAwsOfferingTests.java
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForContainersAwsOffering;
-import com.azure.resourcemanager.security.models.DefenderForContainersAwsOfferingCloudWatchToKinesis;
-import com.azure.resourcemanager.security.models.DefenderForContainersAwsOfferingContainerVulnerabilityAssessment;
-import com.azure.resourcemanager.security.models.DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask;
-import com.azure.resourcemanager.security.models.DefenderForContainersAwsOfferingKinesisToS3;
-import com.azure.resourcemanager.security.models.DefenderForContainersAwsOfferingKubernetesScubaReader;
-import com.azure.resourcemanager.security.models.DefenderForContainersAwsOfferingKubernetesService;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForContainersAwsOfferingTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForContainersAwsOffering model =
- BinaryData
- .fromString(
- "{\"offeringType\":\"DefenderForContainersAws\",\"kubernetesService\":{\"cloudRoleArn\":\"qqlmgnlqxsjxte\"},\"kubernetesScubaReader\":{\"cloudRoleArn\":\"hvuqbo\"},\"cloudWatchToKinesis\":{\"cloudRoleArn\":\"lzqocark\"},\"kinesisToS3\":{\"cloudRoleArn\":\"bc\"},\"containerVulnerabilityAssessment\":{\"cloudRoleArn\":\"t\"},\"containerVulnerabilityAssessmentTask\":{\"cloudRoleArn\":\"awqytllhdyzm\"},\"enableContainerVulnerabilityAssessment\":false,\"autoProvisioning\":false,\"kubeAuditRetentionTime\":8696466832626634358,\"scubaExternalId\":\"kck\",\"description\":\"ymx\"}")
- .toObject(DefenderForContainersAwsOffering.class);
- Assertions.assertEquals("qqlmgnlqxsjxte", model.kubernetesService().cloudRoleArn());
- Assertions.assertEquals("hvuqbo", model.kubernetesScubaReader().cloudRoleArn());
- Assertions.assertEquals("lzqocark", model.cloudWatchToKinesis().cloudRoleArn());
- Assertions.assertEquals("bc", model.kinesisToS3().cloudRoleArn());
- Assertions.assertEquals("t", model.containerVulnerabilityAssessment().cloudRoleArn());
- Assertions.assertEquals("awqytllhdyzm", model.containerVulnerabilityAssessmentTask().cloudRoleArn());
- Assertions.assertEquals(false, model.enableContainerVulnerabilityAssessment());
- Assertions.assertEquals(false, model.autoProvisioning());
- Assertions.assertEquals(8696466832626634358L, model.kubeAuditRetentionTime());
- Assertions.assertEquals("kck", model.scubaExternalId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForContainersAwsOffering model =
- new DefenderForContainersAwsOffering()
- .withKubernetesService(
- new DefenderForContainersAwsOfferingKubernetesService().withCloudRoleArn("qqlmgnlqxsjxte"))
- .withKubernetesScubaReader(
- new DefenderForContainersAwsOfferingKubernetesScubaReader().withCloudRoleArn("hvuqbo"))
- .withCloudWatchToKinesis(
- new DefenderForContainersAwsOfferingCloudWatchToKinesis().withCloudRoleArn("lzqocark"))
- .withKinesisToS3(new DefenderForContainersAwsOfferingKinesisToS3().withCloudRoleArn("bc"))
- .withContainerVulnerabilityAssessment(
- new DefenderForContainersAwsOfferingContainerVulnerabilityAssessment().withCloudRoleArn("t"))
- .withContainerVulnerabilityAssessmentTask(
- new DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask()
- .withCloudRoleArn("awqytllhdyzm"))
- .withEnableContainerVulnerabilityAssessment(false)
- .withAutoProvisioning(false)
- .withKubeAuditRetentionTime(8696466832626634358L)
- .withScubaExternalId("kck");
- model = BinaryData.fromObject(model).toObject(DefenderForContainersAwsOffering.class);
- Assertions.assertEquals("qqlmgnlqxsjxte", model.kubernetesService().cloudRoleArn());
- Assertions.assertEquals("hvuqbo", model.kubernetesScubaReader().cloudRoleArn());
- Assertions.assertEquals("lzqocark", model.cloudWatchToKinesis().cloudRoleArn());
- Assertions.assertEquals("bc", model.kinesisToS3().cloudRoleArn());
- Assertions.assertEquals("t", model.containerVulnerabilityAssessment().cloudRoleArn());
- Assertions.assertEquals("awqytllhdyzm", model.containerVulnerabilityAssessmentTask().cloudRoleArn());
- Assertions.assertEquals(false, model.enableContainerVulnerabilityAssessment());
- Assertions.assertEquals(false, model.autoProvisioning());
- Assertions.assertEquals(8696466832626634358L, model.kubeAuditRetentionTime());
- Assertions.assertEquals("kck", model.scubaExternalId());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersGcpOfferingDataPipelineNativeCloudConnectionTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersGcpOfferingDataPipelineNativeCloudConnectionTests.java
deleted file mode 100644
index ee1965a024c7..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersGcpOfferingDataPipelineNativeCloudConnectionTests.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForContainersGcpOfferingDataPipelineNativeCloudConnectionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection model =
- BinaryData
- .fromString("{\"serviceAccountEmailAddress\":\"itrdexy\",\"workloadIdentityProviderId\":\"nofnin\"}")
- .toObject(DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection.class);
- Assertions.assertEquals("itrdexy", model.serviceAccountEmailAddress());
- Assertions.assertEquals("nofnin", model.workloadIdentityProviderId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection model =
- new DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection()
- .withServiceAccountEmailAddress("itrdexy")
- .withWorkloadIdentityProviderId("nofnin");
- model =
- BinaryData
- .fromObject(model)
- .toObject(DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection.class);
- Assertions.assertEquals("itrdexy", model.serviceAccountEmailAddress());
- Assertions.assertEquals("nofnin", model.workloadIdentityProviderId());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersGcpOfferingNativeCloudConnectionTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersGcpOfferingNativeCloudConnectionTests.java
deleted file mode 100644
index d13c664ae313..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersGcpOfferingNativeCloudConnectionTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForContainersGcpOfferingNativeCloudConnection;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForContainersGcpOfferingNativeCloudConnectionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForContainersGcpOfferingNativeCloudConnection model =
- BinaryData
- .fromString("{\"serviceAccountEmailAddress\":\"ajq\",\"workloadIdentityProviderId\":\"kpeexpgeumilh\"}")
- .toObject(DefenderForContainersGcpOfferingNativeCloudConnection.class);
- Assertions.assertEquals("ajq", model.serviceAccountEmailAddress());
- Assertions.assertEquals("kpeexpgeumilh", model.workloadIdentityProviderId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForContainersGcpOfferingNativeCloudConnection model =
- new DefenderForContainersGcpOfferingNativeCloudConnection()
- .withServiceAccountEmailAddress("ajq")
- .withWorkloadIdentityProviderId("kpeexpgeumilh");
- model = BinaryData.fromObject(model).toObject(DefenderForContainersGcpOfferingNativeCloudConnection.class);
- Assertions.assertEquals("ajq", model.serviceAccountEmailAddress());
- Assertions.assertEquals("kpeexpgeumilh", model.workloadIdentityProviderId());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersGcpOfferingTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersGcpOfferingTests.java
deleted file mode 100644
index f8c4fbe213fe..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForContainersGcpOfferingTests.java
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForContainersGcpOffering;
-import com.azure.resourcemanager.security.models.DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection;
-import com.azure.resourcemanager.security.models.DefenderForContainersGcpOfferingNativeCloudConnection;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForContainersGcpOfferingTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForContainersGcpOffering model =
- BinaryData
- .fromString(
- "{\"offeringType\":\"DefenderForContainersGcp\",\"nativeCloudConnection\":{\"serviceAccountEmailAddress\":\"tz\",\"workloadIdentityProviderId\":\"ypefcpczshnuqnda\"},\"dataPipelineNativeCloudConnection\":{\"serviceAccountEmailAddress\":\"pfkhuytuszxhmt\",\"workloadIdentityProviderId\":\"vegwqiukvz\"},\"auditLogsAutoProvisioningFlag\":false,\"defenderAgentAutoProvisioningFlag\":true,\"policyAgentAutoProvisioningFlag\":true,\"description\":\"okgkskjivbs\"}")
- .toObject(DefenderForContainersGcpOffering.class);
- Assertions.assertEquals("tz", model.nativeCloudConnection().serviceAccountEmailAddress());
- Assertions.assertEquals("ypefcpczshnuqnda", model.nativeCloudConnection().workloadIdentityProviderId());
- Assertions
- .assertEquals("pfkhuytuszxhmt", model.dataPipelineNativeCloudConnection().serviceAccountEmailAddress());
- Assertions.assertEquals("vegwqiukvz", model.dataPipelineNativeCloudConnection().workloadIdentityProviderId());
- Assertions.assertEquals(false, model.auditLogsAutoProvisioningFlag());
- Assertions.assertEquals(true, model.defenderAgentAutoProvisioningFlag());
- Assertions.assertEquals(true, model.policyAgentAutoProvisioningFlag());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForContainersGcpOffering model =
- new DefenderForContainersGcpOffering()
- .withNativeCloudConnection(
- new DefenderForContainersGcpOfferingNativeCloudConnection()
- .withServiceAccountEmailAddress("tz")
- .withWorkloadIdentityProviderId("ypefcpczshnuqnda"))
- .withDataPipelineNativeCloudConnection(
- new DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection()
- .withServiceAccountEmailAddress("pfkhuytuszxhmt")
- .withWorkloadIdentityProviderId("vegwqiukvz"))
- .withAuditLogsAutoProvisioningFlag(false)
- .withDefenderAgentAutoProvisioningFlag(true)
- .withPolicyAgentAutoProvisioningFlag(true);
- model = BinaryData.fromObject(model).toObject(DefenderForContainersGcpOffering.class);
- Assertions.assertEquals("tz", model.nativeCloudConnection().serviceAccountEmailAddress());
- Assertions.assertEquals("ypefcpczshnuqnda", model.nativeCloudConnection().workloadIdentityProviderId());
- Assertions
- .assertEquals("pfkhuytuszxhmt", model.dataPipelineNativeCloudConnection().serviceAccountEmailAddress());
- Assertions.assertEquals("vegwqiukvz", model.dataPipelineNativeCloudConnection().workloadIdentityProviderId());
- Assertions.assertEquals(false, model.auditLogsAutoProvisioningFlag());
- Assertions.assertEquals(true, model.defenderAgentAutoProvisioningFlag());
- Assertions.assertEquals(true, model.policyAgentAutoProvisioningFlag());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForDatabasesGcpOfferingArcAutoProvisioningTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForDatabasesGcpOfferingArcAutoProvisioningTests.java
deleted file mode 100644
index 43fedadc8fdf..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForDatabasesGcpOfferingArcAutoProvisioningTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForDatabasesGcpOfferingArcAutoProvisioning;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForDatabasesGcpOfferingArcAutoProvisioningTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForDatabasesGcpOfferingArcAutoProvisioning model =
- BinaryData
- .fromString("{\"enabled\":false}")
- .toObject(DefenderForDatabasesGcpOfferingArcAutoProvisioning.class);
- Assertions.assertEquals(false, model.enabled());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForDatabasesGcpOfferingArcAutoProvisioning model =
- new DefenderForDatabasesGcpOfferingArcAutoProvisioning().withEnabled(false);
- model = BinaryData.fromObject(model).toObject(DefenderForDatabasesGcpOfferingArcAutoProvisioning.class);
- Assertions.assertEquals(false, model.enabled());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioningTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioningTests.java
deleted file mode 100644
index 3e85e683381e..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioningTests.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioningTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning model =
- BinaryData
- .fromString("{\"serviceAccountEmailAddress\":\"cp\",\"workloadIdentityProviderId\":\"rpzeqac\"}")
- .toObject(DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning.class);
- Assertions.assertEquals("cp", model.serviceAccountEmailAddress());
- Assertions.assertEquals("rpzeqac", model.workloadIdentityProviderId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning model =
- new DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning()
- .withServiceAccountEmailAddress("cp")
- .withWorkloadIdentityProviderId("rpzeqac");
- model =
- BinaryData
- .fromObject(model)
- .toObject(DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning.class);
- Assertions.assertEquals("cp", model.serviceAccountEmailAddress());
- Assertions.assertEquals("rpzeqac", model.workloadIdentityProviderId());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForDatabasesGcpOfferingTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForDatabasesGcpOfferingTests.java
deleted file mode 100644
index 9f098439c0a6..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForDatabasesGcpOfferingTests.java
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForDatabasesGcpOffering;
-import com.azure.resourcemanager.security.models.DefenderForDatabasesGcpOfferingArcAutoProvisioning;
-import com.azure.resourcemanager.security.models.DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForDatabasesGcpOfferingTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForDatabasesGcpOffering model =
- BinaryData
- .fromString(
- "{\"offeringType\":\"DefenderForDatabasesGcp\",\"arcAutoProvisioning\":{\"enabled\":false},\"defenderForDatabasesArcAutoProvisioning\":{\"serviceAccountEmailAddress\":\"lpckaewsedves\",\"workloadIdentityProviderId\":\"xegqphr\"},\"description\":\"nzhctmjtsgh\"}")
- .toObject(DefenderForDatabasesGcpOffering.class);
- Assertions.assertEquals(false, model.arcAutoProvisioning().enabled());
- Assertions
- .assertEquals(
- "lpckaewsedves", model.defenderForDatabasesArcAutoProvisioning().serviceAccountEmailAddress());
- Assertions
- .assertEquals("xegqphr", model.defenderForDatabasesArcAutoProvisioning().workloadIdentityProviderId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForDatabasesGcpOffering model =
- new DefenderForDatabasesGcpOffering()
- .withArcAutoProvisioning(new DefenderForDatabasesGcpOfferingArcAutoProvisioning().withEnabled(false))
- .withDefenderForDatabasesArcAutoProvisioning(
- new DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning()
- .withServiceAccountEmailAddress("lpckaewsedves")
- .withWorkloadIdentityProviderId("xegqphr"));
- model = BinaryData.fromObject(model).toObject(DefenderForDatabasesGcpOffering.class);
- Assertions.assertEquals(false, model.arcAutoProvisioning().enabled());
- Assertions
- .assertEquals(
- "lpckaewsedves", model.defenderForDatabasesArcAutoProvisioning().serviceAccountEmailAddress());
- Assertions
- .assertEquals("xegqphr", model.defenderForDatabasesArcAutoProvisioning().workloadIdentityProviderId());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForDevOpsAzureDevOpsOfferingTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForDevOpsAzureDevOpsOfferingTests.java
deleted file mode 100644
index 999d4125412b..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForDevOpsAzureDevOpsOfferingTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForDevOpsAzureDevOpsOffering;
-
-public final class DefenderForDevOpsAzureDevOpsOfferingTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForDevOpsAzureDevOpsOffering model =
- BinaryData
- .fromString("{\"offeringType\":\"DefenderForDevOpsAzureDevOps\",\"description\":\"lwe\"}")
- .toObject(DefenderForDevOpsAzureDevOpsOffering.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForDevOpsAzureDevOpsOffering model = new DefenderForDevOpsAzureDevOpsOffering();
- model = BinaryData.fromObject(model).toObject(DefenderForDevOpsAzureDevOpsOffering.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForDevOpsGithubOfferingTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForDevOpsGithubOfferingTests.java
deleted file mode 100644
index 11ed0bdf12bc..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForDevOpsGithubOfferingTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForDevOpsGithubOffering;
-
-public final class DefenderForDevOpsGithubOfferingTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForDevOpsGithubOffering model =
- BinaryData
- .fromString("{\"offeringType\":\"DefenderForDevOpsGithub\",\"description\":\"ajlskzptj\"}")
- .toObject(DefenderForDevOpsGithubOffering.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForDevOpsGithubOffering model = new DefenderForDevOpsGithubOffering();
- model = BinaryData.fromObject(model).toObject(DefenderForDevOpsGithubOffering.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingArcAutoProvisioningTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingArcAutoProvisioningTests.java
deleted file mode 100644
index 58367f29ab2b..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingArcAutoProvisioningTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForServersAwsOfferingArcAutoProvisioning;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForServersAwsOfferingArcAutoProvisioningTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForServersAwsOfferingArcAutoProvisioning model =
- BinaryData
- .fromString("{\"enabled\":false,\"cloudRoleArn\":\"dfpdqwtygevg\"}")
- .toObject(DefenderForServersAwsOfferingArcAutoProvisioning.class);
- Assertions.assertEquals(false, model.enabled());
- Assertions.assertEquals("dfpdqwtygevg", model.cloudRoleArn());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForServersAwsOfferingArcAutoProvisioning model =
- new DefenderForServersAwsOfferingArcAutoProvisioning().withEnabled(false).withCloudRoleArn("dfpdqwtygevg");
- model = BinaryData.fromObject(model).toObject(DefenderForServersAwsOfferingArcAutoProvisioning.class);
- Assertions.assertEquals(false, model.enabled());
- Assertions.assertEquals("dfpdqwtygevg", model.cloudRoleArn());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingDefenderForServersTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingDefenderForServersTests.java
deleted file mode 100644
index 9145c810bfcc..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingDefenderForServersTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForServersAwsOfferingDefenderForServers;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForServersAwsOfferingDefenderForServersTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForServersAwsOfferingDefenderForServers model =
- BinaryData
- .fromString("{\"cloudRoleArn\":\"j\"}")
- .toObject(DefenderForServersAwsOfferingDefenderForServers.class);
- Assertions.assertEquals("j", model.cloudRoleArn());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForServersAwsOfferingDefenderForServers model =
- new DefenderForServersAwsOfferingDefenderForServers().withCloudRoleArn("j");
- model = BinaryData.fromObject(model).toObject(DefenderForServersAwsOfferingDefenderForServers.class);
- Assertions.assertEquals("j", model.cloudRoleArn());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingMdeAutoProvisioningTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingMdeAutoProvisioningTests.java
deleted file mode 100644
index c96ebb0b0eb3..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingMdeAutoProvisioningTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForServersAwsOfferingMdeAutoProvisioning;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForServersAwsOfferingMdeAutoProvisioningTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForServersAwsOfferingMdeAutoProvisioning model =
- BinaryData
- .fromString("{\"enabled\":false,\"configuration\":\"dataqnrxtmbpjptn\"}")
- .toObject(DefenderForServersAwsOfferingMdeAutoProvisioning.class);
- Assertions.assertEquals(false, model.enabled());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForServersAwsOfferingMdeAutoProvisioning model =
- new DefenderForServersAwsOfferingMdeAutoProvisioning()
- .withEnabled(false)
- .withConfiguration("dataqnrxtmbpjptn");
- model = BinaryData.fromObject(model).toObject(DefenderForServersAwsOfferingMdeAutoProvisioning.class);
- Assertions.assertEquals(false, model.enabled());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingSubPlanTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingSubPlanTests.java
deleted file mode 100644
index 5e77a7807241..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingSubPlanTests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForServersAwsOfferingSubPlan;
-import com.azure.resourcemanager.security.models.SubPlan;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForServersAwsOfferingSubPlanTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForServersAwsOfferingSubPlan model =
- BinaryData.fromString("{\"type\":\"P2\"}").toObject(DefenderForServersAwsOfferingSubPlan.class);
- Assertions.assertEquals(SubPlan.P2, model.type());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForServersAwsOfferingSubPlan model = new DefenderForServersAwsOfferingSubPlan().withType(SubPlan.P2);
- model = BinaryData.fromObject(model).toObject(DefenderForServersAwsOfferingSubPlan.class);
- Assertions.assertEquals(SubPlan.P2, model.type());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingTests.java
deleted file mode 100644
index 90ac29bcec76..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingTests.java
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForServersAwsOffering;
-import com.azure.resourcemanager.security.models.DefenderForServersAwsOfferingArcAutoProvisioning;
-import com.azure.resourcemanager.security.models.DefenderForServersAwsOfferingDefenderForServers;
-import com.azure.resourcemanager.security.models.DefenderForServersAwsOfferingMdeAutoProvisioning;
-import com.azure.resourcemanager.security.models.DefenderForServersAwsOfferingSubPlan;
-import com.azure.resourcemanager.security.models.DefenderForServersAwsOfferingVaAutoProvisioning;
-import com.azure.resourcemanager.security.models.DefenderForServersAwsOfferingVaAutoProvisioningConfiguration;
-import com.azure.resourcemanager.security.models.DefenderForServersAwsOfferingVmScanners;
-import com.azure.resourcemanager.security.models.DefenderForServersAwsOfferingVmScannersConfiguration;
-import com.azure.resourcemanager.security.models.ScanningMode;
-import com.azure.resourcemanager.security.models.SubPlan;
-import com.azure.resourcemanager.security.models.Type;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForServersAwsOfferingTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForServersAwsOffering model =
- BinaryData
- .fromString(
- "{\"offeringType\":\"DefenderForServersAws\",\"defenderForServers\":{\"cloudRoleArn\":\"ril\"},\"arcAutoProvisioning\":{\"enabled\":false,\"cloudRoleArn\":\"qqxvztpbn\"},\"vaAutoProvisioning\":{\"enabled\":false,\"configuration\":{\"type\":\"Qualys\"}},\"mdeAutoProvisioning\":{\"enabled\":false,\"configuration\":\"dataswbnfddepldwqjns\"},\"subPlan\":{\"type\":\"P1\"},\"vmScanners\":{\"enabled\":false,\"configuration\":{\"cloudRoleArn\":\"hvmywhsbrcarycs\",\"scanningMode\":\"Default\",\"exclusionTags\":{\"uvehzptd\":\"oaqa\",\"be\":\"krrbhmpful\",\"ununm\":\"gybpmfb\",\"kdschlzvfictnkjj\":\"zkrvfyi\"}}},\"description\":\"cwnphbkgfyrtogm\"}")
- .toObject(DefenderForServersAwsOffering.class);
- Assertions.assertEquals("ril", model.defenderForServers().cloudRoleArn());
- Assertions.assertEquals(false, model.arcAutoProvisioning().enabled());
- Assertions.assertEquals("qqxvztpbn", model.arcAutoProvisioning().cloudRoleArn());
- Assertions.assertEquals(false, model.vaAutoProvisioning().enabled());
- Assertions.assertEquals(Type.QUALYS, model.vaAutoProvisioning().configuration().type());
- Assertions.assertEquals(false, model.mdeAutoProvisioning().enabled());
- Assertions.assertEquals(SubPlan.P1, model.subPlan().type());
- Assertions.assertEquals(false, model.vmScanners().enabled());
- Assertions.assertEquals("hvmywhsbrcarycs", model.vmScanners().configuration().cloudRoleArn());
- Assertions.assertEquals(ScanningMode.DEFAULT, model.vmScanners().configuration().scanningMode());
- Assertions.assertEquals("oaqa", model.vmScanners().configuration().exclusionTags().get("uvehzptd"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForServersAwsOffering model =
- new DefenderForServersAwsOffering()
- .withDefenderForServers(new DefenderForServersAwsOfferingDefenderForServers().withCloudRoleArn("ril"))
- .withArcAutoProvisioning(
- new DefenderForServersAwsOfferingArcAutoProvisioning()
- .withEnabled(false)
- .withCloudRoleArn("qqxvztpbn"))
- .withVaAutoProvisioning(
- new DefenderForServersAwsOfferingVaAutoProvisioning()
- .withEnabled(false)
- .withConfiguration(
- new DefenderForServersAwsOfferingVaAutoProvisioningConfiguration().withType(Type.QUALYS)))
- .withMdeAutoProvisioning(
- new DefenderForServersAwsOfferingMdeAutoProvisioning()
- .withEnabled(false)
- .withConfiguration("dataswbnfddepldwqjns"))
- .withSubPlan(new DefenderForServersAwsOfferingSubPlan().withType(SubPlan.P1))
- .withVmScanners(
- new DefenderForServersAwsOfferingVmScanners()
- .withEnabled(false)
- .withConfiguration(
- new DefenderForServersAwsOfferingVmScannersConfiguration()
- .withCloudRoleArn("hvmywhsbrcarycs")
- .withScanningMode(ScanningMode.DEFAULT)
- .withExclusionTags(
- mapOf(
- "uvehzptd",
- "oaqa",
- "be",
- "krrbhmpful",
- "ununm",
- "gybpmfb",
- "kdschlzvfictnkjj",
- "zkrvfyi"))));
- model = BinaryData.fromObject(model).toObject(DefenderForServersAwsOffering.class);
- Assertions.assertEquals("ril", model.defenderForServers().cloudRoleArn());
- Assertions.assertEquals(false, model.arcAutoProvisioning().enabled());
- Assertions.assertEquals("qqxvztpbn", model.arcAutoProvisioning().cloudRoleArn());
- Assertions.assertEquals(false, model.vaAutoProvisioning().enabled());
- Assertions.assertEquals(Type.QUALYS, model.vaAutoProvisioning().configuration().type());
- Assertions.assertEquals(false, model.mdeAutoProvisioning().enabled());
- Assertions.assertEquals(SubPlan.P1, model.subPlan().type());
- Assertions.assertEquals(false, model.vmScanners().enabled());
- Assertions.assertEquals("hvmywhsbrcarycs", model.vmScanners().configuration().cloudRoleArn());
- Assertions.assertEquals(ScanningMode.DEFAULT, model.vmScanners().configuration().scanningMode());
- Assertions.assertEquals("oaqa", model.vmScanners().configuration().exclusionTags().get("uvehzptd"));
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingVaAutoProvisioningConfigurationTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingVaAutoProvisioningConfigurationTests.java
deleted file mode 100644
index bf806864b8be..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingVaAutoProvisioningConfigurationTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForServersAwsOfferingVaAutoProvisioningConfiguration;
-import com.azure.resourcemanager.security.models.Type;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForServersAwsOfferingVaAutoProvisioningConfigurationTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForServersAwsOfferingVaAutoProvisioningConfiguration model =
- BinaryData
- .fromString("{\"type\":\"TVM\"}")
- .toObject(DefenderForServersAwsOfferingVaAutoProvisioningConfiguration.class);
- Assertions.assertEquals(Type.TVM, model.type());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForServersAwsOfferingVaAutoProvisioningConfiguration model =
- new DefenderForServersAwsOfferingVaAutoProvisioningConfiguration().withType(Type.TVM);
- model =
- BinaryData.fromObject(model).toObject(DefenderForServersAwsOfferingVaAutoProvisioningConfiguration.class);
- Assertions.assertEquals(Type.TVM, model.type());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingVaAutoProvisioningTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingVaAutoProvisioningTests.java
deleted file mode 100644
index 25e6d925c65e..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingVaAutoProvisioningTests.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForServersAwsOfferingVaAutoProvisioning;
-import com.azure.resourcemanager.security.models.DefenderForServersAwsOfferingVaAutoProvisioningConfiguration;
-import com.azure.resourcemanager.security.models.Type;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForServersAwsOfferingVaAutoProvisioningTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForServersAwsOfferingVaAutoProvisioning model =
- BinaryData
- .fromString("{\"enabled\":false,\"configuration\":{\"type\":\"TVM\"}}")
- .toObject(DefenderForServersAwsOfferingVaAutoProvisioning.class);
- Assertions.assertEquals(false, model.enabled());
- Assertions.assertEquals(Type.TVM, model.configuration().type());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForServersAwsOfferingVaAutoProvisioning model =
- new DefenderForServersAwsOfferingVaAutoProvisioning()
- .withEnabled(false)
- .withConfiguration(
- new DefenderForServersAwsOfferingVaAutoProvisioningConfiguration().withType(Type.TVM));
- model = BinaryData.fromObject(model).toObject(DefenderForServersAwsOfferingVaAutoProvisioning.class);
- Assertions.assertEquals(false, model.enabled());
- Assertions.assertEquals(Type.TVM, model.configuration().type());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingVmScannersConfigurationTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingVmScannersConfigurationTests.java
deleted file mode 100644
index 9110f8a3092f..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingVmScannersConfigurationTests.java
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForServersAwsOfferingVmScannersConfiguration;
-import com.azure.resourcemanager.security.models.ScanningMode;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForServersAwsOfferingVmScannersConfigurationTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForServersAwsOfferingVmScannersConfiguration model =
- BinaryData
- .fromString(
- "{\"cloudRoleArn\":\"drlefgnaavuag\",\"scanningMode\":\"Default\",\"exclusionTags\":{\"hduyeuyldph\":\"outnpdctuhspfefy\"}}")
- .toObject(DefenderForServersAwsOfferingVmScannersConfiguration.class);
- Assertions.assertEquals("drlefgnaavuag", model.cloudRoleArn());
- Assertions.assertEquals(ScanningMode.DEFAULT, model.scanningMode());
- Assertions.assertEquals("outnpdctuhspfefy", model.exclusionTags().get("hduyeuyldph"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForServersAwsOfferingVmScannersConfiguration model =
- new DefenderForServersAwsOfferingVmScannersConfiguration()
- .withCloudRoleArn("drlefgnaavuag")
- .withScanningMode(ScanningMode.DEFAULT)
- .withExclusionTags(mapOf("hduyeuyldph", "outnpdctuhspfefy"));
- model = BinaryData.fromObject(model).toObject(DefenderForServersAwsOfferingVmScannersConfiguration.class);
- Assertions.assertEquals("drlefgnaavuag", model.cloudRoleArn());
- Assertions.assertEquals(ScanningMode.DEFAULT, model.scanningMode());
- Assertions.assertEquals("outnpdctuhspfefy", model.exclusionTags().get("hduyeuyldph"));
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingVmScannersTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingVmScannersTests.java
deleted file mode 100644
index a175e768c4e6..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersAwsOfferingVmScannersTests.java
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForServersAwsOfferingVmScanners;
-import com.azure.resourcemanager.security.models.DefenderForServersAwsOfferingVmScannersConfiguration;
-import com.azure.resourcemanager.security.models.ScanningMode;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForServersAwsOfferingVmScannersTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForServersAwsOfferingVmScanners model =
- BinaryData
- .fromString(
- "{\"enabled\":true,\"configuration\":{\"cloudRoleArn\":\"dqpx\",\"scanningMode\":\"Default\",\"exclusionTags\":{\"gatwmykyu\":\"kft\",\"hpycvjqdvdwkq\":\"rymdwmf\"}}}")
- .toObject(DefenderForServersAwsOfferingVmScanners.class);
- Assertions.assertEquals(true, model.enabled());
- Assertions.assertEquals("dqpx", model.configuration().cloudRoleArn());
- Assertions.assertEquals(ScanningMode.DEFAULT, model.configuration().scanningMode());
- Assertions.assertEquals("kft", model.configuration().exclusionTags().get("gatwmykyu"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForServersAwsOfferingVmScanners model =
- new DefenderForServersAwsOfferingVmScanners()
- .withEnabled(true)
- .withConfiguration(
- new DefenderForServersAwsOfferingVmScannersConfiguration()
- .withCloudRoleArn("dqpx")
- .withScanningMode(ScanningMode.DEFAULT)
- .withExclusionTags(mapOf("gatwmykyu", "kft", "hpycvjqdvdwkq", "rymdwmf")));
- model = BinaryData.fromObject(model).toObject(DefenderForServersAwsOfferingVmScanners.class);
- Assertions.assertEquals(true, model.enabled());
- Assertions.assertEquals("dqpx", model.configuration().cloudRoleArn());
- Assertions.assertEquals(ScanningMode.DEFAULT, model.configuration().scanningMode());
- Assertions.assertEquals("kft", model.configuration().exclusionTags().get("gatwmykyu"));
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersGcpOfferingArcAutoProvisioningTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersGcpOfferingArcAutoProvisioningTests.java
deleted file mode 100644
index 685b426398bd..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersGcpOfferingArcAutoProvisioningTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForServersGcpOfferingArcAutoProvisioning;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForServersGcpOfferingArcAutoProvisioningTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForServersGcpOfferingArcAutoProvisioning model =
- BinaryData
- .fromString("{\"enabled\":false}")
- .toObject(DefenderForServersGcpOfferingArcAutoProvisioning.class);
- Assertions.assertEquals(false, model.enabled());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForServersGcpOfferingArcAutoProvisioning model =
- new DefenderForServersGcpOfferingArcAutoProvisioning().withEnabled(false);
- model = BinaryData.fromObject(model).toObject(DefenderForServersGcpOfferingArcAutoProvisioning.class);
- Assertions.assertEquals(false, model.enabled());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersGcpOfferingDefenderForServersTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersGcpOfferingDefenderForServersTests.java
deleted file mode 100644
index f9196f0c4229..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersGcpOfferingDefenderForServersTests.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForServersGcpOfferingDefenderForServers;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForServersGcpOfferingDefenderForServersTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForServersGcpOfferingDefenderForServers model =
- BinaryData
- .fromString(
- "{\"workloadIdentityProviderId\":\"exleqirccjcl\",\"serviceAccountEmailAddress\":\"cgxvrpj\"}")
- .toObject(DefenderForServersGcpOfferingDefenderForServers.class);
- Assertions.assertEquals("exleqirccjcl", model.workloadIdentityProviderId());
- Assertions.assertEquals("cgxvrpj", model.serviceAccountEmailAddress());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForServersGcpOfferingDefenderForServers model =
- new DefenderForServersGcpOfferingDefenderForServers()
- .withWorkloadIdentityProviderId("exleqirccjcl")
- .withServiceAccountEmailAddress("cgxvrpj");
- model = BinaryData.fromObject(model).toObject(DefenderForServersGcpOfferingDefenderForServers.class);
- Assertions.assertEquals("exleqirccjcl", model.workloadIdentityProviderId());
- Assertions.assertEquals("cgxvrpj", model.serviceAccountEmailAddress());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersGcpOfferingMdeAutoProvisioningTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersGcpOfferingMdeAutoProvisioningTests.java
deleted file mode 100644
index 313d5a2bbb14..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersGcpOfferingMdeAutoProvisioningTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForServersGcpOfferingMdeAutoProvisioning;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForServersGcpOfferingMdeAutoProvisioningTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForServersGcpOfferingMdeAutoProvisioning model =
- BinaryData
- .fromString("{\"enabled\":true,\"configuration\":\"datattepdjxqe\"}")
- .toObject(DefenderForServersGcpOfferingMdeAutoProvisioning.class);
- Assertions.assertEquals(true, model.enabled());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForServersGcpOfferingMdeAutoProvisioning model =
- new DefenderForServersGcpOfferingMdeAutoProvisioning().withEnabled(true).withConfiguration("datattepdjxqe");
- model = BinaryData.fromObject(model).toObject(DefenderForServersGcpOfferingMdeAutoProvisioning.class);
- Assertions.assertEquals(true, model.enabled());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersGcpOfferingSubPlanTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersGcpOfferingSubPlanTests.java
deleted file mode 100644
index f70acd19405e..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersGcpOfferingSubPlanTests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForServersGcpOfferingSubPlan;
-import com.azure.resourcemanager.security.models.SubPlan;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForServersGcpOfferingSubPlanTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForServersGcpOfferingSubPlan model =
- BinaryData.fromString("{\"type\":\"P1\"}").toObject(DefenderForServersGcpOfferingSubPlan.class);
- Assertions.assertEquals(SubPlan.P1, model.type());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForServersGcpOfferingSubPlan model = new DefenderForServersGcpOfferingSubPlan().withType(SubPlan.P1);
- model = BinaryData.fromObject(model).toObject(DefenderForServersGcpOfferingSubPlan.class);
- Assertions.assertEquals(SubPlan.P1, model.type());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersGcpOfferingTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersGcpOfferingTests.java
deleted file mode 100644
index 239f28a5ac78..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersGcpOfferingTests.java
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForServersGcpOffering;
-import com.azure.resourcemanager.security.models.DefenderForServersGcpOfferingArcAutoProvisioning;
-import com.azure.resourcemanager.security.models.DefenderForServersGcpOfferingDefenderForServers;
-import com.azure.resourcemanager.security.models.DefenderForServersGcpOfferingMdeAutoProvisioning;
-import com.azure.resourcemanager.security.models.DefenderForServersGcpOfferingSubPlan;
-import com.azure.resourcemanager.security.models.DefenderForServersGcpOfferingVaAutoProvisioning;
-import com.azure.resourcemanager.security.models.DefenderForServersGcpOfferingVaAutoProvisioningConfiguration;
-import com.azure.resourcemanager.security.models.SubPlan;
-import com.azure.resourcemanager.security.models.Type;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForServersGcpOfferingTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForServersGcpOffering model =
- BinaryData
- .fromString(
- "{\"offeringType\":\"DefenderForServersGcp\",\"defenderForServers\":{\"workloadIdentityProviderId\":\"vaexh\",\"serviceAccountEmailAddress\":\"trceqnkbrupob\"},\"arcAutoProvisioning\":{\"enabled\":false},\"vaAutoProvisioning\":{\"enabled\":false,\"configuration\":{\"type\":\"Qualys\"}},\"mdeAutoProvisioning\":{\"enabled\":false,\"configuration\":\"datajpbi\"},\"subPlan\":{\"type\":\"P2\"},\"description\":\"hep\"}")
- .toObject(DefenderForServersGcpOffering.class);
- Assertions.assertEquals("vaexh", model.defenderForServers().workloadIdentityProviderId());
- Assertions.assertEquals("trceqnkbrupob", model.defenderForServers().serviceAccountEmailAddress());
- Assertions.assertEquals(false, model.arcAutoProvisioning().enabled());
- Assertions.assertEquals(false, model.vaAutoProvisioning().enabled());
- Assertions.assertEquals(Type.QUALYS, model.vaAutoProvisioning().configuration().type());
- Assertions.assertEquals(false, model.mdeAutoProvisioning().enabled());
- Assertions.assertEquals(SubPlan.P2, model.subPlan().type());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForServersGcpOffering model =
- new DefenderForServersGcpOffering()
- .withDefenderForServers(
- new DefenderForServersGcpOfferingDefenderForServers()
- .withWorkloadIdentityProviderId("vaexh")
- .withServiceAccountEmailAddress("trceqnkbrupob"))
- .withArcAutoProvisioning(new DefenderForServersGcpOfferingArcAutoProvisioning().withEnabled(false))
- .withVaAutoProvisioning(
- new DefenderForServersGcpOfferingVaAutoProvisioning()
- .withEnabled(false)
- .withConfiguration(
- new DefenderForServersGcpOfferingVaAutoProvisioningConfiguration().withType(Type.QUALYS)))
- .withMdeAutoProvisioning(
- new DefenderForServersGcpOfferingMdeAutoProvisioning()
- .withEnabled(false)
- .withConfiguration("datajpbi"))
- .withSubPlan(new DefenderForServersGcpOfferingSubPlan().withType(SubPlan.P2));
- model = BinaryData.fromObject(model).toObject(DefenderForServersGcpOffering.class);
- Assertions.assertEquals("vaexh", model.defenderForServers().workloadIdentityProviderId());
- Assertions.assertEquals("trceqnkbrupob", model.defenderForServers().serviceAccountEmailAddress());
- Assertions.assertEquals(false, model.arcAutoProvisioning().enabled());
- Assertions.assertEquals(false, model.vaAutoProvisioning().enabled());
- Assertions.assertEquals(Type.QUALYS, model.vaAutoProvisioning().configuration().type());
- Assertions.assertEquals(false, model.mdeAutoProvisioning().enabled());
- Assertions.assertEquals(SubPlan.P2, model.subPlan().type());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersGcpOfferingVaAutoProvisioningConfigurationTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersGcpOfferingVaAutoProvisioningConfigurationTests.java
deleted file mode 100644
index e136f432681e..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersGcpOfferingVaAutoProvisioningConfigurationTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForServersGcpOfferingVaAutoProvisioningConfiguration;
-import com.azure.resourcemanager.security.models.Type;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForServersGcpOfferingVaAutoProvisioningConfigurationTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForServersGcpOfferingVaAutoProvisioningConfiguration model =
- BinaryData
- .fromString("{\"type\":\"TVM\"}")
- .toObject(DefenderForServersGcpOfferingVaAutoProvisioningConfiguration.class);
- Assertions.assertEquals(Type.TVM, model.type());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForServersGcpOfferingVaAutoProvisioningConfiguration model =
- new DefenderForServersGcpOfferingVaAutoProvisioningConfiguration().withType(Type.TVM);
- model =
- BinaryData.fromObject(model).toObject(DefenderForServersGcpOfferingVaAutoProvisioningConfiguration.class);
- Assertions.assertEquals(Type.TVM, model.type());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersGcpOfferingVaAutoProvisioningTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersGcpOfferingVaAutoProvisioningTests.java
deleted file mode 100644
index eaa99c4f295e..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DefenderForServersGcpOfferingVaAutoProvisioningTests.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DefenderForServersGcpOfferingVaAutoProvisioning;
-import com.azure.resourcemanager.security.models.DefenderForServersGcpOfferingVaAutoProvisioningConfiguration;
-import com.azure.resourcemanager.security.models.Type;
-import org.junit.jupiter.api.Assertions;
-
-public final class DefenderForServersGcpOfferingVaAutoProvisioningTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DefenderForServersGcpOfferingVaAutoProvisioning model =
- BinaryData
- .fromString("{\"enabled\":false,\"configuration\":{\"type\":\"Qualys\"}}")
- .toObject(DefenderForServersGcpOfferingVaAutoProvisioning.class);
- Assertions.assertEquals(false, model.enabled());
- Assertions.assertEquals(Type.QUALYS, model.configuration().type());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DefenderForServersGcpOfferingVaAutoProvisioning model =
- new DefenderForServersGcpOfferingVaAutoProvisioning()
- .withEnabled(false)
- .withConfiguration(
- new DefenderForServersGcpOfferingVaAutoProvisioningConfiguration().withType(Type.QUALYS));
- model = BinaryData.fromObject(model).toObject(DefenderForServersGcpOfferingVaAutoProvisioning.class);
- Assertions.assertEquals(false, model.enabled());
- Assertions.assertEquals(Type.QUALYS, model.configuration().type());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DenylistCustomAlertRuleTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DenylistCustomAlertRuleTests.java
deleted file mode 100644
index ea7b0c7a514e..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DenylistCustomAlertRuleTests.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DenylistCustomAlertRule;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class DenylistCustomAlertRuleTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DenylistCustomAlertRule model =
- BinaryData
- .fromString(
- "{\"ruleType\":\"DenylistCustomAlertRule\",\"denylistValues\":[\"pvhez\",\"kgqhcjrefovg\",\"kqsleyyvxy\"],\"valueType\":\"IpCidr\",\"displayName\":\"cattpngjcrcczsq\",\"description\":\"hvmdajvnysounq\",\"isEnabled\":true}")
- .toObject(DenylistCustomAlertRule.class);
- Assertions.assertEquals(true, model.isEnabled());
- Assertions.assertEquals("pvhez", model.denylistValues().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DenylistCustomAlertRule model =
- new DenylistCustomAlertRule()
- .withIsEnabled(true)
- .withDenylistValues(Arrays.asList("pvhez", "kgqhcjrefovg", "kqsleyyvxy"));
- model = BinaryData.fromObject(model).toObject(DenylistCustomAlertRule.class);
- Assertions.assertEquals(true, model.isEnabled());
- Assertions.assertEquals("pvhez", model.denylistValues().get(0));
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DeviceSecurityGroupInnerTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DeviceSecurityGroupInnerTests.java
deleted file mode 100644
index 024f5c203c8a..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DeviceSecurityGroupInnerTests.java
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.DeviceSecurityGroupInner;
-import com.azure.resourcemanager.security.models.AllowlistCustomAlertRule;
-import com.azure.resourcemanager.security.models.DenylistCustomAlertRule;
-import com.azure.resourcemanager.security.models.ThresholdCustomAlertRule;
-import com.azure.resourcemanager.security.models.TimeWindowCustomAlertRule;
-import java.time.Duration;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class DeviceSecurityGroupInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DeviceSecurityGroupInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"thresholdRules\":[{\"ruleType\":\"ThresholdCustomAlertRule\",\"minThreshold\":438265610,\"maxThreshold\":404172620,\"displayName\":\"nteiwaopv\",\"description\":\"ijcmmx\",\"isEnabled\":true},{\"ruleType\":\"ThresholdCustomAlertRule\",\"minThreshold\":1833473049,\"maxThreshold\":292078453,\"displayName\":\"fsrpymzidnse\",\"description\":\"xtbzsgfyccsne\",\"isEnabled\":true},{\"ruleType\":\"ThresholdCustomAlertRule\",\"minThreshold\":194894857,\"maxThreshold\":2139410059,\"displayName\":\"jeiachboosfl\",\"description\":\"osfqpteehzzv\",\"isEnabled\":false}],\"timeWindowRules\":[{\"ruleType\":\"TimeWindowCustomAlertRule\",\"timeWindowSize\":\"PT53H59M6S\",\"minThreshold\":19452143,\"maxThreshold\":602358321,\"displayName\":\"inpvswjdkirsoodq\",\"description\":\"crmnohjtckwhds\",\"isEnabled\":true},{\"ruleType\":\"TimeWindowCustomAlertRule\",\"timeWindowSize\":\"PT97H38M16S\",\"minThreshold\":491677014,\"maxThreshold\":614073164,\"displayName\":\"pjxsqwpgrjbznor\",\"description\":\"xv\",\"isEnabled\":false},{\"ruleType\":\"TimeWindowCustomAlertRule\",\"timeWindowSize\":\"PT169H20M47S\",\"minThreshold\":1906799262,\"maxThreshold\":1282010157,\"displayName\":\"abnmocpcyshu\",\"description\":\"afbljjgpbtoqcjmk\",\"isEnabled\":true}],\"allowlistRules\":[{\"ruleType\":\"AllowlistCustomAlertRule\",\"allowlistValues\":[],\"valueType\":\"String\",\"displayName\":\"dtqajzyulpkudj\",\"description\":\"lkhbz\",\"isEnabled\":false},{\"ruleType\":\"AllowlistCustomAlertRule\",\"allowlistValues\":[],\"valueType\":\"IpCidr\",\"displayName\":\"zgqexz\",\"description\":\"c\",\"isEnabled\":false}],\"denylistRules\":[{\"ruleType\":\"DenylistCustomAlertRule\",\"denylistValues\":[],\"valueType\":\"String\",\"displayName\":\"rhhbcs\",\"description\":\"ummajtjaod\",\"isEnabled\":true},{\"ruleType\":\"DenylistCustomAlertRule\",\"denylistValues\":[],\"valueType\":\"IpCidr\",\"displayName\":\"dxkqpx\",\"description\":\"ajionpimexgstxg\",\"isEnabled\":false}]},\"id\":\"odgmaajrmvdjwz\",\"name\":\"lovmclwhijcoe\",\"type\":\"ctbzaq\"}")
- .toObject(DeviceSecurityGroupInner.class);
- Assertions.assertEquals(true, model.thresholdRules().get(0).isEnabled());
- Assertions.assertEquals(438265610, model.thresholdRules().get(0).minThreshold());
- Assertions.assertEquals(404172620, model.thresholdRules().get(0).maxThreshold());
- Assertions.assertEquals(true, model.timeWindowRules().get(0).isEnabled());
- Assertions.assertEquals(19452143, model.timeWindowRules().get(0).minThreshold());
- Assertions.assertEquals(602358321, model.timeWindowRules().get(0).maxThreshold());
- Assertions.assertEquals(Duration.parse("PT53H59M6S"), model.timeWindowRules().get(0).timeWindowSize());
- Assertions.assertEquals(false, model.allowlistRules().get(0).isEnabled());
- Assertions.assertEquals(true, model.denylistRules().get(0).isEnabled());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DeviceSecurityGroupInner model =
- new DeviceSecurityGroupInner()
- .withThresholdRules(
- Arrays
- .asList(
- new ThresholdCustomAlertRule()
- .withIsEnabled(true)
- .withMinThreshold(438265610)
- .withMaxThreshold(404172620),
- new ThresholdCustomAlertRule()
- .withIsEnabled(true)
- .withMinThreshold(1833473049)
- .withMaxThreshold(292078453),
- new ThresholdCustomAlertRule()
- .withIsEnabled(false)
- .withMinThreshold(194894857)
- .withMaxThreshold(2139410059)))
- .withTimeWindowRules(
- Arrays
- .asList(
- new TimeWindowCustomAlertRule()
- .withIsEnabled(true)
- .withMinThreshold(19452143)
- .withMaxThreshold(602358321)
- .withTimeWindowSize(Duration.parse("PT53H59M6S")),
- new TimeWindowCustomAlertRule()
- .withIsEnabled(false)
- .withMinThreshold(491677014)
- .withMaxThreshold(614073164)
- .withTimeWindowSize(Duration.parse("PT97H38M16S")),
- new TimeWindowCustomAlertRule()
- .withIsEnabled(true)
- .withMinThreshold(1906799262)
- .withMaxThreshold(1282010157)
- .withTimeWindowSize(Duration.parse("PT169H20M47S"))))
- .withAllowlistRules(
- Arrays
- .asList(
- new AllowlistCustomAlertRule().withIsEnabled(false).withAllowlistValues(Arrays.asList()),
- new AllowlistCustomAlertRule().withIsEnabled(false).withAllowlistValues(Arrays.asList())))
- .withDenylistRules(
- Arrays
- .asList(
- new DenylistCustomAlertRule().withIsEnabled(true).withDenylistValues(Arrays.asList()),
- new DenylistCustomAlertRule().withIsEnabled(false).withDenylistValues(Arrays.asList())));
- model = BinaryData.fromObject(model).toObject(DeviceSecurityGroupInner.class);
- Assertions.assertEquals(true, model.thresholdRules().get(0).isEnabled());
- Assertions.assertEquals(438265610, model.thresholdRules().get(0).minThreshold());
- Assertions.assertEquals(404172620, model.thresholdRules().get(0).maxThreshold());
- Assertions.assertEquals(true, model.timeWindowRules().get(0).isEnabled());
- Assertions.assertEquals(19452143, model.timeWindowRules().get(0).minThreshold());
- Assertions.assertEquals(602358321, model.timeWindowRules().get(0).maxThreshold());
- Assertions.assertEquals(Duration.parse("PT53H59M6S"), model.timeWindowRules().get(0).timeWindowSize());
- Assertions.assertEquals(false, model.allowlistRules().get(0).isEnabled());
- Assertions.assertEquals(true, model.denylistRules().get(0).isEnabled());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DeviceSecurityGroupListTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DeviceSecurityGroupListTests.java
deleted file mode 100644
index 812ecca328c9..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DeviceSecurityGroupListTests.java
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.DeviceSecurityGroupInner;
-import com.azure.resourcemanager.security.models.DeviceSecurityGroupList;
-import java.util.Arrays;
-
-public final class DeviceSecurityGroupListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DeviceSecurityGroupList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"thresholdRules\":[],\"timeWindowRules\":[],\"allowlistRules\":[],\"denylistRules\":[]},\"id\":\"jkcpr\",\"name\":\"nwbxgjvtbvpyssz\",\"type\":\"nruj\"},{\"properties\":{\"thresholdRules\":[],\"timeWindowRules\":[],\"allowlistRules\":[],\"denylistRules\":[]},\"id\":\"ouqfprwz\",\"name\":\"bngui\",\"type\":\"nwui\"},{\"properties\":{\"thresholdRules\":[],\"timeWindowRules\":[],\"allowlistRules\":[],\"denylistRules\":[]},\"id\":\"fizuckyf\",\"name\":\"hr\",\"type\":\"idf\"}],\"nextLink\":\"wdzuhtymwisd\"}")
- .toObject(DeviceSecurityGroupList.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DeviceSecurityGroupList model =
- new DeviceSecurityGroupList()
- .withValue(
- Arrays
- .asList(
- new DeviceSecurityGroupInner()
- .withThresholdRules(Arrays.asList())
- .withTimeWindowRules(Arrays.asList())
- .withAllowlistRules(Arrays.asList())
- .withDenylistRules(Arrays.asList()),
- new DeviceSecurityGroupInner()
- .withThresholdRules(Arrays.asList())
- .withTimeWindowRules(Arrays.asList())
- .withAllowlistRules(Arrays.asList())
- .withDenylistRules(Arrays.asList()),
- new DeviceSecurityGroupInner()
- .withThresholdRules(Arrays.asList())
- .withTimeWindowRules(Arrays.asList())
- .withAllowlistRules(Arrays.asList())
- .withDenylistRules(Arrays.asList())));
- model = BinaryData.fromObject(model).toObject(DeviceSecurityGroupList.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DeviceSecurityGroupPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DeviceSecurityGroupPropertiesTests.java
deleted file mode 100644
index ad886593f7ae..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DeviceSecurityGroupPropertiesTests.java
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.DeviceSecurityGroupProperties;
-import com.azure.resourcemanager.security.models.AllowlistCustomAlertRule;
-import com.azure.resourcemanager.security.models.DenylistCustomAlertRule;
-import com.azure.resourcemanager.security.models.ThresholdCustomAlertRule;
-import com.azure.resourcemanager.security.models.TimeWindowCustomAlertRule;
-import java.time.Duration;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class DeviceSecurityGroupPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DeviceSecurityGroupProperties model =
- BinaryData
- .fromString(
- "{\"thresholdRules\":[{\"ruleType\":\"ThresholdCustomAlertRule\",\"minThreshold\":169768909,\"maxThreshold\":1712979680,\"displayName\":\"kbfkg\",\"description\":\"dkexxppofm\",\"isEnabled\":true},{\"ruleType\":\"ThresholdCustomAlertRule\",\"minThreshold\":159547648,\"maxThreshold\":54654595,\"displayName\":\"jpgd\",\"description\":\"ocjjxhvpmouexh\",\"isEnabled\":false}],\"timeWindowRules\":[{\"ruleType\":\"TimeWindowCustomAlertRule\",\"timeWindowSize\":\"PT63H16M48S\",\"minThreshold\":1730783579,\"maxThreshold\":996013729,\"displayName\":\"jnxqbzvddntwn\",\"description\":\"icbtwnpzao\",\"isEnabled\":true}],\"allowlistRules\":[{\"ruleType\":\"AllowlistCustomAlertRule\",\"allowlistValues\":[\"hcffcyddglmjthjq\",\"wpyeicxmqciwqvh\",\"hix\"],\"valueType\":\"String\",\"displayName\":\"topbobjogh\",\"description\":\"w\",\"isEnabled\":false},{\"ruleType\":\"AllowlistCustomAlertRule\",\"allowlistValues\":[\"a\"],\"valueType\":\"IpCidr\",\"displayName\":\"ayvvtpgvdf\",\"description\":\"otkftutqxlngx\",\"isEnabled\":false},{\"ruleType\":\"AllowlistCustomAlertRule\",\"allowlistValues\":[\"gug\",\"xkrxdqmi\",\"tthzrvqd\",\"abhjybi\"],\"valueType\":\"IpCidr\",\"displayName\":\"qfbow\",\"description\":\"anyktzlcuiywg\",\"isEnabled\":false},{\"ruleType\":\"AllowlistCustomAlertRule\",\"allowlistValues\":[\"gndrvynh\",\"gpphrcgyn\",\"ocpecfvmmco\",\"fsxlzevgbmqjqa\"],\"valueType\":\"IpCidr\",\"displayName\":\"mivkwlzuvcc\",\"description\":\"nfnbacfionlebxe\",\"isEnabled\":false}],\"denylistRules\":[{\"ruleType\":\"DenylistCustomAlertRule\",\"denylistValues\":[\"xdpnqbqq\",\"xrjfeallnwsub\",\"snjampmng\"],\"valueType\":\"IpCidr\",\"displayName\":\"xaqwoochcbonqv\",\"description\":\"vlrxnjeaseiph\",\"isEnabled\":false},{\"ruleType\":\"DenylistCustomAlertRule\",\"denylistValues\":[\"lokeyy\"],\"valueType\":\"IpCidr\",\"displayName\":\"bdlwtgrhpdjpj\",\"description\":\"asxazjpqyegualhb\",\"isEnabled\":true},{\"ruleType\":\"DenylistCustomAlertRule\",\"denylistValues\":[\"e\",\"jzzvdud\"],\"valueType\":\"String\",\"displayName\":\"lfh\",\"description\":\"wmc\",\"isEnabled\":true}]}")
- .toObject(DeviceSecurityGroupProperties.class);
- Assertions.assertEquals(true, model.thresholdRules().get(0).isEnabled());
- Assertions.assertEquals(169768909, model.thresholdRules().get(0).minThreshold());
- Assertions.assertEquals(1712979680, model.thresholdRules().get(0).maxThreshold());
- Assertions.assertEquals(true, model.timeWindowRules().get(0).isEnabled());
- Assertions.assertEquals(1730783579, model.timeWindowRules().get(0).minThreshold());
- Assertions.assertEquals(996013729, model.timeWindowRules().get(0).maxThreshold());
- Assertions.assertEquals(Duration.parse("PT63H16M48S"), model.timeWindowRules().get(0).timeWindowSize());
- Assertions.assertEquals(false, model.allowlistRules().get(0).isEnabled());
- Assertions.assertEquals("hcffcyddglmjthjq", model.allowlistRules().get(0).allowlistValues().get(0));
- Assertions.assertEquals(false, model.denylistRules().get(0).isEnabled());
- Assertions.assertEquals("xdpnqbqq", model.denylistRules().get(0).denylistValues().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DeviceSecurityGroupProperties model =
- new DeviceSecurityGroupProperties()
- .withThresholdRules(
- Arrays
- .asList(
- new ThresholdCustomAlertRule()
- .withIsEnabled(true)
- .withMinThreshold(169768909)
- .withMaxThreshold(1712979680),
- new ThresholdCustomAlertRule()
- .withIsEnabled(false)
- .withMinThreshold(159547648)
- .withMaxThreshold(54654595)))
- .withTimeWindowRules(
- Arrays
- .asList(
- new TimeWindowCustomAlertRule()
- .withIsEnabled(true)
- .withMinThreshold(1730783579)
- .withMaxThreshold(996013729)
- .withTimeWindowSize(Duration.parse("PT63H16M48S"))))
- .withAllowlistRules(
- Arrays
- .asList(
- new AllowlistCustomAlertRule()
- .withIsEnabled(false)
- .withAllowlistValues(Arrays.asList("hcffcyddglmjthjq", "wpyeicxmqciwqvh", "hix")),
- new AllowlistCustomAlertRule().withIsEnabled(false).withAllowlistValues(Arrays.asList("a")),
- new AllowlistCustomAlertRule()
- .withIsEnabled(false)
- .withAllowlistValues(Arrays.asList("gug", "xkrxdqmi", "tthzrvqd", "abhjybi")),
- new AllowlistCustomAlertRule()
- .withIsEnabled(false)
- .withAllowlistValues(
- Arrays.asList("gndrvynh", "gpphrcgyn", "ocpecfvmmco", "fsxlzevgbmqjqa"))))
- .withDenylistRules(
- Arrays
- .asList(
- new DenylistCustomAlertRule()
- .withIsEnabled(false)
- .withDenylistValues(Arrays.asList("xdpnqbqq", "xrjfeallnwsub", "snjampmng")),
- new DenylistCustomAlertRule()
- .withIsEnabled(true)
- .withDenylistValues(Arrays.asList("lokeyy")),
- new DenylistCustomAlertRule()
- .withIsEnabled(true)
- .withDenylistValues(Arrays.asList("e", "jzzvdud"))));
- model = BinaryData.fromObject(model).toObject(DeviceSecurityGroupProperties.class);
- Assertions.assertEquals(true, model.thresholdRules().get(0).isEnabled());
- Assertions.assertEquals(169768909, model.thresholdRules().get(0).minThreshold());
- Assertions.assertEquals(1712979680, model.thresholdRules().get(0).maxThreshold());
- Assertions.assertEquals(true, model.timeWindowRules().get(0).isEnabled());
- Assertions.assertEquals(1730783579, model.timeWindowRules().get(0).minThreshold());
- Assertions.assertEquals(996013729, model.timeWindowRules().get(0).maxThreshold());
- Assertions.assertEquals(Duration.parse("PT63H16M48S"), model.timeWindowRules().get(0).timeWindowSize());
- Assertions.assertEquals(false, model.allowlistRules().get(0).isEnabled());
- Assertions.assertEquals("hcffcyddglmjthjq", model.allowlistRules().get(0).allowlistValues().get(0));
- Assertions.assertEquals(false, model.denylistRules().get(0).isEnabled());
- Assertions.assertEquals("xdpnqbqq", model.denylistRules().get(0).denylistValues().get(0));
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DeviceSecurityGroupsCreateOrUpdateWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DeviceSecurityGroupsCreateOrUpdateWithResponseMockTests.java
deleted file mode 100644
index f00d9ff29f32..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DeviceSecurityGroupsCreateOrUpdateWithResponseMockTests.java
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.DeviceSecurityGroup;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DeviceSecurityGroupsCreateOrUpdateWithResponseMockTests {
- @Test
- public void testCreateOrUpdateWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"thresholdRules\":[],\"timeWindowRules\":[],\"allowlistRules\":[],\"denylistRules\":[]},\"id\":\"gglmvoka\",\"name\":\"uztjct\",\"type\":\"bpvbkaehxsmzygd\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- DeviceSecurityGroup response =
- manager
- .deviceSecurityGroups()
- .define("pntghyks")
- .withExistingResourceId("tuadxkxeqb")
- .withThresholdRules(Arrays.asList())
- .withTimeWindowRules(Arrays.asList())
- .withAllowlistRules(Arrays.asList())
- .withDenylistRules(Arrays.asList())
- .create();
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DeviceSecurityGroupsDeleteByResourceGroupWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DeviceSecurityGroupsDeleteByResourceGroupWithResponseMockTests.java
deleted file mode 100644
index 3b54b5f07e20..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DeviceSecurityGroupsDeleteByResourceGroupWithResponseMockTests.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DeviceSecurityGroupsDeleteByResourceGroupWithResponseMockTests {
- @Test
- public void testDeleteWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .deviceSecurityGroups()
- .deleteByResourceGroupWithResponse("nsxzajlns", "hwjuyxxbxqvmvua", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DeviceSecurityGroupsGetWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DeviceSecurityGroupsGetWithResponseMockTests.java
deleted file mode 100644
index 7a91b139d01d..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DeviceSecurityGroupsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.DeviceSecurityGroup;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DeviceSecurityGroupsGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"thresholdRules\":[],\"timeWindowRules\":[],\"allowlistRules\":[],\"denylistRules\":[]},\"id\":\"rvpe\",\"name\":\"yc\",\"type\":\"veitit\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- DeviceSecurityGroup response =
- manager
- .deviceSecurityGroups()
- .getWithResponse("aqotwfhipxwgsabv", "ipowza", com.azure.core.util.Context.NONE)
- .getValue();
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DeviceSecurityGroupsListMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DeviceSecurityGroupsListMockTests.java
deleted file mode 100644
index 519046717ae9..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DeviceSecurityGroupsListMockTests.java
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.DeviceSecurityGroup;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DeviceSecurityGroupsListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"thresholdRules\":[],\"timeWindowRules\":[],\"allowlistRules\":[],\"denylistRules\":[]},\"id\":\"ttzgixgyrihlg\",\"name\":\"gbehlqtxnr\",\"type\":\"lkndrndpgfjodh\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.deviceSecurityGroups().list("xdncaqtt", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DirectMethodInvokesNotInAllowedRangeTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DirectMethodInvokesNotInAllowedRangeTests.java
deleted file mode 100644
index f97035da14bf..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DirectMethodInvokesNotInAllowedRangeTests.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.DirectMethodInvokesNotInAllowedRange;
-import java.time.Duration;
-import org.junit.jupiter.api.Assertions;
-
-public final class DirectMethodInvokesNotInAllowedRangeTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DirectMethodInvokesNotInAllowedRange model =
- BinaryData
- .fromString(
- "{\"ruleType\":\"DirectMethodInvokesNotInAllowedRange\",\"timeWindowSize\":\"PT198H54M37S\",\"minThreshold\":476273145,\"maxThreshold\":848220252,\"displayName\":\"djodqhy\",\"description\":\"ncn\",\"isEnabled\":true}")
- .toObject(DirectMethodInvokesNotInAllowedRange.class);
- Assertions.assertEquals(true, model.isEnabled());
- Assertions.assertEquals(476273145, model.minThreshold());
- Assertions.assertEquals(848220252, model.maxThreshold());
- Assertions.assertEquals(Duration.parse("PT198H54M37S"), model.timeWindowSize());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DirectMethodInvokesNotInAllowedRange model =
- new DirectMethodInvokesNotInAllowedRange()
- .withIsEnabled(true)
- .withMinThreshold(476273145)
- .withMaxThreshold(848220252)
- .withTimeWindowSize(Duration.parse("PT198H54M37S"));
- model = BinaryData.fromObject(model).toObject(DirectMethodInvokesNotInAllowedRange.class);
- Assertions.assertEquals(true, model.isEnabled());
- Assertions.assertEquals(476273145, model.minThreshold());
- Assertions.assertEquals(848220252, model.maxThreshold());
- Assertions.assertEquals(Duration.parse("PT198H54M37S"), model.timeWindowSize());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DiscoveredSecuritySolutionInnerTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DiscoveredSecuritySolutionInnerTests.java
deleted file mode 100644
index cb5568d6247e..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DiscoveredSecuritySolutionInnerTests.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.DiscoveredSecuritySolutionInner;
-import com.azure.resourcemanager.security.models.SecurityFamily;
-import org.junit.jupiter.api.Assertions;
-
-public final class DiscoveredSecuritySolutionInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DiscoveredSecuritySolutionInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"securityFamily\":\"Waf\",\"offer\":\"pbswvefloccsrm\",\"publisher\":\"zihmipgawtxxpky\",\"sku\":\"cxcjxgry\"},\"location\":\"mpcycilrmcaykgg\",\"id\":\"oxuztrksx\",\"name\":\"pndfcpfnznt\",\"type\":\"jtwkjaos\"}")
- .toObject(DiscoveredSecuritySolutionInner.class);
- Assertions.assertEquals(SecurityFamily.WAF, model.securityFamily());
- Assertions.assertEquals("pbswvefloccsrm", model.offer());
- Assertions.assertEquals("zihmipgawtxxpky", model.publisher());
- Assertions.assertEquals("cxcjxgry", model.sku());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DiscoveredSecuritySolutionInner model =
- new DiscoveredSecuritySolutionInner()
- .withSecurityFamily(SecurityFamily.WAF)
- .withOffer("pbswvefloccsrm")
- .withPublisher("zihmipgawtxxpky")
- .withSku("cxcjxgry");
- model = BinaryData.fromObject(model).toObject(DiscoveredSecuritySolutionInner.class);
- Assertions.assertEquals(SecurityFamily.WAF, model.securityFamily());
- Assertions.assertEquals("pbswvefloccsrm", model.offer());
- Assertions.assertEquals("zihmipgawtxxpky", model.publisher());
- Assertions.assertEquals("cxcjxgry", model.sku());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DiscoveredSecuritySolutionListTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DiscoveredSecuritySolutionListTests.java
deleted file mode 100644
index 6014a76ff0f3..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DiscoveredSecuritySolutionListTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.DiscoveredSecuritySolutionInner;
-import com.azure.resourcemanager.security.models.DiscoveredSecuritySolutionList;
-import com.azure.resourcemanager.security.models.SecurityFamily;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class DiscoveredSecuritySolutionListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DiscoveredSecuritySolutionList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"securityFamily\":\"Ngfw\",\"offer\":\"ptfujgicgaaoept\",\"publisher\":\"aqutdewemxswvruu\",\"sku\":\"zzjgehkfki\"},\"location\":\"tixo\",\"id\":\"ffqyinlj\",\"name\":\"epqw\",\"type\":\"ixmonstshiyxg\"},{\"properties\":{\"securityFamily\":\"SaasWaf\",\"offer\":\"lfcldu\",\"publisher\":\"cb\",\"sku\":\"rds\"},\"location\":\"wcobie\",\"id\":\"stmninwjizcilng\",\"name\":\"gshejjtbxqmulux\",\"type\":\"xqzv\"},{\"properties\":{\"securityFamily\":\"Waf\",\"offer\":\"rsbycucrwn\",\"publisher\":\"mikzeb\",\"sku\":\"qbsms\"},\"location\":\"iqg\",\"id\":\"uhok\",\"name\":\"ruswhv\",\"type\":\"czznvfbycjsxj\"},{\"properties\":{\"securityFamily\":\"Waf\",\"offer\":\"i\",\"publisher\":\"z\",\"sku\":\"umwmxqhnd\"},\"location\":\"oamld\",\"id\":\"ehaohdjhh\",\"name\":\"lzok\",\"type\":\"coxpelnjeta\"}],\"nextLink\":\"tsxoatftgz\"}")
- .toObject(DiscoveredSecuritySolutionList.class);
- Assertions.assertEquals(SecurityFamily.NGFW, model.value().get(0).securityFamily());
- Assertions.assertEquals("ptfujgicgaaoept", model.value().get(0).offer());
- Assertions.assertEquals("aqutdewemxswvruu", model.value().get(0).publisher());
- Assertions.assertEquals("zzjgehkfki", model.value().get(0).sku());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DiscoveredSecuritySolutionList model =
- new DiscoveredSecuritySolutionList()
- .withValue(
- Arrays
- .asList(
- new DiscoveredSecuritySolutionInner()
- .withSecurityFamily(SecurityFamily.NGFW)
- .withOffer("ptfujgicgaaoept")
- .withPublisher("aqutdewemxswvruu")
- .withSku("zzjgehkfki"),
- new DiscoveredSecuritySolutionInner()
- .withSecurityFamily(SecurityFamily.SAAS_WAF)
- .withOffer("lfcldu")
- .withPublisher("cb")
- .withSku("rds"),
- new DiscoveredSecuritySolutionInner()
- .withSecurityFamily(SecurityFamily.WAF)
- .withOffer("rsbycucrwn")
- .withPublisher("mikzeb")
- .withSku("qbsms"),
- new DiscoveredSecuritySolutionInner()
- .withSecurityFamily(SecurityFamily.WAF)
- .withOffer("i")
- .withPublisher("z")
- .withSku("umwmxqhnd")));
- model = BinaryData.fromObject(model).toObject(DiscoveredSecuritySolutionList.class);
- Assertions.assertEquals(SecurityFamily.NGFW, model.value().get(0).securityFamily());
- Assertions.assertEquals("ptfujgicgaaoept", model.value().get(0).offer());
- Assertions.assertEquals("aqutdewemxswvruu", model.value().get(0).publisher());
- Assertions.assertEquals("zzjgehkfki", model.value().get(0).sku());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DiscoveredSecuritySolutionPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DiscoveredSecuritySolutionPropertiesTests.java
deleted file mode 100644
index 0c9f26a3f1b1..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DiscoveredSecuritySolutionPropertiesTests.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.DiscoveredSecuritySolutionProperties;
-import com.azure.resourcemanager.security.models.SecurityFamily;
-import org.junit.jupiter.api.Assertions;
-
-public final class DiscoveredSecuritySolutionPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DiscoveredSecuritySolutionProperties model =
- BinaryData
- .fromString(
- "{\"securityFamily\":\"SaasWaf\",\"offer\":\"uzvoamktcqiosm\",\"publisher\":\"bzahgxqd\",\"sku\":\"yrtltlaprltzkat\"}")
- .toObject(DiscoveredSecuritySolutionProperties.class);
- Assertions.assertEquals(SecurityFamily.SAAS_WAF, model.securityFamily());
- Assertions.assertEquals("uzvoamktcqiosm", model.offer());
- Assertions.assertEquals("bzahgxqd", model.publisher());
- Assertions.assertEquals("yrtltlaprltzkat", model.sku());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DiscoveredSecuritySolutionProperties model =
- new DiscoveredSecuritySolutionProperties()
- .withSecurityFamily(SecurityFamily.SAAS_WAF)
- .withOffer("uzvoamktcqiosm")
- .withPublisher("bzahgxqd")
- .withSku("yrtltlaprltzkat");
- model = BinaryData.fromObject(model).toObject(DiscoveredSecuritySolutionProperties.class);
- Assertions.assertEquals(SecurityFamily.SAAS_WAF, model.securityFamily());
- Assertions.assertEquals("uzvoamktcqiosm", model.offer());
- Assertions.assertEquals("bzahgxqd", model.publisher());
- Assertions.assertEquals("yrtltlaprltzkat", model.sku());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DiscoveredSecuritySolutionsGetWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DiscoveredSecuritySolutionsGetWithResponseMockTests.java
deleted file mode 100644
index 810e09db86af..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DiscoveredSecuritySolutionsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.DiscoveredSecuritySolution;
-import com.azure.resourcemanager.security.models.SecurityFamily;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DiscoveredSecuritySolutionsGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"securityFamily\":\"Va\",\"offer\":\"azpzdqwuz\",\"publisher\":\"cmcokxizekuv\",\"sku\":\"rjwuca\"},\"location\":\"zvajbvbnkrdem\",\"id\":\"idackzidgzwdyd\",\"name\":\"misvpztd\",\"type\":\"vykpxkqe\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- DiscoveredSecuritySolution response =
- manager
- .discoveredSecuritySolutions()
- .getWithResponse("ard", "vs", "c", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals(SecurityFamily.VA, response.securityFamily());
- Assertions.assertEquals("azpzdqwuz", response.offer());
- Assertions.assertEquals("cmcokxizekuv", response.publisher());
- Assertions.assertEquals("rjwuca", response.sku());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DiscoveredSecuritySolutionsListByHomeRegionMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DiscoveredSecuritySolutionsListByHomeRegionMockTests.java
deleted file mode 100644
index 56540cdac090..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DiscoveredSecuritySolutionsListByHomeRegionMockTests.java
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.DiscoveredSecuritySolution;
-import com.azure.resourcemanager.security.models.SecurityFamily;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DiscoveredSecuritySolutionsListByHomeRegionMockTests {
- @Test
- public void testListByHomeRegion() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"securityFamily\":\"Va\",\"offer\":\"dlhvdv\",\"publisher\":\"iphbeaeqjzmhk\",\"sku\":\"clacr\"},\"location\":\"zfmunerkelux\",\"id\":\"shxzezb\",\"name\":\"uzudlevzskejcg\",\"type\":\"fsgqkstyecupyuij\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.discoveredSecuritySolutions().listByHomeRegion("xlniwmcpm", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals(SecurityFamily.VA, response.iterator().next().securityFamily());
- Assertions.assertEquals("dlhvdv", response.iterator().next().offer());
- Assertions.assertEquals("iphbeaeqjzmhk", response.iterator().next().publisher());
- Assertions.assertEquals("clacr", response.iterator().next().sku());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DiscoveredSecuritySolutionsListMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DiscoveredSecuritySolutionsListMockTests.java
deleted file mode 100644
index 2104f3e8dca0..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/DiscoveredSecuritySolutionsListMockTests.java
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.DiscoveredSecuritySolution;
-import com.azure.resourcemanager.security.models.SecurityFamily;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DiscoveredSecuritySolutionsListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"securityFamily\":\"Va\",\"offer\":\"zqazvb\",\"publisher\":\"arkptgongruatsyi\",\"sku\":\"sjqhenigbeqngu\"},\"location\":\"byjdeayscse\",\"id\":\"d\",\"name\":\"jemexmnv\",\"type\":\"vmuw\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.discoveredSecuritySolutions().list(com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals(SecurityFamily.VA, response.iterator().next().securityFamily());
- Assertions.assertEquals("zqazvb", response.iterator().next().offer());
- Assertions.assertEquals("arkptgongruatsyi", response.iterator().next().publisher());
- Assertions.assertEquals("sjqhenigbeqngu", response.iterator().next().sku());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/EffectiveNetworkSecurityGroupsTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/EffectiveNetworkSecurityGroupsTests.java
deleted file mode 100644
index 27e2fa27461e..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/EffectiveNetworkSecurityGroupsTests.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.EffectiveNetworkSecurityGroups;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class EffectiveNetworkSecurityGroupsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EffectiveNetworkSecurityGroups model =
- BinaryData
- .fromString(
- "{\"networkInterface\":\"aeranokqgukkjqnv\",\"networkSecurityGroups\":[\"ylaxxulcdi\",\"dosfjbjsvgjrw\"]}")
- .toObject(EffectiveNetworkSecurityGroups.class);
- Assertions.assertEquals("aeranokqgukkjqnv", model.networkInterface());
- Assertions.assertEquals("ylaxxulcdi", model.networkSecurityGroups().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EffectiveNetworkSecurityGroups model =
- new EffectiveNetworkSecurityGroups()
- .withNetworkInterface("aeranokqgukkjqnv")
- .withNetworkSecurityGroups(Arrays.asList("ylaxxulcdi", "dosfjbjsvgjrw"));
- model = BinaryData.fromObject(model).toObject(EffectiveNetworkSecurityGroups.class);
- Assertions.assertEquals("aeranokqgukkjqnv", model.networkInterface());
- Assertions.assertEquals("ylaxxulcdi", model.networkSecurityGroups().get(0));
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/EnvironmentDataTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/EnvironmentDataTests.java
deleted file mode 100644
index b86d82d1f6e7..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/EnvironmentDataTests.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.EnvironmentData;
-
-public final class EnvironmentDataTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EnvironmentData model =
- BinaryData.fromString("{\"environmentType\":\"EnvironmentData\"}").toObject(EnvironmentData.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EnvironmentData model = new EnvironmentData();
- model = BinaryData.fromObject(model).toObject(EnvironmentData.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/EnvironmentDetailsTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/EnvironmentDetailsTests.java
deleted file mode 100644
index 4c739f60b87f..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/EnvironmentDetailsTests.java
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.EnvironmentDetails;
-import org.junit.jupiter.api.Assertions;
-
-public final class EnvironmentDetailsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EnvironmentDetails model =
- BinaryData
- .fromString(
- "{\"nativeResourceId\":\"dotjvdk\",\"environmentHierarchyId\":\"swskuk\",\"organizationalHierarchyId\":\"asbvw\",\"subscriptionId\":\"pkxkdtxfk\",\"tenantId\":\"lq\"}")
- .toObject(EnvironmentDetails.class);
- Assertions.assertEquals("dotjvdk", model.nativeResourceId());
- Assertions.assertEquals("swskuk", model.environmentHierarchyId());
- Assertions.assertEquals("asbvw", model.organizationalHierarchyId());
- Assertions.assertEquals("pkxkdtxfk", model.subscriptionId());
- Assertions.assertEquals("lq", model.tenantId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EnvironmentDetails model =
- new EnvironmentDetails()
- .withNativeResourceId("dotjvdk")
- .withEnvironmentHierarchyId("swskuk")
- .withOrganizationalHierarchyId("asbvw")
- .withSubscriptionId("pkxkdtxfk")
- .withTenantId("lq");
- model = BinaryData.fromObject(model).toObject(EnvironmentDetails.class);
- Assertions.assertEquals("dotjvdk", model.nativeResourceId());
- Assertions.assertEquals("swskuk", model.environmentHierarchyId());
- Assertions.assertEquals("asbvw", model.organizationalHierarchyId());
- Assertions.assertEquals("pkxkdtxfk", model.subscriptionId());
- Assertions.assertEquals("lq", model.tenantId());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/EtagTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/EtagTests.java
deleted file mode 100644
index f338b94dfa01..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/EtagTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.Etag;
-import org.junit.jupiter.api.Assertions;
-
-public final class EtagTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- Etag model = BinaryData.fromString("{\"etag\":\"jw\"}").toObject(Etag.class);
- Assertions.assertEquals("jw", model.etag());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- Etag model = new Etag().withEtag("jw");
- model = BinaryData.fromObject(model).toObject(Etag.class);
- Assertions.assertEquals("jw", model.etag());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ExecuteGovernanceRuleParamsTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ExecuteGovernanceRuleParamsTests.java
deleted file mode 100644
index ae5bc94262af..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ExecuteGovernanceRuleParamsTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.ExecuteGovernanceRuleParams;
-import org.junit.jupiter.api.Assertions;
-
-public final class ExecuteGovernanceRuleParamsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ExecuteGovernanceRuleParams model =
- BinaryData.fromString("{\"override\":false}").toObject(ExecuteGovernanceRuleParams.class);
- Assertions.assertEquals(false, model.override());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ExecuteGovernanceRuleParams model = new ExecuteGovernanceRuleParams().withOverride(false);
- model = BinaryData.fromObject(model).toObject(ExecuteGovernanceRuleParams.class);
- Assertions.assertEquals(false, model.override());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ExternalSecuritySolutionInnerTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ExternalSecuritySolutionInnerTests.java
deleted file mode 100644
index c7243563ce05..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ExternalSecuritySolutionInnerTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.ExternalSecuritySolutionInner;
-
-public final class ExternalSecuritySolutionInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ExternalSecuritySolutionInner model =
- BinaryData
- .fromString(
- "{\"kind\":\"ExternalSecuritySolution\",\"location\":\"ddoui\",\"id\":\"amowaziynknlqwzd\",\"name\":\"piwhxqs\",\"type\":\"dtmaa\"}")
- .toObject(ExternalSecuritySolutionInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ExternalSecuritySolutionInner model = new ExternalSecuritySolutionInner();
- model = BinaryData.fromObject(model).toObject(ExternalSecuritySolutionInner.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ExternalSecuritySolutionListTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ExternalSecuritySolutionListTests.java
deleted file mode 100644
index 2df85c8b0656..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ExternalSecuritySolutionListTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.ExternalSecuritySolutionInner;
-import com.azure.resourcemanager.security.models.ExternalSecuritySolutionList;
-import java.util.Arrays;
-
-public final class ExternalSecuritySolutionListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ExternalSecuritySolutionList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"kind\":\"ExternalSecuritySolution\",\"location\":\"ozxwopd\",\"id\":\"yd\",\"name\":\"izqaclnapxbiyg\",\"type\":\"ugjknf\"},{\"kind\":\"ExternalSecuritySolution\",\"location\":\"fcttuxuuyilfl\",\"id\":\"oiquvrehmrnjhvs\",\"name\":\"jztczytqj\",\"type\":\"w\"}],\"nextLink\":\"uunfprnjletlxsm\"}")
- .toObject(ExternalSecuritySolutionList.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ExternalSecuritySolutionList model =
- new ExternalSecuritySolutionList()
- .withValue(Arrays.asList(new ExternalSecuritySolutionInner(), new ExternalSecuritySolutionInner()));
- model = BinaryData.fromObject(model).toObject(ExternalSecuritySolutionList.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ExternalSecuritySolutionPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ExternalSecuritySolutionPropertiesTests.java
deleted file mode 100644
index 3292c0dbd37c..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ExternalSecuritySolutionPropertiesTests.java
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.ConnectedWorkspace;
-import com.azure.resourcemanager.security.models.ExternalSecuritySolutionProperties;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ExternalSecuritySolutionPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ExternalSecuritySolutionProperties model =
- BinaryData
- .fromString(
- "{\"deviceVendor\":\"jc\",\"deviceType\":\"a\",\"workspace\":{\"id\":\"z\"},\"\":{\"qjf\":\"datakbnrzorpdltbqc\"}}")
- .toObject(ExternalSecuritySolutionProperties.class);
- Assertions.assertEquals("jc", model.deviceVendor());
- Assertions.assertEquals("a", model.deviceType());
- Assertions.assertEquals("z", model.workspace().id());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ExternalSecuritySolutionProperties model =
- new ExternalSecuritySolutionProperties()
- .withDeviceVendor("jc")
- .withDeviceType("a")
- .withWorkspace(new ConnectedWorkspace().withId("z"))
- .withAdditionalProperties(mapOf());
- model = BinaryData.fromObject(model).toObject(ExternalSecuritySolutionProperties.class);
- Assertions.assertEquals("jc", model.deviceVendor());
- Assertions.assertEquals("a", model.deviceType());
- Assertions.assertEquals("z", model.workspace().id());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ExternalSecuritySolutionsGetWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ExternalSecuritySolutionsGetWithResponseMockTests.java
deleted file mode 100644
index 51d47a888a28..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ExternalSecuritySolutionsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.ExternalSecuritySolution;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ExternalSecuritySolutionsGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"kind\":\"ExternalSecuritySolution\",\"location\":\"likyohz\",\"id\":\"xyqhfnkvycqqqd\",\"name\":\"eipnquwzx\",\"type\":\"rptyo\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- ExternalSecuritySolution response =
- manager
- .externalSecuritySolutions()
- .getWithResponse("gxfqpan", "ceov", "gzwhsxyrujmtik", com.azure.core.util.Context.NONE)
- .getValue();
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ExternalSecuritySolutionsListByHomeRegionMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ExternalSecuritySolutionsListByHomeRegionMockTests.java
deleted file mode 100644
index ba0cb9140594..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ExternalSecuritySolutionsListByHomeRegionMockTests.java
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.ExternalSecuritySolution;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ExternalSecuritySolutionsListByHomeRegionMockTests {
- @Test
- public void testListByHomeRegion() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"kind\":\"ExternalSecuritySolution\",\"location\":\"at\",\"id\":\"izexroqsqj\",\"name\":\"hrmt\",\"type\":\"splwsttxs\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.externalSecuritySolutions().listByHomeRegion("wtxzuisam", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ExternalSecuritySolutionsListMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ExternalSecuritySolutionsListMockTests.java
deleted file mode 100644
index 7b30488c3d63..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/ExternalSecuritySolutionsListMockTests.java
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.ExternalSecuritySolution;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class ExternalSecuritySolutionsListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"kind\":\"ExternalSecuritySolution\",\"location\":\"jrmfqzwqd\",\"id\":\"xkeedcnwmy\",\"name\":\"xfqzkvemyzd\",\"type\":\"czaqpqifdbmpt\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.externalSecuritySolutions().list(com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/FailedLocalLoginsNotInAllowedRangeTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/FailedLocalLoginsNotInAllowedRangeTests.java
deleted file mode 100644
index e72058d6df76..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/FailedLocalLoginsNotInAllowedRangeTests.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.FailedLocalLoginsNotInAllowedRange;
-import java.time.Duration;
-import org.junit.jupiter.api.Assertions;
-
-public final class FailedLocalLoginsNotInAllowedRangeTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- FailedLocalLoginsNotInAllowedRange model =
- BinaryData
- .fromString(
- "{\"ruleType\":\"FailedLocalLoginsNotInAllowedRange\",\"timeWindowSize\":\"PT66H50M42S\",\"minThreshold\":704277704,\"maxThreshold\":866139805,\"displayName\":\"lizhceumoqodkad\",\"description\":\"yibngqladywrxwh\",\"isEnabled\":true}")
- .toObject(FailedLocalLoginsNotInAllowedRange.class);
- Assertions.assertEquals(true, model.isEnabled());
- Assertions.assertEquals(704277704, model.minThreshold());
- Assertions.assertEquals(866139805, model.maxThreshold());
- Assertions.assertEquals(Duration.parse("PT66H50M42S"), model.timeWindowSize());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- FailedLocalLoginsNotInAllowedRange model =
- new FailedLocalLoginsNotInAllowedRange()
- .withIsEnabled(true)
- .withMinThreshold(704277704)
- .withMaxThreshold(866139805)
- .withTimeWindowSize(Duration.parse("PT66H50M42S"));
- model = BinaryData.fromObject(model).toObject(FailedLocalLoginsNotInAllowedRange.class);
- Assertions.assertEquals(true, model.isEnabled());
- Assertions.assertEquals(704277704, model.minThreshold());
- Assertions.assertEquals(866139805, model.maxThreshold());
- Assertions.assertEquals(Duration.parse("PT66H50M42S"), model.timeWindowSize());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/FileUploadsNotInAllowedRangeTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/FileUploadsNotInAllowedRangeTests.java
deleted file mode 100644
index 38917e669a77..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/FileUploadsNotInAllowedRangeTests.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.FileUploadsNotInAllowedRange;
-import java.time.Duration;
-import org.junit.jupiter.api.Assertions;
-
-public final class FileUploadsNotInAllowedRangeTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- FileUploadsNotInAllowedRange model =
- BinaryData
- .fromString(
- "{\"ruleType\":\"FileUploadsNotInAllowedRange\",\"timeWindowSize\":\"PT130H37M29S\",\"minThreshold\":1418655458,\"maxThreshold\":647013015,\"displayName\":\"vadswzs\",\"description\":\"yemlowuowhlxln\",\"isEnabled\":false}")
- .toObject(FileUploadsNotInAllowedRange.class);
- Assertions.assertEquals(false, model.isEnabled());
- Assertions.assertEquals(1418655458, model.minThreshold());
- Assertions.assertEquals(647013015, model.maxThreshold());
- Assertions.assertEquals(Duration.parse("PT130H37M29S"), model.timeWindowSize());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- FileUploadsNotInAllowedRange model =
- new FileUploadsNotInAllowedRange()
- .withIsEnabled(false)
- .withMinThreshold(1418655458)
- .withMaxThreshold(647013015)
- .withTimeWindowSize(Duration.parse("PT130H37M29S"));
- model = BinaryData.fromObject(model).toObject(FileUploadsNotInAllowedRange.class);
- Assertions.assertEquals(false, model.isEnabled());
- Assertions.assertEquals(1418655458, model.minThreshold());
- Assertions.assertEquals(647013015, model.maxThreshold());
- Assertions.assertEquals(Duration.parse("PT130H37M29S"), model.timeWindowSize());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GcpOrganizationalDataMemberTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GcpOrganizationalDataMemberTests.java
deleted file mode 100644
index 8ef1d99d5da9..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GcpOrganizationalDataMemberTests.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.GcpOrganizationalDataMember;
-import org.junit.jupiter.api.Assertions;
-
-public final class GcpOrganizationalDataMemberTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- GcpOrganizationalDataMember model =
- BinaryData
- .fromString(
- "{\"organizationMembershipType\":\"Member\",\"parentHierarchyId\":\"fajs\",\"managementProjectNumber\":\"skmqozzkivyhj\"}")
- .toObject(GcpOrganizationalDataMember.class);
- Assertions.assertEquals("fajs", model.parentHierarchyId());
- Assertions.assertEquals("skmqozzkivyhj", model.managementProjectNumber());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- GcpOrganizationalDataMember model =
- new GcpOrganizationalDataMember()
- .withParentHierarchyId("fajs")
- .withManagementProjectNumber("skmqozzkivyhj");
- model = BinaryData.fromObject(model).toObject(GcpOrganizationalDataMember.class);
- Assertions.assertEquals("fajs", model.parentHierarchyId());
- Assertions.assertEquals("skmqozzkivyhj", model.managementProjectNumber());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GcpOrganizationalDataOrganizationTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GcpOrganizationalDataOrganizationTests.java
deleted file mode 100644
index b79616e561a4..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GcpOrganizationalDataOrganizationTests.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.GcpOrganizationalDataOrganization;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class GcpOrganizationalDataOrganizationTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- GcpOrganizationalDataOrganization model =
- BinaryData
- .fromString(
- "{\"organizationMembershipType\":\"Organization\",\"excludedProjectNumbers\":[\"sbede\"],\"serviceAccountEmailAddress\":\"exkxbhx\",\"workloadIdentityProviderId\":\"cnulgmnhjevdy\"}")
- .toObject(GcpOrganizationalDataOrganization.class);
- Assertions.assertEquals("sbede", model.excludedProjectNumbers().get(0));
- Assertions.assertEquals("exkxbhx", model.serviceAccountEmailAddress());
- Assertions.assertEquals("cnulgmnhjevdy", model.workloadIdentityProviderId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- GcpOrganizationalDataOrganization model =
- new GcpOrganizationalDataOrganization()
- .withExcludedProjectNumbers(Arrays.asList("sbede"))
- .withServiceAccountEmailAddress("exkxbhx")
- .withWorkloadIdentityProviderId("cnulgmnhjevdy");
- model = BinaryData.fromObject(model).toObject(GcpOrganizationalDataOrganization.class);
- Assertions.assertEquals("sbede", model.excludedProjectNumbers().get(0));
- Assertions.assertEquals("exkxbhx", model.serviceAccountEmailAddress());
- Assertions.assertEquals("cnulgmnhjevdy", model.workloadIdentityProviderId());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GcpOrganizationalDataTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GcpOrganizationalDataTests.java
deleted file mode 100644
index 0249f77d9859..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GcpOrganizationalDataTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.GcpOrganizationalData;
-
-public final class GcpOrganizationalDataTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- GcpOrganizationalData model =
- BinaryData
- .fromString("{\"organizationMembershipType\":\"GcpOrganizationalData\"}")
- .toObject(GcpOrganizationalData.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- GcpOrganizationalData model = new GcpOrganizationalData();
- model = BinaryData.fromObject(model).toObject(GcpOrganizationalData.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GcpProjectDetailsTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GcpProjectDetailsTests.java
deleted file mode 100644
index 9b9186dabad2..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GcpProjectDetailsTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.GcpProjectDetails;
-import org.junit.jupiter.api.Assertions;
-
-public final class GcpProjectDetailsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- GcpProjectDetails model =
- BinaryData
- .fromString(
- "{\"projectNumber\":\"rsqftib\",\"projectId\":\"ibuyvpirf\",\"workloadIdentityPoolId\":\"pnqn\"}")
- .toObject(GcpProjectDetails.class);
- Assertions.assertEquals("rsqftib", model.projectNumber());
- Assertions.assertEquals("ibuyvpirf", model.projectId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- GcpProjectDetails model = new GcpProjectDetails().withProjectNumber("rsqftib").withProjectId("ibuyvpirf");
- model = BinaryData.fromObject(model).toObject(GcpProjectDetails.class);
- Assertions.assertEquals("rsqftib", model.projectNumber());
- Assertions.assertEquals("ibuyvpirf", model.projectId());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GcpProjectEnvironmentDataTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GcpProjectEnvironmentDataTests.java
deleted file mode 100644
index 5981fb614900..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GcpProjectEnvironmentDataTests.java
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.GcpOrganizationalData;
-import com.azure.resourcemanager.security.models.GcpProjectDetails;
-import com.azure.resourcemanager.security.models.GcpProjectEnvironmentData;
-import org.junit.jupiter.api.Assertions;
-
-public final class GcpProjectEnvironmentDataTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- GcpProjectEnvironmentData model =
- BinaryData
- .fromString(
- "{\"environmentType\":\"GcpProject\",\"organizationalData\":{\"organizationMembershipType\":\"GcpOrganizationalData\"},\"projectDetails\":{\"projectNumber\":\"sozjiihj\",\"projectId\":\"ybmrzoepnxwd\",\"workloadIdentityPoolId\":\"njkgvfnmx\"}}")
- .toObject(GcpProjectEnvironmentData.class);
- Assertions.assertEquals("sozjiihj", model.projectDetails().projectNumber());
- Assertions.assertEquals("ybmrzoepnxwd", model.projectDetails().projectId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- GcpProjectEnvironmentData model =
- new GcpProjectEnvironmentData()
- .withOrganizationalData(new GcpOrganizationalData())
- .withProjectDetails(
- new GcpProjectDetails().withProjectNumber("sozjiihj").withProjectId("ybmrzoepnxwd"));
- model = BinaryData.fromObject(model).toObject(GcpProjectEnvironmentData.class);
- Assertions.assertEquals("sozjiihj", model.projectDetails().projectNumber());
- Assertions.assertEquals("ybmrzoepnxwd", model.projectDetails().projectId());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GithubScopeEnvironmentDataTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GithubScopeEnvironmentDataTests.java
deleted file mode 100644
index 417e9df0ab9e..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GithubScopeEnvironmentDataTests.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.GithubScopeEnvironmentData;
-
-public final class GithubScopeEnvironmentDataTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- GithubScopeEnvironmentData model =
- BinaryData.fromString("{\"environmentType\":\"GithubScope\"}").toObject(GithubScopeEnvironmentData.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- GithubScopeEnvironmentData model = new GithubScopeEnvironmentData();
- model = BinaryData.fromObject(model).toObject(GithubScopeEnvironmentData.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceAssignmentAdditionalDataTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceAssignmentAdditionalDataTests.java
deleted file mode 100644
index d2d917bfc2e6..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceAssignmentAdditionalDataTests.java
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.GovernanceAssignmentAdditionalData;
-import org.junit.jupiter.api.Assertions;
-
-public final class GovernanceAssignmentAdditionalDataTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- GovernanceAssignmentAdditionalData model =
- BinaryData
- .fromString(
- "{\"ticketNumber\":465206787,\"ticketLink\":\"dkfnozoeoqbvj\",\"ticketStatus\":\"efgwbmqjc\"}")
- .toObject(GovernanceAssignmentAdditionalData.class);
- Assertions.assertEquals(465206787, model.ticketNumber());
- Assertions.assertEquals("dkfnozoeoqbvj", model.ticketLink());
- Assertions.assertEquals("efgwbmqjc", model.ticketStatus());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- GovernanceAssignmentAdditionalData model =
- new GovernanceAssignmentAdditionalData()
- .withTicketNumber(465206787)
- .withTicketLink("dkfnozoeoqbvj")
- .withTicketStatus("efgwbmqjc");
- model = BinaryData.fromObject(model).toObject(GovernanceAssignmentAdditionalData.class);
- Assertions.assertEquals(465206787, model.ticketNumber());
- Assertions.assertEquals("dkfnozoeoqbvj", model.ticketLink());
- Assertions.assertEquals("efgwbmqjc", model.ticketStatus());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceAssignmentInnerTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceAssignmentInnerTests.java
deleted file mode 100644
index 3d0921efe9c3..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceAssignmentInnerTests.java
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.GovernanceAssignmentInner;
-import com.azure.resourcemanager.security.models.GovernanceAssignmentAdditionalData;
-import com.azure.resourcemanager.security.models.GovernanceEmailNotification;
-import com.azure.resourcemanager.security.models.RemediationEta;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-
-public final class GovernanceAssignmentInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- GovernanceAssignmentInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"owner\":\"ihztgeqmgqzgwldo\",\"remediationDueDate\":\"2021-05-02T02:18:46Z\",\"remediationEta\":{\"eta\":\"2021-03-27T03:55:09Z\",\"justification\":\"llcecfehuwaoa\"},\"isGracePeriod\":false,\"governanceEmailNotification\":{\"disableManagerEmailNotification\":true,\"disableOwnerEmailNotification\":false},\"additionalData\":{\"ticketNumber\":1994420195,\"ticketLink\":\"ac\",\"ticketStatus\":\"vhrweftkwqejpmv\"}},\"id\":\"s\",\"name\":\"haep\",\"type\":\"a\"}")
- .toObject(GovernanceAssignmentInner.class);
- Assertions.assertEquals("ihztgeqmgqzgwldo", model.owner());
- Assertions.assertEquals(OffsetDateTime.parse("2021-05-02T02:18:46Z"), model.remediationDueDate());
- Assertions.assertEquals(OffsetDateTime.parse("2021-03-27T03:55:09Z"), model.remediationEta().eta());
- Assertions.assertEquals("llcecfehuwaoa", model.remediationEta().justification());
- Assertions.assertEquals(false, model.isGracePeriod());
- Assertions.assertEquals(true, model.governanceEmailNotification().disableManagerEmailNotification());
- Assertions.assertEquals(false, model.governanceEmailNotification().disableOwnerEmailNotification());
- Assertions.assertEquals(1994420195, model.additionalData().ticketNumber());
- Assertions.assertEquals("ac", model.additionalData().ticketLink());
- Assertions.assertEquals("vhrweftkwqejpmv", model.additionalData().ticketStatus());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- GovernanceAssignmentInner model =
- new GovernanceAssignmentInner()
- .withOwner("ihztgeqmgqzgwldo")
- .withRemediationDueDate(OffsetDateTime.parse("2021-05-02T02:18:46Z"))
- .withRemediationEta(
- new RemediationEta()
- .withEta(OffsetDateTime.parse("2021-03-27T03:55:09Z"))
- .withJustification("llcecfehuwaoa"))
- .withIsGracePeriod(false)
- .withGovernanceEmailNotification(
- new GovernanceEmailNotification()
- .withDisableManagerEmailNotification(true)
- .withDisableOwnerEmailNotification(false))
- .withAdditionalData(
- new GovernanceAssignmentAdditionalData()
- .withTicketNumber(1994420195)
- .withTicketLink("ac")
- .withTicketStatus("vhrweftkwqejpmv"));
- model = BinaryData.fromObject(model).toObject(GovernanceAssignmentInner.class);
- Assertions.assertEquals("ihztgeqmgqzgwldo", model.owner());
- Assertions.assertEquals(OffsetDateTime.parse("2021-05-02T02:18:46Z"), model.remediationDueDate());
- Assertions.assertEquals(OffsetDateTime.parse("2021-03-27T03:55:09Z"), model.remediationEta().eta());
- Assertions.assertEquals("llcecfehuwaoa", model.remediationEta().justification());
- Assertions.assertEquals(false, model.isGracePeriod());
- Assertions.assertEquals(true, model.governanceEmailNotification().disableManagerEmailNotification());
- Assertions.assertEquals(false, model.governanceEmailNotification().disableOwnerEmailNotification());
- Assertions.assertEquals(1994420195, model.additionalData().ticketNumber());
- Assertions.assertEquals("ac", model.additionalData().ticketLink());
- Assertions.assertEquals("vhrweftkwqejpmv", model.additionalData().ticketStatus());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceAssignmentPropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceAssignmentPropertiesTests.java
deleted file mode 100644
index 44f5d3e0c88e..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceAssignmentPropertiesTests.java
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.GovernanceAssignmentProperties;
-import com.azure.resourcemanager.security.models.GovernanceAssignmentAdditionalData;
-import com.azure.resourcemanager.security.models.GovernanceEmailNotification;
-import com.azure.resourcemanager.security.models.RemediationEta;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-
-public final class GovernanceAssignmentPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- GovernanceAssignmentProperties model =
- BinaryData
- .fromString(
- "{\"owner\":\"xtczhupeuknijd\",\"remediationDueDate\":\"2021-01-29T00:46:36Z\",\"remediationEta\":{\"eta\":\"2021-05-29T22:33:32Z\",\"justification\":\"spyd\"},\"isGracePeriod\":true,\"governanceEmailNotification\":{\"disableManagerEmailNotification\":false,\"disableOwnerEmailNotification\":true},\"additionalData\":{\"ticketNumber\":1649894132,\"ticketLink\":\"tywikd\",\"ticketStatus\":\"lakuflgbhgauacd\"}}")
- .toObject(GovernanceAssignmentProperties.class);
- Assertions.assertEquals("xtczhupeuknijd", model.owner());
- Assertions.assertEquals(OffsetDateTime.parse("2021-01-29T00:46:36Z"), model.remediationDueDate());
- Assertions.assertEquals(OffsetDateTime.parse("2021-05-29T22:33:32Z"), model.remediationEta().eta());
- Assertions.assertEquals("spyd", model.remediationEta().justification());
- Assertions.assertEquals(true, model.isGracePeriod());
- Assertions.assertEquals(false, model.governanceEmailNotification().disableManagerEmailNotification());
- Assertions.assertEquals(true, model.governanceEmailNotification().disableOwnerEmailNotification());
- Assertions.assertEquals(1649894132, model.additionalData().ticketNumber());
- Assertions.assertEquals("tywikd", model.additionalData().ticketLink());
- Assertions.assertEquals("lakuflgbhgauacd", model.additionalData().ticketStatus());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- GovernanceAssignmentProperties model =
- new GovernanceAssignmentProperties()
- .withOwner("xtczhupeuknijd")
- .withRemediationDueDate(OffsetDateTime.parse("2021-01-29T00:46:36Z"))
- .withRemediationEta(
- new RemediationEta()
- .withEta(OffsetDateTime.parse("2021-05-29T22:33:32Z"))
- .withJustification("spyd"))
- .withIsGracePeriod(true)
- .withGovernanceEmailNotification(
- new GovernanceEmailNotification()
- .withDisableManagerEmailNotification(false)
- .withDisableOwnerEmailNotification(true))
- .withAdditionalData(
- new GovernanceAssignmentAdditionalData()
- .withTicketNumber(1649894132)
- .withTicketLink("tywikd")
- .withTicketStatus("lakuflgbhgauacd"));
- model = BinaryData.fromObject(model).toObject(GovernanceAssignmentProperties.class);
- Assertions.assertEquals("xtczhupeuknijd", model.owner());
- Assertions.assertEquals(OffsetDateTime.parse("2021-01-29T00:46:36Z"), model.remediationDueDate());
- Assertions.assertEquals(OffsetDateTime.parse("2021-05-29T22:33:32Z"), model.remediationEta().eta());
- Assertions.assertEquals("spyd", model.remediationEta().justification());
- Assertions.assertEquals(true, model.isGracePeriod());
- Assertions.assertEquals(false, model.governanceEmailNotification().disableManagerEmailNotification());
- Assertions.assertEquals(true, model.governanceEmailNotification().disableOwnerEmailNotification());
- Assertions.assertEquals(1649894132, model.additionalData().ticketNumber());
- Assertions.assertEquals("tywikd", model.additionalData().ticketLink());
- Assertions.assertEquals("lakuflgbhgauacd", model.additionalData().ticketStatus());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceAssignmentsCreateOrUpdateWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceAssignmentsCreateOrUpdateWithResponseMockTests.java
deleted file mode 100644
index 4ca972a4f274..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceAssignmentsCreateOrUpdateWithResponseMockTests.java
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.GovernanceAssignment;
-import com.azure.resourcemanager.security.models.GovernanceAssignmentAdditionalData;
-import com.azure.resourcemanager.security.models.GovernanceEmailNotification;
-import com.azure.resourcemanager.security.models.RemediationEta;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class GovernanceAssignmentsCreateOrUpdateWithResponseMockTests {
- @Test
- public void testCreateOrUpdateWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"owner\":\"mpspfeylq\",\"remediationDueDate\":\"2021-01-17T01:06:19Z\",\"remediationEta\":{\"eta\":\"2021-09-14T20:14:28Z\",\"justification\":\"vujex\"},\"isGracePeriod\":true,\"governanceEmailNotification\":{\"disableManagerEmailNotification\":true,\"disableOwnerEmailNotification\":false},\"additionalData\":{\"ticketNumber\":2064153963,\"ticketLink\":\"paslavxjfiuofpi\",\"ticketStatus\":\"dzlvssqywj\"}},\"id\":\"packyh\",\"name\":\"dvikm\",\"type\":\"ngpmillxgjsci\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- GovernanceAssignment response =
- manager
- .governanceAssignments()
- .define("pryj")
- .withExistingAssessment("uerbgpxebjl", "dcaytujraxd")
- .withOwner("nsewouxl")
- .withRemediationDueDate(OffsetDateTime.parse("2021-06-07T17:36:48Z"))
- .withRemediationEta(
- new RemediationEta()
- .withEta(OffsetDateTime.parse("2021-06-30T16:12:02Z"))
- .withJustification("vyljurkeposehqq"))
- .withIsGracePeriod(true)
- .withGovernanceEmailNotification(
- new GovernanceEmailNotification()
- .withDisableManagerEmailNotification(true)
- .withDisableOwnerEmailNotification(false))
- .withAdditionalData(
- new GovernanceAssignmentAdditionalData()
- .withTicketNumber(1305721046)
- .withTicketLink("lzmkxerxxxotee")
- .withTicketStatus("howgomvvhxo"))
- .create();
-
- Assertions.assertEquals("mpspfeylq", response.owner());
- Assertions.assertEquals(OffsetDateTime.parse("2021-01-17T01:06:19Z"), response.remediationDueDate());
- Assertions.assertEquals(OffsetDateTime.parse("2021-09-14T20:14:28Z"), response.remediationEta().eta());
- Assertions.assertEquals("vujex", response.remediationEta().justification());
- Assertions.assertEquals(true, response.isGracePeriod());
- Assertions.assertEquals(true, response.governanceEmailNotification().disableManagerEmailNotification());
- Assertions.assertEquals(false, response.governanceEmailNotification().disableOwnerEmailNotification());
- Assertions.assertEquals(2064153963, response.additionalData().ticketNumber());
- Assertions.assertEquals("paslavxjfiuofpi", response.additionalData().ticketLink());
- Assertions.assertEquals("dzlvssqywj", response.additionalData().ticketStatus());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceAssignmentsDeleteWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceAssignmentsDeleteWithResponseMockTests.java
deleted file mode 100644
index 8e2c7dc3c64a..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceAssignmentsDeleteWithResponseMockTests.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class GovernanceAssignmentsDeleteWithResponseMockTests {
- @Test
- public void testDeleteWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .governanceAssignments()
- .deleteWithResponse("hsxrznmgsdaluyc", "hefr", "hs", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceAssignmentsGetWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceAssignmentsGetWithResponseMockTests.java
deleted file mode 100644
index aae87bf7e8b1..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceAssignmentsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.GovernanceAssignment;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class GovernanceAssignmentsGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"owner\":\"rvmzrqra\",\"remediationDueDate\":\"2021-07-03T12:21:15Z\",\"remediationEta\":{\"eta\":\"2021-06-20T09:26:07Z\",\"justification\":\"vznllaslkskhjqj\"},\"isGracePeriod\":true,\"governanceEmailNotification\":{\"disableManagerEmailNotification\":true,\"disableOwnerEmailNotification\":true},\"additionalData\":{\"ticketNumber\":1270661924,\"ticketLink\":\"taiy\",\"ticketStatus\":\"qgroigbsfsgsaen\"}},\"id\":\"ldfmhljq\",\"name\":\"xspmrjc\",\"type\":\"ryldsxeb\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- GovernanceAssignment response =
- manager
- .governanceAssignments()
- .getWithResponse("kft", "mcxqqxmyzklao", "n", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("rvmzrqra", response.owner());
- Assertions.assertEquals(OffsetDateTime.parse("2021-07-03T12:21:15Z"), response.remediationDueDate());
- Assertions.assertEquals(OffsetDateTime.parse("2021-06-20T09:26:07Z"), response.remediationEta().eta());
- Assertions.assertEquals("vznllaslkskhjqj", response.remediationEta().justification());
- Assertions.assertEquals(true, response.isGracePeriod());
- Assertions.assertEquals(true, response.governanceEmailNotification().disableManagerEmailNotification());
- Assertions.assertEquals(true, response.governanceEmailNotification().disableOwnerEmailNotification());
- Assertions.assertEquals(1270661924, response.additionalData().ticketNumber());
- Assertions.assertEquals("taiy", response.additionalData().ticketLink());
- Assertions.assertEquals("qgroigbsfsgsaen", response.additionalData().ticketStatus());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceAssignmentsListMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceAssignmentsListMockTests.java
deleted file mode 100644
index a0c63b81c74e..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceAssignmentsListMockTests.java
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.GovernanceAssignment;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class GovernanceAssignmentsListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"owner\":\"xnhwh\",\"remediationDueDate\":\"2021-03-06T08:23:41Z\",\"remediationEta\":{\"eta\":\"2021-09-30T00:24:56Z\",\"justification\":\"rzaaoee\"},\"isGracePeriod\":true,\"governanceEmailNotification\":{\"disableManagerEmailNotification\":true,\"disableOwnerEmailNotification\":false},\"additionalData\":{\"ticketNumber\":900871116,\"ticketLink\":\"axxcrxoxdj\",\"ticketStatus\":\"dnaryyinzk\"}},\"id\":\"olrndwdb\",\"name\":\"xvzaledoy\",\"type\":\"xlu\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.governanceAssignments().list("uklajvcfoc", "hapejov", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("xnhwh", response.iterator().next().owner());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-03-06T08:23:41Z"), response.iterator().next().remediationDueDate());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-09-30T00:24:56Z"), response.iterator().next().remediationEta().eta());
- Assertions.assertEquals("rzaaoee", response.iterator().next().remediationEta().justification());
- Assertions.assertEquals(true, response.iterator().next().isGracePeriod());
- Assertions
- .assertEquals(
- true, response.iterator().next().governanceEmailNotification().disableManagerEmailNotification());
- Assertions
- .assertEquals(
- false, response.iterator().next().governanceEmailNotification().disableOwnerEmailNotification());
- Assertions.assertEquals(900871116, response.iterator().next().additionalData().ticketNumber());
- Assertions.assertEquals("axxcrxoxdj", response.iterator().next().additionalData().ticketLink());
- Assertions.assertEquals("dnaryyinzk", response.iterator().next().additionalData().ticketStatus());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceAssignmentsListTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceAssignmentsListTests.java
deleted file mode 100644
index 9c8749c92eae..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceAssignmentsListTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.GovernanceAssignmentsList;
-
-public final class GovernanceAssignmentsListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- GovernanceAssignmentsList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"owner\":\"qtlffhzbk\",\"remediationDueDate\":\"2021-02-09T15:59:01Z\",\"isGracePeriod\":false},\"id\":\"fqnvhnqoewdogi\",\"name\":\"etesypvidbztjhqt\",\"type\":\"b\"},{\"properties\":{\"owner\":\"ynkbwetnju\",\"remediationDueDate\":\"2021-07-10T00:36:33Z\",\"isGracePeriod\":true},\"id\":\"yaupia\",\"name\":\"cxnafbwqrooh\",\"type\":\"uovmaonurjt\"},{\"properties\":{\"owner\":\"hihpvecmsl\",\"remediationDueDate\":\"2021-01-23T19:57:44Z\",\"isGracePeriod\":true},\"id\":\"lt\",\"name\":\"sjuscvsfxigctmg\",\"type\":\"uupb\"}],\"nextLink\":\"qccydrtceukdq\"}")
- .toObject(GovernanceAssignmentsList.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- GovernanceAssignmentsList model = new GovernanceAssignmentsList();
- model = BinaryData.fromObject(model).toObject(GovernanceAssignmentsList.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceEmailNotificationTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceEmailNotificationTests.java
deleted file mode 100644
index 958e35c3cb64..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceEmailNotificationTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.GovernanceEmailNotification;
-import org.junit.jupiter.api.Assertions;
-
-public final class GovernanceEmailNotificationTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- GovernanceEmailNotification model =
- BinaryData
- .fromString("{\"disableManagerEmailNotification\":true,\"disableOwnerEmailNotification\":false}")
- .toObject(GovernanceEmailNotification.class);
- Assertions.assertEquals(true, model.disableManagerEmailNotification());
- Assertions.assertEquals(false, model.disableOwnerEmailNotification());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- GovernanceEmailNotification model =
- new GovernanceEmailNotification()
- .withDisableManagerEmailNotification(true)
- .withDisableOwnerEmailNotification(false);
- model = BinaryData.fromObject(model).toObject(GovernanceEmailNotification.class);
- Assertions.assertEquals(true, model.disableManagerEmailNotification());
- Assertions.assertEquals(false, model.disableOwnerEmailNotification());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRuleEmailNotificationTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRuleEmailNotificationTests.java
deleted file mode 100644
index a83db39ccb7a..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRuleEmailNotificationTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.GovernanceRuleEmailNotification;
-import org.junit.jupiter.api.Assertions;
-
-public final class GovernanceRuleEmailNotificationTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- GovernanceRuleEmailNotification model =
- BinaryData
- .fromString("{\"disableManagerEmailNotification\":false,\"disableOwnerEmailNotification\":true}")
- .toObject(GovernanceRuleEmailNotification.class);
- Assertions.assertEquals(false, model.disableManagerEmailNotification());
- Assertions.assertEquals(true, model.disableOwnerEmailNotification());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- GovernanceRuleEmailNotification model =
- new GovernanceRuleEmailNotification()
- .withDisableManagerEmailNotification(false)
- .withDisableOwnerEmailNotification(true);
- model = BinaryData.fromObject(model).toObject(GovernanceRuleEmailNotification.class);
- Assertions.assertEquals(false, model.disableManagerEmailNotification());
- Assertions.assertEquals(true, model.disableOwnerEmailNotification());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRuleInnerTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRuleInnerTests.java
deleted file mode 100644
index d73dfab387ef..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRuleInnerTests.java
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.GovernanceRuleInner;
-import com.azure.resourcemanager.security.models.GovernanceRuleEmailNotification;
-import com.azure.resourcemanager.security.models.GovernanceRuleMetadata;
-import com.azure.resourcemanager.security.models.GovernanceRuleOwnerSource;
-import com.azure.resourcemanager.security.models.GovernanceRuleOwnerSourceType;
-import com.azure.resourcemanager.security.models.GovernanceRuleSourceResourceType;
-import com.azure.resourcemanager.security.models.GovernanceRuleType;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class GovernanceRuleInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- GovernanceRuleInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"tenantId\":\"t\",\"displayName\":\"x\",\"description\":\"qzasunwqrjzfrgqh\",\"remediationTimeframe\":\"hcmbuocnjrohmbp\",\"isGracePeriod\":false,\"rulePriority\":1432807244,\"isDisabled\":false,\"ruleType\":\"Integrated\",\"sourceResourceType\":\"Assessments\",\"excludedScopes\":[\"dyvkfkmr\",\"cxneh\",\"sm\"],\"conditionSets\":[\"datadlfp\",\"dataapucygvo\",\"datavyuns\",\"dataxlghieegj\"],\"includeMemberScopes\":false,\"ownerSource\":{\"type\":\"ByTag\",\"value\":\"seksgbux\"},\"governanceEmailNotification\":{\"disableManagerEmailNotification\":true,\"disableOwnerEmailNotification\":false},\"metadata\":{\"createdBy\":\"gaqi\",\"createdOn\":\"2021-02-21T23:48:36Z\",\"updatedBy\":\"iwrqofulopmjnl\",\"updatedOn\":\"2021-03-15T13:05:41Z\"}},\"id\":\"hcbjpibk\",\"name\":\"phuuuerctato\",\"type\":\"intqpbrlcyr\"}")
- .toObject(GovernanceRuleInner.class);
- Assertions.assertEquals("x", model.displayName());
- Assertions.assertEquals("qzasunwqrjzfrgqh", model.description());
- Assertions.assertEquals("hcmbuocnjrohmbp", model.remediationTimeframe());
- Assertions.assertEquals(false, model.isGracePeriod());
- Assertions.assertEquals(1432807244, model.rulePriority());
- Assertions.assertEquals(false, model.isDisabled());
- Assertions.assertEquals(GovernanceRuleType.INTEGRATED, model.ruleType());
- Assertions.assertEquals(GovernanceRuleSourceResourceType.ASSESSMENTS, model.sourceResourceType());
- Assertions.assertEquals("dyvkfkmr", model.excludedScopes().get(0));
- Assertions.assertEquals(false, model.includeMemberScopes());
- Assertions.assertEquals(GovernanceRuleOwnerSourceType.BY_TAG, model.ownerSource().type());
- Assertions.assertEquals("seksgbux", model.ownerSource().value());
- Assertions.assertEquals(true, model.governanceEmailNotification().disableManagerEmailNotification());
- Assertions.assertEquals(false, model.governanceEmailNotification().disableOwnerEmailNotification());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- GovernanceRuleInner model =
- new GovernanceRuleInner()
- .withDisplayName("x")
- .withDescription("qzasunwqrjzfrgqh")
- .withRemediationTimeframe("hcmbuocnjrohmbp")
- .withIsGracePeriod(false)
- .withRulePriority(1432807244)
- .withIsDisabled(false)
- .withRuleType(GovernanceRuleType.INTEGRATED)
- .withSourceResourceType(GovernanceRuleSourceResourceType.ASSESSMENTS)
- .withExcludedScopes(Arrays.asList("dyvkfkmr", "cxneh", "sm"))
- .withConditionSets(Arrays.asList("datadlfp", "dataapucygvo", "datavyuns", "dataxlghieegj"))
- .withIncludeMemberScopes(false)
- .withOwnerSource(
- new GovernanceRuleOwnerSource()
- .withType(GovernanceRuleOwnerSourceType.BY_TAG)
- .withValue("seksgbux"))
- .withGovernanceEmailNotification(
- new GovernanceRuleEmailNotification()
- .withDisableManagerEmailNotification(true)
- .withDisableOwnerEmailNotification(false))
- .withMetadata(new GovernanceRuleMetadata());
- model = BinaryData.fromObject(model).toObject(GovernanceRuleInner.class);
- Assertions.assertEquals("x", model.displayName());
- Assertions.assertEquals("qzasunwqrjzfrgqh", model.description());
- Assertions.assertEquals("hcmbuocnjrohmbp", model.remediationTimeframe());
- Assertions.assertEquals(false, model.isGracePeriod());
- Assertions.assertEquals(1432807244, model.rulePriority());
- Assertions.assertEquals(false, model.isDisabled());
- Assertions.assertEquals(GovernanceRuleType.INTEGRATED, model.ruleType());
- Assertions.assertEquals(GovernanceRuleSourceResourceType.ASSESSMENTS, model.sourceResourceType());
- Assertions.assertEquals("dyvkfkmr", model.excludedScopes().get(0));
- Assertions.assertEquals(false, model.includeMemberScopes());
- Assertions.assertEquals(GovernanceRuleOwnerSourceType.BY_TAG, model.ownerSource().type());
- Assertions.assertEquals("seksgbux", model.ownerSource().value());
- Assertions.assertEquals(true, model.governanceEmailNotification().disableManagerEmailNotification());
- Assertions.assertEquals(false, model.governanceEmailNotification().disableOwnerEmailNotification());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRuleListTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRuleListTests.java
deleted file mode 100644
index 599a423c96f6..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRuleListTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.GovernanceRuleList;
-
-public final class GovernanceRuleListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- GovernanceRuleList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"tenantId\":\"eakxcptsoqfyi\",\"displayName\":\"seqchkrt\",\"description\":\"razisg\",\"remediationTimeframe\":\"iuemvanbwzohmnr\",\"isGracePeriod\":false,\"rulePriority\":1409401531,\"isDisabled\":false,\"ruleType\":\"ServiceNow\",\"sourceResourceType\":\"Assessments\",\"excludedScopes\":[],\"conditionSets\":[],\"includeMemberScopes\":false},\"id\":\"ptysprq\",\"name\":\"gnzxojpslsvj\",\"type\":\"pli\"},{\"properties\":{\"tenantId\":\"qwoyxqvapco\",\"displayName\":\"houcqpqojxc\",\"description\":\"rzdcgdzbenribcaw\",\"remediationTimeframe\":\"zqddtjwfljhzn\",\"isGracePeriod\":true,\"rulePriority\":1578404842,\"isDisabled\":false,\"ruleType\":\"ServiceNow\",\"sourceResourceType\":\"Assessments\",\"excludedScopes\":[],\"conditionSets\":[],\"includeMemberScopes\":false},\"id\":\"cqtjzmi\",\"name\":\"vgbgatzuuvbxng\",\"type\":\"ebwgga\"}],\"nextLink\":\"tzlswvaj\"}")
- .toObject(GovernanceRuleList.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- GovernanceRuleList model = new GovernanceRuleList();
- model = BinaryData.fromObject(model).toObject(GovernanceRuleList.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRuleMetadataTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRuleMetadataTests.java
deleted file mode 100644
index 1c094ebe37cd..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRuleMetadataTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.GovernanceRuleMetadata;
-
-public final class GovernanceRuleMetadataTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- GovernanceRuleMetadata model =
- BinaryData
- .fromString(
- "{\"createdBy\":\"gzwx\",\"createdOn\":\"2021-07-10T06:33:57Z\",\"updatedBy\":\"cvogygzyvne\",\"updatedOn\":\"2021-06-04T20:52:49Z\"}")
- .toObject(GovernanceRuleMetadata.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- GovernanceRuleMetadata model = new GovernanceRuleMetadata();
- model = BinaryData.fromObject(model).toObject(GovernanceRuleMetadata.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRuleOwnerSourceTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRuleOwnerSourceTests.java
deleted file mode 100644
index 20acff7b5dc6..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRuleOwnerSourceTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.GovernanceRuleOwnerSource;
-import com.azure.resourcemanager.security.models.GovernanceRuleOwnerSourceType;
-import org.junit.jupiter.api.Assertions;
-
-public final class GovernanceRuleOwnerSourceTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- GovernanceRuleOwnerSource model =
- BinaryData.fromString("{\"type\":\"ByTag\",\"value\":\"mtx\"}").toObject(GovernanceRuleOwnerSource.class);
- Assertions.assertEquals(GovernanceRuleOwnerSourceType.BY_TAG, model.type());
- Assertions.assertEquals("mtx", model.value());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- GovernanceRuleOwnerSource model =
- new GovernanceRuleOwnerSource().withType(GovernanceRuleOwnerSourceType.BY_TAG).withValue("mtx");
- model = BinaryData.fromObject(model).toObject(GovernanceRuleOwnerSource.class);
- Assertions.assertEquals(GovernanceRuleOwnerSourceType.BY_TAG, model.type());
- Assertions.assertEquals("mtx", model.value());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRulePropertiesTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRulePropertiesTests.java
deleted file mode 100644
index b4db9cf130dd..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRulePropertiesTests.java
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.fluent.models.GovernanceRuleProperties;
-import com.azure.resourcemanager.security.models.GovernanceRuleEmailNotification;
-import com.azure.resourcemanager.security.models.GovernanceRuleMetadata;
-import com.azure.resourcemanager.security.models.GovernanceRuleOwnerSource;
-import com.azure.resourcemanager.security.models.GovernanceRuleOwnerSourceType;
-import com.azure.resourcemanager.security.models.GovernanceRuleSourceResourceType;
-import com.azure.resourcemanager.security.models.GovernanceRuleType;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class GovernanceRulePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- GovernanceRuleProperties model =
- BinaryData
- .fromString(
- "{\"tenantId\":\"czkgofxyfsrucvcr\",\"displayName\":\"pcjttbstvjeaqn\",\"description\":\"vvf\",\"remediationTimeframe\":\"xmlghkt\",\"isGracePeriod\":true,\"rulePriority\":2137769434,\"isDisabled\":false,\"ruleType\":\"Integrated\",\"sourceResourceType\":\"Assessments\",\"excludedScopes\":[\"dwwexymz\",\"lazipbhpwvq\",\"gnyyuuzivens\",\"pmeyyvpkpatlbijp\"],\"conditionSets\":[\"datasksrfhfvolmknbn\",\"datawcdommpvfqaw\"],\"includeMemberScopes\":false,\"ownerSource\":{\"type\":\"Manually\",\"value\":\"tuiaclkiexhajlfn\"},\"governanceEmailNotification\":{\"disableManagerEmailNotification\":false,\"disableOwnerEmailNotification\":true},\"metadata\":{\"createdBy\":\"t\",\"createdOn\":\"2021-07-20T02:29:06Z\",\"updatedBy\":\"b\",\"updatedOn\":\"2021-05-24T19:47:23Z\"}}")
- .toObject(GovernanceRuleProperties.class);
- Assertions.assertEquals("pcjttbstvjeaqn", model.displayName());
- Assertions.assertEquals("vvf", model.description());
- Assertions.assertEquals("xmlghkt", model.remediationTimeframe());
- Assertions.assertEquals(true, model.isGracePeriod());
- Assertions.assertEquals(2137769434, model.rulePriority());
- Assertions.assertEquals(false, model.isDisabled());
- Assertions.assertEquals(GovernanceRuleType.INTEGRATED, model.ruleType());
- Assertions.assertEquals(GovernanceRuleSourceResourceType.ASSESSMENTS, model.sourceResourceType());
- Assertions.assertEquals("dwwexymz", model.excludedScopes().get(0));
- Assertions.assertEquals(false, model.includeMemberScopes());
- Assertions.assertEquals(GovernanceRuleOwnerSourceType.MANUALLY, model.ownerSource().type());
- Assertions.assertEquals("tuiaclkiexhajlfn", model.ownerSource().value());
- Assertions.assertEquals(false, model.governanceEmailNotification().disableManagerEmailNotification());
- Assertions.assertEquals(true, model.governanceEmailNotification().disableOwnerEmailNotification());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- GovernanceRuleProperties model =
- new GovernanceRuleProperties()
- .withDisplayName("pcjttbstvjeaqn")
- .withDescription("vvf")
- .withRemediationTimeframe("xmlghkt")
- .withIsGracePeriod(true)
- .withRulePriority(2137769434)
- .withIsDisabled(false)
- .withRuleType(GovernanceRuleType.INTEGRATED)
- .withSourceResourceType(GovernanceRuleSourceResourceType.ASSESSMENTS)
- .withExcludedScopes(Arrays.asList("dwwexymz", "lazipbhpwvq", "gnyyuuzivens", "pmeyyvpkpatlbijp"))
- .withConditionSets(Arrays.asList("datasksrfhfvolmknbn", "datawcdommpvfqaw"))
- .withIncludeMemberScopes(false)
- .withOwnerSource(
- new GovernanceRuleOwnerSource()
- .withType(GovernanceRuleOwnerSourceType.MANUALLY)
- .withValue("tuiaclkiexhajlfn"))
- .withGovernanceEmailNotification(
- new GovernanceRuleEmailNotification()
- .withDisableManagerEmailNotification(false)
- .withDisableOwnerEmailNotification(true))
- .withMetadata(new GovernanceRuleMetadata());
- model = BinaryData.fromObject(model).toObject(GovernanceRuleProperties.class);
- Assertions.assertEquals("pcjttbstvjeaqn", model.displayName());
- Assertions.assertEquals("vvf", model.description());
- Assertions.assertEquals("xmlghkt", model.remediationTimeframe());
- Assertions.assertEquals(true, model.isGracePeriod());
- Assertions.assertEquals(2137769434, model.rulePriority());
- Assertions.assertEquals(false, model.isDisabled());
- Assertions.assertEquals(GovernanceRuleType.INTEGRATED, model.ruleType());
- Assertions.assertEquals(GovernanceRuleSourceResourceType.ASSESSMENTS, model.sourceResourceType());
- Assertions.assertEquals("dwwexymz", model.excludedScopes().get(0));
- Assertions.assertEquals(false, model.includeMemberScopes());
- Assertions.assertEquals(GovernanceRuleOwnerSourceType.MANUALLY, model.ownerSource().type());
- Assertions.assertEquals("tuiaclkiexhajlfn", model.ownerSource().value());
- Assertions.assertEquals(false, model.governanceEmailNotification().disableManagerEmailNotification());
- Assertions.assertEquals(true, model.governanceEmailNotification().disableOwnerEmailNotification());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRulesCreateOrUpdateWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRulesCreateOrUpdateWithResponseMockTests.java
deleted file mode 100644
index 2cfeae73a2e5..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRulesCreateOrUpdateWithResponseMockTests.java
+++ /dev/null
@@ -1,112 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.GovernanceRule;
-import com.azure.resourcemanager.security.models.GovernanceRuleEmailNotification;
-import com.azure.resourcemanager.security.models.GovernanceRuleMetadata;
-import com.azure.resourcemanager.security.models.GovernanceRuleOwnerSource;
-import com.azure.resourcemanager.security.models.GovernanceRuleOwnerSourceType;
-import com.azure.resourcemanager.security.models.GovernanceRuleSourceResourceType;
-import com.azure.resourcemanager.security.models.GovernanceRuleType;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class GovernanceRulesCreateOrUpdateWithResponseMockTests {
- @Test
- public void testCreateOrUpdateWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"tenantId\":\"ol\",\"displayName\":\"wil\",\"description\":\"gojfsqe\",\"remediationTimeframe\":\"uxjxhfxf\",\"isGracePeriod\":true,\"rulePriority\":1987568238,\"isDisabled\":false,\"ruleType\":\"ServiceNow\",\"sourceResourceType\":\"Assessments\",\"excludedScopes\":[\"mxbmbrwgzzxljbkh\",\"sdplaumydmhw\",\"qjfyx\",\"dgtokvqbvwg\"],\"conditionSets\":[\"dataw\",\"datapvxakglhpsesrfga\"],\"includeMemberScopes\":false,\"ownerSource\":{\"type\":\"Manually\",\"value\":\"xcgdhyhgoqgso\"},\"governanceEmailNotification\":{\"disableManagerEmailNotification\":true,\"disableOwnerEmailNotification\":true},\"metadata\":{\"createdBy\":\"b\",\"createdOn\":\"2021-03-05T15:00:41Z\",\"updatedBy\":\"spglq\",\"updatedOn\":\"2021-05-23T05:40:58Z\"}},\"id\":\"tdahneaoovtyjzti\",\"name\":\"fwjlof\",\"type\":\"ekfsrm\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- GovernanceRule response =
- manager
- .governanceRules()
- .define("tbqgdirdamm")
- .withExistingScope("shtkutzc")
- .withDisplayName("dgfttmd")
- .withDescription("geoagfuof")
- .withRemediationTimeframe("xodwxm")
- .withIsGracePeriod(true)
- .withRulePriority(2110518274)
- .withIsDisabled(false)
- .withRuleType(GovernanceRuleType.INTEGRATED)
- .withSourceResourceType(GovernanceRuleSourceResourceType.ASSESSMENTS)
- .withExcludedScopes(Arrays.asList("evmdm", "enlrstgf", "zljdnci", "tjva"))
- .withConditionSets(
- Arrays.asList("datayznm", "datagcdogcvucgy", "dataoxuwhttnzqsaqm", "databgszplusdek"))
- .withIncludeMemberScopes(true)
- .withOwnerSource(
- new GovernanceRuleOwnerSource()
- .withType(GovernanceRuleOwnerSourceType.MANUALLY)
- .withValue("sgpgvokyejidbd"))
- .withGovernanceEmailNotification(
- new GovernanceRuleEmailNotification()
- .withDisableManagerEmailNotification(true)
- .withDisableOwnerEmailNotification(false))
- .withMetadata(new GovernanceRuleMetadata())
- .create();
-
- Assertions.assertEquals("wil", response.displayName());
- Assertions.assertEquals("gojfsqe", response.description());
- Assertions.assertEquals("uxjxhfxf", response.remediationTimeframe());
- Assertions.assertEquals(true, response.isGracePeriod());
- Assertions.assertEquals(1987568238, response.rulePriority());
- Assertions.assertEquals(false, response.isDisabled());
- Assertions.assertEquals(GovernanceRuleType.SERVICE_NOW, response.ruleType());
- Assertions.assertEquals(GovernanceRuleSourceResourceType.ASSESSMENTS, response.sourceResourceType());
- Assertions.assertEquals("mxbmbrwgzzxljbkh", response.excludedScopes().get(0));
- Assertions.assertEquals(false, response.includeMemberScopes());
- Assertions.assertEquals(GovernanceRuleOwnerSourceType.MANUALLY, response.ownerSource().type());
- Assertions.assertEquals("xcgdhyhgoqgso", response.ownerSource().value());
- Assertions.assertEquals(true, response.governanceEmailNotification().disableManagerEmailNotification());
- Assertions.assertEquals(true, response.governanceEmailNotification().disableOwnerEmailNotification());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRulesDeleteMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRulesDeleteMockTests.java
deleted file mode 100644
index c4a58196d8fa..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRulesDeleteMockTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class GovernanceRulesDeleteMockTests {
- @Test
- public void testDelete() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager.governanceRules().delete("ckcatuqbhpo", "cnxtpzdlysei", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRulesGetWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRulesGetWithResponseMockTests.java
deleted file mode 100644
index bc75f5e15bfd..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRulesGetWithResponseMockTests.java
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.GovernanceRule;
-import com.azure.resourcemanager.security.models.GovernanceRuleOwnerSourceType;
-import com.azure.resourcemanager.security.models.GovernanceRuleSourceResourceType;
-import com.azure.resourcemanager.security.models.GovernanceRuleType;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class GovernanceRulesGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"tenantId\":\"q\",\"displayName\":\"psdudgco\",\"description\":\"omehx\",\"remediationTimeframe\":\"ntolamlb\",\"isGracePeriod\":true,\"rulePriority\":1635580301,\"isDisabled\":true,\"ruleType\":\"ServiceNow\",\"sourceResourceType\":\"Assessments\",\"excludedScopes\":[\"i\"],\"conditionSets\":[\"datawdtgckzdqiqdl\",\"dataatrkwxoauwxs\",\"dataykznhrfgslglhp\",\"datayjfzi\"],\"includeMemberScopes\":false,\"ownerSource\":{\"type\":\"ByTag\",\"value\":\"ocpajt\"},\"governanceEmailNotification\":{\"disableManagerEmailNotification\":true,\"disableOwnerEmailNotification\":false},\"metadata\":{\"createdBy\":\"dd\",\"createdOn\":\"2021-09-28T18:23:35Z\",\"updatedBy\":\"ccxbeuuqutkz\",\"updatedOn\":\"2021-04-09T11:59:49Z\"}},\"id\":\"wwguzytij\",\"name\":\"xfn\",\"type\":\"ndegjdydhqkkkbj\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- GovernanceRule response =
- manager.governanceRules().getWithResponse("ooy", "cuxd", com.azure.core.util.Context.NONE).getValue();
-
- Assertions.assertEquals("psdudgco", response.displayName());
- Assertions.assertEquals("omehx", response.description());
- Assertions.assertEquals("ntolamlb", response.remediationTimeframe());
- Assertions.assertEquals(true, response.isGracePeriod());
- Assertions.assertEquals(1635580301, response.rulePriority());
- Assertions.assertEquals(true, response.isDisabled());
- Assertions.assertEquals(GovernanceRuleType.SERVICE_NOW, response.ruleType());
- Assertions.assertEquals(GovernanceRuleSourceResourceType.ASSESSMENTS, response.sourceResourceType());
- Assertions.assertEquals("i", response.excludedScopes().get(0));
- Assertions.assertEquals(false, response.includeMemberScopes());
- Assertions.assertEquals(GovernanceRuleOwnerSourceType.BY_TAG, response.ownerSource().type());
- Assertions.assertEquals("ocpajt", response.ownerSource().value());
- Assertions.assertEquals(true, response.governanceEmailNotification().disableManagerEmailNotification());
- Assertions.assertEquals(false, response.governanceEmailNotification().disableOwnerEmailNotification());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRulesListMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRulesListMockTests.java
deleted file mode 100644
index 629667b88b65..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRulesListMockTests.java
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.GovernanceRule;
-import com.azure.resourcemanager.security.models.GovernanceRuleOwnerSourceType;
-import com.azure.resourcemanager.security.models.GovernanceRuleSourceResourceType;
-import com.azure.resourcemanager.security.models.GovernanceRuleType;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class GovernanceRulesListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"tenantId\":\"iauesugmocpcjy\",\"displayName\":\"boel\",\"description\":\"ttwfldsiuorini\",\"remediationTimeframe\":\"edpksriwmmtmqrxr\",\"isGracePeriod\":false,\"rulePriority\":509534967,\"isDisabled\":true,\"ruleType\":\"ServiceNow\",\"sourceResourceType\":\"Assessments\",\"excludedScopes\":[\"ubt\",\"mbxiqahra\",\"pxmib\"],\"conditionSets\":[\"datanupoyryefqmwovyz\",\"dataxlnomfpbjcee\",\"datavyieztkutnjilluk\",\"datarehyhtmj\"],\"includeMemberScopes\":false,\"ownerSource\":{\"type\":\"Manually\",\"value\":\"ulxfaryrvjl\"},\"governanceEmailNotification\":{\"disableManagerEmailNotification\":false,\"disableOwnerEmailNotification\":false},\"metadata\":{\"createdBy\":\"ahoyiyaxqvj\",\"createdOn\":\"2020-12-23T11:34:58Z\",\"updatedBy\":\"tcz\",\"updatedOn\":\"2021-02-12T19:56:53Z\"}},\"id\":\"nvovbooqbmdqrxy\",\"name\":\"laetscflwtjdtlr\",\"type\":\"e\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.governanceRules().list("woxfaxdtnqifbsa", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("boel", response.iterator().next().displayName());
- Assertions.assertEquals("ttwfldsiuorini", response.iterator().next().description());
- Assertions.assertEquals("edpksriwmmtmqrxr", response.iterator().next().remediationTimeframe());
- Assertions.assertEquals(false, response.iterator().next().isGracePeriod());
- Assertions.assertEquals(509534967, response.iterator().next().rulePriority());
- Assertions.assertEquals(true, response.iterator().next().isDisabled());
- Assertions.assertEquals(GovernanceRuleType.SERVICE_NOW, response.iterator().next().ruleType());
- Assertions
- .assertEquals(
- GovernanceRuleSourceResourceType.ASSESSMENTS, response.iterator().next().sourceResourceType());
- Assertions.assertEquals("ubt", response.iterator().next().excludedScopes().get(0));
- Assertions.assertEquals(false, response.iterator().next().includeMemberScopes());
- Assertions
- .assertEquals(GovernanceRuleOwnerSourceType.MANUALLY, response.iterator().next().ownerSource().type());
- Assertions.assertEquals("ulxfaryrvjl", response.iterator().next().ownerSource().value());
- Assertions
- .assertEquals(
- false, response.iterator().next().governanceEmailNotification().disableManagerEmailNotification());
- Assertions
- .assertEquals(
- false, response.iterator().next().governanceEmailNotification().disableOwnerEmailNotification());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRulesOperationResultsWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRulesOperationResultsWithResponseMockTests.java
deleted file mode 100644
index 6ed6e92a5595..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/GovernanceRulesOperationResultsWithResponseMockTests.java
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.OperationResultAutoGenerated;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class GovernanceRulesOperationResultsWithResponseMockTests {
- @Test
- public void testOperationResultsWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{\"status\":\"Canceled\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- OperationResultAutoGenerated response =
- manager
- .governanceRules()
- .operationResultsWithResponse("toakatprytgrhz", "qfdpf", "wrp", com.azure.core.util.Context.NONE)
- .getValue();
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/HealthDataClassificationTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/HealthDataClassificationTests.java
deleted file mode 100644
index 0d9aadede68a..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/HealthDataClassificationTests.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.HealthDataClassification;
-import com.azure.resourcemanager.security.models.ScopeName;
-import org.junit.jupiter.api.Assertions;
-
-public final class HealthDataClassificationTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- HealthDataClassification model =
- BinaryData
- .fromString("{\"component\":\"w\",\"scenario\":\"vgmmbugtyw\",\"scope\":\"Unknown\"}")
- .toObject(HealthDataClassification.class);
- Assertions.assertEquals("w", model.component());
- Assertions.assertEquals("vgmmbugtyw", model.scenario());
- Assertions.assertEquals(ScopeName.UNKNOWN, model.scope());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- HealthDataClassification model =
- new HealthDataClassification().withComponent("w").withScenario("vgmmbugtyw").withScope(ScopeName.UNKNOWN);
- model = BinaryData.fromObject(model).toObject(HealthDataClassification.class);
- Assertions.assertEquals("w", model.component());
- Assertions.assertEquals("vgmmbugtyw", model.scenario());
- Assertions.assertEquals(ScopeName.UNKNOWN, model.scope());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/HealthReportsListTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/HealthReportsListTests.java
deleted file mode 100644
index ab3ab46ba2c3..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/HealthReportsListTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.HealthReportsList;
-
-public final class HealthReportsListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- HealthReportsList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"affectedDefendersPlans\":[],\"issues\":[]},\"id\":\"vzoqgyipemchgavs\",\"name\":\"zuejd\",\"type\":\"xptlghwzho\"}],\"nextLink\":\"wjjstliuhqa\"}")
- .toObject(HealthReportsList.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- HealthReportsList model = new HealthReportsList();
- model = BinaryData.fromObject(model).toObject(HealthReportsList.class);
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/HttpC2DMessagesNotInAllowedRangeTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/HttpC2DMessagesNotInAllowedRangeTests.java
deleted file mode 100644
index b0ac041533f4..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/HttpC2DMessagesNotInAllowedRangeTests.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.HttpC2DMessagesNotInAllowedRange;
-import java.time.Duration;
-import org.junit.jupiter.api.Assertions;
-
-public final class HttpC2DMessagesNotInAllowedRangeTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- HttpC2DMessagesNotInAllowedRange model =
- BinaryData
- .fromString(
- "{\"ruleType\":\"HttpC2DMessagesNotInAllowedRange\",\"timeWindowSize\":\"PT226H41M44S\",\"minThreshold\":1258720981,\"maxThreshold\":933419147,\"displayName\":\"nmdvha\",\"description\":\"vjytiqswbq\",\"isEnabled\":false}")
- .toObject(HttpC2DMessagesNotInAllowedRange.class);
- Assertions.assertEquals(false, model.isEnabled());
- Assertions.assertEquals(1258720981, model.minThreshold());
- Assertions.assertEquals(933419147, model.maxThreshold());
- Assertions.assertEquals(Duration.parse("PT226H41M44S"), model.timeWindowSize());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- HttpC2DMessagesNotInAllowedRange model =
- new HttpC2DMessagesNotInAllowedRange()
- .withIsEnabled(false)
- .withMinThreshold(1258720981)
- .withMaxThreshold(933419147)
- .withTimeWindowSize(Duration.parse("PT226H41M44S"));
- model = BinaryData.fromObject(model).toObject(HttpC2DMessagesNotInAllowedRange.class);
- Assertions.assertEquals(false, model.isEnabled());
- Assertions.assertEquals(1258720981, model.minThreshold());
- Assertions.assertEquals(933419147, model.maxThreshold());
- Assertions.assertEquals(Duration.parse("PT226H41M44S"), model.timeWindowSize());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/HttpC2DRejectedMessagesNotInAllowedRangeTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/HttpC2DRejectedMessagesNotInAllowedRangeTests.java
deleted file mode 100644
index ec64153a8920..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/HttpC2DRejectedMessagesNotInAllowedRangeTests.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.HttpC2DRejectedMessagesNotInAllowedRange;
-import java.time.Duration;
-import org.junit.jupiter.api.Assertions;
-
-public final class HttpC2DRejectedMessagesNotInAllowedRangeTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- HttpC2DRejectedMessagesNotInAllowedRange model =
- BinaryData
- .fromString(
- "{\"ruleType\":\"HttpC2DRejectedMessagesNotInAllowedRange\",\"timeWindowSize\":\"PT70H3M54S\",\"minThreshold\":1102084667,\"maxThreshold\":1286022280,\"displayName\":\"uqi\",\"description\":\"jiitnspxlzdesygr\",\"isEnabled\":false}")
- .toObject(HttpC2DRejectedMessagesNotInAllowedRange.class);
- Assertions.assertEquals(false, model.isEnabled());
- Assertions.assertEquals(1102084667, model.minThreshold());
- Assertions.assertEquals(1286022280, model.maxThreshold());
- Assertions.assertEquals(Duration.parse("PT70H3M54S"), model.timeWindowSize());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- HttpC2DRejectedMessagesNotInAllowedRange model =
- new HttpC2DRejectedMessagesNotInAllowedRange()
- .withIsEnabled(false)
- .withMinThreshold(1102084667)
- .withMaxThreshold(1286022280)
- .withTimeWindowSize(Duration.parse("PT70H3M54S"));
- model = BinaryData.fromObject(model).toObject(HttpC2DRejectedMessagesNotInAllowedRange.class);
- Assertions.assertEquals(false, model.isEnabled());
- Assertions.assertEquals(1102084667, model.minThreshold());
- Assertions.assertEquals(1286022280, model.maxThreshold());
- Assertions.assertEquals(Duration.parse("PT70H3M54S"), model.timeWindowSize());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/HttpD2CMessagesNotInAllowedRangeTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/HttpD2CMessagesNotInAllowedRangeTests.java
deleted file mode 100644
index 30954cd80e7f..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/HttpD2CMessagesNotInAllowedRangeTests.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.HttpD2CMessagesNotInAllowedRange;
-import java.time.Duration;
-import org.junit.jupiter.api.Assertions;
-
-public final class HttpD2CMessagesNotInAllowedRangeTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- HttpD2CMessagesNotInAllowedRange model =
- BinaryData
- .fromString(
- "{\"ruleType\":\"HttpD2CMessagesNotInAllowedRange\",\"timeWindowSize\":\"PT39H28M58S\",\"minThreshold\":80458584,\"maxThreshold\":1574438037,\"displayName\":\"ixqcahyhxalybxaw\",\"description\":\"jpodtbl\",\"isEnabled\":false}")
- .toObject(HttpD2CMessagesNotInAllowedRange.class);
- Assertions.assertEquals(false, model.isEnabled());
- Assertions.assertEquals(80458584, model.minThreshold());
- Assertions.assertEquals(1574438037, model.maxThreshold());
- Assertions.assertEquals(Duration.parse("PT39H28M58S"), model.timeWindowSize());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- HttpD2CMessagesNotInAllowedRange model =
- new HttpD2CMessagesNotInAllowedRange()
- .withIsEnabled(false)
- .withMinThreshold(80458584)
- .withMaxThreshold(1574438037)
- .withTimeWindowSize(Duration.parse("PT39H28M58S"));
- model = BinaryData.fromObject(model).toObject(HttpD2CMessagesNotInAllowedRange.class);
- Assertions.assertEquals(false, model.isEnabled());
- Assertions.assertEquals(80458584, model.minThreshold());
- Assertions.assertEquals(1574438037, model.maxThreshold());
- Assertions.assertEquals(Duration.parse("PT39H28M58S"), model.timeWindowSize());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/InformationProtectionAwsOfferingInformationProtectionTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/InformationProtectionAwsOfferingInformationProtectionTests.java
deleted file mode 100644
index db527865ecf8..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/InformationProtectionAwsOfferingInformationProtectionTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.InformationProtectionAwsOfferingInformationProtection;
-import org.junit.jupiter.api.Assertions;
-
-public final class InformationProtectionAwsOfferingInformationProtectionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- InformationProtectionAwsOfferingInformationProtection model =
- BinaryData
- .fromString("{\"cloudRoleArn\":\"toqxjh\"}")
- .toObject(InformationProtectionAwsOfferingInformationProtection.class);
- Assertions.assertEquals("toqxjh", model.cloudRoleArn());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- InformationProtectionAwsOfferingInformationProtection model =
- new InformationProtectionAwsOfferingInformationProtection().withCloudRoleArn("toqxjh");
- model = BinaryData.fromObject(model).toObject(InformationProtectionAwsOfferingInformationProtection.class);
- Assertions.assertEquals("toqxjh", model.cloudRoleArn());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/InformationProtectionAwsOfferingTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/InformationProtectionAwsOfferingTests.java
deleted file mode 100644
index 1fb189349d1e..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/InformationProtectionAwsOfferingTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.InformationProtectionAwsOffering;
-import com.azure.resourcemanager.security.models.InformationProtectionAwsOfferingInformationProtection;
-import org.junit.jupiter.api.Assertions;
-
-public final class InformationProtectionAwsOfferingTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- InformationProtectionAwsOffering model =
- BinaryData
- .fromString(
- "{\"offeringType\":\"InformationProtectionAws\",\"informationProtection\":{\"cloudRoleArn\":\"mkxettcsloj\"},\"description\":\"qid\"}")
- .toObject(InformationProtectionAwsOffering.class);
- Assertions.assertEquals("mkxettcsloj", model.informationProtection().cloudRoleArn());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- InformationProtectionAwsOffering model =
- new InformationProtectionAwsOffering()
- .withInformationProtection(
- new InformationProtectionAwsOfferingInformationProtection().withCloudRoleArn("mkxettcsloj"));
- model = BinaryData.fromObject(model).toObject(InformationProtectionAwsOffering.class);
- Assertions.assertEquals("mkxettcsloj", model.informationProtection().cloudRoleArn());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/InformationProtectionKeywordTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/InformationProtectionKeywordTests.java
deleted file mode 100644
index d3dedd80d401..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/InformationProtectionKeywordTests.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.security.models.InformationProtectionKeyword;
-import org.junit.jupiter.api.Assertions;
-
-public final class InformationProtectionKeywordTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- InformationProtectionKeyword model =
- BinaryData
- .fromString(
- "{\"pattern\":\"zlxwabmqoefkifr\",\"custom\":true,\"canBeNumeric\":true,\"excluded\":false}")
- .toObject(InformationProtectionKeyword.class);
- Assertions.assertEquals("zlxwabmqoefkifr", model.pattern());
- Assertions.assertEquals(true, model.custom());
- Assertions.assertEquals(true, model.canBeNumeric());
- Assertions.assertEquals(false, model.excluded());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- InformationProtectionKeyword model =
- new InformationProtectionKeyword()
- .withPattern("zlxwabmqoefkifr")
- .withCustom(true)
- .withCanBeNumeric(true)
- .withExcluded(false);
- model = BinaryData.fromObject(model).toObject(InformationProtectionKeyword.class);
- Assertions.assertEquals("zlxwabmqoefkifr", model.pattern());
- Assertions.assertEquals(true, model.custom());
- Assertions.assertEquals(true, model.canBeNumeric());
- Assertions.assertEquals(false, model.excluded());
- }
-}
diff --git a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/InformationProtectionPoliciesCreateOrUpdateWithResponseMockTests.java b/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/InformationProtectionPoliciesCreateOrUpdateWithResponseMockTests.java
deleted file mode 100644
index 89425d5de909..000000000000
--- a/sdk/security/azure-resourcemanager-security/src/test/java/com/azure/resourcemanager/security/generated/InformationProtectionPoliciesCreateOrUpdateWithResponseMockTests.java
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.security.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.security.SecurityManager;
-import com.azure.resourcemanager.security.models.InformationProtectionPolicy;
-import com.azure.resourcemanager.security.models.InformationProtectionPolicyName;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class InformationProtectionPoliciesCreateOrUpdateWithResponseMockTests {
- @Test
- public void testCreateOrUpdateWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"lastModifiedUtc\":\"2021-10-17T07:38:01Z\",\"version\":\"mftzgyy\",\"labels\":{},\"informationTypes\":{}},\"id\":\"gekdfqnht\",\"name\":\"wdowrczfjjn\",\"type\":\"uxxrkkmhmnulwemp\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SecurityManager manager =
- SecurityManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- InformationProtectionPolicy response =
- manager
- .informationProtectionPolicies()
- .define(InformationProtectionPolicyName.CUSTOM)
- .withExistingScope("kzfzqxjosho")
- .withLabels(mapOf())
- .withInformationTypes(mapOf())
- .create();
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map