diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/CHANGELOG.md b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/CHANGELOG.md
index 575f0dc096516..9653de3fa340e 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/CHANGELOG.md
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/CHANGELOG.md
@@ -1,6 +1,8 @@
# Release History
-## 1.1.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2023-09-04)
+
+- Azure Resource Manager ResourceHealth client library for Java. This package contains Microsoft Azure SDK for ResourceHealth Management SDK. The Resource Health Client. Package tag package-preview-2023-07. 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/resourcehealth/azure-resourcemanager-resourcehealth/README.md b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/README.md
index 82832a5d5664b..8e571599f18a8 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/README.md
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager ResourceHealth client library for Java.
-This package contains Microsoft Azure SDK for ResourceHealth Management SDK. The Resource Health Client. Package tag package-2022-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for ResourceHealth Management SDK. The Resource Health Client. Package tag package-preview-2023-07. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-resourcehealth
- 1.1.0-beta.1
+ 1.1.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -103,3 +103,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
+
+![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fresourcehealth%2Fazure-resourcemanager-resourcehealth%2FREADME.png)
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/SAMPLE.md b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/SAMPLE.md
index f37cba6bb3435..b1fb8f20d415a 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/SAMPLE.md
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/SAMPLE.md
@@ -61,7 +61,7 @@
/** Samples for AvailabilityStatuses GetByResource. */
public final class AvailabilityStatusesGetByResourceSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/AvailabilityStatus_GetByResource.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/AvailabilityStatus_GetByResource.json
*/
/**
* Sample code: GetCurrentHealthByResource.
@@ -83,7 +83,7 @@ public final class AvailabilityStatusesGetByResourceSamples {
/** Samples for AvailabilityStatuses List. */
public final class AvailabilityStatusesListSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/AvailabilityStatuses_List.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/AvailabilityStatuses_List.json
*/
/**
* Sample code: GetHealthHistoryByResource.
@@ -103,7 +103,7 @@ public final class AvailabilityStatusesListSamples {
/** Samples for AvailabilityStatuses ListByResourceGroup. */
public final class AvailabilityStatusesListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/AvailabilityStatuses_ListByResourceGroup.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/AvailabilityStatuses_ListByResourceGroup.json
*/
/**
* Sample code: ListByResourceGroup.
@@ -124,7 +124,7 @@ public final class AvailabilityStatusesListByResourceGroupSamples {
/** Samples for AvailabilityStatuses ListBySubscriptionId. */
public final class AvailabilityStatusesListBySubscriptionIdSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/AvailabilityStatuses_ListBySubscriptionId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/AvailabilityStatuses_ListBySubscriptionId.json
*/
/**
* Sample code: ListHealthBySubscriptionId.
@@ -146,7 +146,7 @@ public final class AvailabilityStatusesListBySubscriptionIdSamples {
/** Samples for ChildAvailabilityStatuses GetByResource. */
public final class ChildAvailabilityStatusesGetByResourceSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/ChildAvailabilityStatus_GetByResource.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/ChildAvailabilityStatus_GetByResource.json
*/
/**
* Sample code: GetChildCurrentHealthByResource.
@@ -172,7 +172,7 @@ public final class ChildAvailabilityStatusesGetByResourceSamples {
/** Samples for ChildAvailabilityStatuses List. */
public final class ChildAvailabilityStatusesListSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/ChildAvailabilityStatuses_List.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/ChildAvailabilityStatuses_List.json
*/
/**
* Sample code: GetChildHealthHistoryByResource.
@@ -198,7 +198,7 @@ public final class ChildAvailabilityStatusesListSamples {
/** Samples for ChildResources List. */
public final class ChildResourcesListSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/ChildResources_List.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/ChildResources_List.json
*/
/**
* Sample code: GetCurrentChildHealthByResource.
@@ -220,7 +220,7 @@ import com.azure.resourcemanager.resourcehealth.models.IssueNameParameter;
/** Samples for EmergingIssues Get. */
public final class EmergingIssuesGetSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/EmergingIssues_Get.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/EmergingIssues_Get.json
*/
/**
* Sample code: GetEmergingIssues.
@@ -239,7 +239,7 @@ public final class EmergingIssuesGetSamples {
/** Samples for EmergingIssues List. */
public final class EmergingIssuesListSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/EmergingIssues_List.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/EmergingIssues_List.json
*/
/**
* Sample code: GetEmergingIssues.
@@ -258,7 +258,7 @@ public final class EmergingIssuesListSamples {
/** Samples for EventOperation FetchDetailsBySubscriptionIdAndTrackingId. */
public final class EventOperationFetchDetailsBySubscriptionIdAndTrackingIdSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Event_fetchDetailsBySubscriptionIdAndTrackingId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/Event_fetchDetailsBySubscriptionIdAndTrackingId.json
*/
/**
* Sample code: EventDetailsBySubscriptionIdAndTrackingId.
@@ -280,7 +280,7 @@ public final class EventOperationFetchDetailsBySubscriptionIdAndTrackingIdSample
/** Samples for EventOperation FetchDetailsByTenantIdAndTrackingId. */
public final class EventOperationFetchDetailsByTenantIdAndTrackingIdSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Event_fetchDetailsByTenantIdAndTrackingId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/Event_fetchDetailsByTenantIdAndTrackingId.json
*/
/**
* Sample code: EventDetailsByTenantIdAndTrackingId.
@@ -302,7 +302,7 @@ public final class EventOperationFetchDetailsByTenantIdAndTrackingIdSamples {
/** Samples for EventOperation GetBySubscriptionIdAndTrackingId. */
public final class EventOperationGetBySubscriptionIdAndTrackingIdSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Event_GetBySubscriptionIdAndTrackingId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/Event_GetBySubscriptionIdAndTrackingId.json
*/
/**
* Sample code: SecurityAdvisoriesEventBySubscriptionIdAndTrackingId.
@@ -325,7 +325,7 @@ public final class EventOperationGetBySubscriptionIdAndTrackingIdSamples {
/** Samples for EventOperation GetByTenantIdAndTrackingId. */
public final class EventOperationGetByTenantIdAndTrackingIdSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Event_GetByTenantIdAndTrackingId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/Event_GetByTenantIdAndTrackingId.json
*/
/**
* Sample code: EventByTenantIdAndTrackingId.
@@ -348,7 +348,7 @@ public final class EventOperationGetByTenantIdAndTrackingIdSamples {
/** Samples for EventsOperation List. */
public final class EventsOperationListSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Events_ListBySubscriptionId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/Events_ListBySubscriptionId.json
*/
/**
* Sample code: ListEventsBySubscriptionId.
@@ -371,7 +371,7 @@ public final class EventsOperationListSamples {
/** Samples for EventsOperation ListBySingleResource. */
public final class EventsOperationListBySingleResourceSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Events_ListBySingleResource.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/Events_ListBySingleResource.json
*/
/**
* Sample code: ListEventsBySingleResource.
@@ -396,7 +396,7 @@ public final class EventsOperationListBySingleResourceSamples {
/** Samples for EventsOperation ListByTenantId. */
public final class EventsOperationListByTenantIdSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Events_ListByTenantId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/Events_ListByTenantId.json
*/
/**
* Sample code: ListEventsByTenantId.
@@ -418,7 +418,7 @@ public final class EventsOperationListByTenantIdSamples {
/** Samples for ImpactedResources Get. */
public final class ImpactedResourcesGetSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/ImpactedResources_Get.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/ImpactedResources_Get.json
*/
/**
* Sample code: ImpactedResourcesGet.
@@ -437,7 +437,7 @@ public final class ImpactedResourcesGetSamples {
/** Samples for ImpactedResources GetByTenantId. */
public final class ImpactedResourcesGetByTenantIdSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/ImpactedResources_GetByTenantId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/ImpactedResources_GetByTenantId.json
*/
/**
* Sample code: ImpactedResourcesGet.
@@ -458,7 +458,7 @@ public final class ImpactedResourcesGetByTenantIdSamples {
/** Samples for ImpactedResources ListBySubscriptionIdAndEventId. */
public final class ImpactedResourcesListBySubscriptionIdAndEventIdSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/ImpactedResources_ListBySubscriptionId_ListByEventId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/ImpactedResources_ListBySubscriptionId_ListByEventId.json
*/
/**
* Sample code: ListImpactedResourcesBySubscriptionId.
@@ -480,7 +480,7 @@ public final class ImpactedResourcesListBySubscriptionIdAndEventIdSamples {
/** Samples for ImpactedResources ListByTenantIdAndEventId. */
public final class ImpactedResourcesListByTenantIdAndEventIdSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/ImpactedResources_ListByTenantId_ListByEventId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/ImpactedResources_ListByTenantId_ListByEventId.json
*/
/**
* Sample code: ListEventsByTenantId.
@@ -501,7 +501,7 @@ public final class ImpactedResourcesListByTenantIdAndEventIdSamples {
/** Samples for Metadata GetEntity. */
public final class MetadataGetEntitySamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Metadata_GetEntity.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/Metadata_GetEntity.json
*/
/**
* Sample code: GetMetadata.
@@ -520,7 +520,7 @@ public final class MetadataGetEntitySamples {
/** Samples for Metadata List. */
public final class MetadataListSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Metadata_List.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/Metadata_List.json
*/
/**
* Sample code: GetMetadata.
@@ -539,7 +539,7 @@ public final class MetadataListSamples {
/** Samples for Operations List. */
public final class OperationsListSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Operations_List.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/Operations_List.json
*/
/**
* Sample code: GetOperationsList.
@@ -558,7 +558,7 @@ public final class OperationsListSamples {
/** Samples for SecurityAdvisoryImpactedResources ListBySubscriptionIdAndEventId. */
public final class SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/SecurityAdvisoryImpactedResources_ListBySubscriptionId_ListByEventId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/SecurityAdvisoryImpactedResources_ListBySubscriptionId_ListByEventId.json
*/
/**
* Sample code: ListSecurityAdvisoryImpactedResourcesBySubscriptionId.
@@ -580,7 +580,7 @@ public final class SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEvent
/** Samples for SecurityAdvisoryImpactedResources ListByTenantIdAndEventId. */
public final class SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/SecurityAdvisoryImpactedResources_ListByTenantId_ListByEventId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/SecurityAdvisoryImpactedResources_ListByTenantId_ListByEventId.json
*/
/**
* Sample code: ListSecurityAdvisoryImpactedResourcesByTenantId.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml
index 8961cbe212cac..52800b04b9d34 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml
@@ -18,7 +18,7 @@
jar
Microsoft Azure SDK for ResourceHealth Management
- This package contains Microsoft Azure SDK for ResourceHealth Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Resource Health Client. Package tag package-2022-10.
+ This package contains Microsoft Azure SDK for ResourceHealth Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Resource Health Client. Package tag package-preview-2023-07.
https://github.com/Azure/azure-sdk-for-java
@@ -45,10 +45,7 @@
UTF-8
0
0
- true
-
- --add-opens com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED
-
+ true
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/ResourceHealthManager.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/ResourceHealthManager.java
index c315240fd2ab9..8e9c63fe478af 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/ResourceHealthManager.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/ResourceHealthManager.java
@@ -239,7 +239,7 @@ public ResourceHealthManager authenticate(TokenCredential credential, AzureProfi
.append("-")
.append("com.azure.resourcemanager.resourcehealth")
.append("/")
- .append("1.1.0-beta.1");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -419,8 +419,10 @@ public EmergingIssues emergingIssues() {
}
/**
- * @return Wrapped service client MicrosoftResourceHealth providing direct access to the underlying auto-generated
- * API implementation, based on Azure REST API.
+ * Gets wrapped service client MicrosoftResourceHealth providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client MicrosoftResourceHealth.
*/
public MicrosoftResourceHealth serviceClient() {
return this.clientObject;
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EmergingIssuesGetResultInner.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EmergingIssuesGetResultInner.java
index a27d0b9d511a7..33b44eb863ceb 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EmergingIssuesGetResultInner.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EmergingIssuesGetResultInner.java
@@ -6,7 +6,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.management.SystemData;
import com.azure.resourcemanager.resourcehealth.models.StatusActiveEvent;
import com.azure.resourcemanager.resourcehealth.models.StatusBanner;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -22,12 +21,6 @@ public final class EmergingIssuesGetResultInner extends ProxyResource {
@JsonProperty(value = "properties")
private EmergingIssue innerProperties;
- /*
- * Azure Resource Manager metadata containing createdBy and modifiedBy information.
- */
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
-
/** Creates an instance of EmergingIssuesGetResultInner class. */
public EmergingIssuesGetResultInner() {
}
@@ -41,15 +34,6 @@ private EmergingIssue innerProperties() {
return this.innerProperties;
}
- /**
- * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
/**
* Get the refreshTimestamp property: Timestamp for when last time refreshed for ongoing emerging issue.
*
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventImpactedResourceInner.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventImpactedResourceInner.java
index c5e64558d1476..bf70a36971c52 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventImpactedResourceInner.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventImpactedResourceInner.java
@@ -6,7 +6,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.management.SystemData;
import com.azure.resourcemanager.resourcehealth.models.KeyValueItem;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
@@ -20,12 +19,6 @@ public final class EventImpactedResourceInner extends ProxyResource {
@JsonProperty(value = "properties")
private EventImpactedResourceProperties innerProperties;
- /*
- * Azure Resource Manager metadata containing createdBy and modifiedBy information.
- */
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
-
/** Creates an instance of EventImpactedResourceInner class. */
public EventImpactedResourceInner() {
}
@@ -39,15 +32,6 @@ private EventImpactedResourceProperties innerProperties() {
return this.innerProperties;
}
- /**
- * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
/**
* Get the targetResourceType property: Resource type within Microsoft cloud.
*
@@ -75,6 +59,51 @@ public String targetRegion() {
return this.innerProperties() == null ? null : this.innerProperties().targetRegion();
}
+ /**
+ * Get the resourceName property: Resource name of the impacted resource.
+ *
+ * @return the resourceName value.
+ */
+ public String resourceName() {
+ return this.innerProperties() == null ? null : this.innerProperties().resourceName();
+ }
+
+ /**
+ * Get the resourceGroup property: Resource group name of the impacted resource.
+ *
+ * @return the resourceGroup value.
+ */
+ public String resourceGroup() {
+ return this.innerProperties() == null ? null : this.innerProperties().resourceGroup();
+ }
+
+ /**
+ * Get the status property: Status of the impacted resource.
+ *
+ * @return the status value.
+ */
+ public String status() {
+ return this.innerProperties() == null ? null : this.innerProperties().status();
+ }
+
+ /**
+ * Get the maintenanceStartTime property: Start time of maintenance for the impacted resource.
+ *
+ * @return the maintenanceStartTime value.
+ */
+ public String maintenanceStartTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().maintenanceStartTime();
+ }
+
+ /**
+ * Get the maintenanceEndTime property: End time of maintenance for the impacted resource.
+ *
+ * @return the maintenanceEndTime value.
+ */
+ public String maintenanceEndTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().maintenanceEndTime();
+ }
+
/**
* Get the info property: Additional information.
*
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventImpactedResourceProperties.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventImpactedResourceProperties.java
index 8aad65ba8a29c..11df9f43450d7 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventImpactedResourceProperties.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventImpactedResourceProperties.java
@@ -30,6 +30,36 @@ public final class EventImpactedResourceProperties {
@JsonProperty(value = "targetRegion", access = JsonProperty.Access.WRITE_ONLY)
private String targetRegion;
+ /*
+ * Resource name of the impacted resource.
+ */
+ @JsonProperty(value = "resourceName", access = JsonProperty.Access.WRITE_ONLY)
+ private String resourceName;
+
+ /*
+ * Resource group name of the impacted resource.
+ */
+ @JsonProperty(value = "resourceGroup", access = JsonProperty.Access.WRITE_ONLY)
+ private String resourceGroup;
+
+ /*
+ * Status of the impacted resource.
+ */
+ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
+ private String status;
+
+ /*
+ * Start time of maintenance for the impacted resource.
+ */
+ @JsonProperty(value = "maintenanceStartTime", access = JsonProperty.Access.WRITE_ONLY)
+ private String maintenanceStartTime;
+
+ /*
+ * End time of maintenance for the impacted resource.
+ */
+ @JsonProperty(value = "maintenanceEndTime", access = JsonProperty.Access.WRITE_ONLY)
+ private String maintenanceEndTime;
+
/*
* Additional information.
*/
@@ -67,6 +97,51 @@ public String targetRegion() {
return this.targetRegion;
}
+ /**
+ * Get the resourceName property: Resource name of the impacted resource.
+ *
+ * @return the resourceName value.
+ */
+ public String resourceName() {
+ return this.resourceName;
+ }
+
+ /**
+ * Get the resourceGroup property: Resource group name of the impacted resource.
+ *
+ * @return the resourceGroup value.
+ */
+ public String resourceGroup() {
+ return this.resourceGroup;
+ }
+
+ /**
+ * Get the status property: Status of the impacted resource.
+ *
+ * @return the status value.
+ */
+ public String status() {
+ return this.status;
+ }
+
+ /**
+ * Get the maintenanceStartTime property: Start time of maintenance for the impacted resource.
+ *
+ * @return the maintenanceStartTime value.
+ */
+ public String maintenanceStartTime() {
+ return this.maintenanceStartTime;
+ }
+
+ /**
+ * Get the maintenanceEndTime property: End time of maintenance for the impacted resource.
+ *
+ * @return the maintenanceEndTime value.
+ */
+ public String maintenanceEndTime() {
+ return this.maintenanceEndTime;
+ }
+
/**
* Get the info property: Additional information.
*
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventInner.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventInner.java
index aac299cc6d695..675e671e420c5 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventInner.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventInner.java
@@ -6,13 +6,13 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.management.SystemData;
import com.azure.resourcemanager.resourcehealth.models.EventLevelValues;
import com.azure.resourcemanager.resourcehealth.models.EventPropertiesAdditionalInformation;
import com.azure.resourcemanager.resourcehealth.models.EventPropertiesArticle;
import com.azure.resourcemanager.resourcehealth.models.EventPropertiesRecommendedActions;
import com.azure.resourcemanager.resourcehealth.models.EventSourceValues;
import com.azure.resourcemanager.resourcehealth.models.EventStatusValues;
+import com.azure.resourcemanager.resourcehealth.models.EventSubTypeValues;
import com.azure.resourcemanager.resourcehealth.models.EventTypeValues;
import com.azure.resourcemanager.resourcehealth.models.Faq;
import com.azure.resourcemanager.resourcehealth.models.Impact;
@@ -31,12 +31,6 @@ public final class EventInner extends ProxyResource {
@JsonProperty(value = "properties")
private EventProperties innerProperties;
- /*
- * Azure Resource Manager metadata containing createdBy and modifiedBy information.
- */
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
-
/** Creates an instance of EventInner class. */
public EventInner() {
}
@@ -50,15 +44,6 @@ private EventProperties innerProperties() {
return this.innerProperties;
}
- /**
- * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
/**
* Get the eventType property: Type of event.
*
@@ -82,6 +67,31 @@ public EventInner withEventType(EventTypeValues eventType) {
return this;
}
+ /**
+ * Get the eventSubType property: Sub type of the event. Currently used to determine retirement communications for
+ * health advisory events.
+ *
+ * @return the eventSubType value.
+ */
+ public EventSubTypeValues eventSubType() {
+ return this.innerProperties() == null ? null : this.innerProperties().eventSubType();
+ }
+
+ /**
+ * Set the eventSubType property: Sub type of the event. Currently used to determine retirement communications for
+ * health advisory events.
+ *
+ * @param eventSubType the eventSubType value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withEventSubType(EventSubTypeValues eventSubType) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withEventSubType(eventSubType);
+ return this;
+ }
+
/**
* Get the eventSource property: Source of event.
*
@@ -711,6 +721,77 @@ public EventInner withImpactType(String impactType) {
return this;
}
+ /**
+ * Get the maintenanceId property: Unique identifier for planned maintenance event.
+ *
+ * @return the maintenanceId value.
+ */
+ public String maintenanceId() {
+ return this.innerProperties() == null ? null : this.innerProperties().maintenanceId();
+ }
+
+ /**
+ * Set the maintenanceId property: Unique identifier for planned maintenance event.
+ *
+ * @param maintenanceId the maintenanceId value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withMaintenanceId(String maintenanceId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withMaintenanceId(maintenanceId);
+ return this;
+ }
+
+ /**
+ * Get the maintenanceType property: The type of planned maintenance event.
+ *
+ * @return the maintenanceType value.
+ */
+ public String maintenanceType() {
+ return this.innerProperties() == null ? null : this.innerProperties().maintenanceType();
+ }
+
+ /**
+ * Set the maintenanceType property: The type of planned maintenance event.
+ *
+ * @param maintenanceType the maintenanceType value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withMaintenanceType(String maintenanceType) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withMaintenanceType(maintenanceType);
+ return this;
+ }
+
+ /**
+ * Get the argQuery property: Azure Resource Graph query to fetch the affected resources from their existing Azure
+ * Resource Graph locations.
+ *
+ * @return the argQuery value.
+ */
+ public String argQuery() {
+ return this.innerProperties() == null ? null : this.innerProperties().argQuery();
+ }
+
+ /**
+ * Set the argQuery property: Azure Resource Graph query to fetch the affected resources from their existing Azure
+ * Resource Graph locations.
+ *
+ * @param argQuery the argQuery value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withArgQuery(String argQuery) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withArgQuery(argQuery);
+ return this;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventProperties.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventProperties.java
index ff31364f2f3a3..2438c049a5b1c 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventProperties.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventProperties.java
@@ -11,6 +11,7 @@
import com.azure.resourcemanager.resourcehealth.models.EventPropertiesRecommendedActions;
import com.azure.resourcemanager.resourcehealth.models.EventSourceValues;
import com.azure.resourcemanager.resourcehealth.models.EventStatusValues;
+import com.azure.resourcemanager.resourcehealth.models.EventSubTypeValues;
import com.azure.resourcemanager.resourcehealth.models.EventTypeValues;
import com.azure.resourcemanager.resourcehealth.models.Faq;
import com.azure.resourcemanager.resourcehealth.models.Impact;
@@ -29,6 +30,12 @@ public final class EventProperties {
@JsonProperty(value = "eventType")
private EventTypeValues eventType;
+ /*
+ * Sub type of the event. Currently used to determine retirement communications for health advisory events
+ */
+ @JsonProperty(value = "eventSubType")
+ private EventSubTypeValues eventSubType;
+
/*
* Source of event.
*/
@@ -193,6 +200,24 @@ public final class EventProperties {
@JsonProperty(value = "impactType")
private String impactType;
+ /*
+ * Unique identifier for planned maintenance event.
+ */
+ @JsonProperty(value = "maintenanceId")
+ private String maintenanceId;
+
+ /*
+ * The type of planned maintenance event.
+ */
+ @JsonProperty(value = "maintenanceType")
+ private String maintenanceType;
+
+ /*
+ * Azure Resource Graph query to fetch the affected resources from their existing Azure Resource Graph locations.
+ */
+ @JsonProperty(value = "argQuery")
+ private String argQuery;
+
/** Creates an instance of EventProperties class. */
public EventProperties() {
}
@@ -217,6 +242,28 @@ public EventProperties withEventType(EventTypeValues eventType) {
return this;
}
+ /**
+ * Get the eventSubType property: Sub type of the event. Currently used to determine retirement communications for
+ * health advisory events.
+ *
+ * @return the eventSubType value.
+ */
+ public EventSubTypeValues eventSubType() {
+ return this.eventSubType;
+ }
+
+ /**
+ * Set the eventSubType property: Sub type of the event. Currently used to determine retirement communications for
+ * health advisory events.
+ *
+ * @param eventSubType the eventSubType value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withEventSubType(EventSubTypeValues eventSubType) {
+ this.eventSubType = eventSubType;
+ return this;
+ }
+
/**
* Get the eventSource property: Source of event.
*
@@ -765,6 +812,68 @@ public EventProperties withImpactType(String impactType) {
return this;
}
+ /**
+ * Get the maintenanceId property: Unique identifier for planned maintenance event.
+ *
+ * @return the maintenanceId value.
+ */
+ public String maintenanceId() {
+ return this.maintenanceId;
+ }
+
+ /**
+ * Set the maintenanceId property: Unique identifier for planned maintenance event.
+ *
+ * @param maintenanceId the maintenanceId value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withMaintenanceId(String maintenanceId) {
+ this.maintenanceId = maintenanceId;
+ return this;
+ }
+
+ /**
+ * Get the maintenanceType property: The type of planned maintenance event.
+ *
+ * @return the maintenanceType value.
+ */
+ public String maintenanceType() {
+ return this.maintenanceType;
+ }
+
+ /**
+ * Set the maintenanceType property: The type of planned maintenance event.
+ *
+ * @param maintenanceType the maintenanceType value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withMaintenanceType(String maintenanceType) {
+ this.maintenanceType = maintenanceType;
+ return this;
+ }
+
+ /**
+ * Get the argQuery property: Azure Resource Graph query to fetch the affected resources from their existing Azure
+ * Resource Graph locations.
+ *
+ * @return the argQuery value.
+ */
+ public String argQuery() {
+ return this.argQuery;
+ }
+
+ /**
+ * Set the argQuery property: Azure Resource Graph query to fetch the affected resources from their existing Azure
+ * Resource Graph locations.
+ *
+ * @param argQuery the argQuery value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withArgQuery(String argQuery) {
+ this.argQuery = argQuery;
+ return this;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EmergingIssuesGetResultImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EmergingIssuesGetResultImpl.java
index a72dc61536946..a0f288fa88b9b 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EmergingIssuesGetResultImpl.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EmergingIssuesGetResultImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.resourcehealth.implementation;
-import com.azure.core.management.SystemData;
import com.azure.resourcemanager.resourcehealth.fluent.models.EmergingIssuesGetResultInner;
import com.azure.resourcemanager.resourcehealth.models.EmergingIssuesGetResult;
import com.azure.resourcemanager.resourcehealth.models.StatusActiveEvent;
@@ -37,10 +36,6 @@ public String type() {
return this.innerModel().type();
}
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
public OffsetDateTime refreshTimestamp() {
return this.innerModel().refreshTimestamp();
}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventImpactedResourceImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventImpactedResourceImpl.java
index 86d7682e0ea21..8f52ba1ef7e03 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventImpactedResourceImpl.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventImpactedResourceImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.resourcehealth.implementation;
-import com.azure.core.management.SystemData;
import com.azure.resourcemanager.resourcehealth.fluent.models.EventImpactedResourceInner;
import com.azure.resourcemanager.resourcehealth.models.EventImpactedResource;
import com.azure.resourcemanager.resourcehealth.models.KeyValueItem;
@@ -35,10 +34,6 @@ public String type() {
return this.innerModel().type();
}
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
public String targetResourceType() {
return this.innerModel().targetResourceType();
}
@@ -51,6 +46,26 @@ public String targetRegion() {
return this.innerModel().targetRegion();
}
+ public String resourceName() {
+ return this.innerModel().resourceName();
+ }
+
+ public String resourceGroup() {
+ return this.innerModel().resourceGroup();
+ }
+
+ public String status() {
+ return this.innerModel().status();
+ }
+
+ public String maintenanceStartTime() {
+ return this.innerModel().maintenanceStartTime();
+ }
+
+ public String maintenanceEndTime() {
+ return this.innerModel().maintenanceEndTime();
+ }
+
public List info() {
List inner = this.innerModel().info();
if (inner != null) {
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventImpl.java
index 01b3c0c024813..e879e2b4852e3 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventImpl.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.resourcehealth.implementation;
-import com.azure.core.management.SystemData;
import com.azure.resourcemanager.resourcehealth.fluent.models.EventInner;
import com.azure.resourcemanager.resourcehealth.models.Event;
import com.azure.resourcemanager.resourcehealth.models.EventLevelValues;
@@ -13,6 +12,7 @@
import com.azure.resourcemanager.resourcehealth.models.EventPropertiesRecommendedActions;
import com.azure.resourcemanager.resourcehealth.models.EventSourceValues;
import com.azure.resourcemanager.resourcehealth.models.EventStatusValues;
+import com.azure.resourcemanager.resourcehealth.models.EventSubTypeValues;
import com.azure.resourcemanager.resourcehealth.models.EventTypeValues;
import com.azure.resourcemanager.resourcehealth.models.Faq;
import com.azure.resourcemanager.resourcehealth.models.Impact;
@@ -44,14 +44,14 @@ public String type() {
return this.innerModel().type();
}
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
public EventTypeValues eventType() {
return this.innerModel().eventType();
}
+ public EventSubTypeValues eventSubType() {
+ return this.innerModel().eventSubType();
+ }
+
public EventSourceValues eventSource() {
return this.innerModel().eventSource();
}
@@ -175,6 +175,18 @@ public String impactType() {
return this.innerModel().impactType();
}
+ public String maintenanceId() {
+ return this.innerModel().maintenanceId();
+ }
+
+ public String maintenanceType() {
+ return this.innerModel().maintenanceType();
+ }
+
+ public String argQuery() {
+ return this.innerModel().argQuery();
+ }
+
public EventInner innerModel() {
return this.innerObject;
}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/MicrosoftResourceHealthBuilder.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/MicrosoftResourceHealthBuilder.java
index 07a1e0d60e7ea..6c99127991911 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/MicrosoftResourceHealthBuilder.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/MicrosoftResourceHealthBuilder.java
@@ -137,7 +137,7 @@ public MicrosoftResourceHealthImpl buildClient() {
localSerializerAdapter,
localDefaultPollInterval,
localEnvironment,
- subscriptionId,
+ this.subscriptionId,
localEndpoint);
return client;
}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/MicrosoftResourceHealthImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/MicrosoftResourceHealthImpl.java
index bdef7bdfa60d5..f99fe1b005e17 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/MicrosoftResourceHealthImpl.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/MicrosoftResourceHealthImpl.java
@@ -259,7 +259,7 @@ public EmergingIssuesClient getEmergingIssues() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2022-10-01";
+ this.apiVersion = "2023-07-01-preview";
this.availabilityStatuses = new AvailabilityStatusesClientImpl(this);
this.operations = new OperationsClientImpl(this);
this.metadatas = new MetadatasClientImpl(this);
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EmergingIssuesGetResult.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EmergingIssuesGetResult.java
index 90239235eb33c..d52415f614556 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EmergingIssuesGetResult.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EmergingIssuesGetResult.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.resourcehealth.models;
-import com.azure.core.management.SystemData;
import com.azure.resourcemanager.resourcehealth.fluent.models.EmergingIssuesGetResultInner;
import java.time.OffsetDateTime;
import java.util.List;
@@ -32,13 +31,6 @@ public interface EmergingIssuesGetResult {
*/
String type();
- /**
- * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
- *
- * @return the systemData value.
- */
- SystemData systemData();
-
/**
* Gets the refreshTimestamp property: Timestamp for when last time refreshed for ongoing emerging issue.
*
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Event.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Event.java
index 04289b9b2d5fb..11d4ea55243cf 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Event.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Event.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.resourcehealth.models;
-import com.azure.core.management.SystemData;
import com.azure.resourcemanager.resourcehealth.fluent.models.EventInner;
import java.time.OffsetDateTime;
import java.util.List;
@@ -33,18 +32,19 @@ public interface Event {
String type();
/**
- * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ * Gets the eventType property: Type of event.
*
- * @return the systemData value.
+ * @return the eventType value.
*/
- SystemData systemData();
+ EventTypeValues eventType();
/**
- * Gets the eventType property: Type of event.
+ * Gets the eventSubType property: Sub type of the event. Currently used to determine retirement communications for
+ * health advisory events.
*
- * @return the eventType value.
+ * @return the eventSubType value.
*/
- EventTypeValues eventType();
+ EventSubTypeValues eventSubType();
/**
* Gets the eventSource property: Source of event.
@@ -239,6 +239,28 @@ public interface Event {
*/
String impactType();
+ /**
+ * Gets the maintenanceId property: Unique identifier for planned maintenance event.
+ *
+ * @return the maintenanceId value.
+ */
+ String maintenanceId();
+
+ /**
+ * Gets the maintenanceType property: The type of planned maintenance event.
+ *
+ * @return the maintenanceType value.
+ */
+ String maintenanceType();
+
+ /**
+ * Gets the argQuery property: Azure Resource Graph query to fetch the affected resources from their existing Azure
+ * Resource Graph locations.
+ *
+ * @return the argQuery value.
+ */
+ String argQuery();
+
/**
* Gets the inner com.azure.resourcemanager.resourcehealth.fluent.models.EventInner object.
*
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventImpactedResource.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventImpactedResource.java
index f1ca85bc835c5..7990723957be1 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventImpactedResource.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventImpactedResource.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.resourcehealth.models;
-import com.azure.core.management.SystemData;
import com.azure.resourcemanager.resourcehealth.fluent.models.EventImpactedResourceInner;
import java.util.List;
@@ -31,13 +30,6 @@ public interface EventImpactedResource {
*/
String type();
- /**
- * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
- *
- * @return the systemData value.
- */
- SystemData systemData();
-
/**
* Gets the targetResourceType property: Resource type within Microsoft cloud.
*
@@ -59,6 +51,41 @@ public interface EventImpactedResource {
*/
String targetRegion();
+ /**
+ * Gets the resourceName property: Resource name of the impacted resource.
+ *
+ * @return the resourceName value.
+ */
+ String resourceName();
+
+ /**
+ * Gets the resourceGroup property: Resource group name of the impacted resource.
+ *
+ * @return the resourceGroup value.
+ */
+ String resourceGroup();
+
+ /**
+ * Gets the status property: Status of the impacted resource.
+ *
+ * @return the status value.
+ */
+ String status();
+
+ /**
+ * Gets the maintenanceStartTime property: Start time of maintenance for the impacted resource.
+ *
+ * @return the maintenanceStartTime value.
+ */
+ String maintenanceStartTime();
+
+ /**
+ * Gets the maintenanceEndTime property: End time of maintenance for the impacted resource.
+ *
+ * @return the maintenanceEndTime value.
+ */
+ String maintenanceEndTime();
+
/**
* Gets the info property: Additional information.
*
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventSubTypeValues.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventSubTypeValues.java
new file mode 100644
index 0000000000000..89bc131be2409
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventSubTypeValues.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.resourcehealth.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Sub type of the event. Currently used to determine retirement communications for health advisory events. */
+public final class EventSubTypeValues extends ExpandableStringEnum {
+ /** Static value Retirement for EventSubTypeValues. */
+ public static final EventSubTypeValues RETIREMENT = fromString("Retirement");
+
+ /**
+ * Creates a new instance of EventSubTypeValues value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public EventSubTypeValues() {
+ }
+
+ /**
+ * Creates or finds a EventSubTypeValues from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding EventSubTypeValues.
+ */
+ @JsonCreator
+ public static EventSubTypeValues fromString(String name) {
+ return fromString(name, EventSubTypeValues.class);
+ }
+
+ /**
+ * Gets known EventSubTypeValues values.
+ *
+ * @return known EventSubTypeValues values.
+ */
+ public static Collection values() {
+ return values(EventSubTypeValues.class);
+ }
+}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesGetByResourceSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesGetByResourceSamples.java
index 71ba09cb9d348..37de5ca7b5ae1 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesGetByResourceSamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesGetByResourceSamples.java
@@ -7,7 +7,7 @@
/** Samples for AvailabilityStatuses GetByResource. */
public final class AvailabilityStatusesGetByResourceSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/AvailabilityStatus_GetByResource.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/AvailabilityStatus_GetByResource.json
*/
/**
* Sample code: GetCurrentHealthByResource.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListByResourceGroupSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListByResourceGroupSamples.java
index a4a92e5786af6..195207079a7d9 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListByResourceGroupSamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for AvailabilityStatuses ListByResourceGroup. */
public final class AvailabilityStatusesListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/AvailabilityStatuses_ListByResourceGroup.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/AvailabilityStatuses_ListByResourceGroup.json
*/
/**
* Sample code: ListByResourceGroup.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListBySubscriptionIdSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListBySubscriptionIdSamples.java
index 5956cb5ec49ab..cba14abd81ef5 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListBySubscriptionIdSamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListBySubscriptionIdSamples.java
@@ -7,7 +7,7 @@
/** Samples for AvailabilityStatuses ListBySubscriptionId. */
public final class AvailabilityStatusesListBySubscriptionIdSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/AvailabilityStatuses_ListBySubscriptionId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/AvailabilityStatuses_ListBySubscriptionId.json
*/
/**
* Sample code: ListHealthBySubscriptionId.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListSamples.java
index 7644e2d923a9b..b1e9171554ea0 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListSamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListSamples.java
@@ -7,7 +7,7 @@
/** Samples for AvailabilityStatuses List. */
public final class AvailabilityStatusesListSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/AvailabilityStatuses_List.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/AvailabilityStatuses_List.json
*/
/**
* Sample code: GetHealthHistoryByResource.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ChildAvailabilityStatusesGetByResourceSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ChildAvailabilityStatusesGetByResourceSamples.java
index c8d484425692c..1a5b47ea5e76f 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ChildAvailabilityStatusesGetByResourceSamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ChildAvailabilityStatusesGetByResourceSamples.java
@@ -7,7 +7,7 @@
/** Samples for ChildAvailabilityStatuses GetByResource. */
public final class ChildAvailabilityStatusesGetByResourceSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/ChildAvailabilityStatus_GetByResource.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/ChildAvailabilityStatus_GetByResource.json
*/
/**
* Sample code: GetChildCurrentHealthByResource.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ChildAvailabilityStatusesListSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ChildAvailabilityStatusesListSamples.java
index 5f0c684c6a427..fc94de37fd001 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ChildAvailabilityStatusesListSamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ChildAvailabilityStatusesListSamples.java
@@ -7,7 +7,7 @@
/** Samples for ChildAvailabilityStatuses List. */
public final class ChildAvailabilityStatusesListSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/ChildAvailabilityStatuses_List.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/ChildAvailabilityStatuses_List.json
*/
/**
* Sample code: GetChildHealthHistoryByResource.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ChildResourcesListSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ChildResourcesListSamples.java
index ed897190281cc..4384f7a3de94c 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ChildResourcesListSamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ChildResourcesListSamples.java
@@ -7,7 +7,7 @@
/** Samples for ChildResources List. */
public final class ChildResourcesListSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/ChildResources_List.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/ChildResources_List.json
*/
/**
* Sample code: GetCurrentChildHealthByResource.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssuesGetSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssuesGetSamples.java
index 0db74f25b0dc8..536e917a830aa 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssuesGetSamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssuesGetSamples.java
@@ -9,7 +9,7 @@
/** Samples for EmergingIssues Get. */
public final class EmergingIssuesGetSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/EmergingIssues_Get.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/EmergingIssues_Get.json
*/
/**
* Sample code: GetEmergingIssues.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssuesListSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssuesListSamples.java
index b7b1cbfa6e99f..18900bb0245a5 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssuesListSamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssuesListSamples.java
@@ -7,7 +7,7 @@
/** Samples for EmergingIssues List. */
public final class EmergingIssuesListSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/EmergingIssues_List.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/EmergingIssues_List.json
*/
/**
* Sample code: GetEmergingIssues.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventOperationFetchDetailsBySubscriptionIdAndTrackingIdSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventOperationFetchDetailsBySubscriptionIdAndTrackingIdSamples.java
index cb29283681feb..9a1f58788c9b0 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventOperationFetchDetailsBySubscriptionIdAndTrackingIdSamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventOperationFetchDetailsBySubscriptionIdAndTrackingIdSamples.java
@@ -7,7 +7,7 @@
/** Samples for EventOperation FetchDetailsBySubscriptionIdAndTrackingId. */
public final class EventOperationFetchDetailsBySubscriptionIdAndTrackingIdSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Event_fetchDetailsBySubscriptionIdAndTrackingId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/Event_fetchDetailsBySubscriptionIdAndTrackingId.json
*/
/**
* Sample code: EventDetailsBySubscriptionIdAndTrackingId.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventOperationFetchDetailsByTenantIdAndTrackingIdSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventOperationFetchDetailsByTenantIdAndTrackingIdSamples.java
index 1c9785590a07a..23bf8971a7331 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventOperationFetchDetailsByTenantIdAndTrackingIdSamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventOperationFetchDetailsByTenantIdAndTrackingIdSamples.java
@@ -7,7 +7,7 @@
/** Samples for EventOperation FetchDetailsByTenantIdAndTrackingId. */
public final class EventOperationFetchDetailsByTenantIdAndTrackingIdSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Event_fetchDetailsByTenantIdAndTrackingId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/Event_fetchDetailsByTenantIdAndTrackingId.json
*/
/**
* Sample code: EventDetailsByTenantIdAndTrackingId.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventOperationGetBySubscriptionIdAndTrackingIdSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventOperationGetBySubscriptionIdAndTrackingIdSamples.java
index d86822c705eb3..859c8220a18b3 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventOperationGetBySubscriptionIdAndTrackingIdSamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventOperationGetBySubscriptionIdAndTrackingIdSamples.java
@@ -7,7 +7,7 @@
/** Samples for EventOperation GetBySubscriptionIdAndTrackingId. */
public final class EventOperationGetBySubscriptionIdAndTrackingIdSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Event_GetBySubscriptionIdAndTrackingId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/Event_GetBySubscriptionIdAndTrackingId.json
*/
/**
* Sample code: SecurityAdvisoriesEventBySubscriptionIdAndTrackingId.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventOperationGetByTenantIdAndTrackingIdSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventOperationGetByTenantIdAndTrackingIdSamples.java
index f71ef111579b1..a8e0bf928e327 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventOperationGetByTenantIdAndTrackingIdSamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventOperationGetByTenantIdAndTrackingIdSamples.java
@@ -7,7 +7,7 @@
/** Samples for EventOperation GetByTenantIdAndTrackingId. */
public final class EventOperationGetByTenantIdAndTrackingIdSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Event_GetByTenantIdAndTrackingId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/Event_GetByTenantIdAndTrackingId.json
*/
/**
* Sample code: EventByTenantIdAndTrackingId.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventsOperationListBySingleResourceSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventsOperationListBySingleResourceSamples.java
index 349fd359f661a..1af632e88bec5 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventsOperationListBySingleResourceSamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventsOperationListBySingleResourceSamples.java
@@ -7,7 +7,7 @@
/** Samples for EventsOperation ListBySingleResource. */
public final class EventsOperationListBySingleResourceSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Events_ListBySingleResource.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/Events_ListBySingleResource.json
*/
/**
* Sample code: ListEventsBySingleResource.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventsOperationListByTenantIdSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventsOperationListByTenantIdSamples.java
index 48ec5b4df008d..e53185a888dd5 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventsOperationListByTenantIdSamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventsOperationListByTenantIdSamples.java
@@ -7,7 +7,7 @@
/** Samples for EventsOperation ListByTenantId. */
public final class EventsOperationListByTenantIdSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Events_ListByTenantId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/Events_ListByTenantId.json
*/
/**
* Sample code: ListEventsByTenantId.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventsOperationListSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventsOperationListSamples.java
index 117ee38090c8c..02d1b782b2752 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventsOperationListSamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/EventsOperationListSamples.java
@@ -7,7 +7,7 @@
/** Samples for EventsOperation List. */
public final class EventsOperationListSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Events_ListBySubscriptionId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/Events_ListBySubscriptionId.json
*/
/**
* Sample code: ListEventsBySubscriptionId.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesGetByTenantIdSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesGetByTenantIdSamples.java
index 5c5c026ab89c8..9e4d06cebcdd1 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesGetByTenantIdSamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesGetByTenantIdSamples.java
@@ -7,7 +7,7 @@
/** Samples for ImpactedResources GetByTenantId. */
public final class ImpactedResourcesGetByTenantIdSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/ImpactedResources_GetByTenantId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/ImpactedResources_GetByTenantId.json
*/
/**
* Sample code: ImpactedResourcesGet.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesGetSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesGetSamples.java
index ac28fa587d227..079536f0b631b 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesGetSamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for ImpactedResources Get. */
public final class ImpactedResourcesGetSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/ImpactedResources_Get.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/ImpactedResources_Get.json
*/
/**
* Sample code: ImpactedResourcesGet.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesListBySubscriptionIdAndEventIdSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesListBySubscriptionIdAndEventIdSamples.java
index cee1e82fe2cee..60c6d8d6b6220 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesListBySubscriptionIdAndEventIdSamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesListBySubscriptionIdAndEventIdSamples.java
@@ -7,7 +7,7 @@
/** Samples for ImpactedResources ListBySubscriptionIdAndEventId. */
public final class ImpactedResourcesListBySubscriptionIdAndEventIdSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/ImpactedResources_ListBySubscriptionId_ListByEventId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/ImpactedResources_ListBySubscriptionId_ListByEventId.json
*/
/**
* Sample code: ListImpactedResourcesBySubscriptionId.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesListByTenantIdAndEventIdSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesListByTenantIdAndEventIdSamples.java
index bf50e9560c8fe..63b8e90c402c2 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesListByTenantIdAndEventIdSamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesListByTenantIdAndEventIdSamples.java
@@ -7,7 +7,7 @@
/** Samples for ImpactedResources ListByTenantIdAndEventId. */
public final class ImpactedResourcesListByTenantIdAndEventIdSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/ImpactedResources_ListByTenantId_ListByEventId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/ImpactedResources_ListByTenantId_ListByEventId.json
*/
/**
* Sample code: ListEventsByTenantId.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/MetadataGetEntitySamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/MetadataGetEntitySamples.java
index bf5324d6cbec1..86a44a86141ae 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/MetadataGetEntitySamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/MetadataGetEntitySamples.java
@@ -7,7 +7,7 @@
/** Samples for Metadata GetEntity. */
public final class MetadataGetEntitySamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Metadata_GetEntity.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/Metadata_GetEntity.json
*/
/**
* Sample code: GetMetadata.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/MetadataListSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/MetadataListSamples.java
index a27f7d3d66cf7..01b03ae65c6f2 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/MetadataListSamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/MetadataListSamples.java
@@ -7,7 +7,7 @@
/** Samples for Metadata List. */
public final class MetadataListSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Metadata_List.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/Metadata_List.json
*/
/**
* Sample code: GetMetadata.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/OperationsListSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/OperationsListSamples.java
index 15b5bf1c940a6..5a4eb1a59cd97 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/OperationsListSamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/OperationsListSamples.java
@@ -7,7 +7,7 @@
/** Samples for Operations List. */
public final class OperationsListSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Operations_List.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/Operations_List.json
*/
/**
* Sample code: GetOperationsList.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdSamples.java
index cc1e87860458f..461b41cf9ce61 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdSamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdSamples.java
@@ -7,7 +7,7 @@
/** Samples for SecurityAdvisoryImpactedResources ListBySubscriptionIdAndEventId. */
public final class SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/SecurityAdvisoryImpactedResources_ListBySubscriptionId_ListByEventId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/SecurityAdvisoryImpactedResources_ListBySubscriptionId_ListByEventId.json
*/
/**
* Sample code: ListSecurityAdvisoryImpactedResourcesBySubscriptionId.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdSamples.java
index c876674bfb18d..d11c7408341b6 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdSamples.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdSamples.java
@@ -7,7 +7,7 @@
/** Samples for SecurityAdvisoryImpactedResources ListByTenantIdAndEventId. */
public final class SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/SecurityAdvisoryImpactedResources_ListByTenantId_ListByEventId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-07-01-preview/examples/SecurityAdvisoryImpactedResources_ListByTenantId_ListByEventId.json
*/
/**
* Sample code: ListSecurityAdvisoryImpactedResourcesByTenantId.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusInnerTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusInnerTests.java
deleted file mode 100644
index f5c376e1b666b..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusInnerTests.java
+++ /dev/null
@@ -1,161 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.fluent.models.AvailabilityStatusInner;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStateValues;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatusProperties;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatusPropertiesRecentlyResolved;
-import com.azure.resourcemanager.resourcehealth.models.ReasonChronicityTypes;
-import com.azure.resourcemanager.resourcehealth.models.RecommendedAction;
-import com.azure.resourcemanager.resourcehealth.models.ServiceImpactingEvent;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AvailabilityStatusInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AvailabilityStatusInner model =
- BinaryData
- .fromString(
- "{\"id\":\"yoqpsoaccta\",\"name\":\"kljla\",\"type\":\"cr\",\"location\":\"fdfdosygexpa\",\"properties\":{\"availabilityState\":\"Unavailable\",\"title\":\"msbzjhcrz\",\"summary\":\"dphlxaolt\",\"detailedStatus\":\"trg\",\"reasonType\":\"bpf\",\"context\":\"s\",\"category\":\"zgvfcjrwz\",\"articleId\":\"xjtfelluwfzit\",\"rootCauseAttributionTime\":\"2021-10-17T22:50:15Z\",\"healthEventType\":\"qfpjk\",\"healthEventCause\":\"xofpdvhpfxxypi\",\"healthEventCategory\":\"nmayhuybb\",\"healthEventId\":\"odepoogin\",\"resolutionETA\":\"2021-04-24T19:55:27Z\",\"occuredTime\":\"2021-11-03T11:27:22Z\",\"reasonChronicity\":\"Persistent\",\"reportedTime\":\"2021-06-18T10:02:36Z\",\"recentlyResolved\":{\"unavailableOccuredTime\":\"2021-11-24T18:41:38Z\",\"resolvedTime\":\"2021-08-23T15:48:59Z\",\"unavailableSummary\":\"theotusiv\"},\"recommendedActions\":[{\"action\":\"ciqihnhung\",\"actionUrl\":\"jzrnf\",\"_ActionUrl.Comment\":\"xgispemvtzfkufu\",\"actionUrlText\":\"jofxqe\"}],\"serviceImpactingEvents\":[{\"eventStartTime\":\"2021-11-09T06:35:40Z\",\"eventStatusLastModifiedTime\":\"2021-11-08T09:04:14Z\",\"correlationId\":\"qjbasvms\"}]}}")
- .toObject(AvailabilityStatusInner.class);
- Assertions.assertEquals("yoqpsoaccta", model.id());
- Assertions.assertEquals("kljla", model.name());
- Assertions.assertEquals("cr", model.type());
- Assertions.assertEquals("fdfdosygexpa", model.location());
- Assertions.assertEquals(AvailabilityStateValues.UNAVAILABLE, model.properties().availabilityState());
- Assertions.assertEquals("msbzjhcrz", model.properties().title());
- Assertions.assertEquals("dphlxaolt", model.properties().summary());
- Assertions.assertEquals("trg", model.properties().detailedStatus());
- Assertions.assertEquals("bpf", model.properties().reasonType());
- Assertions.assertEquals("s", model.properties().context());
- Assertions.assertEquals("zgvfcjrwz", model.properties().category());
- Assertions.assertEquals("xjtfelluwfzit", model.properties().articleId());
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-10-17T22:50:15Z"), model.properties().rootCauseAttributionTime());
- Assertions.assertEquals("qfpjk", model.properties().healthEventType());
- Assertions.assertEquals("xofpdvhpfxxypi", model.properties().healthEventCause());
- Assertions.assertEquals("nmayhuybb", model.properties().healthEventCategory());
- Assertions.assertEquals("odepoogin", model.properties().healthEventId());
- Assertions.assertEquals(OffsetDateTime.parse("2021-04-24T19:55:27Z"), model.properties().resolutionEta());
- Assertions.assertEquals(OffsetDateTime.parse("2021-11-03T11:27:22Z"), model.properties().occuredTime());
- Assertions.assertEquals(ReasonChronicityTypes.PERSISTENT, model.properties().reasonChronicity());
- Assertions.assertEquals(OffsetDateTime.parse("2021-06-18T10:02:36Z"), model.properties().reportedTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-11-24T18:41:38Z"),
- model.properties().recentlyResolved().unavailableOccuredTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-08-23T15:48:59Z"), model.properties().recentlyResolved().resolvedTime());
- Assertions.assertEquals("theotusiv", model.properties().recentlyResolved().unavailableSummary());
- Assertions.assertEquals("ciqihnhung", model.properties().recommendedActions().get(0).action());
- Assertions.assertEquals("jzrnf", model.properties().recommendedActions().get(0).actionUrl());
- Assertions.assertEquals("jofxqe", model.properties().recommendedActions().get(0).actionUrlText());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-11-09T06:35:40Z"),
- model.properties().serviceImpactingEvents().get(0).eventStartTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-11-08T09:04:14Z"),
- model.properties().serviceImpactingEvents().get(0).eventStatusLastModifiedTime());
- Assertions.assertEquals("qjbasvms", model.properties().serviceImpactingEvents().get(0).correlationId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AvailabilityStatusInner model =
- new AvailabilityStatusInner()
- .withId("yoqpsoaccta")
- .withName("kljla")
- .withType("cr")
- .withLocation("fdfdosygexpa")
- .withProperties(
- new AvailabilityStatusProperties()
- .withAvailabilityState(AvailabilityStateValues.UNAVAILABLE)
- .withTitle("msbzjhcrz")
- .withSummary("dphlxaolt")
- .withDetailedStatus("trg")
- .withReasonType("bpf")
- .withContext("s")
- .withCategory("zgvfcjrwz")
- .withArticleId("xjtfelluwfzit")
- .withRootCauseAttributionTime(OffsetDateTime.parse("2021-10-17T22:50:15Z"))
- .withHealthEventType("qfpjk")
- .withHealthEventCause("xofpdvhpfxxypi")
- .withHealthEventCategory("nmayhuybb")
- .withHealthEventId("odepoogin")
- .withResolutionEta(OffsetDateTime.parse("2021-04-24T19:55:27Z"))
- .withOccuredTime(OffsetDateTime.parse("2021-11-03T11:27:22Z"))
- .withReasonChronicity(ReasonChronicityTypes.PERSISTENT)
- .withReportedTime(OffsetDateTime.parse("2021-06-18T10:02:36Z"))
- .withRecentlyResolved(
- new AvailabilityStatusPropertiesRecentlyResolved()
- .withUnavailableOccuredTime(OffsetDateTime.parse("2021-11-24T18:41:38Z"))
- .withResolvedTime(OffsetDateTime.parse("2021-08-23T15:48:59Z"))
- .withUnavailableSummary("theotusiv"))
- .withRecommendedActions(
- Arrays
- .asList(
- new RecommendedAction()
- .withAction("ciqihnhung")
- .withActionUrl("jzrnf")
- .withActionUrlText("jofxqe")))
- .withServiceImpactingEvents(
- Arrays
- .asList(
- new ServiceImpactingEvent()
- .withEventStartTime(OffsetDateTime.parse("2021-11-09T06:35:40Z"))
- .withEventStatusLastModifiedTime(OffsetDateTime.parse("2021-11-08T09:04:14Z"))
- .withCorrelationId("qjbasvms"))));
- model = BinaryData.fromObject(model).toObject(AvailabilityStatusInner.class);
- Assertions.assertEquals("yoqpsoaccta", model.id());
- Assertions.assertEquals("kljla", model.name());
- Assertions.assertEquals("cr", model.type());
- Assertions.assertEquals("fdfdosygexpa", model.location());
- Assertions.assertEquals(AvailabilityStateValues.UNAVAILABLE, model.properties().availabilityState());
- Assertions.assertEquals("msbzjhcrz", model.properties().title());
- Assertions.assertEquals("dphlxaolt", model.properties().summary());
- Assertions.assertEquals("trg", model.properties().detailedStatus());
- Assertions.assertEquals("bpf", model.properties().reasonType());
- Assertions.assertEquals("s", model.properties().context());
- Assertions.assertEquals("zgvfcjrwz", model.properties().category());
- Assertions.assertEquals("xjtfelluwfzit", model.properties().articleId());
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-10-17T22:50:15Z"), model.properties().rootCauseAttributionTime());
- Assertions.assertEquals("qfpjk", model.properties().healthEventType());
- Assertions.assertEquals("xofpdvhpfxxypi", model.properties().healthEventCause());
- Assertions.assertEquals("nmayhuybb", model.properties().healthEventCategory());
- Assertions.assertEquals("odepoogin", model.properties().healthEventId());
- Assertions.assertEquals(OffsetDateTime.parse("2021-04-24T19:55:27Z"), model.properties().resolutionEta());
- Assertions.assertEquals(OffsetDateTime.parse("2021-11-03T11:27:22Z"), model.properties().occuredTime());
- Assertions.assertEquals(ReasonChronicityTypes.PERSISTENT, model.properties().reasonChronicity());
- Assertions.assertEquals(OffsetDateTime.parse("2021-06-18T10:02:36Z"), model.properties().reportedTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-11-24T18:41:38Z"),
- model.properties().recentlyResolved().unavailableOccuredTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-08-23T15:48:59Z"), model.properties().recentlyResolved().resolvedTime());
- Assertions.assertEquals("theotusiv", model.properties().recentlyResolved().unavailableSummary());
- Assertions.assertEquals("ciqihnhung", model.properties().recommendedActions().get(0).action());
- Assertions.assertEquals("jzrnf", model.properties().recommendedActions().get(0).actionUrl());
- Assertions.assertEquals("jofxqe", model.properties().recommendedActions().get(0).actionUrlText());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-11-09T06:35:40Z"),
- model.properties().serviceImpactingEvents().get(0).eventStartTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-11-08T09:04:14Z"),
- model.properties().serviceImpactingEvents().get(0).eventStatusLastModifiedTime());
- Assertions.assertEquals("qjbasvms", model.properties().serviceImpactingEvents().get(0).correlationId());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusListResultTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusListResultTests.java
deleted file mode 100644
index dcc9f851c22f9..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusListResultTests.java
+++ /dev/null
@@ -1,179 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.fluent.models.AvailabilityStatusInner;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStateValues;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatusListResult;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatusProperties;
-import com.azure.resourcemanager.resourcehealth.models.ReasonChronicityTypes;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AvailabilityStatusListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AvailabilityStatusListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"id\":\"hq\",\"name\":\"gjxpybczmehmt\",\"type\":\"pbsphrupidgs\",\"location\":\"bejhphoycmsxa\",\"properties\":{\"availabilityState\":\"Degraded\",\"title\":\"bmtqioq\",\"summary\":\"ehtbm\",\"detailedStatus\":\"p\",\"reasonType\":\"noi\",\"context\":\"wlrxyb\",\"category\":\"oqijgkdmbpaz\",\"articleId\":\"bc\",\"rootCauseAttributionTime\":\"2021-08-16T12:22:59Z\",\"healthEventType\":\"znrb\",\"healthEventCause\":\"qqjnqgl\",\"healthEventCategory\":\"gnufoooj\",\"healthEventId\":\"ifsqesaagdfmg\",\"resolutionETA\":\"2021-05-15T08:16:53Z\",\"occuredTime\":\"2021-07-04T01:57:27Z\",\"reasonChronicity\":\"Transient\",\"reportedTime\":\"2021-05-21T02:09:04Z\",\"recommendedActions\":[],\"serviceImpactingEvents\":[]}},{\"id\":\"vktsizntocipao\",\"name\":\"jpsq\",\"type\":\"mpoyfd\",\"location\":\"ogknygjofjdd\",\"properties\":{\"availabilityState\":\"Available\",\"title\":\"eupewnwreitjz\",\"summary\":\"lusarh\",\"detailedStatus\":\"fcqhsmyurkd\",\"reasonType\":\"lx\",\"context\":\"kuksjtxukcdm\",\"category\":\"rcryuanzwuxzdxta\",\"articleId\":\"lhmwhfpmrqobm\",\"rootCauseAttributionTime\":\"2021-05-19T00:26:38Z\",\"healthEventType\":\"nryrtihf\",\"healthEventCause\":\"ijbpzvgnwzsymgl\",\"healthEventCategory\":\"fcyzkohdbihanufh\",\"healthEventId\":\"bj\",\"resolutionETA\":\"2021-10-05T18:31:22Z\",\"occuredTime\":\"2021-11-25T18:32:18Z\",\"reasonChronicity\":\"Transient\",\"reportedTime\":\"2021-03-22T18:05:05Z\",\"recommendedActions\":[],\"serviceImpactingEvents\":[]}},{\"id\":\"fpikxwczb\",\"name\":\"cnpqxuhivyqniwby\",\"type\":\"k\",\"location\":\"dumjgrtfwvuk\",\"properties\":{\"availabilityState\":\"Degraded\",\"title\":\"ccsnhsjc\",\"summary\":\"ejhkry\",\"detailedStatus\":\"napczwlokjy\",\"reasonType\":\"kkvnipjox\",\"context\":\"nchgej\",\"category\":\"odmailzyd\",\"articleId\":\"o\",\"rootCauseAttributionTime\":\"2021-05-10T11:45:10Z\",\"healthEventType\":\"huxinpmqnj\",\"healthEventCause\":\"wixjsprozvcp\",\"healthEventCategory\":\"eg\",\"healthEventId\":\"wmfdatscmdvpjhul\",\"resolutionETA\":\"2021-11-19T18:36:28Z\",\"occuredTime\":\"2021-05-03T23:04:21Z\",\"reasonChronicity\":\"Persistent\",\"reportedTime\":\"2021-09-20T02:03:10Z\",\"recommendedActions\":[],\"serviceImpactingEvents\":[]}}],\"nextLink\":\"ndiodjpslwejdpv\"}")
- .toObject(AvailabilityStatusListResult.class);
- Assertions.assertEquals("hq", model.value().get(0).id());
- Assertions.assertEquals("gjxpybczmehmt", model.value().get(0).name());
- Assertions.assertEquals("pbsphrupidgs", model.value().get(0).type());
- Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).location());
- Assertions
- .assertEquals(AvailabilityStateValues.DEGRADED, model.value().get(0).properties().availabilityState());
- Assertions.assertEquals("bmtqioq", model.value().get(0).properties().title());
- Assertions.assertEquals("ehtbm", model.value().get(0).properties().summary());
- Assertions.assertEquals("p", model.value().get(0).properties().detailedStatus());
- Assertions.assertEquals("noi", model.value().get(0).properties().reasonType());
- Assertions.assertEquals("wlrxyb", model.value().get(0).properties().context());
- Assertions.assertEquals("oqijgkdmbpaz", model.value().get(0).properties().category());
- Assertions.assertEquals("bc", model.value().get(0).properties().articleId());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-08-16T12:22:59Z"),
- model.value().get(0).properties().rootCauseAttributionTime());
- Assertions.assertEquals("znrb", model.value().get(0).properties().healthEventType());
- Assertions.assertEquals("qqjnqgl", model.value().get(0).properties().healthEventCause());
- Assertions.assertEquals("gnufoooj", model.value().get(0).properties().healthEventCategory());
- Assertions.assertEquals("ifsqesaagdfmg", model.value().get(0).properties().healthEventId());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-05-15T08:16:53Z"), model.value().get(0).properties().resolutionEta());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-07-04T01:57:27Z"), model.value().get(0).properties().occuredTime());
- Assertions.assertEquals(ReasonChronicityTypes.TRANSIENT, model.value().get(0).properties().reasonChronicity());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-05-21T02:09:04Z"), model.value().get(0).properties().reportedTime());
- Assertions.assertEquals("ndiodjpslwejdpv", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AvailabilityStatusListResult model =
- new AvailabilityStatusListResult()
- .withValue(
- Arrays
- .asList(
- new AvailabilityStatusInner()
- .withId("hq")
- .withName("gjxpybczmehmt")
- .withType("pbsphrupidgs")
- .withLocation("bejhphoycmsxa")
- .withProperties(
- new AvailabilityStatusProperties()
- .withAvailabilityState(AvailabilityStateValues.DEGRADED)
- .withTitle("bmtqioq")
- .withSummary("ehtbm")
- .withDetailedStatus("p")
- .withReasonType("noi")
- .withContext("wlrxyb")
- .withCategory("oqijgkdmbpaz")
- .withArticleId("bc")
- .withRootCauseAttributionTime(OffsetDateTime.parse("2021-08-16T12:22:59Z"))
- .withHealthEventType("znrb")
- .withHealthEventCause("qqjnqgl")
- .withHealthEventCategory("gnufoooj")
- .withHealthEventId("ifsqesaagdfmg")
- .withResolutionEta(OffsetDateTime.parse("2021-05-15T08:16:53Z"))
- .withOccuredTime(OffsetDateTime.parse("2021-07-04T01:57:27Z"))
- .withReasonChronicity(ReasonChronicityTypes.TRANSIENT)
- .withReportedTime(OffsetDateTime.parse("2021-05-21T02:09:04Z"))
- .withRecommendedActions(Arrays.asList())
- .withServiceImpactingEvents(Arrays.asList())),
- new AvailabilityStatusInner()
- .withId("vktsizntocipao")
- .withName("jpsq")
- .withType("mpoyfd")
- .withLocation("ogknygjofjdd")
- .withProperties(
- new AvailabilityStatusProperties()
- .withAvailabilityState(AvailabilityStateValues.AVAILABLE)
- .withTitle("eupewnwreitjz")
- .withSummary("lusarh")
- .withDetailedStatus("fcqhsmyurkd")
- .withReasonType("lx")
- .withContext("kuksjtxukcdm")
- .withCategory("rcryuanzwuxzdxta")
- .withArticleId("lhmwhfpmrqobm")
- .withRootCauseAttributionTime(OffsetDateTime.parse("2021-05-19T00:26:38Z"))
- .withHealthEventType("nryrtihf")
- .withHealthEventCause("ijbpzvgnwzsymgl")
- .withHealthEventCategory("fcyzkohdbihanufh")
- .withHealthEventId("bj")
- .withResolutionEta(OffsetDateTime.parse("2021-10-05T18:31:22Z"))
- .withOccuredTime(OffsetDateTime.parse("2021-11-25T18:32:18Z"))
- .withReasonChronicity(ReasonChronicityTypes.TRANSIENT)
- .withReportedTime(OffsetDateTime.parse("2021-03-22T18:05:05Z"))
- .withRecommendedActions(Arrays.asList())
- .withServiceImpactingEvents(Arrays.asList())),
- new AvailabilityStatusInner()
- .withId("fpikxwczb")
- .withName("cnpqxuhivyqniwby")
- .withType("k")
- .withLocation("dumjgrtfwvuk")
- .withProperties(
- new AvailabilityStatusProperties()
- .withAvailabilityState(AvailabilityStateValues.DEGRADED)
- .withTitle("ccsnhsjc")
- .withSummary("ejhkry")
- .withDetailedStatus("napczwlokjy")
- .withReasonType("kkvnipjox")
- .withContext("nchgej")
- .withCategory("odmailzyd")
- .withArticleId("o")
- .withRootCauseAttributionTime(OffsetDateTime.parse("2021-05-10T11:45:10Z"))
- .withHealthEventType("huxinpmqnj")
- .withHealthEventCause("wixjsprozvcp")
- .withHealthEventCategory("eg")
- .withHealthEventId("wmfdatscmdvpjhul")
- .withResolutionEta(OffsetDateTime.parse("2021-11-19T18:36:28Z"))
- .withOccuredTime(OffsetDateTime.parse("2021-05-03T23:04:21Z"))
- .withReasonChronicity(ReasonChronicityTypes.PERSISTENT)
- .withReportedTime(OffsetDateTime.parse("2021-09-20T02:03:10Z"))
- .withRecommendedActions(Arrays.asList())
- .withServiceImpactingEvents(Arrays.asList()))))
- .withNextLink("ndiodjpslwejdpv");
- model = BinaryData.fromObject(model).toObject(AvailabilityStatusListResult.class);
- Assertions.assertEquals("hq", model.value().get(0).id());
- Assertions.assertEquals("gjxpybczmehmt", model.value().get(0).name());
- Assertions.assertEquals("pbsphrupidgs", model.value().get(0).type());
- Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).location());
- Assertions
- .assertEquals(AvailabilityStateValues.DEGRADED, model.value().get(0).properties().availabilityState());
- Assertions.assertEquals("bmtqioq", model.value().get(0).properties().title());
- Assertions.assertEquals("ehtbm", model.value().get(0).properties().summary());
- Assertions.assertEquals("p", model.value().get(0).properties().detailedStatus());
- Assertions.assertEquals("noi", model.value().get(0).properties().reasonType());
- Assertions.assertEquals("wlrxyb", model.value().get(0).properties().context());
- Assertions.assertEquals("oqijgkdmbpaz", model.value().get(0).properties().category());
- Assertions.assertEquals("bc", model.value().get(0).properties().articleId());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-08-16T12:22:59Z"),
- model.value().get(0).properties().rootCauseAttributionTime());
- Assertions.assertEquals("znrb", model.value().get(0).properties().healthEventType());
- Assertions.assertEquals("qqjnqgl", model.value().get(0).properties().healthEventCause());
- Assertions.assertEquals("gnufoooj", model.value().get(0).properties().healthEventCategory());
- Assertions.assertEquals("ifsqesaagdfmg", model.value().get(0).properties().healthEventId());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-05-15T08:16:53Z"), model.value().get(0).properties().resolutionEta());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-07-04T01:57:27Z"), model.value().get(0).properties().occuredTime());
- Assertions.assertEquals(ReasonChronicityTypes.TRANSIENT, model.value().get(0).properties().reasonChronicity());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-05-21T02:09:04Z"), model.value().get(0).properties().reportedTime());
- Assertions.assertEquals("ndiodjpslwejdpv", model.nextLink());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusPropertiesRecentlyResolvedTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusPropertiesRecentlyResolvedTests.java
deleted file mode 100644
index 5c30083638809..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusPropertiesRecentlyResolvedTests.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.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatusPropertiesRecentlyResolved;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-
-public final class AvailabilityStatusPropertiesRecentlyResolvedTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AvailabilityStatusPropertiesRecentlyResolved model =
- BinaryData
- .fromString(
- "{\"unavailableOccuredTime\":\"2021-03-20T08:29Z\",\"resolvedTime\":\"2021-05-05T10:20:27Z\",\"unavailableSummary\":\"ddgmb\"}")
- .toObject(AvailabilityStatusPropertiesRecentlyResolved.class);
- Assertions.assertEquals(OffsetDateTime.parse("2021-03-20T08:29Z"), model.unavailableOccuredTime());
- Assertions.assertEquals(OffsetDateTime.parse("2021-05-05T10:20:27Z"), model.resolvedTime());
- Assertions.assertEquals("ddgmb", model.unavailableSummary());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AvailabilityStatusPropertiesRecentlyResolved model =
- new AvailabilityStatusPropertiesRecentlyResolved()
- .withUnavailableOccuredTime(OffsetDateTime.parse("2021-03-20T08:29Z"))
- .withResolvedTime(OffsetDateTime.parse("2021-05-05T10:20:27Z"))
- .withUnavailableSummary("ddgmb");
- model = BinaryData.fromObject(model).toObject(AvailabilityStatusPropertiesRecentlyResolved.class);
- Assertions.assertEquals(OffsetDateTime.parse("2021-03-20T08:29Z"), model.unavailableOccuredTime());
- Assertions.assertEquals(OffsetDateTime.parse("2021-05-05T10:20:27Z"), model.resolvedTime());
- Assertions.assertEquals("ddgmb", model.unavailableSummary());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusPropertiesTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusPropertiesTests.java
deleted file mode 100644
index 341f3c20f8810..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusPropertiesTests.java
+++ /dev/null
@@ -1,166 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStateValues;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatusProperties;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatusPropertiesRecentlyResolved;
-import com.azure.resourcemanager.resourcehealth.models.ReasonChronicityTypes;
-import com.azure.resourcemanager.resourcehealth.models.RecommendedAction;
-import com.azure.resourcemanager.resourcehealth.models.ServiceImpactingEvent;
-import com.azure.resourcemanager.resourcehealth.models.ServiceImpactingEventIncidentProperties;
-import com.azure.resourcemanager.resourcehealth.models.ServiceImpactingEventStatus;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AvailabilityStatusPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AvailabilityStatusProperties model =
- BinaryData
- .fromString(
- "{\"availabilityState\":\"Unknown\",\"title\":\"gsntnbybkzgcwr\",\"summary\":\"lxxwrljdouskc\",\"detailedStatus\":\"kocrcjdkwtnhx\",\"reasonType\":\"jbiksqrglssai\",\"context\":\"p\",\"category\":\"nzl\",\"articleId\":\"fmppe\",\"rootCauseAttributionTime\":\"2021-03-28T22:28:31Z\",\"healthEventType\":\"gxsabkyq\",\"healthEventCause\":\"ujitcjcz\",\"healthEventCategory\":\"evndh\",\"healthEventId\":\"wpdappdsbdkv\",\"resolutionETA\":\"2021-04-24T00:01:09Z\",\"occuredTime\":\"2021-01-30T07:52:01Z\",\"reasonChronicity\":\"Transient\",\"reportedTime\":\"2021-06-21T23:42:54Z\",\"recentlyResolved\":{\"unavailableOccuredTime\":\"2021-01-02T14:30:26Z\",\"resolvedTime\":\"2021-05-06T05:05:41Z\",\"unavailableSummary\":\"tmrldhugjzzdatq\"},\"recommendedActions\":[{\"action\":\"dgeablgphu\",\"actionUrl\":\"cndvkaozwyiftyhx\",\"_ActionUrl.Comment\":\"rokft\",\"actionUrlText\":\"olniwpwcukjf\"}],\"serviceImpactingEvents\":[{\"eventStartTime\":\"2021-03-19T13:58:34Z\",\"eventStatusLastModifiedTime\":\"2021-01-09T05:37:53Z\",\"correlationId\":\"ryplwckbasyypn\",\"status\":{\"value\":\"sgcbac\"},\"incidentProperties\":{\"title\":\"jkot\",\"service\":\"qgoulznd\",\"region\":\"kwy\",\"incidentType\":\"gfgibm\"}},{\"eventStartTime\":\"2021-02-11T14:34:51Z\",\"eventStatusLastModifiedTime\":\"2021-09-02T02:02:12Z\",\"correlationId\":\"qsrxybzqqed\",\"status\":{\"value\":\"bciqfouflm\"},\"incidentProperties\":{\"title\":\"zsm\",\"service\":\"mglougpbkw\",\"region\":\"utduqktapspwgcu\",\"incidentType\":\"tumkdosvqwhbm\"}}]}")
- .toObject(AvailabilityStatusProperties.class);
- Assertions.assertEquals(AvailabilityStateValues.UNKNOWN, model.availabilityState());
- Assertions.assertEquals("gsntnbybkzgcwr", model.title());
- Assertions.assertEquals("lxxwrljdouskc", model.summary());
- Assertions.assertEquals("kocrcjdkwtnhx", model.detailedStatus());
- Assertions.assertEquals("jbiksqrglssai", model.reasonType());
- Assertions.assertEquals("p", model.context());
- Assertions.assertEquals("nzl", model.category());
- Assertions.assertEquals("fmppe", model.articleId());
- Assertions.assertEquals(OffsetDateTime.parse("2021-03-28T22:28:31Z"), model.rootCauseAttributionTime());
- Assertions.assertEquals("gxsabkyq", model.healthEventType());
- Assertions.assertEquals("ujitcjcz", model.healthEventCause());
- Assertions.assertEquals("evndh", model.healthEventCategory());
- Assertions.assertEquals("wpdappdsbdkv", model.healthEventId());
- Assertions.assertEquals(OffsetDateTime.parse("2021-04-24T00:01:09Z"), model.resolutionEta());
- Assertions.assertEquals(OffsetDateTime.parse("2021-01-30T07:52:01Z"), model.occuredTime());
- Assertions.assertEquals(ReasonChronicityTypes.TRANSIENT, model.reasonChronicity());
- Assertions.assertEquals(OffsetDateTime.parse("2021-06-21T23:42:54Z"), model.reportedTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-01-02T14:30:26Z"), model.recentlyResolved().unavailableOccuredTime());
- Assertions.assertEquals(OffsetDateTime.parse("2021-05-06T05:05:41Z"), model.recentlyResolved().resolvedTime());
- Assertions.assertEquals("tmrldhugjzzdatq", model.recentlyResolved().unavailableSummary());
- Assertions.assertEquals("dgeablgphu", model.recommendedActions().get(0).action());
- Assertions.assertEquals("cndvkaozwyiftyhx", model.recommendedActions().get(0).actionUrl());
- Assertions.assertEquals("olniwpwcukjf", model.recommendedActions().get(0).actionUrlText());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-03-19T13:58:34Z"), model.serviceImpactingEvents().get(0).eventStartTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-01-09T05:37:53Z"),
- model.serviceImpactingEvents().get(0).eventStatusLastModifiedTime());
- Assertions.assertEquals("ryplwckbasyypn", model.serviceImpactingEvents().get(0).correlationId());
- Assertions.assertEquals("sgcbac", model.serviceImpactingEvents().get(0).status().value());
- Assertions.assertEquals("jkot", model.serviceImpactingEvents().get(0).incidentProperties().title());
- Assertions.assertEquals("qgoulznd", model.serviceImpactingEvents().get(0).incidentProperties().service());
- Assertions.assertEquals("kwy", model.serviceImpactingEvents().get(0).incidentProperties().region());
- Assertions.assertEquals("gfgibm", model.serviceImpactingEvents().get(0).incidentProperties().incidentType());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AvailabilityStatusProperties model =
- new AvailabilityStatusProperties()
- .withAvailabilityState(AvailabilityStateValues.UNKNOWN)
- .withTitle("gsntnbybkzgcwr")
- .withSummary("lxxwrljdouskc")
- .withDetailedStatus("kocrcjdkwtnhx")
- .withReasonType("jbiksqrglssai")
- .withContext("p")
- .withCategory("nzl")
- .withArticleId("fmppe")
- .withRootCauseAttributionTime(OffsetDateTime.parse("2021-03-28T22:28:31Z"))
- .withHealthEventType("gxsabkyq")
- .withHealthEventCause("ujitcjcz")
- .withHealthEventCategory("evndh")
- .withHealthEventId("wpdappdsbdkv")
- .withResolutionEta(OffsetDateTime.parse("2021-04-24T00:01:09Z"))
- .withOccuredTime(OffsetDateTime.parse("2021-01-30T07:52:01Z"))
- .withReasonChronicity(ReasonChronicityTypes.TRANSIENT)
- .withReportedTime(OffsetDateTime.parse("2021-06-21T23:42:54Z"))
- .withRecentlyResolved(
- new AvailabilityStatusPropertiesRecentlyResolved()
- .withUnavailableOccuredTime(OffsetDateTime.parse("2021-01-02T14:30:26Z"))
- .withResolvedTime(OffsetDateTime.parse("2021-05-06T05:05:41Z"))
- .withUnavailableSummary("tmrldhugjzzdatq"))
- .withRecommendedActions(
- Arrays
- .asList(
- new RecommendedAction()
- .withAction("dgeablgphu")
- .withActionUrl("cndvkaozwyiftyhx")
- .withActionUrlText("olniwpwcukjf")))
- .withServiceImpactingEvents(
- Arrays
- .asList(
- new ServiceImpactingEvent()
- .withEventStartTime(OffsetDateTime.parse("2021-03-19T13:58:34Z"))
- .withEventStatusLastModifiedTime(OffsetDateTime.parse("2021-01-09T05:37:53Z"))
- .withCorrelationId("ryplwckbasyypn")
- .withStatus(new ServiceImpactingEventStatus().withValue("sgcbac"))
- .withIncidentProperties(
- new ServiceImpactingEventIncidentProperties()
- .withTitle("jkot")
- .withService("qgoulznd")
- .withRegion("kwy")
- .withIncidentType("gfgibm")),
- new ServiceImpactingEvent()
- .withEventStartTime(OffsetDateTime.parse("2021-02-11T14:34:51Z"))
- .withEventStatusLastModifiedTime(OffsetDateTime.parse("2021-09-02T02:02:12Z"))
- .withCorrelationId("qsrxybzqqed")
- .withStatus(new ServiceImpactingEventStatus().withValue("bciqfouflm"))
- .withIncidentProperties(
- new ServiceImpactingEventIncidentProperties()
- .withTitle("zsm")
- .withService("mglougpbkw")
- .withRegion("utduqktapspwgcu")
- .withIncidentType("tumkdosvqwhbm"))));
- model = BinaryData.fromObject(model).toObject(AvailabilityStatusProperties.class);
- Assertions.assertEquals(AvailabilityStateValues.UNKNOWN, model.availabilityState());
- Assertions.assertEquals("gsntnbybkzgcwr", model.title());
- Assertions.assertEquals("lxxwrljdouskc", model.summary());
- Assertions.assertEquals("kocrcjdkwtnhx", model.detailedStatus());
- Assertions.assertEquals("jbiksqrglssai", model.reasonType());
- Assertions.assertEquals("p", model.context());
- Assertions.assertEquals("nzl", model.category());
- Assertions.assertEquals("fmppe", model.articleId());
- Assertions.assertEquals(OffsetDateTime.parse("2021-03-28T22:28:31Z"), model.rootCauseAttributionTime());
- Assertions.assertEquals("gxsabkyq", model.healthEventType());
- Assertions.assertEquals("ujitcjcz", model.healthEventCause());
- Assertions.assertEquals("evndh", model.healthEventCategory());
- Assertions.assertEquals("wpdappdsbdkv", model.healthEventId());
- Assertions.assertEquals(OffsetDateTime.parse("2021-04-24T00:01:09Z"), model.resolutionEta());
- Assertions.assertEquals(OffsetDateTime.parse("2021-01-30T07:52:01Z"), model.occuredTime());
- Assertions.assertEquals(ReasonChronicityTypes.TRANSIENT, model.reasonChronicity());
- Assertions.assertEquals(OffsetDateTime.parse("2021-06-21T23:42:54Z"), model.reportedTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-01-02T14:30:26Z"), model.recentlyResolved().unavailableOccuredTime());
- Assertions.assertEquals(OffsetDateTime.parse("2021-05-06T05:05:41Z"), model.recentlyResolved().resolvedTime());
- Assertions.assertEquals("tmrldhugjzzdatq", model.recentlyResolved().unavailableSummary());
- Assertions.assertEquals("dgeablgphu", model.recommendedActions().get(0).action());
- Assertions.assertEquals("cndvkaozwyiftyhx", model.recommendedActions().get(0).actionUrl());
- Assertions.assertEquals("olniwpwcukjf", model.recommendedActions().get(0).actionUrlText());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-03-19T13:58:34Z"), model.serviceImpactingEvents().get(0).eventStartTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-01-09T05:37:53Z"),
- model.serviceImpactingEvents().get(0).eventStatusLastModifiedTime());
- Assertions.assertEquals("ryplwckbasyypn", model.serviceImpactingEvents().get(0).correlationId());
- Assertions.assertEquals("sgcbac", model.serviceImpactingEvents().get(0).status().value());
- Assertions.assertEquals("jkot", model.serviceImpactingEvents().get(0).incidentProperties().title());
- Assertions.assertEquals("qgoulznd", model.serviceImpactingEvents().get(0).incidentProperties().service());
- Assertions.assertEquals("kwy", model.serviceImpactingEvents().get(0).incidentProperties().region());
- Assertions.assertEquals("gfgibm", model.serviceImpactingEvents().get(0).incidentProperties().incidentType());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesGetByResourceWithResponseMockTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesGetByResourceWithResponseMockTests.java
deleted file mode 100644
index ad527ca205e4d..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesGetByResourceWithResponseMockTests.java
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.resourcehealth.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.resourcehealth.ResourceHealthManager;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStateValues;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatus;
-import com.azure.resourcemanager.resourcehealth.models.ReasonChronicityTypes;
-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 AvailabilityStatusesGetByResourceWithResponseMockTests {
- @Test
- public void testGetByResourceWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"id\":\"fvhqc\",\"name\":\"ilvpnppfuflrwd\",\"type\":\"dlxyjrxs\",\"location\":\"afcnih\",\"properties\":{\"availabilityState\":\"Degraded\",\"title\":\"nedgfbc\",\"summary\":\"cvqvpkeqdcv\",\"detailedStatus\":\"hvoodsotbobzd\",\"reasonType\":\"cjwvn\",\"context\":\"ld\",\"category\":\"gx\",\"articleId\":\"rslpmutwuoeg\",\"rootCauseAttributionTime\":\"2021-08-11T07:57:19Z\",\"healthEventType\":\"jw\",\"healthEventCause\":\"yqsluic\",\"healthEventCategory\":\"ggkzzlvmbmpa\",\"healthEventId\":\"odfvuefywsbp\",\"resolutionETA\":\"2021-09-23T19:46:07Z\",\"occuredTime\":\"2021-11-18T13:44:32Z\",\"reasonChronicity\":\"Persistent\",\"reportedTime\":\"2021-03-30T01:45:45Z\",\"recentlyResolved\":{\"unavailableOccuredTime\":\"2021-03-28T00:46:50Z\",\"resolvedTime\":\"2021-06-19T21:54:55Z\",\"unavailableSummary\":\"kcpwiy\"},\"recommendedActions\":[],\"serviceImpactingEvents\":[]}}";
-
- 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);
- }));
-
- ResourceHealthManager manager =
- ResourceHealthManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- AvailabilityStatus response =
- manager
- .availabilityStatuses()
- .getByResourceWithResponse(
- "nosggbhcoh", "wdsjnkalju", "iiswacffgdkzze", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("fvhqc", response.id());
- Assertions.assertEquals("ilvpnppfuflrwd", response.name());
- Assertions.assertEquals("dlxyjrxs", response.type());
- Assertions.assertEquals("afcnih", response.location());
- Assertions.assertEquals(AvailabilityStateValues.DEGRADED, response.properties().availabilityState());
- Assertions.assertEquals("nedgfbc", response.properties().title());
- Assertions.assertEquals("cvqvpkeqdcv", response.properties().summary());
- Assertions.assertEquals("hvoodsotbobzd", response.properties().detailedStatus());
- Assertions.assertEquals("cjwvn", response.properties().reasonType());
- Assertions.assertEquals("ld", response.properties().context());
- Assertions.assertEquals("gx", response.properties().category());
- Assertions.assertEquals("rslpmutwuoeg", response.properties().articleId());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-08-11T07:57:19Z"), response.properties().rootCauseAttributionTime());
- Assertions.assertEquals("jw", response.properties().healthEventType());
- Assertions.assertEquals("yqsluic", response.properties().healthEventCause());
- Assertions.assertEquals("ggkzzlvmbmpa", response.properties().healthEventCategory());
- Assertions.assertEquals("odfvuefywsbp", response.properties().healthEventId());
- Assertions.assertEquals(OffsetDateTime.parse("2021-09-23T19:46:07Z"), response.properties().resolutionEta());
- Assertions.assertEquals(OffsetDateTime.parse("2021-11-18T13:44:32Z"), response.properties().occuredTime());
- Assertions.assertEquals(ReasonChronicityTypes.PERSISTENT, response.properties().reasonChronicity());
- Assertions.assertEquals(OffsetDateTime.parse("2021-03-30T01:45:45Z"), response.properties().reportedTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-03-28T00:46:50Z"),
- response.properties().recentlyResolved().unavailableOccuredTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-06-19T21:54:55Z"), response.properties().recentlyResolved().resolvedTime());
- Assertions.assertEquals("kcpwiy", response.properties().recentlyResolved().unavailableSummary());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListByResourceGroupMockTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListByResourceGroupMockTests.java
deleted file mode 100644
index 991c0ba3bc1d3..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListByResourceGroupMockTests.java
+++ /dev/null
@@ -1,114 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.resourcehealth.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.resourcehealth.ResourceHealthManager;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStateValues;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatus;
-import com.azure.resourcemanager.resourcehealth.models.ReasonChronicityTypes;
-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 AvailabilityStatusesListByResourceGroupMockTests {
- @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\":[{\"id\":\"hgure\",\"name\":\"kwobdagxtibq\",\"type\":\"bxwakbog\",\"location\":\"ndlkzgxhurip\",\"properties\":{\"availabilityState\":\"Unavailable\",\"title\":\"xunkbebxmubyynt\",\"summary\":\"rbqtkoie\",\"detailedStatus\":\"eotg\",\"reasonType\":\"l\",\"context\":\"muwlauwzizxbm\",\"category\":\"cjefuzmu\",\"articleId\":\"bttdumorppxe\",\"rootCauseAttributionTime\":\"2021-08-19T23:12:04Z\",\"healthEventType\":\"btbhjpglkfgohd\",\"healthEventCause\":\"uel\",\"healthEventCategory\":\"hsd\",\"healthEventId\":\"t\",\"resolutionETA\":\"2021-07-01T20:57:19Z\",\"occuredTime\":\"2020-12-24T11:07:38Z\",\"reasonChronicity\":\"Persistent\",\"reportedTime\":\"2020-12-28T14:50:34Z\",\"recentlyResolved\":{\"unavailableOccuredTime\":\"2021-03-30T20:31:18Z\",\"resolvedTime\":\"2021-10-21T16:11:01Z\",\"unavailableSummary\":\"xclvit\"},\"recommendedActions\":[],\"serviceImpactingEvents\":[]}}]}";
-
- 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);
- }));
-
- ResourceHealthManager manager =
- ResourceHealthManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager
- .availabilityStatuses()
- .listByResourceGroup("flcxoga", "konzmnsik", "mkqzeqqkdltfzxmh", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("hgure", response.iterator().next().id());
- Assertions.assertEquals("kwobdagxtibq", response.iterator().next().name());
- Assertions.assertEquals("bxwakbog", response.iterator().next().type());
- Assertions.assertEquals("ndlkzgxhurip", response.iterator().next().location());
- Assertions
- .assertEquals(
- AvailabilityStateValues.UNAVAILABLE, response.iterator().next().properties().availabilityState());
- Assertions.assertEquals("xunkbebxmubyynt", response.iterator().next().properties().title());
- Assertions.assertEquals("rbqtkoie", response.iterator().next().properties().summary());
- Assertions.assertEquals("eotg", response.iterator().next().properties().detailedStatus());
- Assertions.assertEquals("l", response.iterator().next().properties().reasonType());
- Assertions.assertEquals("muwlauwzizxbm", response.iterator().next().properties().context());
- Assertions.assertEquals("cjefuzmu", response.iterator().next().properties().category());
- Assertions.assertEquals("bttdumorppxe", response.iterator().next().properties().articleId());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-08-19T23:12:04Z"),
- response.iterator().next().properties().rootCauseAttributionTime());
- Assertions.assertEquals("btbhjpglkfgohd", response.iterator().next().properties().healthEventType());
- Assertions.assertEquals("uel", response.iterator().next().properties().healthEventCause());
- Assertions.assertEquals("hsd", response.iterator().next().properties().healthEventCategory());
- Assertions.assertEquals("t", response.iterator().next().properties().healthEventId());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-07-01T20:57:19Z"), response.iterator().next().properties().resolutionEta());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2020-12-24T11:07:38Z"), response.iterator().next().properties().occuredTime());
- Assertions
- .assertEquals(ReasonChronicityTypes.PERSISTENT, response.iterator().next().properties().reasonChronicity());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2020-12-28T14:50:34Z"), response.iterator().next().properties().reportedTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-03-30T20:31:18Z"),
- response.iterator().next().properties().recentlyResolved().unavailableOccuredTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-10-21T16:11:01Z"),
- response.iterator().next().properties().recentlyResolved().resolvedTime());
- Assertions
- .assertEquals("xclvit", response.iterator().next().properties().recentlyResolved().unavailableSummary());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListBySubscriptionIdMockTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListBySubscriptionIdMockTests.java
deleted file mode 100644
index 8367ddfc20523..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListBySubscriptionIdMockTests.java
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.resourcehealth.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.resourcehealth.ResourceHealthManager;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStateValues;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatus;
-import com.azure.resourcemanager.resourcehealth.models.ReasonChronicityTypes;
-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 AvailabilityStatusesListBySubscriptionIdMockTests {
- @Test
- public void testListBySubscriptionId() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"id\":\"rvnaenqpeh\",\"name\":\"doy\",\"type\":\"ifthnz\",\"location\":\"dslgnayqigynduh\",\"properties\":{\"availabilityState\":\"Unavailable\",\"title\":\"kthumaqolbgycdui\",\"summary\":\"tgccymvaolpss\",\"detailedStatus\":\"lfmmdnbbglzpswi\",\"reasonType\":\"mcwyhzdxssadb\",\"context\":\"nvdfznuda\",\"category\":\"vxzbncb\",\"articleId\":\"lpstdbhhxsrzdz\",\"rootCauseAttributionTime\":\"2021-10-15T02:58:18Z\",\"healthEventType\":\"scdntnevf\",\"healthEventCause\":\"jmygtdsslswtmwer\",\"healthEventCategory\":\"fzp\",\"healthEventId\":\"semwabnet\",\"resolutionETA\":\"2021-07-19T10:32:31Z\",\"occuredTime\":\"2021-08-31T12:26:12Z\",\"reasonChronicity\":\"Persistent\",\"reportedTime\":\"2021-01-02T19:13:53Z\",\"recentlyResolved\":{\"unavailableOccuredTime\":\"2021-10-13T23:51:57Z\",\"resolvedTime\":\"2021-09-12T04:45:44Z\",\"unavailableSummary\":\"bmwmbesldnkw\"},\"recommendedActions\":[],\"serviceImpactingEvents\":[]}}]}";
-
- 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);
- }));
-
- ResourceHealthManager manager =
- ResourceHealthManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager
- .availabilityStatuses()
- .listBySubscriptionId("qtaruoujmkcjhwq", "tjrybnwjewgdr", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("rvnaenqpeh", response.iterator().next().id());
- Assertions.assertEquals("doy", response.iterator().next().name());
- Assertions.assertEquals("ifthnz", response.iterator().next().type());
- Assertions.assertEquals("dslgnayqigynduh", response.iterator().next().location());
- Assertions
- .assertEquals(
- AvailabilityStateValues.UNAVAILABLE, response.iterator().next().properties().availabilityState());
- Assertions.assertEquals("kthumaqolbgycdui", response.iterator().next().properties().title());
- Assertions.assertEquals("tgccymvaolpss", response.iterator().next().properties().summary());
- Assertions.assertEquals("lfmmdnbbglzpswi", response.iterator().next().properties().detailedStatus());
- Assertions.assertEquals("mcwyhzdxssadb", response.iterator().next().properties().reasonType());
- Assertions.assertEquals("nvdfznuda", response.iterator().next().properties().context());
- Assertions.assertEquals("vxzbncb", response.iterator().next().properties().category());
- Assertions.assertEquals("lpstdbhhxsrzdz", response.iterator().next().properties().articleId());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-10-15T02:58:18Z"),
- response.iterator().next().properties().rootCauseAttributionTime());
- Assertions.assertEquals("scdntnevf", response.iterator().next().properties().healthEventType());
- Assertions.assertEquals("jmygtdsslswtmwer", response.iterator().next().properties().healthEventCause());
- Assertions.assertEquals("fzp", response.iterator().next().properties().healthEventCategory());
- Assertions.assertEquals("semwabnet", response.iterator().next().properties().healthEventId());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-07-19T10:32:31Z"), response.iterator().next().properties().resolutionEta());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-08-31T12:26:12Z"), response.iterator().next().properties().occuredTime());
- Assertions
- .assertEquals(ReasonChronicityTypes.PERSISTENT, response.iterator().next().properties().reasonChronicity());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-01-02T19:13:53Z"), response.iterator().next().properties().reportedTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-10-13T23:51:57Z"),
- response.iterator().next().properties().recentlyResolved().unavailableOccuredTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-09-12T04:45:44Z"),
- response.iterator().next().properties().recentlyResolved().resolvedTime());
- Assertions
- .assertEquals(
- "bmwmbesldnkw", response.iterator().next().properties().recentlyResolved().unavailableSummary());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListMockTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListMockTests.java
deleted file mode 100644
index 78a2d002adf4c..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListMockTests.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.resourcehealth.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.resourcehealth.ResourceHealthManager;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStateValues;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatus;
-import com.azure.resourcemanager.resourcehealth.models.ReasonChronicityTypes;
-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 AvailabilityStatusesListMockTests {
- @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\":[{\"id\":\"hojvpajqgxysmocm\",\"name\":\"fqvm\",\"type\":\"xozap\",\"location\":\"elxprglyatddck\",\"properties\":{\"availabilityState\":\"Unavailable\",\"title\":\"jrjxgciqibrhosx\",\"summary\":\"qrhzoymibmrqyib\",\"detailedStatus\":\"wfluszdt\",\"reasonType\":\"rkwofyyvoqa\",\"context\":\"iexpbtgiwbwo\",\"category\":\"washr\",\"articleId\":\"tkcnqxwb\",\"rootCauseAttributionTime\":\"2021-11-17T19:43:56Z\",\"healthEventType\":\"lpiujwaa\",\"healthEventCause\":\"pqiiobyuqe\",\"healthEventCategory\":\"qlpqwcciuq\",\"healthEventId\":\"dbutauvfbtkuwhh\",\"resolutionETA\":\"2021-03-31T16:47:11Z\",\"occuredTime\":\"2021-08-07T17:01:26Z\",\"reasonChronicity\":\"Transient\",\"reportedTime\":\"2021-01-30T06:06:55Z\",\"recentlyResolved\":{\"unavailableOccuredTime\":\"2021-09-02T16:03:41Z\",\"resolvedTime\":\"2021-08-20T12:23:25Z\",\"unavailableSummary\":\"ichkoymkcdyhb\"},\"recommendedActions\":[],\"serviceImpactingEvents\":[]}}]}";
-
- 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);
- }));
-
- ResourceHealthManager manager =
- ResourceHealthManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.availabilityStatuses().list("nubexk", "zksmondj", "quxvypomgkop", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("hojvpajqgxysmocm", response.iterator().next().id());
- Assertions.assertEquals("fqvm", response.iterator().next().name());
- Assertions.assertEquals("xozap", response.iterator().next().type());
- Assertions.assertEquals("elxprglyatddck", response.iterator().next().location());
- Assertions
- .assertEquals(
- AvailabilityStateValues.UNAVAILABLE, response.iterator().next().properties().availabilityState());
- Assertions.assertEquals("jrjxgciqibrhosx", response.iterator().next().properties().title());
- Assertions.assertEquals("qrhzoymibmrqyib", response.iterator().next().properties().summary());
- Assertions.assertEquals("wfluszdt", response.iterator().next().properties().detailedStatus());
- Assertions.assertEquals("rkwofyyvoqa", response.iterator().next().properties().reasonType());
- Assertions.assertEquals("iexpbtgiwbwo", response.iterator().next().properties().context());
- Assertions.assertEquals("washr", response.iterator().next().properties().category());
- Assertions.assertEquals("tkcnqxwb", response.iterator().next().properties().articleId());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-11-17T19:43:56Z"),
- response.iterator().next().properties().rootCauseAttributionTime());
- Assertions.assertEquals("lpiujwaa", response.iterator().next().properties().healthEventType());
- Assertions.assertEquals("pqiiobyuqe", response.iterator().next().properties().healthEventCause());
- Assertions.assertEquals("qlpqwcciuq", response.iterator().next().properties().healthEventCategory());
- Assertions.assertEquals("dbutauvfbtkuwhh", response.iterator().next().properties().healthEventId());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-03-31T16:47:11Z"), response.iterator().next().properties().resolutionEta());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-08-07T17:01:26Z"), response.iterator().next().properties().occuredTime());
- Assertions
- .assertEquals(ReasonChronicityTypes.TRANSIENT, response.iterator().next().properties().reasonChronicity());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-01-30T06:06:55Z"), response.iterator().next().properties().reportedTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-09-02T16:03:41Z"),
- response.iterator().next().properties().recentlyResolved().unavailableOccuredTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-08-20T12:23:25Z"),
- response.iterator().next().properties().recentlyResolved().resolvedTime());
- Assertions
- .assertEquals(
- "ichkoymkcdyhb", response.iterator().next().properties().recentlyResolved().unavailableSummary());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ChildAvailabilityStatusesGetByResourceWithResponseMockTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ChildAvailabilityStatusesGetByResourceWithResponseMockTests.java
deleted file mode 100644
index f63ec19656e05..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ChildAvailabilityStatusesGetByResourceWithResponseMockTests.java
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.resourcehealth.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.resourcehealth.ResourceHealthManager;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStateValues;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatus;
-import com.azure.resourcemanager.resourcehealth.models.ReasonChronicityTypes;
-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 ChildAvailabilityStatusesGetByResourceWithResponseMockTests {
- @Test
- public void testGetByResourceWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"id\":\"tawfsdjpvkvp\",\"name\":\"xbkzbzkdvncj\",\"type\":\"udurgkakmokz\",\"location\":\"jk\",\"properties\":{\"availabilityState\":\"Unknown\",\"title\":\"ouw\",\"summary\":\"gzrf\",\"detailedStatus\":\"eyebizikayuhql\",\"reasonType\":\"bs\",\"context\":\"bqwrvtldgm\",\"category\":\"gvmpipaslthaqfx\",\"articleId\":\"mwutwbdsre\",\"rootCauseAttributionTime\":\"2021-03-19T15:07:21Z\",\"healthEventType\":\"hneuyowqkd\",\"healthEventCause\":\"t\",\"healthEventCategory\":\"ib\",\"healthEventId\":\"cgpik\",\"resolutionETA\":\"2021-11-09T05:31:13Z\",\"occuredTime\":\"2021-04-11T09:56:20Z\",\"reasonChronicity\":\"Transient\",\"reportedTime\":\"2021-11-14T04:35:06Z\",\"recentlyResolved\":{\"unavailableOccuredTime\":\"2020-12-28T15:25:21Z\",\"resolvedTime\":\"2021-05-28T04:48:51Z\",\"unavailableSummary\":\"vrmbzono\"},\"recommendedActions\":[],\"serviceImpactingEvents\":[]}}";
-
- 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);
- }));
-
- ResourceHealthManager manager =
- ResourceHealthManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- AvailabilityStatus response =
- manager
- .childAvailabilityStatuses()
- .getByResourceWithResponse(
- "mkrefajpjorwkq", "yhgbijtjivfx", "sjabibs", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("tawfsdjpvkvp", response.id());
- Assertions.assertEquals("xbkzbzkdvncj", response.name());
- Assertions.assertEquals("udurgkakmokz", response.type());
- Assertions.assertEquals("jk", response.location());
- Assertions.assertEquals(AvailabilityStateValues.UNKNOWN, response.properties().availabilityState());
- Assertions.assertEquals("ouw", response.properties().title());
- Assertions.assertEquals("gzrf", response.properties().summary());
- Assertions.assertEquals("eyebizikayuhql", response.properties().detailedStatus());
- Assertions.assertEquals("bs", response.properties().reasonType());
- Assertions.assertEquals("bqwrvtldgm", response.properties().context());
- Assertions.assertEquals("gvmpipaslthaqfx", response.properties().category());
- Assertions.assertEquals("mwutwbdsre", response.properties().articleId());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-03-19T15:07:21Z"), response.properties().rootCauseAttributionTime());
- Assertions.assertEquals("hneuyowqkd", response.properties().healthEventType());
- Assertions.assertEquals("t", response.properties().healthEventCause());
- Assertions.assertEquals("ib", response.properties().healthEventCategory());
- Assertions.assertEquals("cgpik", response.properties().healthEventId());
- Assertions.assertEquals(OffsetDateTime.parse("2021-11-09T05:31:13Z"), response.properties().resolutionEta());
- Assertions.assertEquals(OffsetDateTime.parse("2021-04-11T09:56:20Z"), response.properties().occuredTime());
- Assertions.assertEquals(ReasonChronicityTypes.TRANSIENT, response.properties().reasonChronicity());
- Assertions.assertEquals(OffsetDateTime.parse("2021-11-14T04:35:06Z"), response.properties().reportedTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2020-12-28T15:25:21Z"),
- response.properties().recentlyResolved().unavailableOccuredTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-05-28T04:48:51Z"), response.properties().recentlyResolved().resolvedTime());
- Assertions.assertEquals("vrmbzono", response.properties().recentlyResolved().unavailableSummary());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ChildAvailabilityStatusesListMockTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ChildAvailabilityStatusesListMockTests.java
deleted file mode 100644
index 8bae6cfc283e3..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ChildAvailabilityStatusesListMockTests.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.resourcehealth.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.resourcehealth.ResourceHealthManager;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStateValues;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatus;
-import com.azure.resourcemanager.resourcehealth.models.ReasonChronicityTypes;
-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 ChildAvailabilityStatusesListMockTests {
- @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\":[{\"id\":\"indfpwpjyl\",\"name\":\"tlhflsjcdhszf\",\"type\":\"fbgofeljagrqmqh\",\"location\":\"vriiio\",\"properties\":{\"availabilityState\":\"Available\",\"title\":\"hfkvtvsexsowuel\",\"summary\":\"hhahhxvrhmzkwpjg\",\"detailedStatus\":\"spughftqsxhq\",\"reasonType\":\"j\",\"context\":\"kndxdigrjgu\",\"category\":\"zdmsyqtfi\",\"articleId\":\"hbotzingamvppho\",\"rootCauseAttributionTime\":\"2021-03-18T11:58:55Z\",\"healthEventType\":\"udphqamvdkfwyn\",\"healthEventCause\":\"vtbvkayh\",\"healthEventCategory\":\"nvyq\",\"healthEventId\":\"tkzwpcnpwzc\",\"resolutionETA\":\"2021-05-22T23:16:36Z\",\"occuredTime\":\"2021-02-06T15:24:08Z\",\"reasonChronicity\":\"Transient\",\"reportedTime\":\"2021-02-07T07:30:38Z\",\"recentlyResolved\":{\"unavailableOccuredTime\":\"2021-03-29T04:52:48Z\",\"resolvedTime\":\"2021-01-01T20:15:01Z\",\"unavailableSummary\":\"qfhwyg\"},\"recommendedActions\":[],\"serviceImpactingEvents\":[]}}]}";
-
- 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);
- }));
-
- ResourceHealthManager manager =
- ResourceHealthManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.childAvailabilityStatuses().list("q", "irgzp", "rlazszrnw", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("indfpwpjyl", response.iterator().next().id());
- Assertions.assertEquals("tlhflsjcdhszf", response.iterator().next().name());
- Assertions.assertEquals("fbgofeljagrqmqh", response.iterator().next().type());
- Assertions.assertEquals("vriiio", response.iterator().next().location());
- Assertions
- .assertEquals(
- AvailabilityStateValues.AVAILABLE, response.iterator().next().properties().availabilityState());
- Assertions.assertEquals("hfkvtvsexsowuel", response.iterator().next().properties().title());
- Assertions.assertEquals("hhahhxvrhmzkwpjg", response.iterator().next().properties().summary());
- Assertions.assertEquals("spughftqsxhq", response.iterator().next().properties().detailedStatus());
- Assertions.assertEquals("j", response.iterator().next().properties().reasonType());
- Assertions.assertEquals("kndxdigrjgu", response.iterator().next().properties().context());
- Assertions.assertEquals("zdmsyqtfi", response.iterator().next().properties().category());
- Assertions.assertEquals("hbotzingamvppho", response.iterator().next().properties().articleId());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-03-18T11:58:55Z"),
- response.iterator().next().properties().rootCauseAttributionTime());
- Assertions.assertEquals("udphqamvdkfwyn", response.iterator().next().properties().healthEventType());
- Assertions.assertEquals("vtbvkayh", response.iterator().next().properties().healthEventCause());
- Assertions.assertEquals("nvyq", response.iterator().next().properties().healthEventCategory());
- Assertions.assertEquals("tkzwpcnpwzc", response.iterator().next().properties().healthEventId());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-05-22T23:16:36Z"), response.iterator().next().properties().resolutionEta());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-02-06T15:24:08Z"), response.iterator().next().properties().occuredTime());
- Assertions
- .assertEquals(ReasonChronicityTypes.TRANSIENT, response.iterator().next().properties().reasonChronicity());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-02-07T07:30:38Z"), response.iterator().next().properties().reportedTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-03-29T04:52:48Z"),
- response.iterator().next().properties().recentlyResolved().unavailableOccuredTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-01-01T20:15:01Z"),
- response.iterator().next().properties().recentlyResolved().resolvedTime());
- Assertions
- .assertEquals("qfhwyg", response.iterator().next().properties().recentlyResolved().unavailableSummary());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ChildResourcesListMockTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ChildResourcesListMockTests.java
deleted file mode 100644
index 03a32a3e95b3c..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ChildResourcesListMockTests.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.resourcehealth.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.resourcehealth.ResourceHealthManager;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStateValues;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatus;
-import com.azure.resourcemanager.resourcehealth.models.ReasonChronicityTypes;
-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 ChildResourcesListMockTests {
- @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\":[{\"id\":\"psvuoymgc\",\"name\":\"lvez\",\"type\":\"pqlmfe\",\"location\":\"erqwkyhkobopg\",\"properties\":{\"availabilityState\":\"Available\",\"title\":\"wep\",\"summary\":\"pc\",\"detailedStatus\":\"kbwcc\",\"reasonType\":\"jvcdwxlpqekf\",\"context\":\"khtj\",\"category\":\"i\",\"articleId\":\"wfqatmtd\",\"rootCauseAttributionTime\":\"2021-01-16T13:50:23Z\",\"healthEventType\":\"vypgikdg\",\"healthEventCause\":\"ywkbirryuzhlhkjo\",\"healthEventCategory\":\"vqqaatjinrvgo\",\"healthEventId\":\"mfiibfggj\",\"resolutionETA\":\"2021-04-08T04:20:38Z\",\"occuredTime\":\"2021-04-15T19:39:33Z\",\"reasonChronicity\":\"Persistent\",\"reportedTime\":\"2021-01-31T00:57:49Z\",\"recentlyResolved\":{\"unavailableOccuredTime\":\"2021-07-25T08:46:43Z\",\"resolvedTime\":\"2021-04-24T02:16:24Z\",\"unavailableSummary\":\"lqwjygvjayvblm\"},\"recommendedActions\":[],\"serviceImpactingEvents\":[]}}]}";
-
- 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);
- }));
-
- ResourceHealthManager manager =
- ResourceHealthManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.childResources().list("kfxu", "emdwzrmuhapfc", "dpsqx", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("psvuoymgc", response.iterator().next().id());
- Assertions.assertEquals("lvez", response.iterator().next().name());
- Assertions.assertEquals("pqlmfe", response.iterator().next().type());
- Assertions.assertEquals("erqwkyhkobopg", response.iterator().next().location());
- Assertions
- .assertEquals(
- AvailabilityStateValues.AVAILABLE, response.iterator().next().properties().availabilityState());
- Assertions.assertEquals("wep", response.iterator().next().properties().title());
- Assertions.assertEquals("pc", response.iterator().next().properties().summary());
- Assertions.assertEquals("kbwcc", response.iterator().next().properties().detailedStatus());
- Assertions.assertEquals("jvcdwxlpqekf", response.iterator().next().properties().reasonType());
- Assertions.assertEquals("khtj", response.iterator().next().properties().context());
- Assertions.assertEquals("i", response.iterator().next().properties().category());
- Assertions.assertEquals("wfqatmtd", response.iterator().next().properties().articleId());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-01-16T13:50:23Z"),
- response.iterator().next().properties().rootCauseAttributionTime());
- Assertions.assertEquals("vypgikdg", response.iterator().next().properties().healthEventType());
- Assertions.assertEquals("ywkbirryuzhlhkjo", response.iterator().next().properties().healthEventCause());
- Assertions.assertEquals("vqqaatjinrvgo", response.iterator().next().properties().healthEventCategory());
- Assertions.assertEquals("mfiibfggj", response.iterator().next().properties().healthEventId());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-04-08T04:20:38Z"), response.iterator().next().properties().resolutionEta());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-04-15T19:39:33Z"), response.iterator().next().properties().occuredTime());
- Assertions
- .assertEquals(ReasonChronicityTypes.PERSISTENT, response.iterator().next().properties().reasonChronicity());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-01-31T00:57:49Z"), response.iterator().next().properties().reportedTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-07-25T08:46:43Z"),
- response.iterator().next().properties().recentlyResolved().unavailableOccuredTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-04-24T02:16:24Z"),
- response.iterator().next().properties().recentlyResolved().resolvedTime());
- Assertions
- .assertEquals(
- "lqwjygvjayvblm", response.iterator().next().properties().recentlyResolved().unavailableSummary());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssueImpactTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssueImpactTests.java
deleted file mode 100644
index f76788b425362..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssueImpactTests.java
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.models.EmergingIssueImpact;
-import com.azure.resourcemanager.resourcehealth.models.ImpactedRegion;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class EmergingIssueImpactTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EmergingIssueImpact model =
- BinaryData
- .fromString(
- "{\"id\":\"fxoblytkb\",\"name\":\"pe\",\"regions\":[{\"id\":\"bkrvrnsvshqj\",\"name\":\"xc\"},{\"id\":\"bfovasrruvwbhsq\",\"name\":\"ubcgjbirxb\"},{\"id\":\"bsrfbj\",\"name\":\"twss\"}]}")
- .toObject(EmergingIssueImpact.class);
- Assertions.assertEquals("fxoblytkb", model.id());
- Assertions.assertEquals("pe", model.name());
- Assertions.assertEquals("bkrvrnsvshqj", model.regions().get(0).id());
- Assertions.assertEquals("xc", model.regions().get(0).name());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EmergingIssueImpact model =
- new EmergingIssueImpact()
- .withId("fxoblytkb")
- .withName("pe")
- .withRegions(
- Arrays
- .asList(
- new ImpactedRegion().withId("bkrvrnsvshqj").withName("xc"),
- new ImpactedRegion().withId("bfovasrruvwbhsq").withName("ubcgjbirxb"),
- new ImpactedRegion().withId("bsrfbj").withName("twss")));
- model = BinaryData.fromObject(model).toObject(EmergingIssueImpact.class);
- Assertions.assertEquals("fxoblytkb", model.id());
- Assertions.assertEquals("pe", model.name());
- Assertions.assertEquals("bkrvrnsvshqj", model.regions().get(0).id());
- Assertions.assertEquals("xc", model.regions().get(0).name());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssueListResultTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssueListResultTests.java
deleted file mode 100644
index d80b316e21932..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssueListResultTests.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.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.fluent.models.EmergingIssuesGetResultInner;
-import com.azure.resourcemanager.resourcehealth.models.EmergingIssueListResult;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class EmergingIssueListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EmergingIssueListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"refreshTimestamp\":\"2021-05-16T16:57:57Z\",\"statusBanners\":[],\"statusActiveEvents\":[]},\"id\":\"mwsrcrgvxpvgo\",\"name\":\"zlfmisgwbnbbeld\",\"type\":\"wkz\"},{\"properties\":{\"refreshTimestamp\":\"2021-02-02T16:45:23Z\",\"statusBanners\":[],\"statusActiveEvents\":[]},\"id\":\"qhakauhashsf\",\"name\":\"xosow\",\"type\":\"xcug\"},{\"properties\":{\"refreshTimestamp\":\"2020-12-22T21:46:37Z\",\"statusBanners\":[],\"statusActiveEvents\":[]},\"id\":\"j\",\"name\":\"bwpucwwfvovbv\",\"type\":\"euecivyhzceuoj\"}],\"nextLink\":\"rw\"}")
- .toObject(EmergingIssueListResult.class);
- Assertions.assertEquals(OffsetDateTime.parse("2021-05-16T16:57:57Z"), model.value().get(0).refreshTimestamp());
- Assertions.assertEquals("rw", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EmergingIssueListResult model =
- new EmergingIssueListResult()
- .withValue(
- Arrays
- .asList(
- new EmergingIssuesGetResultInner()
- .withRefreshTimestamp(OffsetDateTime.parse("2021-05-16T16:57:57Z"))
- .withStatusBanners(Arrays.asList())
- .withStatusActiveEvents(Arrays.asList()),
- new EmergingIssuesGetResultInner()
- .withRefreshTimestamp(OffsetDateTime.parse("2021-02-02T16:45:23Z"))
- .withStatusBanners(Arrays.asList())
- .withStatusActiveEvents(Arrays.asList()),
- new EmergingIssuesGetResultInner()
- .withRefreshTimestamp(OffsetDateTime.parse("2020-12-22T21:46:37Z"))
- .withStatusBanners(Arrays.asList())
- .withStatusActiveEvents(Arrays.asList())))
- .withNextLink("rw");
- model = BinaryData.fromObject(model).toObject(EmergingIssueListResult.class);
- Assertions.assertEquals(OffsetDateTime.parse("2021-05-16T16:57:57Z"), model.value().get(0).refreshTimestamp());
- Assertions.assertEquals("rw", model.nextLink());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssueTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssueTests.java
deleted file mode 100644
index e1bf09b670ecf..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssueTests.java
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.fluent.models.EmergingIssue;
-import com.azure.resourcemanager.resourcehealth.models.SeverityValues;
-import com.azure.resourcemanager.resourcehealth.models.StageValues;
-import com.azure.resourcemanager.resourcehealth.models.StatusActiveEvent;
-import com.azure.resourcemanager.resourcehealth.models.StatusBanner;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class EmergingIssueTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EmergingIssue model =
- BinaryData
- .fromString(
- "{\"refreshTimestamp\":\"2021-11-26T08:31:17Z\",\"statusBanners\":[{\"title\":\"umveekgpwozuhkf\",\"message\":\"sjyofdx\",\"cloud\":\"us\",\"lastModifiedTime\":\"2021-04-08T00:20:33Z\"},{\"title\":\"uwaboekqvke\",\"message\":\"smv\",\"cloud\":\"wyjsflhhcaalnjix\",\"lastModifiedTime\":\"2021-07-17T12:41:40Z\"},{\"title\":\"awjoyaqcslyjp\",\"message\":\"idzyexznelixhnr\",\"cloud\":\"folhbnxknal\",\"lastModifiedTime\":\"2021-06-16T03:28:56Z\"}],\"statusActiveEvents\":[{\"title\":\"gdtpnapnyiro\",\"description\":\"hpigv\",\"trackingId\":\"ylgqgitxmedjvcsl\",\"startTime\":\"2021-02-07T09:50:45Z\",\"cloud\":\"wncwzzhxgktrmg\",\"severity\":\"Error\",\"stage\":\"Resolve\",\"published\":false,\"lastModifiedTime\":\"2021-10-09T08:24:24Z\",\"impacts\":[]}]}")
- .toObject(EmergingIssue.class);
- Assertions.assertEquals(OffsetDateTime.parse("2021-11-26T08:31:17Z"), model.refreshTimestamp());
- Assertions.assertEquals("umveekgpwozuhkf", model.statusBanners().get(0).title());
- Assertions.assertEquals("sjyofdx", model.statusBanners().get(0).message());
- Assertions.assertEquals("us", model.statusBanners().get(0).cloud());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-04-08T00:20:33Z"), model.statusBanners().get(0).lastModifiedTime());
- Assertions.assertEquals("gdtpnapnyiro", model.statusActiveEvents().get(0).title());
- Assertions.assertEquals("hpigv", model.statusActiveEvents().get(0).description());
- Assertions.assertEquals("ylgqgitxmedjvcsl", model.statusActiveEvents().get(0).trackingId());
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-02-07T09:50:45Z"), model.statusActiveEvents().get(0).startTime());
- Assertions.assertEquals("wncwzzhxgktrmg", model.statusActiveEvents().get(0).cloud());
- Assertions.assertEquals(SeverityValues.ERROR, model.statusActiveEvents().get(0).severity());
- Assertions.assertEquals(StageValues.RESOLVE, model.statusActiveEvents().get(0).stage());
- Assertions.assertEquals(false, model.statusActiveEvents().get(0).published());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-10-09T08:24:24Z"), model.statusActiveEvents().get(0).lastModifiedTime());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EmergingIssue model =
- new EmergingIssue()
- .withRefreshTimestamp(OffsetDateTime.parse("2021-11-26T08:31:17Z"))
- .withStatusBanners(
- Arrays
- .asList(
- new StatusBanner()
- .withTitle("umveekgpwozuhkf")
- .withMessage("sjyofdx")
- .withCloud("us")
- .withLastModifiedTime(OffsetDateTime.parse("2021-04-08T00:20:33Z")),
- new StatusBanner()
- .withTitle("uwaboekqvke")
- .withMessage("smv")
- .withCloud("wyjsflhhcaalnjix")
- .withLastModifiedTime(OffsetDateTime.parse("2021-07-17T12:41:40Z")),
- new StatusBanner()
- .withTitle("awjoyaqcslyjp")
- .withMessage("idzyexznelixhnr")
- .withCloud("folhbnxknal")
- .withLastModifiedTime(OffsetDateTime.parse("2021-06-16T03:28:56Z"))))
- .withStatusActiveEvents(
- Arrays
- .asList(
- new StatusActiveEvent()
- .withTitle("gdtpnapnyiro")
- .withDescription("hpigv")
- .withTrackingId("ylgqgitxmedjvcsl")
- .withStartTime(OffsetDateTime.parse("2021-02-07T09:50:45Z"))
- .withCloud("wncwzzhxgktrmg")
- .withSeverity(SeverityValues.ERROR)
- .withStage(StageValues.RESOLVE)
- .withPublished(false)
- .withLastModifiedTime(OffsetDateTime.parse("2021-10-09T08:24:24Z"))
- .withImpacts(Arrays.asList())));
- model = BinaryData.fromObject(model).toObject(EmergingIssue.class);
- Assertions.assertEquals(OffsetDateTime.parse("2021-11-26T08:31:17Z"), model.refreshTimestamp());
- Assertions.assertEquals("umveekgpwozuhkf", model.statusBanners().get(0).title());
- Assertions.assertEquals("sjyofdx", model.statusBanners().get(0).message());
- Assertions.assertEquals("us", model.statusBanners().get(0).cloud());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-04-08T00:20:33Z"), model.statusBanners().get(0).lastModifiedTime());
- Assertions.assertEquals("gdtpnapnyiro", model.statusActiveEvents().get(0).title());
- Assertions.assertEquals("hpigv", model.statusActiveEvents().get(0).description());
- Assertions.assertEquals("ylgqgitxmedjvcsl", model.statusActiveEvents().get(0).trackingId());
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-02-07T09:50:45Z"), model.statusActiveEvents().get(0).startTime());
- Assertions.assertEquals("wncwzzhxgktrmg", model.statusActiveEvents().get(0).cloud());
- Assertions.assertEquals(SeverityValues.ERROR, model.statusActiveEvents().get(0).severity());
- Assertions.assertEquals(StageValues.RESOLVE, model.statusActiveEvents().get(0).stage());
- Assertions.assertEquals(false, model.statusActiveEvents().get(0).published());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-10-09T08:24:24Z"), model.statusActiveEvents().get(0).lastModifiedTime());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssuesGetResultInnerTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssuesGetResultInnerTests.java
deleted file mode 100644
index 3e80d16396dd7..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssuesGetResultInnerTests.java
+++ /dev/null
@@ -1,127 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.fluent.models.EmergingIssuesGetResultInner;
-import com.azure.resourcemanager.resourcehealth.models.SeverityValues;
-import com.azure.resourcemanager.resourcehealth.models.StageValues;
-import com.azure.resourcemanager.resourcehealth.models.StatusActiveEvent;
-import com.azure.resourcemanager.resourcehealth.models.StatusBanner;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class EmergingIssuesGetResultInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EmergingIssuesGetResultInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"refreshTimestamp\":\"2021-01-05T12:33:20Z\",\"statusBanners\":[{\"title\":\"mcdytdxwitxnrj\",\"message\":\"gqwgxhniskxfbkp\",\"cloud\":\"gklwn\",\"lastModifiedTime\":\"2021-09-10T01:27:47Z\"}],\"statusActiveEvents\":[{\"title\":\"uwhvylwzbtdhxujz\",\"description\":\"mpowuwpr\",\"trackingId\":\"lve\",\"startTime\":\"2021-01-24T13:59:26Z\",\"cloud\":\"pjmkhfxobbc\",\"severity\":\"Warning\",\"stage\":\"Active\",\"published\":true,\"lastModifiedTime\":\"2021-04-01T12:50:08Z\",\"impacts\":[]},{\"title\":\"bpbewtghfgb\",\"description\":\"gw\",\"trackingId\":\"vlvqhjkbegi\",\"startTime\":\"2021-03-26T15:32:51Z\",\"cloud\":\"xiebwwaloayqcg\",\"severity\":\"Warning\",\"stage\":\"Active\",\"published\":false,\"lastModifiedTime\":\"2021-08-18T20:27:18Z\",\"impacts\":[]},{\"title\":\"mhtxongmtsavjcb\",\"description\":\"xqpsrknftguv\",\"trackingId\":\"uhprwmdyvxqt\",\"startTime\":\"2021-09-21T09:24:54Z\",\"cloud\":\"ww\",\"severity\":\"Error\",\"stage\":\"Active\",\"published\":true,\"lastModifiedTime\":\"2021-06-25T11:51:15Z\",\"impacts\":[]},{\"title\":\"ibycno\",\"description\":\"knme\",\"trackingId\":\"sgzvahapjyzhpv\",\"startTime\":\"2021-11-12T18:49:52Z\",\"cloud\":\"j\",\"severity\":\"Information\",\"stage\":\"Archived\",\"published\":true,\"lastModifiedTime\":\"2021-11-01T21:36:12Z\",\"impacts\":[]}]},\"id\":\"kvugfhzovawjvzun\",\"name\":\"uthnnprnxipeilpj\",\"type\":\"uaejxdultsk\"}")
- .toObject(EmergingIssuesGetResultInner.class);
- Assertions.assertEquals(OffsetDateTime.parse("2021-01-05T12:33:20Z"), model.refreshTimestamp());
- Assertions.assertEquals("mcdytdxwitxnrj", model.statusBanners().get(0).title());
- Assertions.assertEquals("gqwgxhniskxfbkp", model.statusBanners().get(0).message());
- Assertions.assertEquals("gklwn", model.statusBanners().get(0).cloud());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-09-10T01:27:47Z"), model.statusBanners().get(0).lastModifiedTime());
- Assertions.assertEquals("uwhvylwzbtdhxujz", model.statusActiveEvents().get(0).title());
- Assertions.assertEquals("mpowuwpr", model.statusActiveEvents().get(0).description());
- Assertions.assertEquals("lve", model.statusActiveEvents().get(0).trackingId());
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-01-24T13:59:26Z"), model.statusActiveEvents().get(0).startTime());
- Assertions.assertEquals("pjmkhfxobbc", model.statusActiveEvents().get(0).cloud());
- Assertions.assertEquals(SeverityValues.WARNING, model.statusActiveEvents().get(0).severity());
- Assertions.assertEquals(StageValues.ACTIVE, model.statusActiveEvents().get(0).stage());
- Assertions.assertEquals(true, model.statusActiveEvents().get(0).published());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-04-01T12:50:08Z"), model.statusActiveEvents().get(0).lastModifiedTime());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EmergingIssuesGetResultInner model =
- new EmergingIssuesGetResultInner()
- .withRefreshTimestamp(OffsetDateTime.parse("2021-01-05T12:33:20Z"))
- .withStatusBanners(
- Arrays
- .asList(
- new StatusBanner()
- .withTitle("mcdytdxwitxnrj")
- .withMessage("gqwgxhniskxfbkp")
- .withCloud("gklwn")
- .withLastModifiedTime(OffsetDateTime.parse("2021-09-10T01:27:47Z"))))
- .withStatusActiveEvents(
- Arrays
- .asList(
- new StatusActiveEvent()
- .withTitle("uwhvylwzbtdhxujz")
- .withDescription("mpowuwpr")
- .withTrackingId("lve")
- .withStartTime(OffsetDateTime.parse("2021-01-24T13:59:26Z"))
- .withCloud("pjmkhfxobbc")
- .withSeverity(SeverityValues.WARNING)
- .withStage(StageValues.ACTIVE)
- .withPublished(true)
- .withLastModifiedTime(OffsetDateTime.parse("2021-04-01T12:50:08Z"))
- .withImpacts(Arrays.asList()),
- new StatusActiveEvent()
- .withTitle("bpbewtghfgb")
- .withDescription("gw")
- .withTrackingId("vlvqhjkbegi")
- .withStartTime(OffsetDateTime.parse("2021-03-26T15:32:51Z"))
- .withCloud("xiebwwaloayqcg")
- .withSeverity(SeverityValues.WARNING)
- .withStage(StageValues.ACTIVE)
- .withPublished(false)
- .withLastModifiedTime(OffsetDateTime.parse("2021-08-18T20:27:18Z"))
- .withImpacts(Arrays.asList()),
- new StatusActiveEvent()
- .withTitle("mhtxongmtsavjcb")
- .withDescription("xqpsrknftguv")
- .withTrackingId("uhprwmdyvxqt")
- .withStartTime(OffsetDateTime.parse("2021-09-21T09:24:54Z"))
- .withCloud("ww")
- .withSeverity(SeverityValues.ERROR)
- .withStage(StageValues.ACTIVE)
- .withPublished(true)
- .withLastModifiedTime(OffsetDateTime.parse("2021-06-25T11:51:15Z"))
- .withImpacts(Arrays.asList()),
- new StatusActiveEvent()
- .withTitle("ibycno")
- .withDescription("knme")
- .withTrackingId("sgzvahapjyzhpv")
- .withStartTime(OffsetDateTime.parse("2021-11-12T18:49:52Z"))
- .withCloud("j")
- .withSeverity(SeverityValues.INFORMATION)
- .withStage(StageValues.ARCHIVED)
- .withPublished(true)
- .withLastModifiedTime(OffsetDateTime.parse("2021-11-01T21:36:12Z"))
- .withImpacts(Arrays.asList())));
- model = BinaryData.fromObject(model).toObject(EmergingIssuesGetResultInner.class);
- Assertions.assertEquals(OffsetDateTime.parse("2021-01-05T12:33:20Z"), model.refreshTimestamp());
- Assertions.assertEquals("mcdytdxwitxnrj", model.statusBanners().get(0).title());
- Assertions.assertEquals("gqwgxhniskxfbkp", model.statusBanners().get(0).message());
- Assertions.assertEquals("gklwn", model.statusBanners().get(0).cloud());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-09-10T01:27:47Z"), model.statusBanners().get(0).lastModifiedTime());
- Assertions.assertEquals("uwhvylwzbtdhxujz", model.statusActiveEvents().get(0).title());
- Assertions.assertEquals("mpowuwpr", model.statusActiveEvents().get(0).description());
- Assertions.assertEquals("lve", model.statusActiveEvents().get(0).trackingId());
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-01-24T13:59:26Z"), model.statusActiveEvents().get(0).startTime());
- Assertions.assertEquals("pjmkhfxobbc", model.statusActiveEvents().get(0).cloud());
- Assertions.assertEquals(SeverityValues.WARNING, model.statusActiveEvents().get(0).severity());
- Assertions.assertEquals(StageValues.ACTIVE, model.statusActiveEvents().get(0).stage());
- Assertions.assertEquals(true, model.statusActiveEvents().get(0).published());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-04-01T12:50:08Z"), model.statusActiveEvents().get(0).lastModifiedTime());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssuesGetWithResponseMockTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssuesGetWithResponseMockTests.java
deleted file mode 100644
index 042674e6f0e4a..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssuesGetWithResponseMockTests.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.resourcehealth.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.resourcehealth.ResourceHealthManager;
-import com.azure.resourcemanager.resourcehealth.models.EmergingIssuesGetResult;
-import com.azure.resourcemanager.resourcehealth.models.IssueNameParameter;
-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 EmergingIssuesGetWithResponseMockTests {
- @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\":{\"refreshTimestamp\":\"2021-09-27T14:47:09Z\",\"statusBanners\":[],\"statusActiveEvents\":[]},\"id\":\"dn\",\"name\":\"itvgbmhrixkwm\",\"type\":\"ijejvegrhbpn\"}";
-
- 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);
- }));
-
- ResourceHealthManager manager =
- ResourceHealthManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- EmergingIssuesGetResult response =
- manager
- .emergingIssues()
- .getWithResponse(IssueNameParameter.DEFAULT, com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals(OffsetDateTime.parse("2021-09-27T14:47:09Z"), response.refreshTimestamp());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssuesListMockTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssuesListMockTests.java
deleted file mode 100644
index 0a75a35b39b6e..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EmergingIssuesListMockTests.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.resourcehealth.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.resourcehealth.ResourceHealthManager;
-import com.azure.resourcemanager.resourcehealth.models.EmergingIssuesGetResult;
-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 EmergingIssuesListMockTests {
- @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\":{\"refreshTimestamp\":\"2021-11-23T11:34:55Z\",\"statusBanners\":[],\"statusActiveEvents\":[]},\"id\":\"s\",\"name\":\"pbyrqufegxu\",\"type\":\"wz\"}]}";
-
- 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);
- }));
-
- ResourceHealthManager manager =
- ResourceHealthManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.emergingIssues().list(com.azure.core.util.Context.NONE);
-
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-11-23T11:34:55Z"), response.iterator().next().refreshTimestamp());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EventImpactedResourceListResultTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EventImpactedResourceListResultTests.java
deleted file mode 100644
index b0647642e0289..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EventImpactedResourceListResultTests.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.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.fluent.models.EventImpactedResourceInner;
-import com.azure.resourcemanager.resourcehealth.models.EventImpactedResourceListResult;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class EventImpactedResourceListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EventImpactedResourceListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"targetResourceType\":\"jqabcypmivkwlzuv\",\"targetResourceId\":\"fwnfnb\",\"targetRegion\":\"fionl\",\"info\":[]},\"id\":\"etqgtzxdpnq\",\"name\":\"qqwx\",\"type\":\"jfeallnwsub\"}],\"nextLink\":\"njampm\"}")
- .toObject(EventImpactedResourceListResult.class);
- Assertions.assertEquals("njampm", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EventImpactedResourceListResult model =
- new EventImpactedResourceListResult()
- .withValue(Arrays.asList(new EventImpactedResourceInner().withInfo(Arrays.asList())))
- .withNextLink("njampm");
- model = BinaryData.fromObject(model).toObject(EventImpactedResourceListResult.class);
- Assertions.assertEquals("njampm", model.nextLink());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EventPropertiesAdditionalInformationTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EventPropertiesAdditionalInformationTests.java
deleted file mode 100644
index 4ee6884a867d9..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EventPropertiesAdditionalInformationTests.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.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.models.EventPropertiesAdditionalInformation;
-import org.junit.jupiter.api.Assertions;
-
-public final class EventPropertiesAdditionalInformationTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EventPropertiesAdditionalInformation model =
- BinaryData
- .fromString("{\"message\":\"juahaquhcdhmdual\"}")
- .toObject(EventPropertiesAdditionalInformation.class);
- Assertions.assertEquals("juahaquhcdhmdual", model.message());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EventPropertiesAdditionalInformation model =
- new EventPropertiesAdditionalInformation().withMessage("juahaquhcdhmdual");
- model = BinaryData.fromObject(model).toObject(EventPropertiesAdditionalInformation.class);
- Assertions.assertEquals("juahaquhcdhmdual", model.message());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EventPropertiesArticleTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EventPropertiesArticleTests.java
deleted file mode 100644
index c85d06761eb72..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EventPropertiesArticleTests.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.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.models.EventPropertiesArticle;
-import org.junit.jupiter.api.Assertions;
-
-public final class EventPropertiesArticleTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EventPropertiesArticle model =
- BinaryData
- .fromString(
- "{\"articleContent\":\"sucocmnyyazttbtw\",\"articleId\":\"qpuedckzywbiex\",\"parameters\":\"dataeyueaxibxujwb\"}")
- .toObject(EventPropertiesArticle.class);
- Assertions.assertEquals("sucocmnyyazttbtw", model.articleContent());
- Assertions.assertEquals("qpuedckzywbiex", model.articleId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EventPropertiesArticle model =
- new EventPropertiesArticle()
- .withArticleContent("sucocmnyyazttbtw")
- .withArticleId("qpuedckzywbiex")
- .withParameters("dataeyueaxibxujwb");
- model = BinaryData.fromObject(model).toObject(EventPropertiesArticle.class);
- Assertions.assertEquals("sucocmnyyazttbtw", model.articleContent());
- Assertions.assertEquals("qpuedckzywbiex", model.articleId());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EventPropertiesRecommendedActionsItemTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EventPropertiesRecommendedActionsItemTests.java
deleted file mode 100644
index 7ee458bc64cb3..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EventPropertiesRecommendedActionsItemTests.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.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.models.EventPropertiesRecommendedActionsItem;
-import org.junit.jupiter.api.Assertions;
-
-public final class EventPropertiesRecommendedActionsItemTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EventPropertiesRecommendedActionsItem model =
- BinaryData
- .fromString("{\"groupId\":2008133985,\"actionText\":\"v\"}")
- .toObject(EventPropertiesRecommendedActionsItem.class);
- Assertions.assertEquals(2008133985, model.groupId());
- Assertions.assertEquals("v", model.actionText());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EventPropertiesRecommendedActionsItem model =
- new EventPropertiesRecommendedActionsItem().withGroupId(2008133985).withActionText("v");
- model = BinaryData.fromObject(model).toObject(EventPropertiesRecommendedActionsItem.class);
- Assertions.assertEquals(2008133985, model.groupId());
- Assertions.assertEquals("v", model.actionText());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EventsTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EventsTests.java
deleted file mode 100644
index 31110620f6040..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/EventsTests.java
+++ /dev/null
@@ -1,165 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.fluent.models.EventInner;
-import com.azure.resourcemanager.resourcehealth.models.EventLevelValues;
-import com.azure.resourcemanager.resourcehealth.models.EventSourceValues;
-import com.azure.resourcemanager.resourcehealth.models.EventStatusValues;
-import com.azure.resourcemanager.resourcehealth.models.EventTypeValues;
-import com.azure.resourcemanager.resourcehealth.models.Events;
-import com.azure.resourcemanager.resourcehealth.models.LevelValues;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class EventsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- Events model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"eventType\":\"ServiceIssue\",\"eventSource\":\"ResourceHealth\",\"status\":\"Active\",\"title\":\"otwmcyn\",\"summary\":\"lbjnpgacftadehx\",\"header\":\"tyfsoppusuesn\",\"level\":\"Critical\",\"eventLevel\":\"Warning\",\"externalIncidentId\":\"avo\",\"reason\":\"zdmohctbqvu\",\"links\":[],\"impactStartTime\":\"2021-10-27T15:38:07Z\",\"impactMitigationTime\":\"2021-10-24T14:50:51Z\",\"impact\":[],\"faqs\":[],\"isHIR\":true,\"enableMicrosoftSupport\":true,\"description\":\"gwdkcglhsl\",\"platformInitiated\":true,\"enableChatWithUs\":true,\"priority\":2006960320,\"lastUpdateTime\":\"2021-08-29T22:22:31Z\",\"hirStage\":\"ixhbkuofqweykhm\",\"duration\":1631259925,\"impactType\":\"yexfwh\"},\"id\":\"cibvyvdcsitynn\",\"name\":\"amdecte\",\"type\":\"f\"},{\"properties\":{\"eventType\":\"EmergingIssues\",\"eventSource\":\"ServiceHealth\",\"status\":\"Active\",\"title\":\"hezrkgq\",\"summary\":\"jrefovgmkqsle\",\"header\":\"vxyqjpkcattpngjc\",\"level\":\"Warning\",\"eventLevel\":\"Warning\",\"externalIncidentId\":\"pjhvmdajvnys\",\"reason\":\"nqecanoaeup\",\"links\":[],\"impactStartTime\":\"2021-02-13T21:17:53Z\",\"impactMitigationTime\":\"2021-06-23T07:18:27Z\",\"impact\":[],\"faqs\":[],\"isHIR\":true,\"enableMicrosoftSupport\":false,\"description\":\"atuokthfuiu\",\"platformInitiated\":true,\"enableChatWithUs\":false,\"priority\":397485144,\"lastUpdateTime\":\"2021-06-22T02:08:06Z\",\"hirStage\":\"odpuozmyzydag\",\"duration\":1113167460,\"impactType\":\"ezyiuokktwhrdxw\"},\"id\":\"wqsmbsur\",\"name\":\"xim\",\"type\":\"ryocfsfksymdd\"},{\"properties\":{\"eventType\":\"SecurityAdvisory\",\"eventSource\":\"ServiceHealth\",\"status\":\"Resolved\",\"title\":\"qyud\",\"summary\":\"rrqnbpoczvyifqrv\",\"header\":\"vjsllrmvvdfw\",\"level\":\"Warning\",\"eventLevel\":\"Critical\",\"externalIncidentId\":\"ulexxbczwtr\",\"reason\":\"iqzbq\",\"links\":[],\"impactStartTime\":\"2021-11-22T16:46:16Z\",\"impactMitigationTime\":\"2021-03-01T06:44:22Z\",\"impact\":[],\"faqs\":[],\"isHIR\":true,\"enableMicrosoftSupport\":false,\"description\":\"lhzdobp\",\"platformInitiated\":false,\"enableChatWithUs\":false,\"priority\":206207279,\"lastUpdateTime\":\"2021-10-31T23:11:15Z\",\"hirStage\":\"hrk\",\"duration\":1990259381,\"impactType\":\"zjuqkhrsaj\"},\"id\":\"ku\",\"name\":\"foskghsauuimj\",\"type\":\"vxieduugidyj\"}],\"nextLink\":\"f\"}")
- .toObject(Events.class);
- Assertions.assertEquals(EventTypeValues.SERVICE_ISSUE, model.value().get(0).eventType());
- Assertions.assertEquals(EventSourceValues.RESOURCE_HEALTH, model.value().get(0).eventSource());
- Assertions.assertEquals(EventStatusValues.ACTIVE, model.value().get(0).status());
- Assertions.assertEquals("otwmcyn", model.value().get(0).title());
- Assertions.assertEquals("lbjnpgacftadehx", model.value().get(0).summary());
- Assertions.assertEquals("tyfsoppusuesn", model.value().get(0).headerProperty());
- Assertions.assertEquals(LevelValues.CRITICAL, model.value().get(0).level());
- Assertions.assertEquals(EventLevelValues.WARNING, model.value().get(0).eventLevel());
- Assertions.assertEquals("avo", model.value().get(0).externalIncidentId());
- Assertions.assertEquals("zdmohctbqvu", model.value().get(0).reason());
- Assertions.assertEquals(OffsetDateTime.parse("2021-10-27T15:38:07Z"), model.value().get(0).impactStartTime());
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-10-24T14:50:51Z"), model.value().get(0).impactMitigationTime());
- Assertions.assertEquals(true, model.value().get(0).isHir());
- Assertions.assertEquals(true, model.value().get(0).enableMicrosoftSupport());
- Assertions.assertEquals("gwdkcglhsl", model.value().get(0).description());
- Assertions.assertEquals(true, model.value().get(0).platformInitiated());
- Assertions.assertEquals(true, model.value().get(0).enableChatWithUs());
- Assertions.assertEquals(2006960320, model.value().get(0).priority());
- Assertions.assertEquals(OffsetDateTime.parse("2021-08-29T22:22:31Z"), model.value().get(0).lastUpdateTime());
- Assertions.assertEquals("ixhbkuofqweykhm", model.value().get(0).hirStage());
- Assertions.assertEquals(1631259925, model.value().get(0).duration());
- Assertions.assertEquals("yexfwh", model.value().get(0).impactType());
- Assertions.assertEquals("f", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- Events model =
- new Events()
- .withValue(
- Arrays
- .asList(
- new EventInner()
- .withEventType(EventTypeValues.SERVICE_ISSUE)
- .withEventSource(EventSourceValues.RESOURCE_HEALTH)
- .withStatus(EventStatusValues.ACTIVE)
- .withTitle("otwmcyn")
- .withSummary("lbjnpgacftadehx")
- .withHeaderProperty("tyfsoppusuesn")
- .withLevel(LevelValues.CRITICAL)
- .withEventLevel(EventLevelValues.WARNING)
- .withExternalIncidentId("avo")
- .withReason("zdmohctbqvu")
- .withLinks(Arrays.asList())
- .withImpactStartTime(OffsetDateTime.parse("2021-10-27T15:38:07Z"))
- .withImpactMitigationTime(OffsetDateTime.parse("2021-10-24T14:50:51Z"))
- .withImpact(Arrays.asList())
- .withFaqs(Arrays.asList())
- .withIsHir(true)
- .withEnableMicrosoftSupport(true)
- .withDescription("gwdkcglhsl")
- .withPlatformInitiated(true)
- .withEnableChatWithUs(true)
- .withPriority(2006960320)
- .withLastUpdateTime(OffsetDateTime.parse("2021-08-29T22:22:31Z"))
- .withHirStage("ixhbkuofqweykhm")
- .withDuration(1631259925)
- .withImpactType("yexfwh"),
- new EventInner()
- .withEventType(EventTypeValues.EMERGING_ISSUES)
- .withEventSource(EventSourceValues.SERVICE_HEALTH)
- .withStatus(EventStatusValues.ACTIVE)
- .withTitle("hezrkgq")
- .withSummary("jrefovgmkqsle")
- .withHeaderProperty("vxyqjpkcattpngjc")
- .withLevel(LevelValues.WARNING)
- .withEventLevel(EventLevelValues.WARNING)
- .withExternalIncidentId("pjhvmdajvnys")
- .withReason("nqecanoaeup")
- .withLinks(Arrays.asList())
- .withImpactStartTime(OffsetDateTime.parse("2021-02-13T21:17:53Z"))
- .withImpactMitigationTime(OffsetDateTime.parse("2021-06-23T07:18:27Z"))
- .withImpact(Arrays.asList())
- .withFaqs(Arrays.asList())
- .withIsHir(true)
- .withEnableMicrosoftSupport(false)
- .withDescription("atuokthfuiu")
- .withPlatformInitiated(true)
- .withEnableChatWithUs(false)
- .withPriority(397485144)
- .withLastUpdateTime(OffsetDateTime.parse("2021-06-22T02:08:06Z"))
- .withHirStage("odpuozmyzydag")
- .withDuration(1113167460)
- .withImpactType("ezyiuokktwhrdxw"),
- new EventInner()
- .withEventType(EventTypeValues.SECURITY_ADVISORY)
- .withEventSource(EventSourceValues.SERVICE_HEALTH)
- .withStatus(EventStatusValues.RESOLVED)
- .withTitle("qyud")
- .withSummary("rrqnbpoczvyifqrv")
- .withHeaderProperty("vjsllrmvvdfw")
- .withLevel(LevelValues.WARNING)
- .withEventLevel(EventLevelValues.CRITICAL)
- .withExternalIncidentId("ulexxbczwtr")
- .withReason("iqzbq")
- .withLinks(Arrays.asList())
- .withImpactStartTime(OffsetDateTime.parse("2021-11-22T16:46:16Z"))
- .withImpactMitigationTime(OffsetDateTime.parse("2021-03-01T06:44:22Z"))
- .withImpact(Arrays.asList())
- .withFaqs(Arrays.asList())
- .withIsHir(true)
- .withEnableMicrosoftSupport(false)
- .withDescription("lhzdobp")
- .withPlatformInitiated(false)
- .withEnableChatWithUs(false)
- .withPriority(206207279)
- .withLastUpdateTime(OffsetDateTime.parse("2021-10-31T23:11:15Z"))
- .withHirStage("hrk")
- .withDuration(1990259381)
- .withImpactType("zjuqkhrsaj")))
- .withNextLink("f");
- model = BinaryData.fromObject(model).toObject(Events.class);
- Assertions.assertEquals(EventTypeValues.SERVICE_ISSUE, model.value().get(0).eventType());
- Assertions.assertEquals(EventSourceValues.RESOURCE_HEALTH, model.value().get(0).eventSource());
- Assertions.assertEquals(EventStatusValues.ACTIVE, model.value().get(0).status());
- Assertions.assertEquals("otwmcyn", model.value().get(0).title());
- Assertions.assertEquals("lbjnpgacftadehx", model.value().get(0).summary());
- Assertions.assertEquals("tyfsoppusuesn", model.value().get(0).headerProperty());
- Assertions.assertEquals(LevelValues.CRITICAL, model.value().get(0).level());
- Assertions.assertEquals(EventLevelValues.WARNING, model.value().get(0).eventLevel());
- Assertions.assertEquals("avo", model.value().get(0).externalIncidentId());
- Assertions.assertEquals("zdmohctbqvu", model.value().get(0).reason());
- Assertions.assertEquals(OffsetDateTime.parse("2021-10-27T15:38:07Z"), model.value().get(0).impactStartTime());
- Assertions
- .assertEquals(OffsetDateTime.parse("2021-10-24T14:50:51Z"), model.value().get(0).impactMitigationTime());
- Assertions.assertEquals(true, model.value().get(0).isHir());
- Assertions.assertEquals(true, model.value().get(0).enableMicrosoftSupport());
- Assertions.assertEquals("gwdkcglhsl", model.value().get(0).description());
- Assertions.assertEquals(true, model.value().get(0).platformInitiated());
- Assertions.assertEquals(true, model.value().get(0).enableChatWithUs());
- Assertions.assertEquals(2006960320, model.value().get(0).priority());
- Assertions.assertEquals(OffsetDateTime.parse("2021-08-29T22:22:31Z"), model.value().get(0).lastUpdateTime());
- Assertions.assertEquals("ixhbkuofqweykhm", model.value().get(0).hirStage());
- Assertions.assertEquals(1631259925, model.value().get(0).duration());
- Assertions.assertEquals("yexfwh", model.value().get(0).impactType());
- Assertions.assertEquals("f", model.nextLink());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ImpactTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ImpactTests.java
deleted file mode 100644
index 91d2436861273..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ImpactTests.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.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.models.EventStatusValues;
-import com.azure.resourcemanager.resourcehealth.models.Impact;
-import com.azure.resourcemanager.resourcehealth.models.ImpactedServiceRegion;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ImpactTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- Impact model =
- BinaryData
- .fromString(
- "{\"impactedService\":\"klbb\",\"impactedRegions\":[{\"impactedRegion\":\"wzbhvgyugu\",\"status\":\"Resolved\",\"impactedSubscriptions\":[\"fssxqukkfplg\",\"gsxnkjzkdeslpv\",\"opwi\"],\"impactedTenants\":[\"hxpkd\",\"zb\"],\"lastUpdateTime\":\"2021-04-02T11:03:50Z\",\"updates\":[]},{\"impactedRegion\":\"a\",\"status\":\"Resolved\",\"impactedSubscriptions\":[\"upedeojnabckhs\",\"txp\",\"ie\"],\"impactedTenants\":[\"hvpesapskrdqm\",\"jjdhtld\",\"kyzxuutk\"],\"lastUpdateTime\":\"2021-06-12T03:44:06Z\",\"updates\":[]},{\"impactedRegion\":\"svlxotogtwrup\",\"status\":\"Resolved\",\"impactedSubscriptions\":[\"micykvceoveilo\"],\"impactedTenants\":[\"tyfjfcnjbkcnxdhb\"],\"lastUpdateTime\":\"2021-07-22T04:13:03Z\",\"updates\":[]}]}")
- .toObject(Impact.class);
- Assertions.assertEquals("klbb", model.impactedService());
- Assertions.assertEquals("wzbhvgyugu", model.impactedRegions().get(0).impactedRegion());
- Assertions.assertEquals(EventStatusValues.RESOLVED, model.impactedRegions().get(0).status());
- Assertions.assertEquals("fssxqukkfplg", model.impactedRegions().get(0).impactedSubscriptions().get(0));
- Assertions.assertEquals("hxpkd", model.impactedRegions().get(0).impactedTenants().get(0));
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-04-02T11:03:50Z"), model.impactedRegions().get(0).lastUpdateTime());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- Impact model =
- new Impact()
- .withImpactedService("klbb")
- .withImpactedRegions(
- Arrays
- .asList(
- new ImpactedServiceRegion()
- .withImpactedRegion("wzbhvgyugu")
- .withStatus(EventStatusValues.RESOLVED)
- .withImpactedSubscriptions(Arrays.asList("fssxqukkfplg", "gsxnkjzkdeslpv", "opwi"))
- .withImpactedTenants(Arrays.asList("hxpkd", "zb"))
- .withLastUpdateTime(OffsetDateTime.parse("2021-04-02T11:03:50Z"))
- .withUpdates(Arrays.asList()),
- new ImpactedServiceRegion()
- .withImpactedRegion("a")
- .withStatus(EventStatusValues.RESOLVED)
- .withImpactedSubscriptions(Arrays.asList("upedeojnabckhs", "txp", "ie"))
- .withImpactedTenants(Arrays.asList("hvpesapskrdqm", "jjdhtld", "kyzxuutk"))
- .withLastUpdateTime(OffsetDateTime.parse("2021-06-12T03:44:06Z"))
- .withUpdates(Arrays.asList()),
- new ImpactedServiceRegion()
- .withImpactedRegion("svlxotogtwrup")
- .withStatus(EventStatusValues.RESOLVED)
- .withImpactedSubscriptions(Arrays.asList("micykvceoveilo"))
- .withImpactedTenants(Arrays.asList("tyfjfcnjbkcnxdhb"))
- .withLastUpdateTime(OffsetDateTime.parse("2021-07-22T04:13:03Z"))
- .withUpdates(Arrays.asList())));
- model = BinaryData.fromObject(model).toObject(Impact.class);
- Assertions.assertEquals("klbb", model.impactedService());
- Assertions.assertEquals("wzbhvgyugu", model.impactedRegions().get(0).impactedRegion());
- Assertions.assertEquals(EventStatusValues.RESOLVED, model.impactedRegions().get(0).status());
- Assertions.assertEquals("fssxqukkfplg", model.impactedRegions().get(0).impactedSubscriptions().get(0));
- Assertions.assertEquals("hxpkd", model.impactedRegions().get(0).impactedTenants().get(0));
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-04-02T11:03:50Z"), model.impactedRegions().get(0).lastUpdateTime());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedRegionTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedRegionTests.java
deleted file mode 100644
index 3b35d503a2428..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedRegionTests.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.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.models.ImpactedRegion;
-import org.junit.jupiter.api.Assertions;
-
-public final class ImpactedRegionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ImpactedRegion model =
- BinaryData.fromString("{\"id\":\"ftpvjzbexil\",\"name\":\"nfqqnvwp\"}").toObject(ImpactedRegion.class);
- Assertions.assertEquals("ftpvjzbexil", model.id());
- Assertions.assertEquals("nfqqnvwp", model.name());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ImpactedRegion model = new ImpactedRegion().withId("ftpvjzbexil").withName("nfqqnvwp");
- model = BinaryData.fromObject(model).toObject(ImpactedRegion.class);
- Assertions.assertEquals("ftpvjzbexil", model.id());
- Assertions.assertEquals("nfqqnvwp", model.name());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesGetByTenantIdWithResponseMockTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesGetByTenantIdWithResponseMockTests.java
deleted file mode 100644
index 220b5a2975a07..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesGetByTenantIdWithResponseMockTests.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.resourcehealth.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.resourcehealth.ResourceHealthManager;
-import com.azure.resourcemanager.resourcehealth.models.EventImpactedResource;
-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 ImpactedResourcesGetByTenantIdWithResponseMockTests {
- @Test
- public void testGetByTenantIdWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"targetResourceType\":\"jhwuaanozjos\",\"targetResourceId\":\"youlp\",\"targetRegion\":\"v\",\"info\":[]},\"id\":\"rvimjwosytxitcsk\",\"name\":\"cktqumiekkezzi\",\"type\":\"hlyfjhdgqgg\"}";
-
- 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);
- }));
-
- ResourceHealthManager manager =
- ResourceHealthManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- EventImpactedResource response =
- manager
- .impactedResources()
- .getByTenantIdWithResponse("elpcirelsfeaenwa", "fatkld", com.azure.core.util.Context.NONE)
- .getValue();
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesGetWithResponseMockTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesGetWithResponseMockTests.java
deleted file mode 100644
index 55d07a1a6be77..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesGetWithResponseMockTests.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.resourcehealth.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.resourcehealth.ResourceHealthManager;
-import com.azure.resourcemanager.resourcehealth.models.EventImpactedResource;
-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 ImpactedResourcesGetWithResponseMockTests {
- @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\":{\"targetResourceType\":\"lwuip\",\"targetResourceId\":\"cjzkzivgvvcna\",\"targetRegion\":\"hyrnxxmu\",\"info\":[]},\"id\":\"drd\",\"name\":\"stkwqqtch\",\"type\":\"alm\"}";
-
- 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);
- }));
-
- ResourceHealthManager manager =
- ResourceHealthManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- EventImpactedResource response =
- manager.impactedResources().getWithResponse("gxk", "lla", com.azure.core.util.Context.NONE).getValue();
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesListBySubscriptionIdAndEventIdMockTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesListBySubscriptionIdAndEventIdMockTests.java
deleted file mode 100644
index 0b4b758c24fb0..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesListBySubscriptionIdAndEventIdMockTests.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.resourcehealth.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.resourcehealth.ResourceHealthManager;
-import com.azure.resourcemanager.resourcehealth.models.EventImpactedResource;
-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 ImpactedResourcesListBySubscriptionIdAndEventIdMockTests {
- @Test
- public void testListBySubscriptionIdAndEventId() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"targetResourceType\":\"wrlkdmtn\",\"targetResourceId\":\"ok\",\"targetRegion\":\"llxdyhgs\",\"info\":[]},\"id\":\"gjltdtbnnhado\",\"name\":\"crkvcikhnv\",\"type\":\"amqgxqquezikyw\"}]}";
-
- 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);
- }));
-
- ResourceHealthManager manager =
- ResourceHealthManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager
- .impactedResources()
- .listBySubscriptionIdAndEventId("ynpcdpumnzgmwznm", "biknsorgjhxbld", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesListByTenantIdAndEventIdMockTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesListByTenantIdAndEventIdMockTests.java
deleted file mode 100644
index 3f2a7c53f0d9f..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedResourcesListByTenantIdAndEventIdMockTests.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.resourcehealth.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.resourcehealth.ResourceHealthManager;
-import com.azure.resourcemanager.resourcehealth.models.EventImpactedResource;
-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 ImpactedResourcesListByTenantIdAndEventIdMockTests {
- @Test
- public void testListByTenantIdAndEventId() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"targetResourceType\":\"piohgwxrtfu\",\"targetResourceId\":\"epxgyqagvr\",\"targetRegion\":\"npkukghimdblx\",\"info\":[]},\"id\":\"fnjhfjxwmszkkfo\",\"name\":\"rey\",\"type\":\"kzikfjawneaivxwc\"}]}";
-
- 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);
- }));
-
- ResourceHealthManager manager =
- ResourceHealthManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.impactedResources().listByTenantIdAndEventId("mtdaa", "gdv", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedServiceRegionTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedServiceRegionTests.java
deleted file mode 100644
index 19039ec6b9c5e..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ImpactedServiceRegionTests.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.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.models.EventStatusValues;
-import com.azure.resourcemanager.resourcehealth.models.ImpactedServiceRegion;
-import com.azure.resourcemanager.resourcehealth.models.Update;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ImpactedServiceRegionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ImpactedServiceRegion model =
- BinaryData
- .fromString(
- "{\"impactedRegion\":\"wpn\",\"status\":\"Active\",\"impactedSubscriptions\":[\"nermcl\",\"plpho\",\"uscrpabgyepsb\",\"tazqugxywpmueefj\"],\"impactedTenants\":[\"qkqujidsu\",\"onobglaocqx\"],\"lastUpdateTime\":\"2021-08-26T18:25:08Z\",\"updates\":[{\"summary\":\"udxytlmoyrx\",\"updateDateTime\":\"2021-08-04T10:24:08Z\"}]}")
- .toObject(ImpactedServiceRegion.class);
- Assertions.assertEquals("wpn", model.impactedRegion());
- Assertions.assertEquals(EventStatusValues.ACTIVE, model.status());
- Assertions.assertEquals("nermcl", model.impactedSubscriptions().get(0));
- Assertions.assertEquals("qkqujidsu", model.impactedTenants().get(0));
- Assertions.assertEquals(OffsetDateTime.parse("2021-08-26T18:25:08Z"), model.lastUpdateTime());
- Assertions.assertEquals("udxytlmoyrx", model.updates().get(0).summary());
- Assertions.assertEquals(OffsetDateTime.parse("2021-08-04T10:24:08Z"), model.updates().get(0).updateDateTime());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ImpactedServiceRegion model =
- new ImpactedServiceRegion()
- .withImpactedRegion("wpn")
- .withStatus(EventStatusValues.ACTIVE)
- .withImpactedSubscriptions(Arrays.asList("nermcl", "plpho", "uscrpabgyepsb", "tazqugxywpmueefj"))
- .withImpactedTenants(Arrays.asList("qkqujidsu", "onobglaocqx"))
- .withLastUpdateTime(OffsetDateTime.parse("2021-08-26T18:25:08Z"))
- .withUpdates(
- Arrays
- .asList(
- new Update()
- .withSummary("udxytlmoyrx")
- .withUpdateDateTime(OffsetDateTime.parse("2021-08-04T10:24:08Z"))));
- model = BinaryData.fromObject(model).toObject(ImpactedServiceRegion.class);
- Assertions.assertEquals("wpn", model.impactedRegion());
- Assertions.assertEquals(EventStatusValues.ACTIVE, model.status());
- Assertions.assertEquals("nermcl", model.impactedSubscriptions().get(0));
- Assertions.assertEquals("qkqujidsu", model.impactedTenants().get(0));
- Assertions.assertEquals(OffsetDateTime.parse("2021-08-26T18:25:08Z"), model.lastUpdateTime());
- Assertions.assertEquals("udxytlmoyrx", model.updates().get(0).summary());
- Assertions.assertEquals(OffsetDateTime.parse("2021-08-04T10:24:08Z"), model.updates().get(0).updateDateTime());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/LinkDisplayTextTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/LinkDisplayTextTests.java
deleted file mode 100644
index 9cf85c9965224..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/LinkDisplayTextTests.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.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.models.LinkDisplayText;
-import org.junit.jupiter.api.Assertions;
-
-public final class LinkDisplayTextTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- LinkDisplayText model =
- BinaryData.fromString("{\"value\":\"cuh\",\"localizedValue\":\"tcty\"}").toObject(LinkDisplayText.class);
- Assertions.assertEquals("cuh", model.value());
- Assertions.assertEquals("tcty", model.localizedValue());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- LinkDisplayText model = new LinkDisplayText().withValue("cuh").withLocalizedValue("tcty");
- model = BinaryData.fromObject(model).toObject(LinkDisplayText.class);
- Assertions.assertEquals("cuh", model.value());
- Assertions.assertEquals("tcty", model.localizedValue());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/LinkTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/LinkTests.java
deleted file mode 100644
index 45ea5a55a8900..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/LinkTests.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.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.models.Link;
-import com.azure.resourcemanager.resourcehealth.models.LinkDisplayText;
-import com.azure.resourcemanager.resourcehealth.models.LinkTypeValues;
-import org.junit.jupiter.api.Assertions;
-
-public final class LinkTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- Link model =
- BinaryData
- .fromString(
- "{\"type\":\"Button\",\"displayText\":{\"value\":\"muzyoxaepdk\",\"localizedValue\":\"ancuxrhd\"},\"extensionName\":\"avxbniwdjswztsdb\",\"bladeName\":\"nxytxh\",\"parameters\":\"dataxbzpfzab\"}")
- .toObject(Link.class);
- Assertions.assertEquals(LinkTypeValues.BUTTON, model.type());
- Assertions.assertEquals("muzyoxaepdk", model.displayText().value());
- Assertions.assertEquals("ancuxrhd", model.displayText().localizedValue());
- Assertions.assertEquals("avxbniwdjswztsdb", model.extensionName());
- Assertions.assertEquals("nxytxh", model.bladeName());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- Link model =
- new Link()
- .withType(LinkTypeValues.BUTTON)
- .withDisplayText(new LinkDisplayText().withValue("muzyoxaepdk").withLocalizedValue("ancuxrhd"))
- .withExtensionName("avxbniwdjswztsdb")
- .withBladeName("nxytxh")
- .withParameters("dataxbzpfzab");
- model = BinaryData.fromObject(model).toObject(Link.class);
- Assertions.assertEquals(LinkTypeValues.BUTTON, model.type());
- Assertions.assertEquals("muzyoxaepdk", model.displayText().value());
- Assertions.assertEquals("ancuxrhd", model.displayText().localizedValue());
- Assertions.assertEquals("avxbniwdjswztsdb", model.extensionName());
- Assertions.assertEquals("nxytxh", model.bladeName());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/MetadataEntityInnerTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/MetadataEntityInnerTests.java
deleted file mode 100644
index eb6bbf7636b5b..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/MetadataEntityInnerTests.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.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.fluent.models.MetadataEntityInner;
-import com.azure.resourcemanager.resourcehealth.models.MetadataSupportedValueDetail;
-import com.azure.resourcemanager.resourcehealth.models.Scenario;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class MetadataEntityInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- MetadataEntityInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"displayName\":\"hjq\",\"dependsOn\":[\"yeicxmqciwqvhk\",\"ixuigdtopbobj\"],\"applicableScenarios\":[\"Alerts\"],\"supportedValues\":[{\"id\":\"a\",\"displayName\":\"uhrzayvvt\",\"resourceTypes\":[]}]},\"id\":\"dfgiot\",\"name\":\"ftutqxlngxlefgu\",\"type\":\"nxkrx\"}")
- .toObject(MetadataEntityInner.class);
- Assertions.assertEquals("hjq", model.displayName());
- Assertions.assertEquals("yeicxmqciwqvhk", model.dependsOn().get(0));
- Assertions.assertEquals(Scenario.ALERTS, model.applicableScenarios().get(0));
- Assertions.assertEquals("a", model.supportedValues().get(0).id());
- Assertions.assertEquals("uhrzayvvt", model.supportedValues().get(0).displayName());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- MetadataEntityInner model =
- new MetadataEntityInner()
- .withDisplayName("hjq")
- .withDependsOn(Arrays.asList("yeicxmqciwqvhk", "ixuigdtopbobj"))
- .withApplicableScenarios(Arrays.asList(Scenario.ALERTS))
- .withSupportedValues(
- Arrays
- .asList(
- new MetadataSupportedValueDetail()
- .withId("a")
- .withDisplayName("uhrzayvvt")
- .withResourceTypes(Arrays.asList())));
- model = BinaryData.fromObject(model).toObject(MetadataEntityInner.class);
- Assertions.assertEquals("hjq", model.displayName());
- Assertions.assertEquals("yeicxmqciwqvhk", model.dependsOn().get(0));
- Assertions.assertEquals(Scenario.ALERTS, model.applicableScenarios().get(0));
- Assertions.assertEquals("a", model.supportedValues().get(0).id());
- Assertions.assertEquals("uhrzayvvt", model.supportedValues().get(0).displayName());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/MetadataEntityListResultTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/MetadataEntityListResultTests.java
deleted file mode 100644
index f2931c9c02f83..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/MetadataEntityListResultTests.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.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.fluent.models.MetadataEntityInner;
-import com.azure.resourcemanager.resourcehealth.models.MetadataEntityListResult;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class MetadataEntityListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- MetadataEntityListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"displayName\":\"rlovmclwhijcoej\",\"dependsOn\":[],\"applicableScenarios\":[],\"supportedValues\":[]},\"id\":\"qsqsy\",\"name\":\"bkbfkgukdkex\",\"type\":\"ppofmxaxcfjpgdd\"},{\"properties\":{\"displayName\":\"jjxhvpmo\",\"dependsOn\":[],\"applicableScenarios\":[],\"supportedValues\":[]},\"id\":\"zxibqeoj\",\"name\":\"xqbzvddntwnd\",\"type\":\"icbtwnpzao\"}],\"nextLink\":\"uhrhcffcyddgl\"}")
- .toObject(MetadataEntityListResult.class);
- Assertions.assertEquals("rlovmclwhijcoej", model.value().get(0).displayName());
- Assertions.assertEquals("uhrhcffcyddgl", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- MetadataEntityListResult model =
- new MetadataEntityListResult()
- .withValue(
- Arrays
- .asList(
- new MetadataEntityInner()
- .withDisplayName("rlovmclwhijcoej")
- .withDependsOn(Arrays.asList())
- .withApplicableScenarios(Arrays.asList())
- .withSupportedValues(Arrays.asList()),
- new MetadataEntityInner()
- .withDisplayName("jjxhvpmo")
- .withDependsOn(Arrays.asList())
- .withApplicableScenarios(Arrays.asList())
- .withSupportedValues(Arrays.asList())))
- .withNextLink("uhrhcffcyddgl");
- model = BinaryData.fromObject(model).toObject(MetadataEntityListResult.class);
- Assertions.assertEquals("rlovmclwhijcoej", model.value().get(0).displayName());
- Assertions.assertEquals("uhrhcffcyddgl", model.nextLink());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/MetadataEntityPropertiesTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/MetadataEntityPropertiesTests.java
deleted file mode 100644
index d4a78d03cb966..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/MetadataEntityPropertiesTests.java
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.fluent.models.MetadataEntityProperties;
-import com.azure.resourcemanager.resourcehealth.models.MetadataSupportedValueDetail;
-import com.azure.resourcemanager.resourcehealth.models.Scenario;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class MetadataEntityPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- MetadataEntityProperties model =
- BinaryData
- .fromString(
- "{\"displayName\":\"mi\",\"dependsOn\":[\"hzrvqd\"],\"applicableScenarios\":[\"Alerts\"],\"supportedValues\":[{\"id\":\"igeho\",\"displayName\":\"bowsk\",\"resourceTypes\":[\"ktzlcuiywg\"]}]}")
- .toObject(MetadataEntityProperties.class);
- Assertions.assertEquals("mi", model.displayName());
- Assertions.assertEquals("hzrvqd", model.dependsOn().get(0));
- Assertions.assertEquals(Scenario.ALERTS, model.applicableScenarios().get(0));
- Assertions.assertEquals("igeho", model.supportedValues().get(0).id());
- Assertions.assertEquals("bowsk", model.supportedValues().get(0).displayName());
- Assertions.assertEquals("ktzlcuiywg", model.supportedValues().get(0).resourceTypes().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- MetadataEntityProperties model =
- new MetadataEntityProperties()
- .withDisplayName("mi")
- .withDependsOn(Arrays.asList("hzrvqd"))
- .withApplicableScenarios(Arrays.asList(Scenario.ALERTS))
- .withSupportedValues(
- Arrays
- .asList(
- new MetadataSupportedValueDetail()
- .withId("igeho")
- .withDisplayName("bowsk")
- .withResourceTypes(Arrays.asList("ktzlcuiywg"))));
- model = BinaryData.fromObject(model).toObject(MetadataEntityProperties.class);
- Assertions.assertEquals("mi", model.displayName());
- Assertions.assertEquals("hzrvqd", model.dependsOn().get(0));
- Assertions.assertEquals(Scenario.ALERTS, model.applicableScenarios().get(0));
- Assertions.assertEquals("igeho", model.supportedValues().get(0).id());
- Assertions.assertEquals("bowsk", model.supportedValues().get(0).displayName());
- Assertions.assertEquals("ktzlcuiywg", model.supportedValues().get(0).resourceTypes().get(0));
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/MetadataSupportedValueDetailTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/MetadataSupportedValueDetailTests.java
deleted file mode 100644
index b33ea61599929..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/MetadataSupportedValueDetailTests.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.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.models.MetadataSupportedValueDetail;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class MetadataSupportedValueDetailTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- MetadataSupportedValueDetail model =
- BinaryData
- .fromString(
- "{\"id\":\"wgndrvynhzgpp\",\"displayName\":\"cgyncocpecf\",\"resourceTypes\":[\"coofsxlzev\"]}")
- .toObject(MetadataSupportedValueDetail.class);
- Assertions.assertEquals("wgndrvynhzgpp", model.id());
- Assertions.assertEquals("cgyncocpecf", model.displayName());
- Assertions.assertEquals("coofsxlzev", model.resourceTypes().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- MetadataSupportedValueDetail model =
- new MetadataSupportedValueDetail()
- .withId("wgndrvynhzgpp")
- .withDisplayName("cgyncocpecf")
- .withResourceTypes(Arrays.asList("coofsxlzev"));
- model = BinaryData.fromObject(model).toObject(MetadataSupportedValueDetail.class);
- Assertions.assertEquals("wgndrvynhzgpp", model.id());
- Assertions.assertEquals("cgyncocpecf", model.displayName());
- Assertions.assertEquals("coofsxlzev", model.resourceTypes().get(0));
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/MetadatasGetEntityWithResponseMockTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/MetadatasGetEntityWithResponseMockTests.java
deleted file mode 100644
index 9810f87849acb..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/MetadatasGetEntityWithResponseMockTests.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.resourcehealth.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.resourcehealth.ResourceHealthManager;
-import com.azure.resourcemanager.resourcehealth.models.MetadataEntity;
-import com.azure.resourcemanager.resourcehealth.models.Scenario;
-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 MetadatasGetEntityWithResponseMockTests {
- @Test
- public void testGetEntityWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"displayName\":\"swsrms\",\"dependsOn\":[\"rpzbchckqqzqi\",\"xiy\"],\"applicableScenarios\":[\"Alerts\",\"Alerts\",\"Alerts\",\"Alerts\"],\"supportedValues\":[]},\"id\":\"yatrwy\",\"name\":\"q\",\"type\":\"ibzyhwitsmyp\"}";
-
- 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);
- }));
-
- ResourceHealthManager manager =
- ResourceHealthManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- MetadataEntity response =
- manager.metadatas().getEntityWithResponse("iyntorzihle", com.azure.core.util.Context.NONE).getValue();
-
- Assertions.assertEquals("swsrms", response.displayName());
- Assertions.assertEquals("rpzbchckqqzqi", response.dependsOn().get(0));
- Assertions.assertEquals(Scenario.ALERTS, response.applicableScenarios().get(0));
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/MetadatasListMockTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/MetadatasListMockTests.java
deleted file mode 100644
index 683367c7504c3..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/MetadatasListMockTests.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.resourcehealth.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.resourcehealth.ResourceHealthManager;
-import com.azure.resourcemanager.resourcehealth.models.MetadataEntity;
-import com.azure.resourcemanager.resourcehealth.models.Scenario;
-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 MetadatasListMockTests {
- @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\":\"nzar\",\"dependsOn\":[\"q\",\"uijfqk\",\"cewiipfpub\",\"ibwwiftohqkv\"],\"applicableScenarios\":[\"Alerts\",\"Alerts\",\"Alerts\",\"Alerts\"],\"supportedValues\":[]},\"id\":\"kn\",\"name\":\"n\",\"type\":\"synljphuopxodl\"}]}";
-
- 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);
- }));
-
- ResourceHealthManager manager =
- ResourceHealthManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response = manager.metadatas().list(com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("nzar", response.iterator().next().displayName());
- Assertions.assertEquals("q", response.iterator().next().dependsOn().get(0));
- Assertions.assertEquals(Scenario.ALERTS, response.iterator().next().applicableScenarios().get(0));
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/OperationDisplayTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/OperationDisplayTests.java
deleted file mode 100644
index a470b254a0fe0..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/OperationDisplayTests.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.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.models.OperationDisplay;
-import org.junit.jupiter.api.Assertions;
-
-public final class OperationDisplayTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationDisplay model =
- BinaryData
- .fromString(
- "{\"provider\":\"ummajtjaod\",\"resource\":\"bnbdxkqpxokajion\",\"operation\":\"mexgstxgcp\",\"description\":\"gmaajrm\"}")
- .toObject(OperationDisplay.class);
- Assertions.assertEquals("ummajtjaod", model.provider());
- Assertions.assertEquals("bnbdxkqpxokajion", model.resource());
- Assertions.assertEquals("mexgstxgcp", model.operation());
- Assertions.assertEquals("gmaajrm", model.description());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationDisplay model =
- new OperationDisplay()
- .withProvider("ummajtjaod")
- .withResource("bnbdxkqpxokajion")
- .withOperation("mexgstxgcp")
- .withDescription("gmaajrm");
- model = BinaryData.fromObject(model).toObject(OperationDisplay.class);
- Assertions.assertEquals("ummajtjaod", model.provider());
- Assertions.assertEquals("bnbdxkqpxokajion", model.resource());
- Assertions.assertEquals("mexgstxgcp", model.operation());
- Assertions.assertEquals("gmaajrm", model.description());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/OperationListResultInnerTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/OperationListResultInnerTests.java
deleted file mode 100644
index 080eca2e4d710..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/OperationListResultInnerTests.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.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.fluent.models.OperationListResultInner;
-import com.azure.resourcemanager.resourcehealth.models.Operation;
-import com.azure.resourcemanager.resourcehealth.models.OperationDisplay;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class OperationListResultInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationListResultInner model =
- BinaryData
- .fromString(
- "{\"value\":[{\"name\":\"dcuf\",\"display\":{\"provider\":\"rpymzidnsez\",\"resource\":\"tbzsgfyccs\",\"operation\":\"wmdwzjeiachboo\",\"description\":\"lnrosfqp\"}},{\"name\":\"ehzzvypyqrim\",\"display\":{\"provider\":\"pvswjdkirso\",\"resource\":\"qxhcrmn\",\"operation\":\"jtckwhdso\",\"description\":\"iy\"}},{\"name\":\"jxsqwpgrjbz\",\"display\":{\"provider\":\"cjxvsnbyxqab\",\"resource\":\"ocpcy\",\"operation\":\"urzafb\",\"description\":\"j\"}}]}")
- .toObject(OperationListResultInner.class);
- Assertions.assertEquals("dcuf", model.value().get(0).name());
- Assertions.assertEquals("rpymzidnsez", model.value().get(0).display().provider());
- Assertions.assertEquals("tbzsgfyccs", model.value().get(0).display().resource());
- Assertions.assertEquals("wmdwzjeiachboo", model.value().get(0).display().operation());
- Assertions.assertEquals("lnrosfqp", model.value().get(0).display().description());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationListResultInner model =
- new OperationListResultInner()
- .withValue(
- Arrays
- .asList(
- new Operation()
- .withName("dcuf")
- .withDisplay(
- new OperationDisplay()
- .withProvider("rpymzidnsez")
- .withResource("tbzsgfyccs")
- .withOperation("wmdwzjeiachboo")
- .withDescription("lnrosfqp")),
- new Operation()
- .withName("ehzzvypyqrim")
- .withDisplay(
- new OperationDisplay()
- .withProvider("pvswjdkirso")
- .withResource("qxhcrmn")
- .withOperation("jtckwhdso")
- .withDescription("iy")),
- new Operation()
- .withName("jxsqwpgrjbz")
- .withDisplay(
- new OperationDisplay()
- .withProvider("cjxvsnbyxqab")
- .withResource("ocpcy")
- .withOperation("urzafb")
- .withDescription("j"))));
- model = BinaryData.fromObject(model).toObject(OperationListResultInner.class);
- Assertions.assertEquals("dcuf", model.value().get(0).name());
- Assertions.assertEquals("rpymzidnsez", model.value().get(0).display().provider());
- Assertions.assertEquals("tbzsgfyccs", model.value().get(0).display().resource());
- Assertions.assertEquals("wmdwzjeiachboo", model.value().get(0).display().operation());
- Assertions.assertEquals("lnrosfqp", model.value().get(0).display().description());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/OperationTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/OperationTests.java
deleted file mode 100644
index fcc79e8ef717c..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/OperationTests.java
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.models.Operation;
-import com.azure.resourcemanager.resourcehealth.models.OperationDisplay;
-import org.junit.jupiter.api.Assertions;
-
-public final class OperationTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- Operation model =
- BinaryData
- .fromString(
- "{\"name\":\"btoqcjmkljavbqid\",\"display\":{\"provider\":\"jzyulpk\",\"resource\":\"jkrlkhbzhfepg\",\"operation\":\"qex\",\"description\":\"ocxscpaierhhbcs\"}}")
- .toObject(Operation.class);
- Assertions.assertEquals("btoqcjmkljavbqid", model.name());
- Assertions.assertEquals("jzyulpk", model.display().provider());
- Assertions.assertEquals("jkrlkhbzhfepg", model.display().resource());
- Assertions.assertEquals("qex", model.display().operation());
- Assertions.assertEquals("ocxscpaierhhbcs", model.display().description());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- Operation model =
- new Operation()
- .withName("btoqcjmkljavbqid")
- .withDisplay(
- new OperationDisplay()
- .withProvider("jzyulpk")
- .withResource("jkrlkhbzhfepg")
- .withOperation("qex")
- .withDescription("ocxscpaierhhbcs"));
- model = BinaryData.fromObject(model).toObject(Operation.class);
- Assertions.assertEquals("btoqcjmkljavbqid", model.name());
- Assertions.assertEquals("jzyulpk", model.display().provider());
- Assertions.assertEquals("jkrlkhbzhfepg", model.display().resource());
- Assertions.assertEquals("qex", model.display().operation());
- Assertions.assertEquals("ocxscpaierhhbcs", model.display().description());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/OperationsListWithResponseMockTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/OperationsListWithResponseMockTests.java
deleted file mode 100644
index 24869615a5d54..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/OperationsListWithResponseMockTests.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.resourcehealth.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.resourcehealth.ResourceHealthManager;
-import com.azure.resourcemanager.resourcehealth.models.OperationListResult;
-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 OperationsListWithResponseMockTests {
- @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\":[{\"name\":\"eqnovvqfovl\"},{\"name\":\"wsuwsyr\"},{\"name\":\"sytgadgvraea\"}]}";
-
- 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);
- }));
-
- ResourceHealthManager manager =
- ResourceHealthManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- OperationListResult response =
- manager.operations().listWithResponse(com.azure.core.util.Context.NONE).getValue();
-
- Assertions.assertEquals("eqnovvqfovl", response.value().get(0).name());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/RecommendedActionTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/RecommendedActionTests.java
deleted file mode 100644
index 2a0e5236bb294..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/RecommendedActionTests.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.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.models.RecommendedAction;
-import org.junit.jupiter.api.Assertions;
-
-public final class RecommendedActionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- RecommendedAction model =
- BinaryData
- .fromString(
- "{\"action\":\"ex\",\"actionUrl\":\"bhtqqrolfpfpsa\",\"_ActionUrl.Comment\":\"bquxigjy\",\"actionUrlText\":\"zjaoyfhrtxil\"}")
- .toObject(RecommendedAction.class);
- Assertions.assertEquals("ex", model.action());
- Assertions.assertEquals("bhtqqrolfpfpsa", model.actionUrl());
- Assertions.assertEquals("zjaoyfhrtxil", model.actionUrlText());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- RecommendedAction model =
- new RecommendedAction().withAction("ex").withActionUrl("bhtqqrolfpfpsa").withActionUrlText("zjaoyfhrtxil");
- model = BinaryData.fromObject(model).toObject(RecommendedAction.class);
- Assertions.assertEquals("ex", model.action());
- Assertions.assertEquals("bhtqqrolfpfpsa", model.actionUrl());
- Assertions.assertEquals("zjaoyfhrtxil", model.actionUrlText());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdMockTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdMockTests.java
deleted file mode 100644
index 6c1472294f40b..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdMockTests.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.resourcehealth.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.resourcehealth.ResourceHealthManager;
-import com.azure.resourcemanager.resourcehealth.models.EventImpactedResource;
-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 SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdMockTests {
- @Test
- public void testListBySubscriptionIdAndEventId() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"targetResourceType\":\"su\",\"targetResourceId\":\"r\",\"targetRegion\":\"wdmjsjqbjhhyx\",\"info\":[]},\"id\":\"yc\",\"name\":\"duhpk\",\"type\":\"kgymareqnajxqug\"}]}";
-
- 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);
- }));
-
- ResourceHealthManager manager =
- ResourceHealthManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager
- .securityAdvisoryImpactedResources()
- .listBySubscriptionIdAndEventId("bdunygaeqid", "qfatpxllrxcyjm", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdMockTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdMockTests.java
deleted file mode 100644
index 18c1809fc6daf..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdMockTests.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.resourcehealth.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.resourcehealth.ResourceHealthManager;
-import com.azure.resourcemanager.resourcehealth.models.EventImpactedResource;
-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 SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdMockTests {
- @Test
- public void testListByTenantIdAndEventId() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"targetResourceType\":\"fwqmzqalkrmn\",\"targetResourceId\":\"jpxac\",\"targetRegion\":\"udfnbyxba\",\"info\":[]},\"id\":\"yvayffimrzr\",\"name\":\"uzqogsexnevf\",\"type\":\"nwnwme\"}]}";
-
- 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);
- }));
-
- ResourceHealthManager manager =
- ResourceHealthManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager
- .securityAdvisoryImpactedResources()
- .listByTenantIdAndEventId("hky", "ubeddg", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ServiceImpactingEventIncidentPropertiesTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ServiceImpactingEventIncidentPropertiesTests.java
deleted file mode 100644
index 715cb490b9c2a..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ServiceImpactingEventIncidentPropertiesTests.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.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.models.ServiceImpactingEventIncidentProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class ServiceImpactingEventIncidentPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ServiceImpactingEventIncidentProperties model =
- BinaryData
- .fromString(
- "{\"title\":\"idf\",\"service\":\"wdzuhtymwisd\",\"region\":\"thwxmnteiwaopvkm\",\"incidentType\":\"c\"}")
- .toObject(ServiceImpactingEventIncidentProperties.class);
- Assertions.assertEquals("idf", model.title());
- Assertions.assertEquals("wdzuhtymwisd", model.service());
- Assertions.assertEquals("thwxmnteiwaopvkm", model.region());
- Assertions.assertEquals("c", model.incidentType());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ServiceImpactingEventIncidentProperties model =
- new ServiceImpactingEventIncidentProperties()
- .withTitle("idf")
- .withService("wdzuhtymwisd")
- .withRegion("thwxmnteiwaopvkm")
- .withIncidentType("c");
- model = BinaryData.fromObject(model).toObject(ServiceImpactingEventIncidentProperties.class);
- Assertions.assertEquals("idf", model.title());
- Assertions.assertEquals("wdzuhtymwisd", model.service());
- Assertions.assertEquals("thwxmnteiwaopvkm", model.region());
- Assertions.assertEquals("c", model.incidentType());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ServiceImpactingEventStatusTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ServiceImpactingEventStatusTests.java
deleted file mode 100644
index 2619acb45faf8..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ServiceImpactingEventStatusTests.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.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.models.ServiceImpactingEventStatus;
-import org.junit.jupiter.api.Assertions;
-
-public final class ServiceImpactingEventStatusTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ServiceImpactingEventStatus model =
- BinaryData.fromString("{\"value\":\"ckyfih\"}").toObject(ServiceImpactingEventStatus.class);
- Assertions.assertEquals("ckyfih", model.value());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ServiceImpactingEventStatus model = new ServiceImpactingEventStatus().withValue("ckyfih");
- model = BinaryData.fromObject(model).toObject(ServiceImpactingEventStatus.class);
- Assertions.assertEquals("ckyfih", model.value());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ServiceImpactingEventTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ServiceImpactingEventTests.java
deleted file mode 100644
index 6a6f59a41a912..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/ServiceImpactingEventTests.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.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.models.ServiceImpactingEvent;
-import com.azure.resourcemanager.resourcehealth.models.ServiceImpactingEventIncidentProperties;
-import com.azure.resourcemanager.resourcehealth.models.ServiceImpactingEventStatus;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-
-public final class ServiceImpactingEventTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ServiceImpactingEvent model =
- BinaryData
- .fromString(
- "{\"eventStartTime\":\"2021-12-06T02:09:40Z\",\"eventStatusLastModifiedTime\":\"2020-12-23T05:46:04Z\",\"correlationId\":\"ysvlejuvf\",\"status\":{\"value\":\"rlyxwjkcprbnw\"},\"incidentProperties\":{\"title\":\"jvtbvpyss\",\"service\":\"nruj\",\"region\":\"uhmuouqfprwzwbn\",\"incidentType\":\"itnwuizgazxufi\"}}")
- .toObject(ServiceImpactingEvent.class);
- Assertions.assertEquals(OffsetDateTime.parse("2021-12-06T02:09:40Z"), model.eventStartTime());
- Assertions.assertEquals(OffsetDateTime.parse("2020-12-23T05:46:04Z"), model.eventStatusLastModifiedTime());
- Assertions.assertEquals("ysvlejuvf", model.correlationId());
- Assertions.assertEquals("rlyxwjkcprbnw", model.status().value());
- Assertions.assertEquals("jvtbvpyss", model.incidentProperties().title());
- Assertions.assertEquals("nruj", model.incidentProperties().service());
- Assertions.assertEquals("uhmuouqfprwzwbn", model.incidentProperties().region());
- Assertions.assertEquals("itnwuizgazxufi", model.incidentProperties().incidentType());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ServiceImpactingEvent model =
- new ServiceImpactingEvent()
- .withEventStartTime(OffsetDateTime.parse("2021-12-06T02:09:40Z"))
- .withEventStatusLastModifiedTime(OffsetDateTime.parse("2020-12-23T05:46:04Z"))
- .withCorrelationId("ysvlejuvf")
- .withStatus(new ServiceImpactingEventStatus().withValue("rlyxwjkcprbnw"))
- .withIncidentProperties(
- new ServiceImpactingEventIncidentProperties()
- .withTitle("jvtbvpyss")
- .withService("nruj")
- .withRegion("uhmuouqfprwzwbn")
- .withIncidentType("itnwuizgazxufi"));
- model = BinaryData.fromObject(model).toObject(ServiceImpactingEvent.class);
- Assertions.assertEquals(OffsetDateTime.parse("2021-12-06T02:09:40Z"), model.eventStartTime());
- Assertions.assertEquals(OffsetDateTime.parse("2020-12-23T05:46:04Z"), model.eventStatusLastModifiedTime());
- Assertions.assertEquals("ysvlejuvf", model.correlationId());
- Assertions.assertEquals("rlyxwjkcprbnw", model.status().value());
- Assertions.assertEquals("jvtbvpyss", model.incidentProperties().title());
- Assertions.assertEquals("nruj", model.incidentProperties().service());
- Assertions.assertEquals("uhmuouqfprwzwbn", model.incidentProperties().region());
- Assertions.assertEquals("itnwuizgazxufi", model.incidentProperties().incidentType());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/StatusActiveEventTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/StatusActiveEventTests.java
deleted file mode 100644
index 43a6e87882bca..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/StatusActiveEventTests.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.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.models.EmergingIssueImpact;
-import com.azure.resourcemanager.resourcehealth.models.SeverityValues;
-import com.azure.resourcemanager.resourcehealth.models.StageValues;
-import com.azure.resourcemanager.resourcehealth.models.StatusActiveEvent;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class StatusActiveEventTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- StatusActiveEvent model =
- BinaryData
- .fromString(
- "{\"title\":\"qeqxo\",\"description\":\"dahzxctobg\",\"trackingId\":\"dmoizpostmg\",\"startTime\":\"2021-03-12T03:59:06Z\",\"cloud\":\"unrmfqjhhkxb\",\"severity\":\"Information\",\"stage\":\"Resolve\",\"published\":false,\"lastModifiedTime\":\"2021-07-29T03:03:57Z\",\"impacts\":[{\"id\":\"gudivkrtswbxqz\",\"name\":\"zjf\",\"regions\":[]},{\"id\":\"fdxxivetvtcqaqtd\",\"name\":\"mcbxvwvxysl\",\"regions\":[]}]}")
- .toObject(StatusActiveEvent.class);
- Assertions.assertEquals("qeqxo", model.title());
- Assertions.assertEquals("dahzxctobg", model.description());
- Assertions.assertEquals("dmoizpostmg", model.trackingId());
- Assertions.assertEquals(OffsetDateTime.parse("2021-03-12T03:59:06Z"), model.startTime());
- Assertions.assertEquals("unrmfqjhhkxb", model.cloud());
- Assertions.assertEquals(SeverityValues.INFORMATION, model.severity());
- Assertions.assertEquals(StageValues.RESOLVE, model.stage());
- Assertions.assertEquals(false, model.published());
- Assertions.assertEquals(OffsetDateTime.parse("2021-07-29T03:03:57Z"), model.lastModifiedTime());
- Assertions.assertEquals("gudivkrtswbxqz", model.impacts().get(0).id());
- Assertions.assertEquals("zjf", model.impacts().get(0).name());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- StatusActiveEvent model =
- new StatusActiveEvent()
- .withTitle("qeqxo")
- .withDescription("dahzxctobg")
- .withTrackingId("dmoizpostmg")
- .withStartTime(OffsetDateTime.parse("2021-03-12T03:59:06Z"))
- .withCloud("unrmfqjhhkxb")
- .withSeverity(SeverityValues.INFORMATION)
- .withStage(StageValues.RESOLVE)
- .withPublished(false)
- .withLastModifiedTime(OffsetDateTime.parse("2021-07-29T03:03:57Z"))
- .withImpacts(
- Arrays
- .asList(
- new EmergingIssueImpact()
- .withId("gudivkrtswbxqz")
- .withName("zjf")
- .withRegions(Arrays.asList()),
- new EmergingIssueImpact()
- .withId("fdxxivetvtcqaqtd")
- .withName("mcbxvwvxysl")
- .withRegions(Arrays.asList())));
- model = BinaryData.fromObject(model).toObject(StatusActiveEvent.class);
- Assertions.assertEquals("qeqxo", model.title());
- Assertions.assertEquals("dahzxctobg", model.description());
- Assertions.assertEquals("dmoizpostmg", model.trackingId());
- Assertions.assertEquals(OffsetDateTime.parse("2021-03-12T03:59:06Z"), model.startTime());
- Assertions.assertEquals("unrmfqjhhkxb", model.cloud());
- Assertions.assertEquals(SeverityValues.INFORMATION, model.severity());
- Assertions.assertEquals(StageValues.RESOLVE, model.stage());
- Assertions.assertEquals(false, model.published());
- Assertions.assertEquals(OffsetDateTime.parse("2021-07-29T03:03:57Z"), model.lastModifiedTime());
- Assertions.assertEquals("gudivkrtswbxqz", model.impacts().get(0).id());
- Assertions.assertEquals("zjf", model.impacts().get(0).name());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/StatusBannerTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/StatusBannerTests.java
deleted file mode 100644
index 338a03ac09718..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/StatusBannerTests.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.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.models.StatusBanner;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-
-public final class StatusBannerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- StatusBanner model =
- BinaryData
- .fromString(
- "{\"title\":\"wptfdy\",\"message\":\"fqbuaceopzf\",\"cloud\":\"hhuao\",\"lastModifiedTime\":\"2021-03-20T16:48:49Z\"}")
- .toObject(StatusBanner.class);
- Assertions.assertEquals("wptfdy", model.title());
- Assertions.assertEquals("fqbuaceopzf", model.message());
- Assertions.assertEquals("hhuao", model.cloud());
- Assertions.assertEquals(OffsetDateTime.parse("2021-03-20T16:48:49Z"), model.lastModifiedTime());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- StatusBanner model =
- new StatusBanner()
- .withTitle("wptfdy")
- .withMessage("fqbuaceopzf")
- .withCloud("hhuao")
- .withLastModifiedTime(OffsetDateTime.parse("2021-03-20T16:48:49Z"));
- model = BinaryData.fromObject(model).toObject(StatusBanner.class);
- Assertions.assertEquals("wptfdy", model.title());
- Assertions.assertEquals("fqbuaceopzf", model.message());
- Assertions.assertEquals("hhuao", model.cloud());
- Assertions.assertEquals(OffsetDateTime.parse("2021-03-20T16:48:49Z"), model.lastModifiedTime());
- }
-}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/UpdateTests.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/UpdateTests.java
deleted file mode 100644
index d3788f73b3c3e..0000000000000
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/test/java/com/azure/resourcemanager/resourcehealth/generated/UpdateTests.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.resourcehealth.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.resourcehealth.models.Update;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-
-public final class UpdateTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- Update model =
- BinaryData
- .fromString("{\"summary\":\"dw\",\"updateDateTime\":\"2021-08-04T11:26:15Z\"}")
- .toObject(Update.class);
- Assertions.assertEquals("dw", model.summary());
- Assertions.assertEquals(OffsetDateTime.parse("2021-08-04T11:26:15Z"), model.updateDateTime());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- Update model = new Update().withSummary("dw").withUpdateDateTime(OffsetDateTime.parse("2021-08-04T11:26:15Z"));
- model = BinaryData.fromObject(model).toObject(Update.class);
- Assertions.assertEquals("dw", model.summary());
- Assertions.assertEquals(OffsetDateTime.parse("2021-08-04T11:26:15Z"), model.updateDateTime());
- }
-}