diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/CHANGELOG.md b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/CHANGELOG.md
index 5837aa17f127..711bf434fa9a 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.1 (Unreleased)
+## 1.0.0-beta.1 (2023-05-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-2022-10. 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 076730b3c213..82832a5d5664 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-2020-05-01. 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-2022-10. 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.resourcemanagerazure-resourcemanager-resourcehealth
- 1.0.0
+ 1.1.0-beta.1
```
[//]: # ({x-version-update-end})
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/SAMPLE.md b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/SAMPLE.md
index 1be5f265d1a5..f37cba6bb343 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/SAMPLE.md
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/SAMPLE.md
@@ -8,18 +8,60 @@
- [ListByResourceGroup](#availabilitystatuses_listbyresourcegroup)
- [ListBySubscriptionId](#availabilitystatuses_listbysubscriptionid)
+## ChildAvailabilityStatuses
+
+- [GetByResource](#childavailabilitystatuses_getbyresource)
+- [List](#childavailabilitystatuses_list)
+
+## ChildResources
+
+- [List](#childresources_list)
+
+## EmergingIssues
+
+- [Get](#emergingissues_get)
+- [List](#emergingissues_list)
+
+## EventOperation
+
+- [FetchDetailsBySubscriptionIdAndTrackingId](#eventoperation_fetchdetailsbysubscriptionidandtrackingid)
+- [FetchDetailsByTenantIdAndTrackingId](#eventoperation_fetchdetailsbytenantidandtrackingid)
+- [GetBySubscriptionIdAndTrackingId](#eventoperation_getbysubscriptionidandtrackingid)
+- [GetByTenantIdAndTrackingId](#eventoperation_getbytenantidandtrackingid)
+
+## EventsOperation
+
+- [List](#eventsoperation_list)
+- [ListBySingleResource](#eventsoperation_listbysingleresource)
+- [ListByTenantId](#eventsoperation_listbytenantid)
+
+## ImpactedResources
+
+- [Get](#impactedresources_get)
+- [GetByTenantId](#impactedresources_getbytenantid)
+- [ListBySubscriptionIdAndEventId](#impactedresources_listbysubscriptionidandeventid)
+- [ListByTenantIdAndEventId](#impactedresources_listbytenantidandeventid)
+
+## Metadata
+
+- [GetEntity](#metadata_getentity)
+- [List](#metadata_list)
+
## Operations
- [List](#operations_list)
+
+## SecurityAdvisoryImpactedResources
+
+- [ListBySubscriptionIdAndEventId](#securityadvisoryimpactedresources_listbysubscriptionidandeventid)
+- [ListByTenantIdAndEventId](#securityadvisoryimpactedresources_listbytenantidandeventid)
### AvailabilityStatuses_GetByResource
```java
-import com.azure.core.util.Context;
-
/** Samples for AvailabilityStatuses GetByResource. */
public final class AvailabilityStatusesGetByResourceSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2020-05-01/examples/AvailabilityStatus_GetByResource.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/AvailabilityStatus_GetByResource.json
*/
/**
* Sample code: GetCurrentHealthByResource.
@@ -30,7 +72,7 @@ public final class AvailabilityStatusesGetByResourceSamples {
com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
manager
.availabilityStatuses()
- .getByResourceWithResponse("resourceUri", null, "recommendedactions", Context.NONE);
+ .getByResourceWithResponse("resourceUri", null, "recommendedactions", com.azure.core.util.Context.NONE);
}
}
```
@@ -38,12 +80,10 @@ public final class AvailabilityStatusesGetByResourceSamples {
### AvailabilityStatuses_List
```java
-import com.azure.core.util.Context;
-
/** Samples for AvailabilityStatuses List. */
public final class AvailabilityStatusesListSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2020-05-01/examples/AvailabilityStatuses_List.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/AvailabilityStatuses_List.json
*/
/**
* Sample code: GetHealthHistoryByResource.
@@ -52,7 +92,7 @@ public final class AvailabilityStatusesListSamples {
*/
public static void getHealthHistoryByResource(
com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
- manager.availabilityStatuses().list("resourceUri", null, null, Context.NONE);
+ manager.availabilityStatuses().list("resourceUri", null, null, com.azure.core.util.Context.NONE);
}
}
```
@@ -60,12 +100,10 @@ public final class AvailabilityStatusesListSamples {
### AvailabilityStatuses_ListByResourceGroup
```java
-import com.azure.core.util.Context;
-
/** Samples for AvailabilityStatuses ListByResourceGroup. */
public final class AvailabilityStatusesListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2020-05-01/examples/AvailabilityStatuses_ListByResourceGroup.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/AvailabilityStatuses_ListByResourceGroup.json
*/
/**
* Sample code: ListByResourceGroup.
@@ -75,7 +113,7 @@ public final class AvailabilityStatusesListByResourceGroupSamples {
public static void listByResourceGroup(com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
manager
.availabilityStatuses()
- .listByResourceGroup("resourceGroupName", null, "recommendedactions", Context.NONE);
+ .listByResourceGroup("resourceGroupName", null, "recommendedactions", com.azure.core.util.Context.NONE);
}
}
```
@@ -83,12 +121,10 @@ public final class AvailabilityStatusesListByResourceGroupSamples {
### AvailabilityStatuses_ListBySubscriptionId
```java
-import com.azure.core.util.Context;
-
/** Samples for AvailabilityStatuses ListBySubscriptionId. */
public final class AvailabilityStatusesListBySubscriptionIdSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2020-05-01/examples/AvailabilityStatuses_ListBySubscriptionId.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/AvailabilityStatuses_ListBySubscriptionId.json
*/
/**
* Sample code: ListHealthBySubscriptionId.
@@ -97,29 +133,465 @@ public final class AvailabilityStatusesListBySubscriptionIdSamples {
*/
public static void listHealthBySubscriptionId(
com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
- manager.availabilityStatuses().listBySubscriptionId(null, "recommendedactions", Context.NONE);
+ manager
+ .availabilityStatuses()
+ .listBySubscriptionId(null, "recommendedactions", com.azure.core.util.Context.NONE);
}
}
```
-### Operations_List
+### ChildAvailabilityStatuses_GetByResource
+
+```java
+/** 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
+ */
+ /**
+ * Sample code: GetChildCurrentHealthByResource.
+ *
+ * @param manager Entry point to ResourceHealthManager.
+ */
+ public static void getChildCurrentHealthByResource(
+ com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
+ manager
+ .childAvailabilityStatuses()
+ .getByResourceWithResponse(
+ "subscriptions/227b734f-e14f-4de6-b7fc-3190c21e69f6/resourceGroups/JUHACKETRHCTEST/providers/Microsoft.Compute/virtualMachineScaleSets/rhctest/virtualMachines/4",
+ null,
+ "recommendedactions",
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### ChildAvailabilityStatuses_List
+
+```java
+/** 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
+ */
+ /**
+ * Sample code: GetChildHealthHistoryByResource.
+ *
+ * @param manager Entry point to ResourceHealthManager.
+ */
+ public static void getChildHealthHistoryByResource(
+ com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
+ manager
+ .childAvailabilityStatuses()
+ .list(
+ "subscriptions/227b734f-e14f-4de6-b7fc-3190c21e69f6/resourceGroups/JUHACKETRHCTEST/providers/Microsoft.Compute/virtualMachineScaleSets/rhctest/virtualMachines/4",
+ null,
+ null,
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### ChildResources_List
+
+```java
+/** 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
+ */
+ /**
+ * Sample code: GetCurrentChildHealthByResource.
+ *
+ * @param manager Entry point to ResourceHealthManager.
+ */
+ public static void getCurrentChildHealthByResource(
+ com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
+ manager.childResources().list("resourceUri", null, null, com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### EmergingIssues_Get
+
+```java
+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
+ */
+ /**
+ * Sample code: GetEmergingIssues.
+ *
+ * @param manager Entry point to ResourceHealthManager.
+ */
+ public static void getEmergingIssues(com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
+ manager.emergingIssues().getWithResponse(IssueNameParameter.DEFAULT, com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### EmergingIssues_List
```java
-import com.azure.core.util.Context;
+/** 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
+ */
+ /**
+ * Sample code: GetEmergingIssues.
+ *
+ * @param manager Entry point to ResourceHealthManager.
+ */
+ public static void getEmergingIssues(com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
+ manager.emergingIssues().list(com.azure.core.util.Context.NONE);
+ }
+}
+```
+### EventOperation_FetchDetailsBySubscriptionIdAndTrackingId
+
+```java
+/** 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
+ */
+ /**
+ * Sample code: EventDetailsBySubscriptionIdAndTrackingId.
+ *
+ * @param manager Entry point to ResourceHealthManager.
+ */
+ public static void eventDetailsBySubscriptionIdAndTrackingId(
+ com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
+ manager
+ .eventOperations()
+ .fetchDetailsBySubscriptionIdAndTrackingIdWithResponse("eventTrackingId", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### EventOperation_FetchDetailsByTenantIdAndTrackingId
+
+```java
+/** 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
+ */
+ /**
+ * Sample code: EventDetailsByTenantIdAndTrackingId.
+ *
+ * @param manager Entry point to ResourceHealthManager.
+ */
+ public static void eventDetailsByTenantIdAndTrackingId(
+ com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
+ manager
+ .eventOperations()
+ .fetchDetailsByTenantIdAndTrackingIdWithResponse("eventTrackingId", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### EventOperation_GetBySubscriptionIdAndTrackingId
+
+```java
+/** 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
+ */
+ /**
+ * Sample code: SecurityAdvisoriesEventBySubscriptionIdAndTrackingId.
+ *
+ * @param manager Entry point to ResourceHealthManager.
+ */
+ public static void securityAdvisoriesEventBySubscriptionIdAndTrackingId(
+ com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
+ manager
+ .eventOperations()
+ .getBySubscriptionIdAndTrackingIdWithResponse(
+ "eventTrackingId", "properties/status eq 'Active'", "7/10/2022", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### EventOperation_GetByTenantIdAndTrackingId
+
+```java
+/** 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
+ */
+ /**
+ * Sample code: EventByTenantIdAndTrackingId.
+ *
+ * @param manager Entry point to ResourceHealthManager.
+ */
+ public static void eventByTenantIdAndTrackingId(
+ com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
+ manager
+ .eventOperations()
+ .getByTenantIdAndTrackingIdWithResponse(
+ "eventTrackingId", "properties/status eq 'Active'", "7/10/2022", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### EventsOperation_List
+
+```java
+/** 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
+ */
+ /**
+ * Sample code: ListEventsBySubscriptionId.
+ *
+ * @param manager Entry point to ResourceHealthManager.
+ */
+ public static void listEventsBySubscriptionId(
+ com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
+ manager
+ .eventsOperations()
+ .list(
+ "service eq 'Virtual Machines' or region eq 'West US'", "7/24/2020", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### EventsOperation_ListBySingleResource
+
+```java
+/** 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
+ */
+ /**
+ * Sample code: ListEventsBySingleResource.
+ *
+ * @param manager Entry point to ResourceHealthManager.
+ */
+ public static void listEventsBySingleResource(
+ com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
+ manager
+ .eventsOperations()
+ .listBySingleResource(
+ "subscriptions/4abcdefgh-ijkl-mnop-qrstuvwxyz/resourceGroups/rhctestenv/providers/Microsoft.Compute/virtualMachines/rhctestenvV1PI",
+ null,
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### EventsOperation_ListByTenantId
+
+```java
+/** 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
+ */
+ /**
+ * Sample code: ListEventsByTenantId.
+ *
+ * @param manager Entry point to ResourceHealthManager.
+ */
+ public static void listEventsByTenantId(com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
+ manager
+ .eventsOperations()
+ .listByTenantId(
+ "service eq 'Virtual Machines' or region eq 'West US'", "7/24/2020", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### ImpactedResources_Get
+
+```java
+/** 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
+ */
+ /**
+ * Sample code: ImpactedResourcesGet.
+ *
+ * @param manager Entry point to ResourceHealthManager.
+ */
+ public static void impactedResourcesGet(com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
+ manager.impactedResources().getWithResponse("BC_1-FXZ", "abc-123-ghj-456", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### ImpactedResources_GetByTenantId
+
+```java
+/** 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
+ */
+ /**
+ * Sample code: ImpactedResourcesGet.
+ *
+ * @param manager Entry point to ResourceHealthManager.
+ */
+ public static void impactedResourcesGet(com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
+ manager
+ .impactedResources()
+ .getByTenantIdWithResponse("BC_1-FXZ", "abc-123-ghj-456", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### ImpactedResources_ListBySubscriptionIdAndEventId
+
+```java
+/** 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
+ */
+ /**
+ * Sample code: ListImpactedResourcesBySubscriptionId.
+ *
+ * @param manager Entry point to ResourceHealthManager.
+ */
+ public static void listImpactedResourcesBySubscriptionId(
+ com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
+ manager
+ .impactedResources()
+ .listBySubscriptionIdAndEventId("BC_1-FXZ", "targetRegion eq 'westus'", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### ImpactedResources_ListByTenantIdAndEventId
+
+```java
+/** 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
+ */
+ /**
+ * Sample code: ListEventsByTenantId.
+ *
+ * @param manager Entry point to ResourceHealthManager.
+ */
+ public static void listEventsByTenantId(com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
+ manager
+ .impactedResources()
+ .listByTenantIdAndEventId("BC_1-FXZ", "targetRegion eq 'westus'", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Metadata_GetEntity
+
+```java
+/** 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
+ */
+ /**
+ * Sample code: GetMetadata.
+ *
+ * @param manager Entry point to ResourceHealthManager.
+ */
+ public static void getMetadata(com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
+ manager.metadatas().getEntityWithResponse("status", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Metadata_List
+
+```java
+/** 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
+ */
+ /**
+ * Sample code: GetMetadata.
+ *
+ * @param manager Entry point to ResourceHealthManager.
+ */
+ public static void getMetadata(com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
+ manager.metadatas().list(com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Operations_List
+
+```java
/** Samples for Operations List. */
public final class OperationsListSamples {
/*
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2020-05-01/examples/Operations_List.json
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Operations_List.json
*/
/**
- * Sample code: GetHealthHistoryByResource.
+ * Sample code: GetOperationsList.
*
* @param manager Entry point to ResourceHealthManager.
*/
- public static void getHealthHistoryByResource(
+ public static void getOperationsList(com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
+ manager.operations().listWithResponse(com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SecurityAdvisoryImpactedResources_ListBySubscriptionIdAndEventId
+
+```java
+/** 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
+ */
+ /**
+ * Sample code: ListSecurityAdvisoryImpactedResourcesBySubscriptionId.
+ *
+ * @param manager Entry point to ResourceHealthManager.
+ */
+ public static void listSecurityAdvisoryImpactedResourcesBySubscriptionId(
+ com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
+ manager
+ .securityAdvisoryImpactedResources()
+ .listBySubscriptionIdAndEventId("BC_1-FXZ", null, com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SecurityAdvisoryImpactedResources_ListByTenantIdAndEventId
+
+```java
+/** 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
+ */
+ /**
+ * Sample code: ListSecurityAdvisoryImpactedResourcesByTenantId.
+ *
+ * @param manager Entry point to ResourceHealthManager.
+ */
+ public static void listSecurityAdvisoryImpactedResourcesByTenantId(
com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
- manager.operations().listWithResponse(Context.NONE);
+ manager
+ .securityAdvisoryImpactedResources()
+ .listByTenantIdAndEventId("BC_1-FXZ", null, com.azure.core.util.Context.NONE);
}
}
```
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml
index 32f8d1f9f0ce..a4170aebbac2 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml
@@ -1,3 +1,8 @@
+
4.0.0
@@ -13,7 +18,7 @@
jarMicrosoft 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-2020-05-01.
+ 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.https://github.com/Azure/azure-sdk-for-java
@@ -38,7 +43,8 @@
UTF-8
- true
+ 0
+ 0
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 dc023b124d0b..4ca9e2b07c9f 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
@@ -25,10 +25,26 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.resourcehealth.fluent.MicrosoftResourceHealth;
import com.azure.resourcemanager.resourcehealth.implementation.AvailabilityStatusesImpl;
+import com.azure.resourcemanager.resourcehealth.implementation.ChildAvailabilityStatusesImpl;
+import com.azure.resourcemanager.resourcehealth.implementation.ChildResourcesImpl;
+import com.azure.resourcemanager.resourcehealth.implementation.EmergingIssuesImpl;
+import com.azure.resourcemanager.resourcehealth.implementation.EventOperationsImpl;
+import com.azure.resourcemanager.resourcehealth.implementation.EventsOperationsImpl;
+import com.azure.resourcemanager.resourcehealth.implementation.ImpactedResourcesImpl;
+import com.azure.resourcemanager.resourcehealth.implementation.MetadatasImpl;
import com.azure.resourcemanager.resourcehealth.implementation.MicrosoftResourceHealthBuilder;
import com.azure.resourcemanager.resourcehealth.implementation.OperationsImpl;
+import com.azure.resourcemanager.resourcehealth.implementation.SecurityAdvisoryImpactedResourcesImpl;
import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatuses;
+import com.azure.resourcemanager.resourcehealth.models.ChildAvailabilityStatuses;
+import com.azure.resourcemanager.resourcehealth.models.ChildResources;
+import com.azure.resourcemanager.resourcehealth.models.EmergingIssues;
+import com.azure.resourcemanager.resourcehealth.models.EventOperations;
+import com.azure.resourcemanager.resourcehealth.models.EventsOperations;
+import com.azure.resourcemanager.resourcehealth.models.ImpactedResources;
+import com.azure.resourcemanager.resourcehealth.models.Metadatas;
import com.azure.resourcemanager.resourcehealth.models.Operations;
+import com.azure.resourcemanager.resourcehealth.models.SecurityAdvisoryImpactedResources;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
@@ -42,6 +58,22 @@ public final class ResourceHealthManager {
private Operations operations;
+ private Metadatas metadatas;
+
+ private ImpactedResources impactedResources;
+
+ private SecurityAdvisoryImpactedResources securityAdvisoryImpactedResources;
+
+ private EventsOperations eventsOperations;
+
+ private EventOperations eventOperations;
+
+ private ChildAvailabilityStatuses childAvailabilityStatuses;
+
+ private ChildResources childResources;
+
+ private EmergingIssues emergingIssues;
+
private final MicrosoftResourceHealth clientObject;
private ResourceHealthManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
@@ -207,7 +239,7 @@ public ResourceHealthManager authenticate(TokenCredential credential, AzureProfi
.append("-")
.append("com.azure.resourcemanager.resourcehealth")
.append("/")
- .append("1.0.0");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -288,6 +320,104 @@ public Operations operations() {
return operations;
}
+ /**
+ * Gets the resource collection API of Metadatas.
+ *
+ * @return Resource collection API of Metadatas.
+ */
+ public Metadatas metadatas() {
+ if (this.metadatas == null) {
+ this.metadatas = new MetadatasImpl(clientObject.getMetadatas(), this);
+ }
+ return metadatas;
+ }
+
+ /**
+ * Gets the resource collection API of ImpactedResources.
+ *
+ * @return Resource collection API of ImpactedResources.
+ */
+ public ImpactedResources impactedResources() {
+ if (this.impactedResources == null) {
+ this.impactedResources = new ImpactedResourcesImpl(clientObject.getImpactedResources(), this);
+ }
+ return impactedResources;
+ }
+
+ /**
+ * Gets the resource collection API of SecurityAdvisoryImpactedResources.
+ *
+ * @return Resource collection API of SecurityAdvisoryImpactedResources.
+ */
+ public SecurityAdvisoryImpactedResources securityAdvisoryImpactedResources() {
+ if (this.securityAdvisoryImpactedResources == null) {
+ this.securityAdvisoryImpactedResources =
+ new SecurityAdvisoryImpactedResourcesImpl(clientObject.getSecurityAdvisoryImpactedResources(), this);
+ }
+ return securityAdvisoryImpactedResources;
+ }
+
+ /**
+ * Gets the resource collection API of EventsOperations.
+ *
+ * @return Resource collection API of EventsOperations.
+ */
+ public EventsOperations eventsOperations() {
+ if (this.eventsOperations == null) {
+ this.eventsOperations = new EventsOperationsImpl(clientObject.getEventsOperations(), this);
+ }
+ return eventsOperations;
+ }
+
+ /**
+ * Gets the resource collection API of EventOperations.
+ *
+ * @return Resource collection API of EventOperations.
+ */
+ public EventOperations eventOperations() {
+ if (this.eventOperations == null) {
+ this.eventOperations = new EventOperationsImpl(clientObject.getEventOperations(), this);
+ }
+ return eventOperations;
+ }
+
+ /**
+ * Gets the resource collection API of ChildAvailabilityStatuses.
+ *
+ * @return Resource collection API of ChildAvailabilityStatuses.
+ */
+ public ChildAvailabilityStatuses childAvailabilityStatuses() {
+ if (this.childAvailabilityStatuses == null) {
+ this.childAvailabilityStatuses =
+ new ChildAvailabilityStatusesImpl(clientObject.getChildAvailabilityStatuses(), this);
+ }
+ return childAvailabilityStatuses;
+ }
+
+ /**
+ * Gets the resource collection API of ChildResources.
+ *
+ * @return Resource collection API of ChildResources.
+ */
+ public ChildResources childResources() {
+ if (this.childResources == null) {
+ this.childResources = new ChildResourcesImpl(clientObject.getChildResources(), this);
+ }
+ return childResources;
+ }
+
+ /**
+ * Gets the resource collection API of EmergingIssues.
+ *
+ * @return Resource collection API of EmergingIssues.
+ */
+ public EmergingIssues emergingIssues() {
+ if (this.emergingIssues == null) {
+ this.emergingIssues = new EmergingIssuesImpl(clientObject.getEmergingIssues(), this);
+ }
+ return emergingIssues;
+ }
+
/**
* @return Wrapped service client MicrosoftResourceHealth providing direct access to the underlying auto-generated
* API implementation, based on Azure REST API.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/AvailabilityStatusesClient.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/AvailabilityStatusesClient.java
index 27511c536c39..96dfbc57de3e 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/AvailabilityStatusesClient.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/AvailabilityStatusesClient.java
@@ -41,7 +41,7 @@ public interface AvailabilityStatusesClient {
/**
* Lists the current availability status for all the resources in the resource group.
*
- * @param resourceGroupName The name of the resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -53,7 +53,7 @@ public interface AvailabilityStatusesClient {
/**
* Lists the current availability status for all the resources in the resource group.
*
- * @param resourceGroupName The name of the resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param filter The filter to apply on the operation. For more information please see
* https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
* @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/ChildAvailabilityStatusesClient.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/ChildAvailabilityStatusesClient.java
new file mode 100644
index 000000000000..59060cd454f7
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/ChildAvailabilityStatusesClient.java
@@ -0,0 +1,82 @@
+// 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.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.resourcehealth.fluent.models.AvailabilityStatusInner;
+
+/** An instance of this class provides access to all the operations defined in ChildAvailabilityStatusesClient. */
+public interface ChildAvailabilityStatusesClient {
+ /**
+ * Gets current availability status for a single resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return current availability status for a single resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceWithResponse(
+ String resourceUri, String filter, String expand, Context context);
+
+ /**
+ * Gets current availability status for a single resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return current availability status for a single resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AvailabilityStatusInner getByResource(String resourceUri);
+
+ /**
+ * Lists the historical availability statuses for a single child resource. Use the nextLink property in the response
+ * to get the next page of availability status.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceUri);
+
+ /**
+ * Lists the historical availability statuses for a single child resource. Use the nextLink property in the response
+ * to get the next page of availability status.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceUri, String filter, String expand, Context context);
+}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/ChildResourcesClient.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/ChildResourcesClient.java
new file mode 100644
index 000000000000..fb3944f7038b
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/ChildResourcesClient.java
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.resourcehealth.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.resourcehealth.fluent.models.AvailabilityStatusInner;
+
+/** An instance of this class provides access to all the operations defined in ChildResourcesClient. */
+public interface ChildResourcesClient {
+ /**
+ * Lists the all the children and its current health status for a parent resource. Use the nextLink property in the
+ * response to get the next page of children current health.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support not nested parent resource type:
+ * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceUri);
+
+ /**
+ * Lists the all the children and its current health status for a parent resource. Use the nextLink property in the
+ * response to get the next page of children current health.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support not nested parent resource type:
+ * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceUri, String filter, String expand, Context context);
+}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/EmergingIssuesClient.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/EmergingIssuesClient.java
new file mode 100644
index 000000000000..bcd4c3732046
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/EmergingIssuesClient.java
@@ -0,0 +1,63 @@
+// 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.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.resourcehealth.fluent.models.EmergingIssuesGetResultInner;
+import com.azure.resourcemanager.resourcehealth.models.IssueNameParameter;
+
+/** An instance of this class provides access to all the operations defined in EmergingIssuesClient. */
+public interface EmergingIssuesClient {
+ /**
+ * Lists Azure services' emerging issues.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of emerging issues as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists Azure services' emerging issues.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of emerging issues as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Gets Azure services' emerging issues.
+ *
+ * @param issueName The name of the emerging issue.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azure services' emerging issues along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(IssueNameParameter issueName, Context context);
+
+ /**
+ * Gets Azure services' emerging issues.
+ *
+ * @param issueName The name of the emerging issue.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azure services' emerging issues.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EmergingIssuesGetResultInner get(IssueNameParameter issueName);
+}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/EventOperationsClient.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/EventOperationsClient.java
new file mode 100644
index 000000000000..499b13a9f452
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/EventOperationsClient.java
@@ -0,0 +1,128 @@
+// 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.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.resourcehealth.fluent.models.EventInner;
+
+/** An instance of this class provides access to all the operations defined in EventOperationsClient. */
+public interface EventOperationsClient {
+ /**
+ * Service health event in the subscription by event tracking id.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param queryStartTime Specifies from when to return events, based on the lastUpdateTime property. For example,
+ * queryStartTime = 7/24/2020 OR queryStartTime=7%2F24%2F2020.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getBySubscriptionIdAndTrackingIdWithResponse(
+ String eventTrackingId, String filter, String queryStartTime, Context context);
+
+ /**
+ * Service health event in the subscription by event tracking id.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EventInner getBySubscriptionIdAndTrackingId(String eventTrackingId);
+
+ /**
+ * Service health event details in the subscription by event tracking id. This can be used to fetch sensitive
+ * properties for Security Advisory events.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response fetchDetailsBySubscriptionIdAndTrackingIdWithResponse(String eventTrackingId, Context context);
+
+ /**
+ * Service health event details in the subscription by event tracking id. This can be used to fetch sensitive
+ * properties for Security Advisory events.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EventInner fetchDetailsBySubscriptionIdAndTrackingId(String eventTrackingId);
+
+ /**
+ * Service health event in the tenant by event tracking id.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param queryStartTime Specifies from when to return events, based on the lastUpdateTime property. For example,
+ * queryStartTime = 7/24/2020 OR queryStartTime=7%2F24%2F2020.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByTenantIdAndTrackingIdWithResponse(
+ String eventTrackingId, String filter, String queryStartTime, Context context);
+
+ /**
+ * Service health event in the tenant by event tracking id.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EventInner getByTenantIdAndTrackingId(String eventTrackingId);
+
+ /**
+ * Service health event details in the tenant by event tracking id. This can be used to fetch sensitive properties
+ * for Security Advisory events.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response fetchDetailsByTenantIdAndTrackingIdWithResponse(String eventTrackingId, Context context);
+
+ /**
+ * Service health event details in the tenant by event tracking id. This can be used to fetch sensitive properties
+ * for Security Advisory events.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EventInner fetchDetailsByTenantIdAndTrackingId(String eventTrackingId);
+}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/EventsOperationsClient.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/EventsOperationsClient.java
new file mode 100644
index 000000000000..22a2c066f8b9
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/EventsOperationsClient.java
@@ -0,0 +1,101 @@
+// 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.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.resourcehealth.fluent.models.EventInner;
+
+/** An instance of this class provides access to all the operations defined in EventsOperationsClient. */
+public interface EventsOperationsClient {
+ /**
+ * Lists service health events in the subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists service health events in the subscription.
+ *
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param queryStartTime Specifies from when to return events, based on the lastUpdateTime property. For example,
+ * queryStartTime = 7/24/2020 OR queryStartTime=7%2F24%2F2020.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String filter, String queryStartTime, Context context);
+
+ /**
+ * Lists current service health events in the tenant.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByTenantId();
+
+ /**
+ * Lists current service health events in the tenant.
+ *
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param queryStartTime Specifies from when to return events, based on the lastUpdateTime property. For example,
+ * queryStartTime = 7/24/2020 OR queryStartTime=7%2F24%2F2020.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByTenantId(String filter, String queryStartTime, Context context);
+
+ /**
+ * Lists current service health events for given resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API support not nested and one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
+ * and
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBySingleResource(String resourceUri);
+
+ /**
+ * Lists current service health events for given resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API support not nested and one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
+ * and
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBySingleResource(String resourceUri, String filter, Context context);
+}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/ImpactedResourcesClient.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/ImpactedResourcesClient.java
new file mode 100644
index 000000000000..bb34248f3221
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/ImpactedResourcesClient.java
@@ -0,0 +1,127 @@
+// 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.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.resourcehealth.fluent.models.EventImpactedResourceInner;
+
+/** An instance of this class provides access to all the operations defined in ImpactedResourcesClient. */
+public interface ImpactedResourcesClient {
+ /**
+ * Lists impacted resources in the subscription by an event.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List of eventImpactedResources operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBySubscriptionIdAndEventId(String eventTrackingId);
+
+ /**
+ * Lists impacted resources in the subscription by an event.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List of eventImpactedResources operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBySubscriptionIdAndEventId(
+ String eventTrackingId, String filter, Context context);
+
+ /**
+ * Gets the specific impacted resource in the subscription by an event.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param impactedResourceName Name of the Impacted Resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specific impacted resource in the subscription by an event along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String eventTrackingId, String impactedResourceName, Context context);
+
+ /**
+ * Gets the specific impacted resource in the subscription by an event.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param impactedResourceName Name of the Impacted Resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specific impacted resource in the subscription by an event.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EventImpactedResourceInner get(String eventTrackingId, String impactedResourceName);
+
+ /**
+ * Lists impacted resources in the tenant by an event.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List of eventImpactedResources operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByTenantIdAndEventId(String eventTrackingId);
+
+ /**
+ * Lists impacted resources in the tenant by an event.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List of eventImpactedResources operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByTenantIdAndEventId(
+ String eventTrackingId, String filter, Context context);
+
+ /**
+ * Gets the specific impacted resource in the tenant by an event.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param impactedResourceName Name of the Impacted Resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specific impacted resource in the tenant by an event along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByTenantIdWithResponse(
+ String eventTrackingId, String impactedResourceName, Context context);
+
+ /**
+ * Gets the specific impacted resource in the tenant by an event.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param impactedResourceName Name of the Impacted Resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specific impacted resource in the tenant by an event.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EventImpactedResourceInner getByTenantId(String eventTrackingId, String impactedResourceName);
+}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/MetadatasClient.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/MetadatasClient.java
new file mode 100644
index 000000000000..8b047ec2acb4
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/MetadatasClient.java
@@ -0,0 +1,62 @@
+// 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.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.resourcehealth.fluent.models.MetadataEntityInner;
+
+/** An instance of this class provides access to all the operations defined in MetadatasClient. */
+public interface MetadatasClient {
+ /**
+ * Gets the list of metadata entities.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of metadata entities as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Gets the list of metadata entities.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of metadata entities as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Gets the list of metadata entities.
+ *
+ * @param name Name of metadata entity.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of metadata entities along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getEntityWithResponse(String name, Context context);
+
+ /**
+ * Gets the list of metadata entities.
+ *
+ * @param name Name of metadata entity.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of metadata entities.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MetadataEntityInner getEntity(String name);
+}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/MicrosoftResourceHealth.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/MicrosoftResourceHealth.java
index dad8232c60aa..34ccd6a7774f 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/MicrosoftResourceHealth.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/MicrosoftResourceHealth.java
@@ -10,8 +10,7 @@
/** The interface for MicrosoftResourceHealth class. */
public interface MicrosoftResourceHealth {
/**
- * Gets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
- * part of the URI for every service call.
+ * Gets The ID of the target subscription.
*
* @return the subscriptionId value.
*/
@@ -58,4 +57,60 @@ public interface MicrosoftResourceHealth {
* @return the OperationsClient object.
*/
OperationsClient getOperations();
+
+ /**
+ * Gets the MetadatasClient object to access its operations.
+ *
+ * @return the MetadatasClient object.
+ */
+ MetadatasClient getMetadatas();
+
+ /**
+ * Gets the ImpactedResourcesClient object to access its operations.
+ *
+ * @return the ImpactedResourcesClient object.
+ */
+ ImpactedResourcesClient getImpactedResources();
+
+ /**
+ * Gets the SecurityAdvisoryImpactedResourcesClient object to access its operations.
+ *
+ * @return the SecurityAdvisoryImpactedResourcesClient object.
+ */
+ SecurityAdvisoryImpactedResourcesClient getSecurityAdvisoryImpactedResources();
+
+ /**
+ * Gets the EventsOperationsClient object to access its operations.
+ *
+ * @return the EventsOperationsClient object.
+ */
+ EventsOperationsClient getEventsOperations();
+
+ /**
+ * Gets the EventOperationsClient object to access its operations.
+ *
+ * @return the EventOperationsClient object.
+ */
+ EventOperationsClient getEventOperations();
+
+ /**
+ * Gets the ChildAvailabilityStatusesClient object to access its operations.
+ *
+ * @return the ChildAvailabilityStatusesClient object.
+ */
+ ChildAvailabilityStatusesClient getChildAvailabilityStatuses();
+
+ /**
+ * Gets the ChildResourcesClient object to access its operations.
+ *
+ * @return the ChildResourcesClient object.
+ */
+ ChildResourcesClient getChildResources();
+
+ /**
+ * Gets the EmergingIssuesClient object to access its operations.
+ *
+ * @return the EmergingIssuesClient object.
+ */
+ EmergingIssuesClient getEmergingIssues();
}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/SecurityAdvisoryImpactedResourcesClient.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/SecurityAdvisoryImpactedResourcesClient.java
new file mode 100644
index 000000000000..378f9b237623
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/SecurityAdvisoryImpactedResourcesClient.java
@@ -0,0 +1,72 @@
+// 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.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.resourcehealth.fluent.models.EventImpactedResourceInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in SecurityAdvisoryImpactedResourcesClient.
+ */
+public interface SecurityAdvisoryImpactedResourcesClient {
+ /**
+ * Lists impacted resources in the subscription by an event (Security Advisory).
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List of eventImpactedResources operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBySubscriptionIdAndEventId(String eventTrackingId);
+
+ /**
+ * Lists impacted resources in the subscription by an event (Security Advisory).
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List of eventImpactedResources operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBySubscriptionIdAndEventId(
+ String eventTrackingId, String filter, Context context);
+
+ /**
+ * Lists impacted resources in the tenant by an event (Security Advisory).
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List of eventImpactedResources operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByTenantIdAndEventId(String eventTrackingId);
+
+ /**
+ * Lists impacted resources in the tenant by an event (Security Advisory).
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List of eventImpactedResources operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByTenantIdAndEventId(
+ String eventTrackingId, String filter, Context context);
+}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EmergingIssue.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EmergingIssue.java
new file mode 100644
index 000000000000..a852e16be602
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EmergingIssue.java
@@ -0,0 +1,112 @@
+// 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.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.resourcehealth.models.StatusActiveEvent;
+import com.azure.resourcemanager.resourcehealth.models.StatusBanner;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.List;
+
+/** On-going emerging issue from azure status. */
+@Fluent
+public final class EmergingIssue {
+ /*
+ * Timestamp for when last time refreshed for ongoing emerging issue.
+ */
+ @JsonProperty(value = "refreshTimestamp")
+ private OffsetDateTime refreshTimestamp;
+
+ /*
+ * The list of emerging issues of banner type.
+ */
+ @JsonProperty(value = "statusBanners")
+ private List statusBanners;
+
+ /*
+ * The list of emerging issues of active event type.
+ */
+ @JsonProperty(value = "statusActiveEvents")
+ private List statusActiveEvents;
+
+ /** Creates an instance of EmergingIssue class. */
+ public EmergingIssue() {
+ }
+
+ /**
+ * Get the refreshTimestamp property: Timestamp for when last time refreshed for ongoing emerging issue.
+ *
+ * @return the refreshTimestamp value.
+ */
+ public OffsetDateTime refreshTimestamp() {
+ return this.refreshTimestamp;
+ }
+
+ /**
+ * Set the refreshTimestamp property: Timestamp for when last time refreshed for ongoing emerging issue.
+ *
+ * @param refreshTimestamp the refreshTimestamp value to set.
+ * @return the EmergingIssue object itself.
+ */
+ public EmergingIssue withRefreshTimestamp(OffsetDateTime refreshTimestamp) {
+ this.refreshTimestamp = refreshTimestamp;
+ return this;
+ }
+
+ /**
+ * Get the statusBanners property: The list of emerging issues of banner type.
+ *
+ * @return the statusBanners value.
+ */
+ public List statusBanners() {
+ return this.statusBanners;
+ }
+
+ /**
+ * Set the statusBanners property: The list of emerging issues of banner type.
+ *
+ * @param statusBanners the statusBanners value to set.
+ * @return the EmergingIssue object itself.
+ */
+ public EmergingIssue withStatusBanners(List statusBanners) {
+ this.statusBanners = statusBanners;
+ return this;
+ }
+
+ /**
+ * Get the statusActiveEvents property: The list of emerging issues of active event type.
+ *
+ * @return the statusActiveEvents value.
+ */
+ public List statusActiveEvents() {
+ return this.statusActiveEvents;
+ }
+
+ /**
+ * Set the statusActiveEvents property: The list of emerging issues of active event type.
+ *
+ * @param statusActiveEvents the statusActiveEvents value to set.
+ * @return the EmergingIssue object itself.
+ */
+ public EmergingIssue withStatusActiveEvents(List statusActiveEvents) {
+ this.statusActiveEvents = statusActiveEvents;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (statusBanners() != null) {
+ statusBanners().forEach(e -> e.validate());
+ }
+ if (statusActiveEvents() != null) {
+ statusActiveEvents().forEach(e -> e.validate());
+ }
+ }
+}
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
new file mode 100644
index 000000000000..a27d0b9d511a
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EmergingIssuesGetResultInner.java
@@ -0,0 +1,132 @@
+// 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.fluent.models;
+
+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;
+import java.time.OffsetDateTime;
+import java.util.List;
+
+/** The Get EmergingIssues operation response. */
+@Fluent
+public final class EmergingIssuesGetResultInner extends ProxyResource {
+ /*
+ * The emerging issue entity properties.
+ */
+ @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() {
+ }
+
+ /**
+ * Get the innerProperties property: The emerging issue entity properties.
+ *
+ * @return the innerProperties value.
+ */
+ 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.
+ *
+ * @return the refreshTimestamp value.
+ */
+ public OffsetDateTime refreshTimestamp() {
+ return this.innerProperties() == null ? null : this.innerProperties().refreshTimestamp();
+ }
+
+ /**
+ * Set the refreshTimestamp property: Timestamp for when last time refreshed for ongoing emerging issue.
+ *
+ * @param refreshTimestamp the refreshTimestamp value to set.
+ * @return the EmergingIssuesGetResultInner object itself.
+ */
+ public EmergingIssuesGetResultInner withRefreshTimestamp(OffsetDateTime refreshTimestamp) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EmergingIssue();
+ }
+ this.innerProperties().withRefreshTimestamp(refreshTimestamp);
+ return this;
+ }
+
+ /**
+ * Get the statusBanners property: The list of emerging issues of banner type.
+ *
+ * @return the statusBanners value.
+ */
+ public List statusBanners() {
+ return this.innerProperties() == null ? null : this.innerProperties().statusBanners();
+ }
+
+ /**
+ * Set the statusBanners property: The list of emerging issues of banner type.
+ *
+ * @param statusBanners the statusBanners value to set.
+ * @return the EmergingIssuesGetResultInner object itself.
+ */
+ public EmergingIssuesGetResultInner withStatusBanners(List statusBanners) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EmergingIssue();
+ }
+ this.innerProperties().withStatusBanners(statusBanners);
+ return this;
+ }
+
+ /**
+ * Get the statusActiveEvents property: The list of emerging issues of active event type.
+ *
+ * @return the statusActiveEvents value.
+ */
+ public List statusActiveEvents() {
+ return this.innerProperties() == null ? null : this.innerProperties().statusActiveEvents();
+ }
+
+ /**
+ * Set the statusActiveEvents property: The list of emerging issues of active event type.
+ *
+ * @param statusActiveEvents the statusActiveEvents value to set.
+ * @return the EmergingIssuesGetResultInner object itself.
+ */
+ public EmergingIssuesGetResultInner withStatusActiveEvents(List statusActiveEvents) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EmergingIssue();
+ }
+ this.innerProperties().withStatusActiveEvents(statusActiveEvents);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
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
new file mode 100644
index 000000000000..c5e64558d147
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventImpactedResourceInner.java
@@ -0,0 +1,111 @@
+// 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.fluent.models;
+
+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;
+
+/** Impacted resource for an event. */
+@Fluent
+public final class EventImpactedResourceInner extends ProxyResource {
+ /*
+ * Properties of impacted resource.
+ */
+ @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() {
+ }
+
+ /**
+ * Get the innerProperties property: Properties of impacted resource.
+ *
+ * @return the innerProperties value.
+ */
+ 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.
+ *
+ * @return the targetResourceType value.
+ */
+ public String targetResourceType() {
+ return this.innerProperties() == null ? null : this.innerProperties().targetResourceType();
+ }
+
+ /**
+ * Get the targetResourceId property: Identity for resource within Microsoft cloud.
+ *
+ * @return the targetResourceId value.
+ */
+ public String targetResourceId() {
+ return this.innerProperties() == null ? null : this.innerProperties().targetResourceId();
+ }
+
+ /**
+ * Get the targetRegion property: Impacted resource region name.
+ *
+ * @return the targetRegion value.
+ */
+ public String targetRegion() {
+ return this.innerProperties() == null ? null : this.innerProperties().targetRegion();
+ }
+
+ /**
+ * Get the info property: Additional information.
+ *
+ * @return the info value.
+ */
+ public List info() {
+ return this.innerProperties() == null ? null : this.innerProperties().info();
+ }
+
+ /**
+ * Set the info property: Additional information.
+ *
+ * @param info the info value to set.
+ * @return the EventImpactedResourceInner object itself.
+ */
+ public EventImpactedResourceInner withInfo(List info) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventImpactedResourceProperties();
+ }
+ this.innerProperties().withInfo(info);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
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
new file mode 100644
index 000000000000..8aad65ba8a29
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventImpactedResourceProperties.java
@@ -0,0 +1,100 @@
+// 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.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.resourcehealth.models.KeyValueItem;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Properties of impacted resource. */
+@Fluent
+public final class EventImpactedResourceProperties {
+ /*
+ * Resource type within Microsoft cloud.
+ */
+ @JsonProperty(value = "targetResourceType", access = JsonProperty.Access.WRITE_ONLY)
+ private String targetResourceType;
+
+ /*
+ * Identity for resource within Microsoft cloud.
+ */
+ @JsonProperty(value = "targetResourceId", access = JsonProperty.Access.WRITE_ONLY)
+ private String targetResourceId;
+
+ /*
+ * Impacted resource region name.
+ */
+ @JsonProperty(value = "targetRegion", access = JsonProperty.Access.WRITE_ONLY)
+ private String targetRegion;
+
+ /*
+ * Additional information.
+ */
+ @JsonProperty(value = "info")
+ private List info;
+
+ /** Creates an instance of EventImpactedResourceProperties class. */
+ public EventImpactedResourceProperties() {
+ }
+
+ /**
+ * Get the targetResourceType property: Resource type within Microsoft cloud.
+ *
+ * @return the targetResourceType value.
+ */
+ public String targetResourceType() {
+ return this.targetResourceType;
+ }
+
+ /**
+ * Get the targetResourceId property: Identity for resource within Microsoft cloud.
+ *
+ * @return the targetResourceId value.
+ */
+ public String targetResourceId() {
+ return this.targetResourceId;
+ }
+
+ /**
+ * Get the targetRegion property: Impacted resource region name.
+ *
+ * @return the targetRegion value.
+ */
+ public String targetRegion() {
+ return this.targetRegion;
+ }
+
+ /**
+ * Get the info property: Additional information.
+ *
+ * @return the info value.
+ */
+ public List info() {
+ return this.info;
+ }
+
+ /**
+ * Set the info property: Additional information.
+ *
+ * @param info the info value to set.
+ * @return the EventImpactedResourceProperties object itself.
+ */
+ public EventImpactedResourceProperties withInfo(List info) {
+ this.info = info;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (info() != null) {
+ info().forEach(e -> e.validate());
+ }
+ }
+}
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
new file mode 100644
index 000000000000..aac299cc6d69
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventInner.java
@@ -0,0 +1,724 @@
+// 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.fluent.models;
+
+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.EventTypeValues;
+import com.azure.resourcemanager.resourcehealth.models.Faq;
+import com.azure.resourcemanager.resourcehealth.models.Impact;
+import com.azure.resourcemanager.resourcehealth.models.LevelValues;
+import com.azure.resourcemanager.resourcehealth.models.Link;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.List;
+
+/** Service health event. */
+@Fluent
+public final class EventInner extends ProxyResource {
+ /*
+ * Properties of event.
+ */
+ @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() {
+ }
+
+ /**
+ * Get the innerProperties property: Properties of event.
+ *
+ * @return the innerProperties value.
+ */
+ 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.
+ *
+ * @return the eventType value.
+ */
+ public EventTypeValues eventType() {
+ return this.innerProperties() == null ? null : this.innerProperties().eventType();
+ }
+
+ /**
+ * Set the eventType property: Type of event.
+ *
+ * @param eventType the eventType value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withEventType(EventTypeValues eventType) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withEventType(eventType);
+ return this;
+ }
+
+ /**
+ * Get the eventSource property: Source of event.
+ *
+ * @return the eventSource value.
+ */
+ public EventSourceValues eventSource() {
+ return this.innerProperties() == null ? null : this.innerProperties().eventSource();
+ }
+
+ /**
+ * Set the eventSource property: Source of event.
+ *
+ * @param eventSource the eventSource value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withEventSource(EventSourceValues eventSource) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withEventSource(eventSource);
+ return this;
+ }
+
+ /**
+ * Get the status property: Current status of event.
+ *
+ * @return the status value.
+ */
+ public EventStatusValues status() {
+ return this.innerProperties() == null ? null : this.innerProperties().status();
+ }
+
+ /**
+ * Set the status property: Current status of event.
+ *
+ * @param status the status value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withStatus(EventStatusValues status) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withStatus(status);
+ return this;
+ }
+
+ /**
+ * Get the title property: Title text of event.
+ *
+ * @return the title value.
+ */
+ public String title() {
+ return this.innerProperties() == null ? null : this.innerProperties().title();
+ }
+
+ /**
+ * Set the title property: Title text of event.
+ *
+ * @param title the title value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withTitle(String title) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withTitle(title);
+ return this;
+ }
+
+ /**
+ * Get the summary property: Summary text of event.
+ *
+ * @return the summary value.
+ */
+ public String summary() {
+ return this.innerProperties() == null ? null : this.innerProperties().summary();
+ }
+
+ /**
+ * Set the summary property: Summary text of event.
+ *
+ * @param summary the summary value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withSummary(String summary) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withSummary(summary);
+ return this;
+ }
+
+ /**
+ * Get the headerProperty property: Header text of event.
+ *
+ * @return the headerProperty value.
+ */
+ public String headerProperty() {
+ return this.innerProperties() == null ? null : this.innerProperties().headerProperty();
+ }
+
+ /**
+ * Set the headerProperty property: Header text of event.
+ *
+ * @param headerProperty the headerProperty value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withHeaderProperty(String headerProperty) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withHeaderProperty(headerProperty);
+ return this;
+ }
+
+ /**
+ * Get the level property: Level of insight.
+ *
+ * @return the level value.
+ */
+ public LevelValues level() {
+ return this.innerProperties() == null ? null : this.innerProperties().level();
+ }
+
+ /**
+ * Set the level property: Level of insight.
+ *
+ * @param level the level value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withLevel(LevelValues level) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withLevel(level);
+ return this;
+ }
+
+ /**
+ * Get the eventLevel property: Level of event.
+ *
+ * @return the eventLevel value.
+ */
+ public EventLevelValues eventLevel() {
+ return this.innerProperties() == null ? null : this.innerProperties().eventLevel();
+ }
+
+ /**
+ * Set the eventLevel property: Level of event.
+ *
+ * @param eventLevel the eventLevel value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withEventLevel(EventLevelValues eventLevel) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withEventLevel(eventLevel);
+ return this;
+ }
+
+ /**
+ * Get the externalIncidentId property: The id of the Incident.
+ *
+ * @return the externalIncidentId value.
+ */
+ public String externalIncidentId() {
+ return this.innerProperties() == null ? null : this.innerProperties().externalIncidentId();
+ }
+
+ /**
+ * Set the externalIncidentId property: The id of the Incident.
+ *
+ * @param externalIncidentId the externalIncidentId value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withExternalIncidentId(String externalIncidentId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withExternalIncidentId(externalIncidentId);
+ return this;
+ }
+
+ /**
+ * Get the reason property: The reason for the Incident.
+ *
+ * @return the reason value.
+ */
+ public String reason() {
+ return this.innerProperties() == null ? null : this.innerProperties().reason();
+ }
+
+ /**
+ * Set the reason property: The reason for the Incident.
+ *
+ * @param reason the reason value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withReason(String reason) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withReason(reason);
+ return this;
+ }
+
+ /**
+ * Get the article property: Article of event.
+ *
+ * @return the article value.
+ */
+ public EventPropertiesArticle article() {
+ return this.innerProperties() == null ? null : this.innerProperties().article();
+ }
+
+ /**
+ * Set the article property: Article of event.
+ *
+ * @param article the article value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withArticle(EventPropertiesArticle article) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withArticle(article);
+ return this;
+ }
+
+ /**
+ * Get the links property: Useful links of event.
+ *
+ * @return the links value.
+ */
+ public List links() {
+ return this.innerProperties() == null ? null : this.innerProperties().links();
+ }
+
+ /**
+ * Set the links property: Useful links of event.
+ *
+ * @param links the links value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withLinks(List links) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withLinks(links);
+ return this;
+ }
+
+ /**
+ * Get the impactStartTime property: It provides the Timestamp for when the health impacting event started.
+ *
+ * @return the impactStartTime value.
+ */
+ public OffsetDateTime impactStartTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().impactStartTime();
+ }
+
+ /**
+ * Set the impactStartTime property: It provides the Timestamp for when the health impacting event started.
+ *
+ * @param impactStartTime the impactStartTime value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withImpactStartTime(OffsetDateTime impactStartTime) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withImpactStartTime(impactStartTime);
+ return this;
+ }
+
+ /**
+ * Get the impactMitigationTime property: It provides the Timestamp for when the health impacting event resolved.
+ *
+ * @return the impactMitigationTime value.
+ */
+ public OffsetDateTime impactMitigationTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().impactMitigationTime();
+ }
+
+ /**
+ * Set the impactMitigationTime property: It provides the Timestamp for when the health impacting event resolved.
+ *
+ * @param impactMitigationTime the impactMitigationTime value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withImpactMitigationTime(OffsetDateTime impactMitigationTime) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withImpactMitigationTime(impactMitigationTime);
+ return this;
+ }
+
+ /**
+ * Get the impact property: List services impacted by the service health event.
+ *
+ * @return the impact value.
+ */
+ public List impact() {
+ return this.innerProperties() == null ? null : this.innerProperties().impact();
+ }
+
+ /**
+ * Set the impact property: List services impacted by the service health event.
+ *
+ * @param impact the impact value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withImpact(List impact) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withImpact(impact);
+ return this;
+ }
+
+ /**
+ * Get the recommendedActions property: Recommended actions of event.
+ *
+ * @return the recommendedActions value.
+ */
+ public EventPropertiesRecommendedActions recommendedActions() {
+ return this.innerProperties() == null ? null : this.innerProperties().recommendedActions();
+ }
+
+ /**
+ * Set the recommendedActions property: Recommended actions of event.
+ *
+ * @param recommendedActions the recommendedActions value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withRecommendedActions(EventPropertiesRecommendedActions recommendedActions) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withRecommendedActions(recommendedActions);
+ return this;
+ }
+
+ /**
+ * Get the faqs property: Frequently asked questions for the service health event.
+ *
+ * @return the faqs value.
+ */
+ public List faqs() {
+ return this.innerProperties() == null ? null : this.innerProperties().faqs();
+ }
+
+ /**
+ * Set the faqs property: Frequently asked questions for the service health event.
+ *
+ * @param faqs the faqs value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withFaqs(List faqs) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withFaqs(faqs);
+ return this;
+ }
+
+ /**
+ * Get the isHir property: It provides information if the event is High incident rate event or not.
+ *
+ * @return the isHir value.
+ */
+ public Boolean isHir() {
+ return this.innerProperties() == null ? null : this.innerProperties().isHir();
+ }
+
+ /**
+ * Set the isHir property: It provides information if the event is High incident rate event or not.
+ *
+ * @param isHir the isHir value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withIsHir(Boolean isHir) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withIsHir(isHir);
+ return this;
+ }
+
+ /**
+ * Get the enableMicrosoftSupport property: Tells if we want to enable or disable Microsoft Support for this event.
+ *
+ * @return the enableMicrosoftSupport value.
+ */
+ public Boolean enableMicrosoftSupport() {
+ return this.innerProperties() == null ? null : this.innerProperties().enableMicrosoftSupport();
+ }
+
+ /**
+ * Set the enableMicrosoftSupport property: Tells if we want to enable or disable Microsoft Support for this event.
+ *
+ * @param enableMicrosoftSupport the enableMicrosoftSupport value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withEnableMicrosoftSupport(Boolean enableMicrosoftSupport) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withEnableMicrosoftSupport(enableMicrosoftSupport);
+ return this;
+ }
+
+ /**
+ * Get the description property: Contains the communication message for the event, that could include summary, root
+ * cause and other details.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.innerProperties() == null ? null : this.innerProperties().description();
+ }
+
+ /**
+ * Set the description property: Contains the communication message for the event, that could include summary, root
+ * cause and other details.
+ *
+ * @param description the description value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withDescription(String description) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withDescription(description);
+ return this;
+ }
+
+ /**
+ * Get the platformInitiated property: Is true if the event is platform initiated.
+ *
+ * @return the platformInitiated value.
+ */
+ public Boolean platformInitiated() {
+ return this.innerProperties() == null ? null : this.innerProperties().platformInitiated();
+ }
+
+ /**
+ * Set the platformInitiated property: Is true if the event is platform initiated.
+ *
+ * @param platformInitiated the platformInitiated value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withPlatformInitiated(Boolean platformInitiated) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withPlatformInitiated(platformInitiated);
+ return this;
+ }
+
+ /**
+ * Get the enableChatWithUs property: Tells if we want to enable or disable Microsoft Support for this event.
+ *
+ * @return the enableChatWithUs value.
+ */
+ public Boolean enableChatWithUs() {
+ return this.innerProperties() == null ? null : this.innerProperties().enableChatWithUs();
+ }
+
+ /**
+ * Set the enableChatWithUs property: Tells if we want to enable or disable Microsoft Support for this event.
+ *
+ * @param enableChatWithUs the enableChatWithUs value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withEnableChatWithUs(Boolean enableChatWithUs) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withEnableChatWithUs(enableChatWithUs);
+ return this;
+ }
+
+ /**
+ * Get the priority property: Priority level of the event. Has value from 0 to 23. 0 is the highest priority.
+ * Service issue events have higher priority followed by planned maintenance and health advisory. Critical events
+ * have higher priority followed by error, warning and informational. Furthermore, active events have higher
+ * priority than resolved.
+ *
+ * @return the priority value.
+ */
+ public Integer priority() {
+ return this.innerProperties() == null ? null : this.innerProperties().priority();
+ }
+
+ /**
+ * Set the priority property: Priority level of the event. Has value from 0 to 23. 0 is the highest priority.
+ * Service issue events have higher priority followed by planned maintenance and health advisory. Critical events
+ * have higher priority followed by error, warning and informational. Furthermore, active events have higher
+ * priority than resolved.
+ *
+ * @param priority the priority value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withPriority(Integer priority) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withPriority(priority);
+ return this;
+ }
+
+ /**
+ * Get the lastUpdateTime property: It provides the Timestamp for when the health impacting event was last updated.
+ *
+ * @return the lastUpdateTime value.
+ */
+ public OffsetDateTime lastUpdateTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().lastUpdateTime();
+ }
+
+ /**
+ * Set the lastUpdateTime property: It provides the Timestamp for when the health impacting event was last updated.
+ *
+ * @param lastUpdateTime the lastUpdateTime value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withLastUpdateTime(OffsetDateTime lastUpdateTime) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withLastUpdateTime(lastUpdateTime);
+ return this;
+ }
+
+ /**
+ * Get the hirStage property: Stage for HIR Document.
+ *
+ * @return the hirStage value.
+ */
+ public String hirStage() {
+ return this.innerProperties() == null ? null : this.innerProperties().hirStage();
+ }
+
+ /**
+ * Set the hirStage property: Stage for HIR Document.
+ *
+ * @param hirStage the hirStage value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withHirStage(String hirStage) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withHirStage(hirStage);
+ return this;
+ }
+
+ /**
+ * Get the additionalInformation property: Additional information.
+ *
+ * @return the additionalInformation value.
+ */
+ public EventPropertiesAdditionalInformation additionalInformation() {
+ return this.innerProperties() == null ? null : this.innerProperties().additionalInformation();
+ }
+
+ /**
+ * Set the additionalInformation property: Additional information.
+ *
+ * @param additionalInformation the additionalInformation value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withAdditionalInformation(EventPropertiesAdditionalInformation additionalInformation) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withAdditionalInformation(additionalInformation);
+ return this;
+ }
+
+ /**
+ * Get the duration property: duration in seconds.
+ *
+ * @return the duration value.
+ */
+ public Integer duration() {
+ return this.innerProperties() == null ? null : this.innerProperties().duration();
+ }
+
+ /**
+ * Set the duration property: duration in seconds.
+ *
+ * @param duration the duration value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withDuration(Integer duration) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withDuration(duration);
+ return this;
+ }
+
+ /**
+ * Get the impactType property: The type of the impact.
+ *
+ * @return the impactType value.
+ */
+ public String impactType() {
+ return this.innerProperties() == null ? null : this.innerProperties().impactType();
+ }
+
+ /**
+ * Set the impactType property: The type of the impact.
+ *
+ * @param impactType the impactType value to set.
+ * @return the EventInner object itself.
+ */
+ public EventInner withImpactType(String impactType) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EventProperties();
+ }
+ this.innerProperties().withImpactType(impactType);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
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
new file mode 100644
index 000000000000..ff31364f2f3a
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventProperties.java
@@ -0,0 +1,793 @@
+// 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.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+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.EventTypeValues;
+import com.azure.resourcemanager.resourcehealth.models.Faq;
+import com.azure.resourcemanager.resourcehealth.models.Impact;
+import com.azure.resourcemanager.resourcehealth.models.LevelValues;
+import com.azure.resourcemanager.resourcehealth.models.Link;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.List;
+
+/** Properties of event. */
+@Fluent
+public final class EventProperties {
+ /*
+ * Type of event.
+ */
+ @JsonProperty(value = "eventType")
+ private EventTypeValues eventType;
+
+ /*
+ * Source of event.
+ */
+ @JsonProperty(value = "eventSource")
+ private EventSourceValues eventSource;
+
+ /*
+ * Current status of event.
+ */
+ @JsonProperty(value = "status")
+ private EventStatusValues status;
+
+ /*
+ * Title text of event.
+ */
+ @JsonProperty(value = "title")
+ private String title;
+
+ /*
+ * Summary text of event.
+ */
+ @JsonProperty(value = "summary")
+ private String summary;
+
+ /*
+ * Header text of event.
+ */
+ @JsonProperty(value = "header")
+ private String headerProperty;
+
+ /*
+ * Level of insight.
+ */
+ @JsonProperty(value = "level")
+ private LevelValues level;
+
+ /*
+ * Level of event.
+ */
+ @JsonProperty(value = "eventLevel")
+ private EventLevelValues eventLevel;
+
+ /*
+ * The id of the Incident
+ */
+ @JsonProperty(value = "externalIncidentId")
+ private String externalIncidentId;
+
+ /*
+ * The reason for the Incident
+ */
+ @JsonProperty(value = "reason")
+ private String reason;
+
+ /*
+ * Article of event.
+ */
+ @JsonProperty(value = "article")
+ private EventPropertiesArticle article;
+
+ /*
+ * Useful links of event.
+ */
+ @JsonProperty(value = "links")
+ private List links;
+
+ /*
+ * It provides the Timestamp for when the health impacting event started.
+ */
+ @JsonProperty(value = "impactStartTime")
+ private OffsetDateTime impactStartTime;
+
+ /*
+ * It provides the Timestamp for when the health impacting event resolved.
+ */
+ @JsonProperty(value = "impactMitigationTime")
+ private OffsetDateTime impactMitigationTime;
+
+ /*
+ * List services impacted by the service health event.
+ */
+ @JsonProperty(value = "impact")
+ private List impact;
+
+ /*
+ * Recommended actions of event.
+ */
+ @JsonProperty(value = "recommendedActions")
+ private EventPropertiesRecommendedActions recommendedActions;
+
+ /*
+ * Frequently asked questions for the service health event.
+ */
+ @JsonProperty(value = "faqs")
+ private List faqs;
+
+ /*
+ * It provides information if the event is High incident rate event or not.
+ */
+ @JsonProperty(value = "isHIR")
+ private Boolean isHir;
+
+ /*
+ * Tells if we want to enable or disable Microsoft Support for this event.
+ */
+ @JsonProperty(value = "enableMicrosoftSupport")
+ private Boolean enableMicrosoftSupport;
+
+ /*
+ * Contains the communication message for the event, that could include summary, root cause and other details.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * Is true if the event is platform initiated.
+ */
+ @JsonProperty(value = "platformInitiated")
+ private Boolean platformInitiated;
+
+ /*
+ * Tells if we want to enable or disable Microsoft Support for this event.
+ */
+ @JsonProperty(value = "enableChatWithUs")
+ private Boolean enableChatWithUs;
+
+ /*
+ * Priority level of the event. Has value from 0 to 23. 0 is the highest priority. Service issue events have higher
+ * priority followed by planned maintenance and health advisory. Critical events have higher priority followed by
+ * error, warning and informational. Furthermore, active events have higher priority than resolved.
+ */
+ @JsonProperty(value = "priority")
+ private Integer priority;
+
+ /*
+ * It provides the Timestamp for when the health impacting event was last updated.
+ */
+ @JsonProperty(value = "lastUpdateTime")
+ private OffsetDateTime lastUpdateTime;
+
+ /*
+ * Stage for HIR Document
+ */
+ @JsonProperty(value = "hirStage")
+ private String hirStage;
+
+ /*
+ * Additional information
+ */
+ @JsonProperty(value = "additionalInformation")
+ private EventPropertiesAdditionalInformation additionalInformation;
+
+ /*
+ * duration in seconds
+ */
+ @JsonProperty(value = "duration")
+ private Integer duration;
+
+ /*
+ * The type of the impact
+ */
+ @JsonProperty(value = "impactType")
+ private String impactType;
+
+ /** Creates an instance of EventProperties class. */
+ public EventProperties() {
+ }
+
+ /**
+ * Get the eventType property: Type of event.
+ *
+ * @return the eventType value.
+ */
+ public EventTypeValues eventType() {
+ return this.eventType;
+ }
+
+ /**
+ * Set the eventType property: Type of event.
+ *
+ * @param eventType the eventType value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withEventType(EventTypeValues eventType) {
+ this.eventType = eventType;
+ return this;
+ }
+
+ /**
+ * Get the eventSource property: Source of event.
+ *
+ * @return the eventSource value.
+ */
+ public EventSourceValues eventSource() {
+ return this.eventSource;
+ }
+
+ /**
+ * Set the eventSource property: Source of event.
+ *
+ * @param eventSource the eventSource value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withEventSource(EventSourceValues eventSource) {
+ this.eventSource = eventSource;
+ return this;
+ }
+
+ /**
+ * Get the status property: Current status of event.
+ *
+ * @return the status value.
+ */
+ public EventStatusValues status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Current status of event.
+ *
+ * @param status the status value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withStatus(EventStatusValues status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the title property: Title text of event.
+ *
+ * @return the title value.
+ */
+ public String title() {
+ return this.title;
+ }
+
+ /**
+ * Set the title property: Title text of event.
+ *
+ * @param title the title value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withTitle(String title) {
+ this.title = title;
+ return this;
+ }
+
+ /**
+ * Get the summary property: Summary text of event.
+ *
+ * @return the summary value.
+ */
+ public String summary() {
+ return this.summary;
+ }
+
+ /**
+ * Set the summary property: Summary text of event.
+ *
+ * @param summary the summary value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withSummary(String summary) {
+ this.summary = summary;
+ return this;
+ }
+
+ /**
+ * Get the headerProperty property: Header text of event.
+ *
+ * @return the headerProperty value.
+ */
+ public String headerProperty() {
+ return this.headerProperty;
+ }
+
+ /**
+ * Set the headerProperty property: Header text of event.
+ *
+ * @param headerProperty the headerProperty value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withHeaderProperty(String headerProperty) {
+ this.headerProperty = headerProperty;
+ return this;
+ }
+
+ /**
+ * Get the level property: Level of insight.
+ *
+ * @return the level value.
+ */
+ public LevelValues level() {
+ return this.level;
+ }
+
+ /**
+ * Set the level property: Level of insight.
+ *
+ * @param level the level value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withLevel(LevelValues level) {
+ this.level = level;
+ return this;
+ }
+
+ /**
+ * Get the eventLevel property: Level of event.
+ *
+ * @return the eventLevel value.
+ */
+ public EventLevelValues eventLevel() {
+ return this.eventLevel;
+ }
+
+ /**
+ * Set the eventLevel property: Level of event.
+ *
+ * @param eventLevel the eventLevel value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withEventLevel(EventLevelValues eventLevel) {
+ this.eventLevel = eventLevel;
+ return this;
+ }
+
+ /**
+ * Get the externalIncidentId property: The id of the Incident.
+ *
+ * @return the externalIncidentId value.
+ */
+ public String externalIncidentId() {
+ return this.externalIncidentId;
+ }
+
+ /**
+ * Set the externalIncidentId property: The id of the Incident.
+ *
+ * @param externalIncidentId the externalIncidentId value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withExternalIncidentId(String externalIncidentId) {
+ this.externalIncidentId = externalIncidentId;
+ return this;
+ }
+
+ /**
+ * Get the reason property: The reason for the Incident.
+ *
+ * @return the reason value.
+ */
+ public String reason() {
+ return this.reason;
+ }
+
+ /**
+ * Set the reason property: The reason for the Incident.
+ *
+ * @param reason the reason value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withReason(String reason) {
+ this.reason = reason;
+ return this;
+ }
+
+ /**
+ * Get the article property: Article of event.
+ *
+ * @return the article value.
+ */
+ public EventPropertiesArticle article() {
+ return this.article;
+ }
+
+ /**
+ * Set the article property: Article of event.
+ *
+ * @param article the article value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withArticle(EventPropertiesArticle article) {
+ this.article = article;
+ return this;
+ }
+
+ /**
+ * Get the links property: Useful links of event.
+ *
+ * @return the links value.
+ */
+ public List links() {
+ return this.links;
+ }
+
+ /**
+ * Set the links property: Useful links of event.
+ *
+ * @param links the links value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withLinks(List links) {
+ this.links = links;
+ return this;
+ }
+
+ /**
+ * Get the impactStartTime property: It provides the Timestamp for when the health impacting event started.
+ *
+ * @return the impactStartTime value.
+ */
+ public OffsetDateTime impactStartTime() {
+ return this.impactStartTime;
+ }
+
+ /**
+ * Set the impactStartTime property: It provides the Timestamp for when the health impacting event started.
+ *
+ * @param impactStartTime the impactStartTime value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withImpactStartTime(OffsetDateTime impactStartTime) {
+ this.impactStartTime = impactStartTime;
+ return this;
+ }
+
+ /**
+ * Get the impactMitigationTime property: It provides the Timestamp for when the health impacting event resolved.
+ *
+ * @return the impactMitigationTime value.
+ */
+ public OffsetDateTime impactMitigationTime() {
+ return this.impactMitigationTime;
+ }
+
+ /**
+ * Set the impactMitigationTime property: It provides the Timestamp for when the health impacting event resolved.
+ *
+ * @param impactMitigationTime the impactMitigationTime value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withImpactMitigationTime(OffsetDateTime impactMitigationTime) {
+ this.impactMitigationTime = impactMitigationTime;
+ return this;
+ }
+
+ /**
+ * Get the impact property: List services impacted by the service health event.
+ *
+ * @return the impact value.
+ */
+ public List impact() {
+ return this.impact;
+ }
+
+ /**
+ * Set the impact property: List services impacted by the service health event.
+ *
+ * @param impact the impact value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withImpact(List impact) {
+ this.impact = impact;
+ return this;
+ }
+
+ /**
+ * Get the recommendedActions property: Recommended actions of event.
+ *
+ * @return the recommendedActions value.
+ */
+ public EventPropertiesRecommendedActions recommendedActions() {
+ return this.recommendedActions;
+ }
+
+ /**
+ * Set the recommendedActions property: Recommended actions of event.
+ *
+ * @param recommendedActions the recommendedActions value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withRecommendedActions(EventPropertiesRecommendedActions recommendedActions) {
+ this.recommendedActions = recommendedActions;
+ return this;
+ }
+
+ /**
+ * Get the faqs property: Frequently asked questions for the service health event.
+ *
+ * @return the faqs value.
+ */
+ public List faqs() {
+ return this.faqs;
+ }
+
+ /**
+ * Set the faqs property: Frequently asked questions for the service health event.
+ *
+ * @param faqs the faqs value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withFaqs(List faqs) {
+ this.faqs = faqs;
+ return this;
+ }
+
+ /**
+ * Get the isHir property: It provides information if the event is High incident rate event or not.
+ *
+ * @return the isHir value.
+ */
+ public Boolean isHir() {
+ return this.isHir;
+ }
+
+ /**
+ * Set the isHir property: It provides information if the event is High incident rate event or not.
+ *
+ * @param isHir the isHir value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withIsHir(Boolean isHir) {
+ this.isHir = isHir;
+ return this;
+ }
+
+ /**
+ * Get the enableMicrosoftSupport property: Tells if we want to enable or disable Microsoft Support for this event.
+ *
+ * @return the enableMicrosoftSupport value.
+ */
+ public Boolean enableMicrosoftSupport() {
+ return this.enableMicrosoftSupport;
+ }
+
+ /**
+ * Set the enableMicrosoftSupport property: Tells if we want to enable or disable Microsoft Support for this event.
+ *
+ * @param enableMicrosoftSupport the enableMicrosoftSupport value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withEnableMicrosoftSupport(Boolean enableMicrosoftSupport) {
+ this.enableMicrosoftSupport = enableMicrosoftSupport;
+ return this;
+ }
+
+ /**
+ * Get the description property: Contains the communication message for the event, that could include summary, root
+ * cause and other details.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Contains the communication message for the event, that could include summary, root
+ * cause and other details.
+ *
+ * @param description the description value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the platformInitiated property: Is true if the event is platform initiated.
+ *
+ * @return the platformInitiated value.
+ */
+ public Boolean platformInitiated() {
+ return this.platformInitiated;
+ }
+
+ /**
+ * Set the platformInitiated property: Is true if the event is platform initiated.
+ *
+ * @param platformInitiated the platformInitiated value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withPlatformInitiated(Boolean platformInitiated) {
+ this.platformInitiated = platformInitiated;
+ return this;
+ }
+
+ /**
+ * Get the enableChatWithUs property: Tells if we want to enable or disable Microsoft Support for this event.
+ *
+ * @return the enableChatWithUs value.
+ */
+ public Boolean enableChatWithUs() {
+ return this.enableChatWithUs;
+ }
+
+ /**
+ * Set the enableChatWithUs property: Tells if we want to enable or disable Microsoft Support for this event.
+ *
+ * @param enableChatWithUs the enableChatWithUs value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withEnableChatWithUs(Boolean enableChatWithUs) {
+ this.enableChatWithUs = enableChatWithUs;
+ return this;
+ }
+
+ /**
+ * Get the priority property: Priority level of the event. Has value from 0 to 23. 0 is the highest priority.
+ * Service issue events have higher priority followed by planned maintenance and health advisory. Critical events
+ * have higher priority followed by error, warning and informational. Furthermore, active events have higher
+ * priority than resolved.
+ *
+ * @return the priority value.
+ */
+ public Integer priority() {
+ return this.priority;
+ }
+
+ /**
+ * Set the priority property: Priority level of the event. Has value from 0 to 23. 0 is the highest priority.
+ * Service issue events have higher priority followed by planned maintenance and health advisory. Critical events
+ * have higher priority followed by error, warning and informational. Furthermore, active events have higher
+ * priority than resolved.
+ *
+ * @param priority the priority value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withPriority(Integer priority) {
+ this.priority = priority;
+ return this;
+ }
+
+ /**
+ * Get the lastUpdateTime property: It provides the Timestamp for when the health impacting event was last updated.
+ *
+ * @return the lastUpdateTime value.
+ */
+ public OffsetDateTime lastUpdateTime() {
+ return this.lastUpdateTime;
+ }
+
+ /**
+ * Set the lastUpdateTime property: It provides the Timestamp for when the health impacting event was last updated.
+ *
+ * @param lastUpdateTime the lastUpdateTime value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withLastUpdateTime(OffsetDateTime lastUpdateTime) {
+ this.lastUpdateTime = lastUpdateTime;
+ return this;
+ }
+
+ /**
+ * Get the hirStage property: Stage for HIR Document.
+ *
+ * @return the hirStage value.
+ */
+ public String hirStage() {
+ return this.hirStage;
+ }
+
+ /**
+ * Set the hirStage property: Stage for HIR Document.
+ *
+ * @param hirStage the hirStage value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withHirStage(String hirStage) {
+ this.hirStage = hirStage;
+ return this;
+ }
+
+ /**
+ * Get the additionalInformation property: Additional information.
+ *
+ * @return the additionalInformation value.
+ */
+ public EventPropertiesAdditionalInformation additionalInformation() {
+ return this.additionalInformation;
+ }
+
+ /**
+ * Set the additionalInformation property: Additional information.
+ *
+ * @param additionalInformation the additionalInformation value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withAdditionalInformation(EventPropertiesAdditionalInformation additionalInformation) {
+ this.additionalInformation = additionalInformation;
+ return this;
+ }
+
+ /**
+ * Get the duration property: duration in seconds.
+ *
+ * @return the duration value.
+ */
+ public Integer duration() {
+ return this.duration;
+ }
+
+ /**
+ * Set the duration property: duration in seconds.
+ *
+ * @param duration the duration value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withDuration(Integer duration) {
+ this.duration = duration;
+ return this;
+ }
+
+ /**
+ * Get the impactType property: The type of the impact.
+ *
+ * @return the impactType value.
+ */
+ public String impactType() {
+ return this.impactType;
+ }
+
+ /**
+ * Set the impactType property: The type of the impact.
+ *
+ * @param impactType the impactType value to set.
+ * @return the EventProperties object itself.
+ */
+ public EventProperties withImpactType(String impactType) {
+ this.impactType = impactType;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (article() != null) {
+ article().validate();
+ }
+ if (links() != null) {
+ links().forEach(e -> e.validate());
+ }
+ if (impact() != null) {
+ impact().forEach(e -> e.validate());
+ }
+ if (recommendedActions() != null) {
+ recommendedActions().validate();
+ }
+ if (faqs() != null) {
+ faqs().forEach(e -> e.validate());
+ }
+ if (additionalInformation() != null) {
+ additionalInformation().validate();
+ }
+ }
+}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/MetadataEntityInner.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/MetadataEntityInner.java
new file mode 100644
index 000000000000..e21596fda4ee
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/MetadataEntityInner.java
@@ -0,0 +1,154 @@
+// 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.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.resourcehealth.models.MetadataSupportedValueDetail;
+import com.azure.resourcemanager.resourcehealth.models.Scenario;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The metadata entity contract. */
+@Fluent
+public final class MetadataEntityInner extends ProxyResource {
+ /*
+ * The metadata entity properties.
+ */
+ @JsonProperty(value = "properties")
+ private MetadataEntityProperties 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 MetadataEntityInner class. */
+ public MetadataEntityInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The metadata entity properties.
+ *
+ * @return the innerProperties value.
+ */
+ private MetadataEntityProperties 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 displayName property: The display name.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.innerProperties() == null ? null : this.innerProperties().displayName();
+ }
+
+ /**
+ * Set the displayName property: The display name.
+ *
+ * @param displayName the displayName value to set.
+ * @return the MetadataEntityInner object itself.
+ */
+ public MetadataEntityInner withDisplayName(String displayName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new MetadataEntityProperties();
+ }
+ this.innerProperties().withDisplayName(displayName);
+ return this;
+ }
+
+ /**
+ * Get the dependsOn property: The list of keys on which this entity depends on.
+ *
+ * @return the dependsOn value.
+ */
+ public List dependsOn() {
+ return this.innerProperties() == null ? null : this.innerProperties().dependsOn();
+ }
+
+ /**
+ * Set the dependsOn property: The list of keys on which this entity depends on.
+ *
+ * @param dependsOn the dependsOn value to set.
+ * @return the MetadataEntityInner object itself.
+ */
+ public MetadataEntityInner withDependsOn(List dependsOn) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new MetadataEntityProperties();
+ }
+ this.innerProperties().withDependsOn(dependsOn);
+ return this;
+ }
+
+ /**
+ * Get the applicableScenarios property: The list of scenarios applicable to this metadata entity.
+ *
+ * @return the applicableScenarios value.
+ */
+ public List applicableScenarios() {
+ return this.innerProperties() == null ? null : this.innerProperties().applicableScenarios();
+ }
+
+ /**
+ * Set the applicableScenarios property: The list of scenarios applicable to this metadata entity.
+ *
+ * @param applicableScenarios the applicableScenarios value to set.
+ * @return the MetadataEntityInner object itself.
+ */
+ public MetadataEntityInner withApplicableScenarios(List applicableScenarios) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new MetadataEntityProperties();
+ }
+ this.innerProperties().withApplicableScenarios(applicableScenarios);
+ return this;
+ }
+
+ /**
+ * Get the supportedValues property: The list of supported values.
+ *
+ * @return the supportedValues value.
+ */
+ public List supportedValues() {
+ return this.innerProperties() == null ? null : this.innerProperties().supportedValues();
+ }
+
+ /**
+ * Set the supportedValues property: The list of supported values.
+ *
+ * @param supportedValues the supportedValues value to set.
+ * @return the MetadataEntityInner object itself.
+ */
+ public MetadataEntityInner withSupportedValues(List supportedValues) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new MetadataEntityProperties();
+ }
+ this.innerProperties().withSupportedValues(supportedValues);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/MetadataEntityProperties.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/MetadataEntityProperties.java
new file mode 100644
index 000000000000..37af7118aae0
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/MetadataEntityProperties.java
@@ -0,0 +1,134 @@
+// 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.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.resourcehealth.models.MetadataSupportedValueDetail;
+import com.azure.resourcemanager.resourcehealth.models.Scenario;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The metadata entity properties. */
+@Fluent
+public final class MetadataEntityProperties {
+ /*
+ * The display name.
+ */
+ @JsonProperty(value = "displayName")
+ private String displayName;
+
+ /*
+ * The list of keys on which this entity depends on.
+ */
+ @JsonProperty(value = "dependsOn")
+ private List dependsOn;
+
+ /*
+ * The list of scenarios applicable to this metadata entity.
+ */
+ @JsonProperty(value = "applicableScenarios")
+ private List applicableScenarios;
+
+ /*
+ * The list of supported values.
+ */
+ @JsonProperty(value = "supportedValues")
+ private List supportedValues;
+
+ /** Creates an instance of MetadataEntityProperties class. */
+ public MetadataEntityProperties() {
+ }
+
+ /**
+ * Get the displayName property: The display name.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the displayName property: The display name.
+ *
+ * @param displayName the displayName value to set.
+ * @return the MetadataEntityProperties object itself.
+ */
+ public MetadataEntityProperties withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Get the dependsOn property: The list of keys on which this entity depends on.
+ *
+ * @return the dependsOn value.
+ */
+ public List dependsOn() {
+ return this.dependsOn;
+ }
+
+ /**
+ * Set the dependsOn property: The list of keys on which this entity depends on.
+ *
+ * @param dependsOn the dependsOn value to set.
+ * @return the MetadataEntityProperties object itself.
+ */
+ public MetadataEntityProperties withDependsOn(List dependsOn) {
+ this.dependsOn = dependsOn;
+ return this;
+ }
+
+ /**
+ * Get the applicableScenarios property: The list of scenarios applicable to this metadata entity.
+ *
+ * @return the applicableScenarios value.
+ */
+ public List applicableScenarios() {
+ return this.applicableScenarios;
+ }
+
+ /**
+ * Set the applicableScenarios property: The list of scenarios applicable to this metadata entity.
+ *
+ * @param applicableScenarios the applicableScenarios value to set.
+ * @return the MetadataEntityProperties object itself.
+ */
+ public MetadataEntityProperties withApplicableScenarios(List applicableScenarios) {
+ this.applicableScenarios = applicableScenarios;
+ return this;
+ }
+
+ /**
+ * Get the supportedValues property: The list of supported values.
+ *
+ * @return the supportedValues value.
+ */
+ public List supportedValues() {
+ return this.supportedValues;
+ }
+
+ /**
+ * Set the supportedValues property: The list of supported values.
+ *
+ * @param supportedValues the supportedValues value to set.
+ * @return the MetadataEntityProperties object itself.
+ */
+ public MetadataEntityProperties withSupportedValues(List supportedValues) {
+ this.supportedValues = supportedValues;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (supportedValues() != null) {
+ supportedValues().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/OperationListResultInner.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/OperationListResultInner.java
index 2c78b0dd5792..71702715a081 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/OperationListResultInner.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/OperationListResultInner.java
@@ -14,7 +14,7 @@
@Fluent
public final class OperationListResultInner {
/*
- * List of operations available in the resourcehealth resource provider.
+ * List of operations available in the Microsoft.ResourceHealth resource provider.
*/
@JsonProperty(value = "value", required = true)
private List value;
@@ -24,7 +24,7 @@ public OperationListResultInner() {
}
/**
- * Get the value property: List of operations available in the resourcehealth resource provider.
+ * Get the value property: List of operations available in the Microsoft.ResourceHealth resource provider.
*
* @return the value value.
*/
@@ -33,7 +33,7 @@ public List value() {
}
/**
- * Set the value property: List of operations available in the resourcehealth resource provider.
+ * Set the value property: List of operations available in the Microsoft.ResourceHealth resource provider.
*
* @param value the value value to set.
* @return the OperationListResultInner object itself.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/AvailabilityStatusesClientImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/AvailabilityStatusesClientImpl.java
index c38c1031fd67..b5e914a561fe 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/AvailabilityStatusesClientImpl.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/AvailabilityStatusesClientImpl.java
@@ -72,8 +72,7 @@ Mono> listBySubscriptionId(
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceHealth"
- + "/availabilityStatuses")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceHealth/availabilityStatuses")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listByResourceGroup(
@@ -333,7 +332,7 @@ public PagedIterable listBySubscriptionId(String filter
/**
* Lists the current availability status for all the resources in the resource group.
*
- * @param resourceGroupName The name of the resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param filter The filter to apply on the operation. For more information please see
* https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
* @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
@@ -391,7 +390,7 @@ private Mono> listByResourceGroupSinglePa
/**
* Lists the current availability status for all the resources in the resource group.
*
- * @param resourceGroupName The name of the resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param filter The filter to apply on the operation. For more information please see
* https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
* @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
@@ -447,7 +446,7 @@ private Mono> listByResourceGroupSinglePa
/**
* Lists the current availability status for all the resources in the resource group.
*
- * @param resourceGroupName The name of the resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param filter The filter to apply on the operation. For more information please see
* https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
* @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
@@ -467,7 +466,7 @@ private PagedFlux listByResourceGroupAsync(
/**
* Lists the current availability status for all the resources in the resource group.
*
- * @param resourceGroupName The name of the resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -485,7 +484,7 @@ private PagedFlux listByResourceGroupAsync(String resou
/**
* Lists the current availability status for all the resources in the resource group.
*
- * @param resourceGroupName The name of the resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param filter The filter to apply on the operation. For more information please see
* https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
* @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
@@ -506,7 +505,7 @@ private PagedFlux listByResourceGroupAsync(
/**
* Lists the current availability status for all the resources in the resource group.
*
- * @param resourceGroupName The name of the resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -522,7 +521,7 @@ public PagedIterable listByResourceGroup(String resourc
/**
* Lists the current availability status for all the resources in the resource group.
*
- * @param resourceGroupName The name of the resource group.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param filter The filter to apply on the operation. For more information please see
* https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
* @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/ChildAvailabilityStatusesClientImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/ChildAvailabilityStatusesClientImpl.java
new file mode 100644
index 000000000000..1c7a14bd4b82
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/ChildAvailabilityStatusesClientImpl.java
@@ -0,0 +1,511 @@
+// 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.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.resourcehealth.fluent.ChildAvailabilityStatusesClient;
+import com.azure.resourcemanager.resourcehealth.fluent.models.AvailabilityStatusInner;
+import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatusListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ChildAvailabilityStatusesClient. */
+public final class ChildAvailabilityStatusesClientImpl implements ChildAvailabilityStatusesClient {
+ /** The proxy service used to perform REST calls. */
+ private final ChildAvailabilityStatusesService service;
+
+ /** The service client containing this operation class. */
+ private final MicrosoftResourceHealthImpl client;
+
+ /**
+ * Initializes an instance of ChildAvailabilityStatusesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ChildAvailabilityStatusesClientImpl(MicrosoftResourceHealthImpl client) {
+ this.service =
+ RestProxy
+ .create(
+ ChildAvailabilityStatusesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MicrosoftResourceHealthChildAvailabilityStatuses to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MicrosoftResourceHea")
+ public interface ChildAvailabilityStatusesService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/{resourceUri}/providers/Microsoft.ResourceHealth/childAvailabilityStatuses/current")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResource(
+ @HostParam("$host") String endpoint,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri,
+ @QueryParam("api-version") String apiVersion,
+ @QueryParam("$filter") String filter,
+ @QueryParam("$expand") String expand,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/{resourceUri}/providers/Microsoft.ResourceHealth/childAvailabilityStatuses")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri,
+ @QueryParam("api-version") String apiVersion,
+ @QueryParam("$filter") String filter,
+ @QueryParam("$expand") String expand,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Gets current availability status for a single resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return current availability status for a single resource along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceWithResponseAsync(
+ String resourceUri, String filter, String expand) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByResource(
+ this.client.getEndpoint(),
+ resourceUri,
+ this.client.getApiVersion(),
+ filter,
+ expand,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets current availability status for a single resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return current availability status for a single resource along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceWithResponseAsync(
+ String resourceUri, String filter, String expand, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getByResource(
+ this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), filter, expand, accept, context);
+ }
+
+ /**
+ * Gets current availability status for a single resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return current availability status for a single resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceAsync(String resourceUri) {
+ final String filter = null;
+ final String expand = null;
+ return getByResourceWithResponseAsync(resourceUri, filter, expand)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets current availability status for a single resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return current availability status for a single resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceWithResponse(
+ String resourceUri, String filter, String expand, Context context) {
+ return getByResourceWithResponseAsync(resourceUri, filter, expand, context).block();
+ }
+
+ /**
+ * Gets current availability status for a single resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return current availability status for a single resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AvailabilityStatusInner getByResource(String resourceUri) {
+ final String filter = null;
+ final String expand = null;
+ return getByResourceWithResponse(resourceUri, filter, expand, Context.NONE).getValue();
+ }
+
+ /**
+ * Lists the historical availability statuses for a single child resource. Use the nextLink property in the response
+ * to get the next page of availability status.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceUri, String filter, String expand) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ resourceUri,
+ this.client.getApiVersion(),
+ filter,
+ expand,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists the historical availability statuses for a single child resource. Use the nextLink property in the response
+ * to get the next page of availability status.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceUri, String filter, String expand, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), filter, expand, accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists the historical availability statuses for a single child resource. Use the nextLink property in the response
+ * to get the next page of availability status.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceUri, String filter, String expand) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceUri, filter, expand), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists the historical availability statuses for a single child resource. Use the nextLink property in the response
+ * to get the next page of availability status.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceUri) {
+ final String filter = null;
+ final String expand = null;
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceUri, filter, expand), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists the historical availability statuses for a single child resource. Use the nextLink property in the response
+ * to get the next page of availability status.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String resourceUri, String filter, String expand, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceUri, filter, expand, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists the historical availability statuses for a single child resource. Use the nextLink property in the response
+ * to get the next page of availability status.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceUri) {
+ final String filter = null;
+ final String expand = null;
+ return new PagedIterable<>(listAsync(resourceUri, filter, expand));
+ }
+
+ /**
+ * Lists the historical availability statuses for a single child resource. Use the nextLink property in the response
+ * to get the next page of availability status.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String resourceUri, String filter, String expand, Context context) {
+ return new PagedIterable<>(listAsync(resourceUri, filter, expand, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/ChildAvailabilityStatusesImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/ChildAvailabilityStatusesImpl.java
new file mode 100644
index 000000000000..6291c177321e
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/ChildAvailabilityStatusesImpl.java
@@ -0,0 +1,72 @@
+// 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.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.resourcehealth.fluent.ChildAvailabilityStatusesClient;
+import com.azure.resourcemanager.resourcehealth.fluent.models.AvailabilityStatusInner;
+import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatus;
+import com.azure.resourcemanager.resourcehealth.models.ChildAvailabilityStatuses;
+
+public final class ChildAvailabilityStatusesImpl implements ChildAvailabilityStatuses {
+ private static final ClientLogger LOGGER = new ClientLogger(ChildAvailabilityStatusesImpl.class);
+
+ private final ChildAvailabilityStatusesClient innerClient;
+
+ private final com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager;
+
+ public ChildAvailabilityStatusesImpl(
+ ChildAvailabilityStatusesClient innerClient,
+ com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getByResourceWithResponse(
+ String resourceUri, String filter, String expand, Context context) {
+ Response inner =
+ this.serviceClient().getByResourceWithResponse(resourceUri, filter, expand, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new AvailabilityStatusImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public AvailabilityStatus getByResource(String resourceUri) {
+ AvailabilityStatusInner inner = this.serviceClient().getByResource(resourceUri);
+ if (inner != null) {
+ return new AvailabilityStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable list(String resourceUri) {
+ PagedIterable inner = this.serviceClient().list(resourceUri);
+ return Utils.mapPage(inner, inner1 -> new AvailabilityStatusImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceUri, String filter, String expand, Context context) {
+ PagedIterable inner = this.serviceClient().list(resourceUri, filter, expand, context);
+ return Utils.mapPage(inner, inner1 -> new AvailabilityStatusImpl(inner1, this.manager()));
+ }
+
+ private ChildAvailabilityStatusesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/ChildResourcesClientImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/ChildResourcesClientImpl.java
new file mode 100644
index 000000000000..e58dbdbb60ba
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/ChildResourcesClientImpl.java
@@ -0,0 +1,360 @@
+// 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.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.resourcehealth.fluent.ChildResourcesClient;
+import com.azure.resourcemanager.resourcehealth.fluent.models.AvailabilityStatusInner;
+import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatusListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ChildResourcesClient. */
+public final class ChildResourcesClientImpl implements ChildResourcesClient {
+ /** The proxy service used to perform REST calls. */
+ private final ChildResourcesService service;
+
+ /** The service client containing this operation class. */
+ private final MicrosoftResourceHealthImpl client;
+
+ /**
+ * Initializes an instance of ChildResourcesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ChildResourcesClientImpl(MicrosoftResourceHealthImpl client) {
+ this.service =
+ RestProxy.create(ChildResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MicrosoftResourceHealthChildResources to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MicrosoftResourceHea")
+ public interface ChildResourcesService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/{resourceUri}/providers/Microsoft.ResourceHealth/childResources")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri,
+ @QueryParam("api-version") String apiVersion,
+ @QueryParam("$filter") String filter,
+ @QueryParam("$expand") String expand,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Lists the all the children and its current health status for a parent resource. Use the nextLink property in the
+ * response to get the next page of children current health.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support not nested parent resource type:
+ * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceUri, String filter, String expand) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ resourceUri,
+ this.client.getApiVersion(),
+ filter,
+ expand,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists the all the children and its current health status for a parent resource. Use the nextLink property in the
+ * response to get the next page of children current health.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support not nested parent resource type:
+ * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceUri, String filter, String expand, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), filter, expand, accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists the all the children and its current health status for a parent resource. Use the nextLink property in the
+ * response to get the next page of children current health.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support not nested parent resource type:
+ * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceUri, String filter, String expand) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceUri, filter, expand), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists the all the children and its current health status for a parent resource. Use the nextLink property in the
+ * response to get the next page of children current health.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support not nested parent resource type:
+ * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceUri) {
+ final String filter = null;
+ final String expand = null;
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceUri, filter, expand), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists the all the children and its current health status for a parent resource. Use the nextLink property in the
+ * response to get the next page of children current health.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support not nested parent resource type:
+ * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String resourceUri, String filter, String expand, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceUri, filter, expand, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists the all the children and its current health status for a parent resource. Use the nextLink property in the
+ * response to get the next page of children current health.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support not nested parent resource type:
+ * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceUri) {
+ final String filter = null;
+ final String expand = null;
+ return new PagedIterable<>(listAsync(resourceUri, filter, expand));
+ }
+
+ /**
+ * Lists the all the children and its current health status for a parent resource. Use the nextLink property in the
+ * response to get the next page of children current health.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API only support not nested parent resource type:
+ * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String resourceUri, String filter, String expand, Context context) {
+ return new PagedIterable<>(listAsync(resourceUri, filter, expand, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/ChildResourcesImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/ChildResourcesImpl.java
new file mode 100644
index 000000000000..2f7ed118d0c5
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/ChildResourcesImpl.java
@@ -0,0 +1,46 @@
+// 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.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.resourcehealth.fluent.ChildResourcesClient;
+import com.azure.resourcemanager.resourcehealth.fluent.models.AvailabilityStatusInner;
+import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatus;
+import com.azure.resourcemanager.resourcehealth.models.ChildResources;
+
+public final class ChildResourcesImpl implements ChildResources {
+ private static final ClientLogger LOGGER = new ClientLogger(ChildResourcesImpl.class);
+
+ private final ChildResourcesClient innerClient;
+
+ private final com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager;
+
+ public ChildResourcesImpl(
+ ChildResourcesClient innerClient,
+ com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String resourceUri) {
+ PagedIterable inner = this.serviceClient().list(resourceUri);
+ return Utils.mapPage(inner, inner1 -> new AvailabilityStatusImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceUri, String filter, String expand, Context context) {
+ PagedIterable inner = this.serviceClient().list(resourceUri, filter, expand, context);
+ return Utils.mapPage(inner, inner1 -> new AvailabilityStatusImpl(inner1, this.manager()));
+ }
+
+ private ChildResourcesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EmergingIssuesClientImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EmergingIssuesClientImpl.java
new file mode 100644
index 000000000000..38b9fa4b4391
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EmergingIssuesClientImpl.java
@@ -0,0 +1,379 @@
+// 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.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.resourcehealth.fluent.EmergingIssuesClient;
+import com.azure.resourcemanager.resourcehealth.fluent.models.EmergingIssuesGetResultInner;
+import com.azure.resourcemanager.resourcehealth.models.EmergingIssueListResult;
+import com.azure.resourcemanager.resourcehealth.models.IssueNameParameter;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in EmergingIssuesClient. */
+public final class EmergingIssuesClientImpl implements EmergingIssuesClient {
+ /** The proxy service used to perform REST calls. */
+ private final EmergingIssuesService service;
+
+ /** The service client containing this operation class. */
+ private final MicrosoftResourceHealthImpl client;
+
+ /**
+ * Initializes an instance of EmergingIssuesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ EmergingIssuesClientImpl(MicrosoftResourceHealthImpl client) {
+ this.service =
+ RestProxy.create(EmergingIssuesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MicrosoftResourceHealthEmergingIssues to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MicrosoftResourceHea")
+ public interface EmergingIssuesService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/providers/Microsoft.ResourceHealth/emergingIssues")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/providers/Microsoft.ResourceHealth/emergingIssues/{issueName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("issueName") IssueNameParameter issueName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Lists Azure services' emerging issues.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of emerging issues along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists Azure services' emerging issues.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of emerging issues along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists Azure services' emerging issues.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of emerging issues as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists Azure services' emerging issues.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of emerging issues as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists Azure services' emerging issues.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of emerging issues as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Lists Azure services' emerging issues.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of emerging issues as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Gets Azure services' emerging issues.
+ *
+ * @param issueName The name of the emerging issue.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azure services' emerging issues along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(IssueNameParameter issueName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (issueName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter issueName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service.get(this.client.getEndpoint(), issueName, this.client.getApiVersion(), accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets Azure services' emerging issues.
+ *
+ * @param issueName The name of the emerging issue.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azure services' emerging issues along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ IssueNameParameter issueName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (issueName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter issueName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.get(this.client.getEndpoint(), issueName, this.client.getApiVersion(), accept, context);
+ }
+
+ /**
+ * Gets Azure services' emerging issues.
+ *
+ * @param issueName The name of the emerging issue.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azure services' emerging issues on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(IssueNameParameter issueName) {
+ return getWithResponseAsync(issueName).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets Azure services' emerging issues.
+ *
+ * @param issueName The name of the emerging issue.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azure services' emerging issues along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(IssueNameParameter issueName, Context context) {
+ return getWithResponseAsync(issueName, context).block();
+ }
+
+ /**
+ * Gets Azure services' emerging issues.
+ *
+ * @param issueName The name of the emerging issue.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azure services' emerging issues.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EmergingIssuesGetResultInner get(IssueNameParameter issueName) {
+ return getWithResponse(issueName, Context.NONE).getValue();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of emerging issues along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of emerging issues along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
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
new file mode 100644
index 000000000000..a72dc6153694
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EmergingIssuesGetResultImpl.java
@@ -0,0 +1,73 @@
+// 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.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;
+import com.azure.resourcemanager.resourcehealth.models.StatusBanner;
+import java.time.OffsetDateTime;
+import java.util.Collections;
+import java.util.List;
+
+public final class EmergingIssuesGetResultImpl implements EmergingIssuesGetResult {
+ private EmergingIssuesGetResultInner innerObject;
+
+ private final com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager;
+
+ EmergingIssuesGetResultImpl(
+ EmergingIssuesGetResultInner innerObject,
+ com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public OffsetDateTime refreshTimestamp() {
+ return this.innerModel().refreshTimestamp();
+ }
+
+ public List statusBanners() {
+ List inner = this.innerModel().statusBanners();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List statusActiveEvents() {
+ List inner = this.innerModel().statusActiveEvents();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public EmergingIssuesGetResultInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EmergingIssuesImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EmergingIssuesImpl.java
new file mode 100644
index 000000000000..f1e6458d47a6
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EmergingIssuesImpl.java
@@ -0,0 +1,71 @@
+// 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.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.resourcehealth.fluent.EmergingIssuesClient;
+import com.azure.resourcemanager.resourcehealth.fluent.models.EmergingIssuesGetResultInner;
+import com.azure.resourcemanager.resourcehealth.models.EmergingIssues;
+import com.azure.resourcemanager.resourcehealth.models.EmergingIssuesGetResult;
+import com.azure.resourcemanager.resourcehealth.models.IssueNameParameter;
+
+public final class EmergingIssuesImpl implements EmergingIssues {
+ private static final ClientLogger LOGGER = new ClientLogger(EmergingIssuesImpl.class);
+
+ private final EmergingIssuesClient innerClient;
+
+ private final com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager;
+
+ public EmergingIssuesImpl(
+ EmergingIssuesClient innerClient,
+ com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new EmergingIssuesGetResultImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new EmergingIssuesGetResultImpl(inner1, this.manager()));
+ }
+
+ public Response getWithResponse(IssueNameParameter issueName, Context context) {
+ Response inner = this.serviceClient().getWithResponse(issueName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new EmergingIssuesGetResultImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public EmergingIssuesGetResult get(IssueNameParameter issueName) {
+ EmergingIssuesGetResultInner inner = this.serviceClient().get(issueName);
+ if (inner != null) {
+ return new EmergingIssuesGetResultImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private EmergingIssuesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager() {
+ return this.serviceManager;
+ }
+}
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
new file mode 100644
index 000000000000..86d7682e0ea2
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventImpactedResourceImpl.java
@@ -0,0 +1,70 @@
+// 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.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;
+import java.util.Collections;
+import java.util.List;
+
+public final class EventImpactedResourceImpl implements EventImpactedResource {
+ private EventImpactedResourceInner innerObject;
+
+ private final com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager;
+
+ EventImpactedResourceImpl(
+ EventImpactedResourceInner innerObject,
+ com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String targetResourceType() {
+ return this.innerModel().targetResourceType();
+ }
+
+ public String targetResourceId() {
+ return this.innerModel().targetResourceId();
+ }
+
+ public String targetRegion() {
+ return this.innerModel().targetRegion();
+ }
+
+ public List info() {
+ List inner = this.innerModel().info();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public EventImpactedResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager() {
+ return this.serviceManager;
+ }
+}
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
new file mode 100644
index 000000000000..01b3c0c02481
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventImpl.java
@@ -0,0 +1,185 @@
+// 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.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;
+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.EventTypeValues;
+import com.azure.resourcemanager.resourcehealth.models.Faq;
+import com.azure.resourcemanager.resourcehealth.models.Impact;
+import com.azure.resourcemanager.resourcehealth.models.LevelValues;
+import com.azure.resourcemanager.resourcehealth.models.Link;
+import java.time.OffsetDateTime;
+import java.util.Collections;
+import java.util.List;
+
+public final class EventImpl implements Event {
+ private EventInner innerObject;
+
+ private final com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager;
+
+ EventImpl(EventInner innerObject, com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public EventTypeValues eventType() {
+ return this.innerModel().eventType();
+ }
+
+ public EventSourceValues eventSource() {
+ return this.innerModel().eventSource();
+ }
+
+ public EventStatusValues status() {
+ return this.innerModel().status();
+ }
+
+ public String title() {
+ return this.innerModel().title();
+ }
+
+ public String summary() {
+ return this.innerModel().summary();
+ }
+
+ public String headerProperty() {
+ return this.innerModel().headerProperty();
+ }
+
+ public LevelValues level() {
+ return this.innerModel().level();
+ }
+
+ public EventLevelValues eventLevel() {
+ return this.innerModel().eventLevel();
+ }
+
+ public String externalIncidentId() {
+ return this.innerModel().externalIncidentId();
+ }
+
+ public String reason() {
+ return this.innerModel().reason();
+ }
+
+ public EventPropertiesArticle article() {
+ return this.innerModel().article();
+ }
+
+ public List links() {
+ List inner = this.innerModel().links();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public OffsetDateTime impactStartTime() {
+ return this.innerModel().impactStartTime();
+ }
+
+ public OffsetDateTime impactMitigationTime() {
+ return this.innerModel().impactMitigationTime();
+ }
+
+ public List impact() {
+ List inner = this.innerModel().impact();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public EventPropertiesRecommendedActions recommendedActions() {
+ return this.innerModel().recommendedActions();
+ }
+
+ public List faqs() {
+ List inner = this.innerModel().faqs();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public Boolean isHir() {
+ return this.innerModel().isHir();
+ }
+
+ public Boolean enableMicrosoftSupport() {
+ return this.innerModel().enableMicrosoftSupport();
+ }
+
+ public String description() {
+ return this.innerModel().description();
+ }
+
+ public Boolean platformInitiated() {
+ return this.innerModel().platformInitiated();
+ }
+
+ public Boolean enableChatWithUs() {
+ return this.innerModel().enableChatWithUs();
+ }
+
+ public Integer priority() {
+ return this.innerModel().priority();
+ }
+
+ public OffsetDateTime lastUpdateTime() {
+ return this.innerModel().lastUpdateTime();
+ }
+
+ public String hirStage() {
+ return this.innerModel().hirStage();
+ }
+
+ public EventPropertiesAdditionalInformation additionalInformation() {
+ return this.innerModel().additionalInformation();
+ }
+
+ public Integer duration() {
+ return this.innerModel().duration();
+ }
+
+ public String impactType() {
+ return this.innerModel().impactType();
+ }
+
+ public EventInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventOperationsClientImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventOperationsClientImpl.java
new file mode 100644
index 000000000000..017b2d09932e
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventOperationsClientImpl.java
@@ -0,0 +1,637 @@
+// 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.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.resourcehealth.fluent.EventOperationsClient;
+import com.azure.resourcemanager.resourcehealth.fluent.models.EventInner;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in EventOperationsClient. */
+public final class EventOperationsClientImpl implements EventOperationsClient {
+ /** The proxy service used to perform REST calls. */
+ private final EventOperationsService service;
+
+ /** The service client containing this operation class. */
+ private final MicrosoftResourceHealthImpl client;
+
+ /**
+ * Initializes an instance of EventOperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ EventOperationsClientImpl(MicrosoftResourceHealthImpl client) {
+ this.service =
+ RestProxy.create(EventOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MicrosoftResourceHealthEventOperations to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MicrosoftResourceHea")
+ public interface EventOperationsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ResourceHealth/events/{eventTrackingId}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getBySubscriptionIdAndTrackingId(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @QueryParam("$filter") String filter,
+ @QueryParam("queryStartTime") String queryStartTime,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("eventTrackingId") String eventTrackingId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/providers/Microsoft.ResourceHealth/events/{eventTrackingId}/fetchEventDetails")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> fetchDetailsBySubscriptionIdAndTrackingId(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("eventTrackingId") String eventTrackingId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/providers/Microsoft.ResourceHealth/events/{eventTrackingId}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByTenantIdAndTrackingId(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @QueryParam("$filter") String filter,
+ @QueryParam("queryStartTime") String queryStartTime,
+ @PathParam("eventTrackingId") String eventTrackingId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post("/providers/Microsoft.ResourceHealth/events/{eventTrackingId}/fetchEventDetails")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> fetchDetailsByTenantIdAndTrackingId(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("eventTrackingId") String eventTrackingId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Service health event in the subscription by event tracking id.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param queryStartTime Specifies from when to return events, based on the lastUpdateTime property. For example,
+ * queryStartTime = 7/24/2020 OR queryStartTime=7%2F24%2F2020.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getBySubscriptionIdAndTrackingIdWithResponseAsync(
+ String eventTrackingId, String filter, String queryStartTime) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (eventTrackingId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter eventTrackingId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getBySubscriptionIdAndTrackingId(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ filter,
+ queryStartTime,
+ this.client.getSubscriptionId(),
+ eventTrackingId,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Service health event in the subscription by event tracking id.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param queryStartTime Specifies from when to return events, based on the lastUpdateTime property. For example,
+ * queryStartTime = 7/24/2020 OR queryStartTime=7%2F24%2F2020.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getBySubscriptionIdAndTrackingIdWithResponseAsync(
+ String eventTrackingId, String filter, String queryStartTime, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (eventTrackingId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter eventTrackingId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getBySubscriptionIdAndTrackingId(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ filter,
+ queryStartTime,
+ this.client.getSubscriptionId(),
+ eventTrackingId,
+ accept,
+ context);
+ }
+
+ /**
+ * Service health event in the subscription by event tracking id.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getBySubscriptionIdAndTrackingIdAsync(String eventTrackingId) {
+ final String filter = null;
+ final String queryStartTime = null;
+ return getBySubscriptionIdAndTrackingIdWithResponseAsync(eventTrackingId, filter, queryStartTime)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Service health event in the subscription by event tracking id.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param queryStartTime Specifies from when to return events, based on the lastUpdateTime property. For example,
+ * queryStartTime = 7/24/2020 OR queryStartTime=7%2F24%2F2020.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getBySubscriptionIdAndTrackingIdWithResponse(
+ String eventTrackingId, String filter, String queryStartTime, Context context) {
+ return getBySubscriptionIdAndTrackingIdWithResponseAsync(eventTrackingId, filter, queryStartTime, context)
+ .block();
+ }
+
+ /**
+ * Service health event in the subscription by event tracking id.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EventInner getBySubscriptionIdAndTrackingId(String eventTrackingId) {
+ final String filter = null;
+ final String queryStartTime = null;
+ return getBySubscriptionIdAndTrackingIdWithResponse(eventTrackingId, filter, queryStartTime, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * Service health event details in the subscription by event tracking id. This can be used to fetch sensitive
+ * properties for Security Advisory events.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> fetchDetailsBySubscriptionIdAndTrackingIdWithResponseAsync(
+ String eventTrackingId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (eventTrackingId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter eventTrackingId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .fetchDetailsBySubscriptionIdAndTrackingId(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ eventTrackingId,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Service health event details in the subscription by event tracking id. This can be used to fetch sensitive
+ * properties for Security Advisory events.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> fetchDetailsBySubscriptionIdAndTrackingIdWithResponseAsync(
+ String eventTrackingId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (eventTrackingId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter eventTrackingId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .fetchDetailsBySubscriptionIdAndTrackingId(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ eventTrackingId,
+ accept,
+ context);
+ }
+
+ /**
+ * Service health event details in the subscription by event tracking id. This can be used to fetch sensitive
+ * properties for Security Advisory events.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono fetchDetailsBySubscriptionIdAndTrackingIdAsync(String eventTrackingId) {
+ return fetchDetailsBySubscriptionIdAndTrackingIdWithResponseAsync(eventTrackingId)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Service health event details in the subscription by event tracking id. This can be used to fetch sensitive
+ * properties for Security Advisory events.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response fetchDetailsBySubscriptionIdAndTrackingIdWithResponse(
+ String eventTrackingId, Context context) {
+ return fetchDetailsBySubscriptionIdAndTrackingIdWithResponseAsync(eventTrackingId, context).block();
+ }
+
+ /**
+ * Service health event details in the subscription by event tracking id. This can be used to fetch sensitive
+ * properties for Security Advisory events.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EventInner fetchDetailsBySubscriptionIdAndTrackingId(String eventTrackingId) {
+ return fetchDetailsBySubscriptionIdAndTrackingIdWithResponse(eventTrackingId, Context.NONE).getValue();
+ }
+
+ /**
+ * Service health event in the tenant by event tracking id.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param queryStartTime Specifies from when to return events, based on the lastUpdateTime property. For example,
+ * queryStartTime = 7/24/2020 OR queryStartTime=7%2F24%2F2020.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByTenantIdAndTrackingIdWithResponseAsync(
+ String eventTrackingId, String filter, String queryStartTime) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (eventTrackingId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter eventTrackingId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByTenantIdAndTrackingId(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ filter,
+ queryStartTime,
+ eventTrackingId,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Service health event in the tenant by event tracking id.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param queryStartTime Specifies from when to return events, based on the lastUpdateTime property. For example,
+ * queryStartTime = 7/24/2020 OR queryStartTime=7%2F24%2F2020.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByTenantIdAndTrackingIdWithResponseAsync(
+ String eventTrackingId, String filter, String queryStartTime, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (eventTrackingId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter eventTrackingId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getByTenantIdAndTrackingId(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ filter,
+ queryStartTime,
+ eventTrackingId,
+ accept,
+ context);
+ }
+
+ /**
+ * Service health event in the tenant by event tracking id.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByTenantIdAndTrackingIdAsync(String eventTrackingId) {
+ final String filter = null;
+ final String queryStartTime = null;
+ return getByTenantIdAndTrackingIdWithResponseAsync(eventTrackingId, filter, queryStartTime)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Service health event in the tenant by event tracking id.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param queryStartTime Specifies from when to return events, based on the lastUpdateTime property. For example,
+ * queryStartTime = 7/24/2020 OR queryStartTime=7%2F24%2F2020.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByTenantIdAndTrackingIdWithResponse(
+ String eventTrackingId, String filter, String queryStartTime, Context context) {
+ return getByTenantIdAndTrackingIdWithResponseAsync(eventTrackingId, filter, queryStartTime, context).block();
+ }
+
+ /**
+ * Service health event in the tenant by event tracking id.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EventInner getByTenantIdAndTrackingId(String eventTrackingId) {
+ final String filter = null;
+ final String queryStartTime = null;
+ return getByTenantIdAndTrackingIdWithResponse(eventTrackingId, filter, queryStartTime, Context.NONE).getValue();
+ }
+
+ /**
+ * Service health event details in the tenant by event tracking id. This can be used to fetch sensitive properties
+ * for Security Advisory events.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> fetchDetailsByTenantIdAndTrackingIdWithResponseAsync(String eventTrackingId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (eventTrackingId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter eventTrackingId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .fetchDetailsByTenantIdAndTrackingId(
+ this.client.getEndpoint(), this.client.getApiVersion(), eventTrackingId, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Service health event details in the tenant by event tracking id. This can be used to fetch sensitive properties
+ * for Security Advisory events.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> fetchDetailsByTenantIdAndTrackingIdWithResponseAsync(
+ String eventTrackingId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (eventTrackingId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter eventTrackingId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .fetchDetailsByTenantIdAndTrackingId(
+ this.client.getEndpoint(), this.client.getApiVersion(), eventTrackingId, accept, context);
+ }
+
+ /**
+ * Service health event details in the tenant by event tracking id. This can be used to fetch sensitive properties
+ * for Security Advisory events.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono fetchDetailsByTenantIdAndTrackingIdAsync(String eventTrackingId) {
+ return fetchDetailsByTenantIdAndTrackingIdWithResponseAsync(eventTrackingId)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Service health event details in the tenant by event tracking id. This can be used to fetch sensitive properties
+ * for Security Advisory events.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response fetchDetailsByTenantIdAndTrackingIdWithResponse(
+ String eventTrackingId, Context context) {
+ return fetchDetailsByTenantIdAndTrackingIdWithResponseAsync(eventTrackingId, context).block();
+ }
+
+ /**
+ * Service health event details in the tenant by event tracking id. This can be used to fetch sensitive properties
+ * for Security Advisory events.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EventInner fetchDetailsByTenantIdAndTrackingId(String eventTrackingId) {
+ return fetchDetailsByTenantIdAndTrackingIdWithResponse(eventTrackingId, Context.NONE).getValue();
+ }
+}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventOperationsImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventOperationsImpl.java
new file mode 100644
index 000000000000..a381bbb2838a
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventOperationsImpl.java
@@ -0,0 +1,136 @@
+// 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.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.resourcehealth.fluent.EventOperationsClient;
+import com.azure.resourcemanager.resourcehealth.fluent.models.EventInner;
+import com.azure.resourcemanager.resourcehealth.models.Event;
+import com.azure.resourcemanager.resourcehealth.models.EventOperations;
+
+public final class EventOperationsImpl implements EventOperations {
+ private static final ClientLogger LOGGER = new ClientLogger(EventOperationsImpl.class);
+
+ private final EventOperationsClient innerClient;
+
+ private final com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager;
+
+ public EventOperationsImpl(
+ EventOperationsClient innerClient,
+ com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getBySubscriptionIdAndTrackingIdWithResponse(
+ String eventTrackingId, String filter, String queryStartTime, Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .getBySubscriptionIdAndTrackingIdWithResponse(eventTrackingId, filter, queryStartTime, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new EventImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public Event getBySubscriptionIdAndTrackingId(String eventTrackingId) {
+ EventInner inner = this.serviceClient().getBySubscriptionIdAndTrackingId(eventTrackingId);
+ if (inner != null) {
+ return new EventImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response fetchDetailsBySubscriptionIdAndTrackingIdWithResponse(
+ String eventTrackingId, Context context) {
+ Response inner =
+ this.serviceClient().fetchDetailsBySubscriptionIdAndTrackingIdWithResponse(eventTrackingId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new EventImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public Event fetchDetailsBySubscriptionIdAndTrackingId(String eventTrackingId) {
+ EventInner inner = this.serviceClient().fetchDetailsBySubscriptionIdAndTrackingId(eventTrackingId);
+ if (inner != null) {
+ return new EventImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getByTenantIdAndTrackingIdWithResponse(
+ String eventTrackingId, String filter, String queryStartTime, Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .getByTenantIdAndTrackingIdWithResponse(eventTrackingId, filter, queryStartTime, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new EventImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public Event getByTenantIdAndTrackingId(String eventTrackingId) {
+ EventInner inner = this.serviceClient().getByTenantIdAndTrackingId(eventTrackingId);
+ if (inner != null) {
+ return new EventImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response fetchDetailsByTenantIdAndTrackingIdWithResponse(String eventTrackingId, Context context) {
+ Response inner =
+ this.serviceClient().fetchDetailsByTenantIdAndTrackingIdWithResponse(eventTrackingId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new EventImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public Event fetchDetailsByTenantIdAndTrackingId(String eventTrackingId) {
+ EventInner inner = this.serviceClient().fetchDetailsByTenantIdAndTrackingId(eventTrackingId);
+ if (inner != null) {
+ return new EventImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private EventOperationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventsOperationsClientImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventsOperationsClientImpl.java
new file mode 100644
index 000000000000..8f5557f58bfa
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventsOperationsClientImpl.java
@@ -0,0 +1,915 @@
+// 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.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.resourcehealth.fluent.EventsOperationsClient;
+import com.azure.resourcemanager.resourcehealth.fluent.models.EventInner;
+import com.azure.resourcemanager.resourcehealth.models.Events;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in EventsOperationsClient. */
+public final class EventsOperationsClientImpl implements EventsOperationsClient {
+ /** The proxy service used to perform REST calls. */
+ private final EventsOperationsService service;
+
+ /** The service client containing this operation class. */
+ private final MicrosoftResourceHealthImpl client;
+
+ /**
+ * Initializes an instance of EventsOperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ EventsOperationsClientImpl(MicrosoftResourceHealthImpl client) {
+ this.service =
+ RestProxy.create(EventsOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MicrosoftResourceHealthEventsOperations to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MicrosoftResourceHea")
+ public interface EventsOperationsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ResourceHealth/events")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @QueryParam("$filter") String filter,
+ @QueryParam("queryStartTime") String queryStartTime,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/providers/Microsoft.ResourceHealth/events")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByTenantId(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @QueryParam("$filter") String filter,
+ @QueryParam("queryStartTime") String queryStartTime,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/{resourceUri}/providers/Microsoft.ResourceHealth/events")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySingleResource(
+ @HostParam("$host") String endpoint,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri,
+ @QueryParam("api-version") String apiVersion,
+ @QueryParam("$filter") String filter,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionIdNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByTenantIdNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySingleResourceNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Lists service health events in the subscription.
+ *
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param queryStartTime Specifies from when to return events, based on the lastUpdateTime property. For example,
+ * queryStartTime = 7/24/2020 OR queryStartTime=7%2F24%2F2020.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String filter, String queryStartTime) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ filter,
+ queryStartTime,
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists service health events in the subscription.
+ *
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param queryStartTime Specifies from when to return events, based on the lastUpdateTime property. For example,
+ * queryStartTime = 7/24/2020 OR queryStartTime=7%2F24%2F2020.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String filter, String queryStartTime, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ filter,
+ queryStartTime,
+ this.client.getSubscriptionId(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists service health events in the subscription.
+ *
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param queryStartTime Specifies from when to return events, based on the lastUpdateTime property. For example,
+ * queryStartTime = 7/24/2020 OR queryStartTime=7%2F24%2F2020.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String filter, String queryStartTime) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(filter, queryStartTime),
+ nextLink -> listBySubscriptionIdNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists service health events in the subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ final String filter = null;
+ final String queryStartTime = null;
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(filter, queryStartTime),
+ nextLink -> listBySubscriptionIdNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists service health events in the subscription.
+ *
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param queryStartTime Specifies from when to return events, based on the lastUpdateTime property. For example,
+ * queryStartTime = 7/24/2020 OR queryStartTime=7%2F24%2F2020.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String filter, String queryStartTime, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(filter, queryStartTime, context),
+ nextLink -> listBySubscriptionIdNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists service health events in the subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ final String filter = null;
+ final String queryStartTime = null;
+ return new PagedIterable<>(listAsync(filter, queryStartTime));
+ }
+
+ /**
+ * Lists service health events in the subscription.
+ *
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param queryStartTime Specifies from when to return events, based on the lastUpdateTime property. For example,
+ * queryStartTime = 7/24/2020 OR queryStartTime=7%2F24%2F2020.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String filter, String queryStartTime, Context context) {
+ return new PagedIterable<>(listAsync(filter, queryStartTime, context));
+ }
+
+ /**
+ * Lists current service health events in the tenant.
+ *
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param queryStartTime Specifies from when to return events, based on the lastUpdateTime property. For example,
+ * queryStartTime = 7/24/2020 OR queryStartTime=7%2F24%2F2020.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByTenantIdSinglePageAsync(String filter, String queryStartTime) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByTenantId(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ filter,
+ queryStartTime,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists current service health events in the tenant.
+ *
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param queryStartTime Specifies from when to return events, based on the lastUpdateTime property. For example,
+ * queryStartTime = 7/24/2020 OR queryStartTime=7%2F24%2F2020.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByTenantIdSinglePageAsync(
+ String filter, String queryStartTime, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByTenantId(
+ this.client.getEndpoint(), this.client.getApiVersion(), filter, queryStartTime, accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists current service health events in the tenant.
+ *
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param queryStartTime Specifies from when to return events, based on the lastUpdateTime property. For example,
+ * queryStartTime = 7/24/2020 OR queryStartTime=7%2F24%2F2020.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByTenantIdAsync(String filter, String queryStartTime) {
+ return new PagedFlux<>(
+ () -> listByTenantIdSinglePageAsync(filter, queryStartTime),
+ nextLink -> listByTenantIdNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists current service health events in the tenant.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByTenantIdAsync() {
+ final String filter = null;
+ final String queryStartTime = null;
+ return new PagedFlux<>(
+ () -> listByTenantIdSinglePageAsync(filter, queryStartTime),
+ nextLink -> listByTenantIdNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists current service health events in the tenant.
+ *
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param queryStartTime Specifies from when to return events, based on the lastUpdateTime property. For example,
+ * queryStartTime = 7/24/2020 OR queryStartTime=7%2F24%2F2020.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByTenantIdAsync(String filter, String queryStartTime, Context context) {
+ return new PagedFlux<>(
+ () -> listByTenantIdSinglePageAsync(filter, queryStartTime, context),
+ nextLink -> listByTenantIdNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists current service health events in the tenant.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByTenantId() {
+ final String filter = null;
+ final String queryStartTime = null;
+ return new PagedIterable<>(listByTenantIdAsync(filter, queryStartTime));
+ }
+
+ /**
+ * Lists current service health events in the tenant.
+ *
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param queryStartTime Specifies from when to return events, based on the lastUpdateTime property. For example,
+ * queryStartTime = 7/24/2020 OR queryStartTime=7%2F24%2F2020.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByTenantId(String filter, String queryStartTime, Context context) {
+ return new PagedIterable<>(listByTenantIdAsync(filter, queryStartTime, context));
+ }
+
+ /**
+ * Lists current service health events for given resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API support not nested and one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
+ * and
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySingleResourceSinglePageAsync(String resourceUri, String filter) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listBySingleResource(
+ this.client.getEndpoint(),
+ resourceUri,
+ this.client.getApiVersion(),
+ filter,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists current service health events for given resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API support not nested and one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
+ * and
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySingleResourceSinglePageAsync(
+ String resourceUri, String filter, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listBySingleResource(
+ this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), filter, accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists current service health events for given resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API support not nested and one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
+ * and
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listBySingleResourceAsync(String resourceUri, String filter) {
+ return new PagedFlux<>(
+ () -> listBySingleResourceSinglePageAsync(resourceUri, filter),
+ nextLink -> listBySingleResourceNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists current service health events for given resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API support not nested and one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
+ * and
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listBySingleResourceAsync(String resourceUri) {
+ final String filter = null;
+ return new PagedFlux<>(
+ () -> listBySingleResourceSinglePageAsync(resourceUri, filter),
+ nextLink -> listBySingleResourceNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists current service health events for given resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API support not nested and one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
+ * and
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listBySingleResourceAsync(String resourceUri, String filter, Context context) {
+ return new PagedFlux<>(
+ () -> listBySingleResourceSinglePageAsync(resourceUri, filter, context),
+ nextLink -> listBySingleResourceNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists current service health events for given resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API support not nested and one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
+ * and
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listBySingleResource(String resourceUri) {
+ final String filter = null;
+ return new PagedIterable<>(listBySingleResourceAsync(resourceUri, filter));
+ }
+
+ /**
+ * Lists current service health events for given resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
+ * Currently the API support not nested and one nesting level resource types :
+ * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
+ * and
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listBySingleResource(String resourceUri, String filter, Context context) {
+ return new PagedIterable<>(listBySingleResourceAsync(resourceUri, filter, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionIdNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listBySubscriptionIdNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionIdNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listBySubscriptionIdNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByTenantIdNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByTenantIdNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByTenantIdNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByTenantIdNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySingleResourceNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listBySingleResourceNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List events operation response along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySingleResourceNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listBySingleResourceNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventsOperationsImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventsOperationsImpl.java
new file mode 100644
index 000000000000..92e0ba02b5e2
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventsOperationsImpl.java
@@ -0,0 +1,66 @@
+// 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.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.resourcehealth.fluent.EventsOperationsClient;
+import com.azure.resourcemanager.resourcehealth.fluent.models.EventInner;
+import com.azure.resourcemanager.resourcehealth.models.Event;
+import com.azure.resourcemanager.resourcehealth.models.EventsOperations;
+
+public final class EventsOperationsImpl implements EventsOperations {
+ private static final ClientLogger LOGGER = new ClientLogger(EventsOperationsImpl.class);
+
+ private final EventsOperationsClient innerClient;
+
+ private final com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager;
+
+ public EventsOperationsImpl(
+ EventsOperationsClient innerClient,
+ com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new EventImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String filter, String queryStartTime, Context context) {
+ PagedIterable inner = this.serviceClient().list(filter, queryStartTime, context);
+ return Utils.mapPage(inner, inner1 -> new EventImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByTenantId() {
+ PagedIterable inner = this.serviceClient().listByTenantId();
+ return Utils.mapPage(inner, inner1 -> new EventImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByTenantId(String filter, String queryStartTime, Context context) {
+ PagedIterable inner = this.serviceClient().listByTenantId(filter, queryStartTime, context);
+ return Utils.mapPage(inner, inner1 -> new EventImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listBySingleResource(String resourceUri) {
+ PagedIterable inner = this.serviceClient().listBySingleResource(resourceUri);
+ return Utils.mapPage(inner, inner1 -> new EventImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listBySingleResource(String resourceUri, String filter, Context context) {
+ PagedIterable inner = this.serviceClient().listBySingleResource(resourceUri, filter, context);
+ return Utils.mapPage(inner, inner1 -> new EventImpl(inner1, this.manager()));
+ }
+
+ private EventsOperationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/ImpactedResourcesClientImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/ImpactedResourcesClientImpl.java
new file mode 100644
index 000000000000..e03343120cf9
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/ImpactedResourcesClientImpl.java
@@ -0,0 +1,944 @@
+// 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.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.resourcehealth.fluent.ImpactedResourcesClient;
+import com.azure.resourcemanager.resourcehealth.fluent.models.EventImpactedResourceInner;
+import com.azure.resourcemanager.resourcehealth.models.EventImpactedResourceListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ImpactedResourcesClient. */
+public final class ImpactedResourcesClientImpl implements ImpactedResourcesClient {
+ /** The proxy service used to perform REST calls. */
+ private final ImpactedResourcesService service;
+
+ /** The service client containing this operation class. */
+ private final MicrosoftResourceHealthImpl client;
+
+ /**
+ * Initializes an instance of ImpactedResourcesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ImpactedResourcesClientImpl(MicrosoftResourceHealthImpl client) {
+ this.service =
+ RestProxy.create(ImpactedResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MicrosoftResourceHealthImpactedResources to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MicrosoftResourceHea")
+ public interface ImpactedResourcesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/providers/Microsoft.ResourceHealth/events/{eventTrackingId}/impactedResources")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionIdAndEventId(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("eventTrackingId") String eventTrackingId,
+ @QueryParam("api-version") String apiVersion,
+ @QueryParam("$filter") String filter,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/providers/Microsoft.ResourceHealth/events/{eventTrackingId}/impactedResources/{impactedResourceName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("eventTrackingId") String eventTrackingId,
+ @PathParam("impactedResourceName") String impactedResourceName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/providers/Microsoft.ResourceHealth/events/{eventTrackingId}/impactedResources")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono