diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/CHANGELOG.md b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/CHANGELOG.md
index d10214f5484f..24448d838831 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/CHANGELOG.md
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/CHANGELOG.md
@@ -1,6 +1,8 @@
# Release History
-## 1.0.0-beta.3 (Unreleased)
+## 1.0.0-beta.1 (2022-12-05)
+
+- Azure Resource Manager ResourceHealth client library for Java. This package contains Microsoft Azure SDK for ResourceHealth Management SDK. The Resource Health Client. Package tag package-preview-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 7ac493972ce9..442cc2fe17f4 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-preview-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-beta.2
+ 1.0.0-beta.3
```
[//]: # ({x-version-update-end})
@@ -41,19 +41,19 @@ Various documentation is available to help you get started
Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
-[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
+[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation.
### Authentication
-By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
+By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables.
- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
-In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
+In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
-With above configuration, `azure` client can be authenticated by following code:
+With above configuration, `azure` client can be authenticated using the following code:
```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
@@ -83,13 +83,13 @@ See [API design][design] for general introduction on design and key concepts on
## Contributing
-For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).
+For details on contributing to this repository, see the [contributing guide][cg].
-1. Fork it
-1. Create your feature branch (`git checkout -b my-new-feature`)
-1. Commit your changes (`git commit -am 'Add some feature'`)
-1. Push to the branch (`git push origin my-new-feature`)
-1. Create new Pull Request
+This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit .
+
+When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
+
+This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments.
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
@@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
+[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
+[coc]: https://opensource.microsoft.com/codeofconduct/
+[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/SAMPLE.md b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/SAMPLE.md
index 1be5f265d1a5..aaacd2a4d31d 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/SAMPLE.md
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/SAMPLE.md
@@ -8,6 +8,22 @@
- [ListByResourceGroup](#availabilitystatuses_listbyresourcegroup)
- [ListBySubscriptionId](#availabilitystatuses_listbysubscriptionid)
+## EventOperation
+
+- [GetBySubscriptionIdAndTrackingId](#eventoperation_getbysubscriptionidandtrackingid)
+- [GetByTenantIdAndTrackingId](#eventoperation_getbytenantidandtrackingid)
+
+## EventsOperation
+
+- [List](#eventsoperation_list)
+- [ListBySingleResource](#eventsoperation_listbysingleresource)
+- [ListByTenantId](#eventsoperation_listbytenantid)
+
+## ImpactedResources
+
+- [Get](#impactedresources_get)
+- [ListBySubscriptionIdAndEventId](#impactedresources_listbysubscriptionidandeventid)
+
## Operations
- [List](#operations_list)
@@ -19,7 +35,7 @@ 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/preview/2022-10-01-preview/examples/AvailabilityStatus_GetByResource.json
*/
/**
* Sample code: GetCurrentHealthByResource.
@@ -43,7 +59,7 @@ 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/preview/2022-10-01-preview/examples/AvailabilityStatuses_List.json
*/
/**
* Sample code: GetHealthHistoryByResource.
@@ -65,7 +81,7 @@ 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/preview/2022-10-01-preview/examples/AvailabilityStatuses_ListByResourceGroup.json
*/
/**
* Sample code: ListByResourceGroup.
@@ -88,7 +104,7 @@ 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/preview/2022-10-01-preview/examples/AvailabilityStatuses_ListBySubscriptionId.json
*/
/**
* Sample code: ListHealthBySubscriptionId.
@@ -102,6 +118,175 @@ public final class AvailabilityStatusesListBySubscriptionIdSamples {
}
```
+### EventOperation_GetBySubscriptionIdAndTrackingId
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for EventOperation GetBySubscriptionIdAndTrackingId. */
+public final class EventOperationGetBySubscriptionIdAndTrackingIdSamples {
+ /*
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2022-10-01-preview/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", Context.NONE);
+ }
+}
+```
+
+### EventOperation_GetByTenantIdAndTrackingId
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for EventOperation GetByTenantIdAndTrackingId. */
+public final class EventOperationGetByTenantIdAndTrackingIdSamples {
+ /*
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2022-10-01-preview/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", Context.NONE);
+ }
+}
+```
+
+### EventsOperation_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for EventsOperation List. */
+public final class EventsOperationListSamples {
+ /*
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2022-10-01-preview/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", Context.NONE);
+ }
+}
+```
+
+### EventsOperation_ListBySingleResource
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for EventsOperation ListBySingleResource. */
+public final class EventsOperationListBySingleResourceSamples {
+ /*
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2022-10-01-preview/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,
+ Context.NONE);
+ }
+}
+```
+
+### EventsOperation_ListByTenantId
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for EventsOperation ListByTenantId. */
+public final class EventsOperationListByTenantIdSamples {
+ /*
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2022-10-01-preview/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", Context.NONE);
+ }
+}
+```
+
+### ImpactedResources_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ImpactedResources Get. */
+public final class ImpactedResourcesGetSamples {
+ /*
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2022-10-01-preview/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", Context.NONE);
+ }
+}
+```
+
+### ImpactedResources_ListBySubscriptionIdAndEventId
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ImpactedResources ListBySubscriptionIdAndEventId. */
+public final class ImpactedResourcesListBySubscriptionIdAndEventIdSamples {
+ /*
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2022-10-01-preview/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'", Context.NONE);
+ }
+}
+```
+
### Operations_List
```java
@@ -110,15 +295,14 @@ import com.azure.core.util.Context;
/** 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/preview/2022-10-01-preview/examples/Operations_List.json
*/
/**
- * Sample code: GetHealthHistoryByResource.
+ * Sample code: GetOperationsList.
*
* @param manager Entry point to ResourceHealthManager.
*/
- public static void getHealthHistoryByResource(
- com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
+ public static void getOperationsList(com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
manager.operations().listWithResponse(Context.NONE);
}
}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml
index 2f474bb0eb5a..7511cd3914d6 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml
@@ -13,7 +13,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-preview-2022-10.https://github.com/Azure/azure-sdk-for-java
@@ -39,9 +39,6 @@
UTF-8true
-
- --add-opens com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED
-
@@ -55,40 +52,40 @@
1.9.0
- com.azure
- azure-core-test
- 1.13.0
- test
+ com.azure
+ azure-core-test
+ 1.13.0
+ test
- com.azure
- azure-identity
- 1.7.1
- test
+ com.azure
+ azure-identity
+ 1.7.1
+ test
- org.junit.jupiter
- junit-jupiter-api
- 5.9.1
- test
+ org.junit.jupiter
+ junit-jupiter-api
+ 5.9.1
+ test
- org.junit.jupiter
- junit-jupiter-engine
- 5.9.1
- test
+ org.junit.jupiter
+ junit-jupiter-engine
+ 5.9.1
+ test
- com.azure.resourcemanager
- azure-resourcemanager-compute
- 2.21.0
- test
+ com.azure.resourcemanager
+ azure-resourcemanager-compute
+ 2.21.0
+ test
- org.slf4j
- slf4j-simple
- 1.7.36
- test
+ org.slf4j
+ slf4j-simple
+ 1.7.36
+ test
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 5f2401f33050..453ca0ee326b 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
@@ -10,11 +10,13 @@
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
+import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
+import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
@@ -23,9 +25,15 @@
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.EventOperationsImpl;
+import com.azure.resourcemanager.resourcehealth.implementation.EventsOperationsImpl;
+import com.azure.resourcemanager.resourcehealth.implementation.ImpactedResourcesImpl;
import com.azure.resourcemanager.resourcehealth.implementation.MicrosoftResourceHealthBuilder;
import com.azure.resourcemanager.resourcehealth.implementation.OperationsImpl;
import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatuses;
+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.Operations;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
@@ -40,6 +48,12 @@ public final class ResourceHealthManager {
private Operations operations;
+ private ImpactedResources impactedResources;
+
+ private EventsOperations eventsOperations;
+
+ private EventOperations eventOperations;
+
private final MicrosoftResourceHealth clientObject;
private ResourceHealthManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
@@ -67,6 +81,19 @@ public static ResourceHealthManager authenticate(TokenCredential credential, Azu
return configure().authenticate(credential, profile);
}
+ /**
+ * Creates an instance of ResourceHealth service API entry point.
+ *
+ * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
+ * @param profile the Azure profile for client.
+ * @return the ResourceHealth service API instance.
+ */
+ public static ResourceHealthManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return new ResourceHealthManager(httpPipeline, profile, null);
+ }
+
/**
* Gets a Configurable instance that can be used to create ResourceHealthManager with optional configuration.
*
@@ -85,6 +112,7 @@ public static final class Configurable {
private final List policies = new ArrayList<>();
private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -145,6 +173,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ *
This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
@@ -178,7 +219,7 @@ public ResourceHealthManager authenticate(TokenCredential credential, AzureProfi
.append("-")
.append("com.azure.resourcemanager.resourcehealth")
.append("/")
- .append("1.0.0-beta.2");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -196,10 +237,15 @@ public ResourceHealthManager authenticate(TokenCredential credential, AzureProfi
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
}
if (retryPolicy == null) {
- retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
policies
.addAll(
@@ -230,7 +276,11 @@ public ResourceHealthManager authenticate(TokenCredential credential, AzureProfi
}
}
- /** @return Resource collection API of AvailabilityStatuses. */
+ /**
+ * Gets the resource collection API of AvailabilityStatuses.
+ *
+ * @return Resource collection API of AvailabilityStatuses.
+ */
public AvailabilityStatuses availabilityStatuses() {
if (this.availabilityStatuses == null) {
this.availabilityStatuses = new AvailabilityStatusesImpl(clientObject.getAvailabilityStatuses(), this);
@@ -238,7 +288,11 @@ public AvailabilityStatuses availabilityStatuses() {
return availabilityStatuses;
}
- /** @return Resource collection API of Operations. */
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
@@ -246,6 +300,42 @@ public Operations operations() {
return operations;
}
+ /**
+ * 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 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;
+ }
+
/**
* @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 c0c086b78c5f..27511c536c39 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
@@ -75,13 +75,18 @@ PagedIterable listByResourceGroup(
* /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 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.
+ * @return current availability status for a single resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- AvailabilityStatusInner getByResource(String resourceUri);
+ Response getByResourceWithResponse(
+ String resourceUri, String filter, String expand, Context context);
/**
* Gets current availability status for a single resource.
@@ -91,18 +96,13 @@ PagedIterable listByResourceGroup(
* /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 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}.
+ * @return current availability status for a single resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceWithResponse(
- String resourceUri, String filter, String expand, Context context);
+ AvailabilityStatusInner getByResource(String resourceUri);
/**
* Lists all historical availability transitions and impacting events for a single resource.
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..c75bc2463a38
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/EventOperationsClient.java
@@ -0,0 +1,74 @@
+// 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 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);
+}
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..97d0ac3f3f46
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/ImpactedResourcesClient.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.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);
+}
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..0ff91b71c504 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,25 @@ public interface MicrosoftResourceHealth {
* @return the OperationsClient object.
*/
OperationsClient getOperations();
+
+ /**
+ * Gets the ImpactedResourcesClient object to access its operations.
+ *
+ * @return the ImpactedResourcesClient object.
+ */
+ ImpactedResourcesClient getImpactedResources();
+
+ /**
+ * 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();
}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/OperationsClient.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/OperationsClient.java
index da83d0af2b67..3d67f564748b 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/OperationsClient.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/OperationsClient.java
@@ -15,22 +15,22 @@ public interface OperationsClient {
/**
* Lists available operations for the resourcehealth resource provider.
*
+ * @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 lists the operations response.
+ * @return lists the operations response along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- OperationListResultInner list();
+ Response listWithResponse(Context context);
/**
* Lists available operations for the resourcehealth resource provider.
*
- * @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 lists the operations response along with {@link Response}.
+ * @return lists the operations response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response listWithResponse(Context context);
+ OperationListResultInner list();
}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/AvailabilityStatusInner.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/AvailabilityStatusInner.java
index 6b0d94060095..df325e2a2fc9 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/AvailabilityStatusInner.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/AvailabilityStatusInner.java
@@ -41,6 +41,10 @@ public final class AvailabilityStatusInner {
@JsonProperty(value = "properties")
private AvailabilityStatusProperties properties;
+ /** Creates an instance of AvailabilityStatusInner class. */
+ public AvailabilityStatusInner() {
+ }
+
/**
* Get the id property: Azure Resource Manager Identity for the availabilityStatuses resource.
*
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..b9915790372f
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventInner.java
@@ -0,0 +1,701 @@
+// 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 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..d3b694ecab33
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventProperties.java
@@ -0,0 +1,767 @@
+// 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;
+
+ /*
+ * 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 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/OperationListResultInner.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/OperationListResultInner.java
index 0d803918dc0e..2c78b0dd5792 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
@@ -19,6 +19,10 @@ public final class OperationListResultInner {
@JsonProperty(value = "value", required = true)
private List value;
+ /** Creates an instance of OperationListResultInner class. */
+ public OperationListResultInner() {
+ }
+
/**
* Get the value property: List of operations available in the resourcehealth resource provider.
*
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 3a9fa218ab9c..c38c1031fd67 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
@@ -56,7 +56,7 @@ public final class AvailabilityStatusesClientImpl implements AvailabilityStatuse
*/
@Host("{$host}")
@ServiceInterface(name = "MicrosoftResourceHea")
- private interface AvailabilityStatusesService {
+ public interface AvailabilityStatusesService {
@Headers({"Content-Type: application/json"})
@Get("/subscriptions/{subscriptionId}/providers/Microsoft.ResourceHealth/availabilityStatuses")
@ExpectedResponses({200})
@@ -628,25 +628,17 @@ private Mono> getByResourceWithResponseAsync(
* /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 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 on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getByResourceAsync(String resourceUri, String filter, String expand) {
+ private Mono getByResourceAsync(String resourceUri) {
+ final String filter = null;
+ final String expand = null;
return getByResourceWithResponseAsync(resourceUri, filter, expand)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -657,24 +649,19 @@ private Mono getByResourceAsync(String resourceUri, Str
* /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 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 on successful completion of {@link Mono}.
+ * @return current availability status for a single resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getByResourceAsync(String resourceUri) {
- final String filter = null;
- final String expand = null;
- return getByResourceWithResponseAsync(resourceUri, filter, expand)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ public Response getByResourceWithResponse(
+ String resourceUri, String filter, String expand, Context context) {
+ return getByResourceWithResponseAsync(resourceUri, filter, expand, context).block();
}
/**
@@ -694,30 +681,7 @@ private Mono getByResourceAsync(String resourceUri) {
public AvailabilityStatusInner getByResource(String resourceUri) {
final String filter = null;
final String expand = null;
- return getByResourceAsync(resourceUri, filter, expand).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 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 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();
+ return getByResourceWithResponse(resourceUri, filter, expand, Context.NONE).getValue();
}
/**
@@ -933,7 +897,8 @@ public PagedIterable list(
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @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.
@@ -970,7 +935,8 @@ private Mono> listBySubscriptionIdNextSin
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @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.
@@ -1008,7 +974,8 @@ private Mono> listBySubscriptionIdNextSin
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @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.
@@ -1045,7 +1012,8 @@ private Mono> listByResourceGroupNextSing
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @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.
@@ -1083,7 +1051,8 @@ private Mono> listByResourceGroupNextSing
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @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.
@@ -1119,7 +1088,8 @@ private Mono> listNextSinglePageAsync(Str
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @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.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/AvailabilityStatusesImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/AvailabilityStatusesImpl.java
index 0bba94049df7..d6181cd4f714 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/AvailabilityStatusesImpl.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/AvailabilityStatusesImpl.java
@@ -51,15 +51,6 @@ public PagedIterable listByResourceGroup(
return Utils.mapPage(inner, inner1 -> new AvailabilityStatusImpl(inner1, this.manager()));
}
- public AvailabilityStatus getByResource(String resourceUri) {
- AvailabilityStatusInner inner = this.serviceClient().getByResource(resourceUri);
- if (inner != null) {
- return new AvailabilityStatusImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getByResourceWithResponse(
String resourceUri, String filter, String expand, Context context) {
Response inner =
@@ -75,6 +66,15 @@ public Response getByResourceWithResponse(
}
}
+ 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()));
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..c0ed0b5fac7e
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventImpl.java
@@ -0,0 +1,181 @@
+// 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 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..d6346c011120
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventOperationsClientImpl.java
@@ -0,0 +1,367 @@
+// 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.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"})
+ @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);
+ }
+
+ /**
+ * 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 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();
+ }
+}
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..afe1ef2257fb
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventOperationsImpl.java
@@ -0,0 +1,89 @@
+// 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 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;
+ }
+ }
+
+ 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..0e0b61b601e4
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/ImpactedResourcesClientImpl.java
@@ -0,0 +1,523 @@
+// 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("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionIdAndEventIdNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * 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.
+ * @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 eventImpactedResources operation response along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionIdAndEventIdSinglePageAsync(
+ String eventTrackingId, String filter) {
+ 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
+ .listBySubscriptionIdAndEventId(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ eventTrackingId,
+ 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 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 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 along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionIdAndEventIdSinglePageAsync(
+ String eventTrackingId, 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 (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
+ .listBySubscriptionIdAndEventId(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ eventTrackingId,
+ this.client.getApiVersion(),
+ filter,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * 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.
+ * @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 eventImpactedResources operation response as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listBySubscriptionIdAndEventIdAsync(
+ String eventTrackingId, String filter) {
+ return new PagedFlux<>(
+ () -> listBySubscriptionIdAndEventIdSinglePageAsync(eventTrackingId, filter),
+ nextLink -> listBySubscriptionIdAndEventIdNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * 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 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 PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listBySubscriptionIdAndEventIdAsync(String eventTrackingId) {
+ final String filter = null;
+ return new PagedFlux<>(
+ () -> listBySubscriptionIdAndEventIdSinglePageAsync(eventTrackingId, filter),
+ nextLink -> listBySubscriptionIdAndEventIdNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * 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 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 PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listBySubscriptionIdAndEventIdAsync(
+ String eventTrackingId, String filter, Context context) {
+ return new PagedFlux<>(
+ () -> listBySubscriptionIdAndEventIdSinglePageAsync(eventTrackingId, filter, context),
+ nextLink -> listBySubscriptionIdAndEventIdNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * 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 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)
+ public PagedIterable listBySubscriptionIdAndEventId(String eventTrackingId) {
+ final String filter = null;
+ return new PagedIterable<>(listBySubscriptionIdAndEventIdAsync(eventTrackingId, filter));
+ }
+
+ /**
+ * 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 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)
+ public PagedIterable listBySubscriptionIdAndEventId(
+ String eventTrackingId, String filter, Context context) {
+ return new PagedIterable<>(listBySubscriptionIdAndEventIdAsync(eventTrackingId, filter, 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 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} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String eventTrackingId, String impactedResourceName) {
+ 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."));
+ }
+ if (impactedResourceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter impactedResourceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ eventTrackingId,
+ impactedResourceName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * 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 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} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String eventTrackingId, String impactedResourceName, 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."));
+ }
+ if (impactedResourceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter impactedResourceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ eventTrackingId,
+ impactedResourceName,
+ this.client.getApiVersion(),
+ accept,
+ 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 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 on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String eventTrackingId, String impactedResourceName) {
+ return getWithResponseAsync(eventTrackingId, impactedResourceName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * 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 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)
+ public Response getWithResponse(
+ String eventTrackingId, String impactedResourceName, Context context) {
+ return getWithResponseAsync(eventTrackingId, impactedResourceName, context).block();
+ }
+
+ /**
+ * 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 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)
+ public EventImpactedResourceInner get(String eventTrackingId, String impactedResourceName) {
+ return getWithResponse(eventTrackingId, impactedResourceName, 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 eventImpactedResources operation response along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionIdAndEventIdNextSinglePageAsync(
+ 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.listBySubscriptionIdAndEventIdNext(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 eventImpactedResources operation response along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionIdAndEventIdNextSinglePageAsync(
+ 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
+ .listBySubscriptionIdAndEventIdNext(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/ImpactedResourcesImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/ImpactedResourcesImpl.java
new file mode 100644
index 000000000000..ab90c186cc3b
--- /dev/null
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/ImpactedResourcesImpl.java
@@ -0,0 +1,75 @@
+// 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.ImpactedResourcesClient;
+import com.azure.resourcemanager.resourcehealth.fluent.models.EventImpactedResourceInner;
+import com.azure.resourcemanager.resourcehealth.models.EventImpactedResource;
+import com.azure.resourcemanager.resourcehealth.models.ImpactedResources;
+
+public final class ImpactedResourcesImpl implements ImpactedResources {
+ private static final ClientLogger LOGGER = new ClientLogger(ImpactedResourcesImpl.class);
+
+ private final ImpactedResourcesClient innerClient;
+
+ private final com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager;
+
+ public ImpactedResourcesImpl(
+ ImpactedResourcesClient innerClient,
+ com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable listBySubscriptionIdAndEventId(String eventTrackingId) {
+ PagedIterable inner =
+ this.serviceClient().listBySubscriptionIdAndEventId(eventTrackingId);
+ return Utils.mapPage(inner, inner1 -> new EventImpactedResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listBySubscriptionIdAndEventId(
+ String eventTrackingId, String filter, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listBySubscriptionIdAndEventId(eventTrackingId, filter, context);
+ return Utils.mapPage(inner, inner1 -> new EventImpactedResourceImpl(inner1, this.manager()));
+ }
+
+ public Response getWithResponse(
+ String eventTrackingId, String impactedResourceName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(eventTrackingId, impactedResourceName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new EventImpactedResourceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public EventImpactedResource get(String eventTrackingId, String impactedResourceName) {
+ EventImpactedResourceInner inner = this.serviceClient().get(eventTrackingId, impactedResourceName);
+ if (inner != null) {
+ return new EventImpactedResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private ImpactedResourcesClient 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/MicrosoftResourceHealthBuilder.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/MicrosoftResourceHealthBuilder.java
index d08a0643b657..07a1e0d60e7e 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/MicrosoftResourceHealthBuilder.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/MicrosoftResourceHealthBuilder.java
@@ -7,7 +7,6 @@
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
-import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.AzureEnvironment;
@@ -19,15 +18,12 @@
@ServiceClientBuilder(serviceClients = {MicrosoftResourceHealthImpl.class})
public final class MicrosoftResourceHealthBuilder {
/*
- * Subscription credentials which uniquely identify Microsoft Azure
- * subscription. The subscription ID forms part of the URI for every
- * service call.
+ * The ID of the target subscription.
*/
private String subscriptionId;
/**
- * Sets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
- * part of the URI for every service call.
+ * Sets The ID of the target subscription.
*
* @param subscriptionId the subscriptionId value.
* @return the MicrosoftResourceHealthBuilder.
@@ -70,34 +66,34 @@ public MicrosoftResourceHealthBuilder environment(AzureEnvironment environment)
}
/*
- * The default poll interval for long-running operation
+ * The HTTP pipeline to send requests through
*/
- private Duration defaultPollInterval;
+ private HttpPipeline pipeline;
/**
- * Sets The default poll interval for long-running operation.
+ * Sets The HTTP pipeline to send requests through.
*
- * @param defaultPollInterval the defaultPollInterval value.
+ * @param pipeline the pipeline value.
* @return the MicrosoftResourceHealthBuilder.
*/
- public MicrosoftResourceHealthBuilder defaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = defaultPollInterval;
+ public MicrosoftResourceHealthBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
return this;
}
/*
- * The HTTP pipeline to send requests through
+ * The default poll interval for long-running operation
*/
- private HttpPipeline pipeline;
+ private Duration defaultPollInterval;
/**
- * Sets The HTTP pipeline to send requests through.
+ * Sets The default poll interval for long-running operation.
*
- * @param pipeline the pipeline value.
+ * @param defaultPollInterval the defaultPollInterval value.
* @return the MicrosoftResourceHealthBuilder.
*/
- public MicrosoftResourceHealthBuilder pipeline(HttpPipeline pipeline) {
- this.pipeline = pipeline;
+ public MicrosoftResourceHealthBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -123,27 +119,26 @@ public MicrosoftResourceHealthBuilder serializerAdapter(SerializerAdapter serial
* @return an instance of MicrosoftResourceHealthImpl.
*/
public MicrosoftResourceHealthImpl buildClient() {
- if (endpoint == null) {
- this.endpoint = "https://management.azure.com";
- }
- if (environment == null) {
- this.environment = AzureEnvironment.AZURE;
- }
- if (defaultPollInterval == null) {
- this.defaultPollInterval = Duration.ofSeconds(30);
- }
- if (pipeline == null) {
- this.pipeline =
- new HttpPipelineBuilder()
- .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
- .build();
- }
- if (serializerAdapter == null) {
- this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
- }
+ String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
+ AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
+ HttpPipeline localPipeline =
+ (pipeline != null)
+ ? pipeline
+ : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ Duration localDefaultPollInterval =
+ (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
+ SerializerAdapter localSerializerAdapter =
+ (serializerAdapter != null)
+ ? serializerAdapter
+ : SerializerFactory.createDefaultManagementSerializerAdapter();
MicrosoftResourceHealthImpl client =
new MicrosoftResourceHealthImpl(
- pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ localPipeline,
+ localSerializerAdapter,
+ localDefaultPollInterval,
+ localEnvironment,
+ subscriptionId,
+ localEndpoint);
return client;
}
}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/MicrosoftResourceHealthImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/MicrosoftResourceHealthImpl.java
index 136d1586af53..73ed85d486a6 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/MicrosoftResourceHealthImpl.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/MicrosoftResourceHealthImpl.java
@@ -15,6 +15,7 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.AsyncPollResponse;
import com.azure.core.util.polling.LongRunningOperationStatus;
@@ -22,6 +23,9 @@
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.resourcehealth.fluent.AvailabilityStatusesClient;
+import com.azure.resourcemanager.resourcehealth.fluent.EventOperationsClient;
+import com.azure.resourcemanager.resourcehealth.fluent.EventsOperationsClient;
+import com.azure.resourcemanager.resourcehealth.fluent.ImpactedResourcesClient;
import com.azure.resourcemanager.resourcehealth.fluent.MicrosoftResourceHealth;
import com.azure.resourcemanager.resourcehealth.fluent.OperationsClient;
import java.io.IOException;
@@ -30,22 +34,17 @@
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
-import java.util.Map;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/** Initializes a new instance of the MicrosoftResourceHealthImpl type. */
@ServiceClient(builder = MicrosoftResourceHealthBuilder.class)
public final class MicrosoftResourceHealthImpl implements MicrosoftResourceHealth {
- /**
- * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of
- * the URI for every service call.
- */
+ /** The ID of the target subscription. */
private final String subscriptionId;
/**
- * 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.
*/
@@ -137,6 +136,42 @@ public OperationsClient getOperations() {
return this.operations;
}
+ /** The ImpactedResourcesClient object to access its operations. */
+ private final ImpactedResourcesClient impactedResources;
+
+ /**
+ * Gets the ImpactedResourcesClient object to access its operations.
+ *
+ * @return the ImpactedResourcesClient object.
+ */
+ public ImpactedResourcesClient getImpactedResources() {
+ return this.impactedResources;
+ }
+
+ /** The EventsOperationsClient object to access its operations. */
+ private final EventsOperationsClient eventsOperations;
+
+ /**
+ * Gets the EventsOperationsClient object to access its operations.
+ *
+ * @return the EventsOperationsClient object.
+ */
+ public EventsOperationsClient getEventsOperations() {
+ return this.eventsOperations;
+ }
+
+ /** The EventOperationsClient object to access its operations. */
+ private final EventOperationsClient eventOperations;
+
+ /**
+ * Gets the EventOperationsClient object to access its operations.
+ *
+ * @return the EventOperationsClient object.
+ */
+ public EventOperationsClient getEventOperations() {
+ return this.eventOperations;
+ }
+
/**
* Initializes an instance of MicrosoftResourceHealth client.
*
@@ -144,8 +179,7 @@ public OperationsClient getOperations() {
* @param serializerAdapter The serializer to serialize an object into a string.
* @param defaultPollInterval The default poll interval for long-running operation.
* @param environment The Azure environment.
- * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure subscription. The
- * subscription ID forms part of the URI for every service call.
+ * @param subscriptionId The ID of the target subscription.
* @param endpoint server parameter.
*/
MicrosoftResourceHealthImpl(
@@ -160,9 +194,12 @@ public OperationsClient getOperations() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2020-05-01";
+ this.apiVersion = "2022-10-01-preview";
this.availabilityStatuses = new AvailabilityStatusesClientImpl(this);
this.operations = new OperationsClientImpl(this);
+ this.impactedResources = new ImpactedResourcesClientImpl(this);
+ this.eventsOperations = new EventsOperationsClientImpl(this);
+ this.eventOperations = new EventOperationsClientImpl(this);
}
/**
@@ -181,10 +218,7 @@ public Context getContext() {
* @return the merged context.
*/
public Context mergeContext(Context context) {
- for (Map.Entry